/** * (non-Javadoc) * * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, * org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse) */ public ActionForward executeme( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { errors.clear(); errors.add("header", new ActionError("errors.header")); errors.add("footer", new ActionError("errors.footer")); HttpSession hs = request.getSession(); String uname = (String) hs.getAttribute("userid"); // TODO 临时用来监测用 long l_begin, l_end; l_begin = System.currentTimeMillis(); commsearch.util.CommDate cdtemp = new commsearch.util.CommDate(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "B", "LYC0000000", 0); if (uname == null) { errors.add("errormessage", new ActionError("NoName")); saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "E", "LYC5555555", l_end - l_begin); return (mapping.findForward("success")); } if (uname.trim().equals("")) { errors.add("errormessage", new ActionError("NoName")); saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "E", "LYC6666666", l_end - l_begin); return (mapping.findForward("success")); } try { PropertyUtils.setSimpleProperty(form, "pagerow", "32"); String temp = (String) request.getParameter("selectwhere"); String stemp = temp; if (stemp == null) stemp = ""; if (stemp.equals("")) { // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "E", "LYC3333333", l_end - l_begin); return (mapping.findForward("err")); } // temp=CommonTools.stringReplace(temp,"'","'"); DataBean dbBean = new DataBean(); String ss = ""; if (temp.indexOf("EIVIVN") != -1) { try { dbBean.executeSelect("select eivstr,eivnum,eivtyp from eivdtl where " + temp); } catch (Exception e) { errors.add("errormessage", new ActionError("Datebase.readdb")); saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "C", "LYC9999991", l_end - l_begin); return (mapping.findForward("success")); } for (int i = 0; i < dbBean.getRowCount(); i++) { ss = ss + "OR (EIPSTR='" + dbBean.getElementValue(i, "eivstr").trim() + "' AND "; ss = ss + " EIPNUM='" + dbBean.getElementValue(i, "eivnum").trim() + "' AND "; ss = ss + " EIPTYP='" + dbBean.getElementValue(i, "eivtyp").trim() + "')"; } ss = ss.substring(2); temp = ss; } PropertyUtils.setSimpleProperty(form, "selectwhere", temp); if (setFormbeen(form, request, temp, uname).equals("0")) { saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "E", "LYC8888881", l_end - l_begin); return (mapping.findForward("success")); } log.debug("成功刷新页面"); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "E", "LYC8888882", l_end - l_begin); return (mapping.findForward("success")); } catch (Exception e) { e.printStackTrace(); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "PrintEipdtl", "C", "LYC9999999", l_end - l_begin); errors.add("errormessage", new ActionError("OrderIn.formbean")); saveErrors(request, errors); return (mapping.findForward("success")); } }
/** * (non-Javadoc) * * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, * org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse) */ public ActionForward executeme( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { errors.clear(); errors.add("header", new ActionError("errors.header")); errors.add("footer", new ActionError("errors.footer")); HttpSession hs = request.getSession(); String uname = (String) hs.getAttribute("userid"); // TODO 临时用来监测用 long l_begin, l_end; l_begin = System.currentTimeMillis(); commsearch.util.CommDate cdtemp = new commsearch.util.CommDate(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "B", "LYC0000000", 0); if (uname == null) { errors.add("errormessage", new ActionError("NoName")); saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "E", "LYC5555555", l_end - l_begin); return (mapping.findForward("success")); } if (uname.trim().equals("")) { errors.add("errormessage", new ActionError("NoName")); saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "E", "LYC6666666", l_end - l_begin); return (mapping.findForward("success")); } try { PropertyUtils.setSimpleProperty(form, "message", "0"); Date now = new Date(); PropertyUtils.setSimpleProperty( form, "nowdate", com.idn.util.FormatDate.format(now, "yyyy-MM-dd")); String temp = request.getParameter("eponum"); String queryid = request.getParameter("queryid"); String selectwhere = request.getParameter("selectwhere"); if (selectwhere == null) { queryid = (String) PropertyUtils.getSimpleProperty(form, "queryid"); selectwhere = (String) PropertyUtils.getSimpleProperty(form, "selectwhere"); } String stemp = selectwhere; if (stemp == null) stemp = ""; if (stemp.equals("")) { // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "E", "LYC3333333", l_end - l_begin); return (mapping.findForward("err")); } PropertyUtils.setSimpleProperty(form, "queryid", queryid); PropertyUtils.setSimpleProperty(form, "selectwhere", selectwhere); String flag = ((String) PropertyUtils.getSimpleProperty(form, "flag")).trim(); if (flag.equals("")) { setFormbeen(form, request, selectwhere, uname); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "E", "LYC8888881", l_end - l_begin); return (mapping.findForward("success")); } String epoflg = (String) PropertyUtils.getSimpleProperty(form, "epoflg"); String freeformstate = (String) PropertyUtils.getSimpleProperty(form, "freeformstate"); String eponum = (String) PropertyUtils.getSimpleProperty(form, "eponum"); String epostr = (String) PropertyUtils.getSimpleProperty(form, "epostr"); String epostn = (String) PropertyUtils.getSimpleProperty(form, "epostn"); String eposdt = (String) PropertyUtils.getSimpleProperty(form, "eposdt"); String epordt = (String) PropertyUtils.getSimpleProperty(form, "epordt"); eposdt = CommonTools.stringReplace(eposdt, "-", "").trim(); eposdt = eposdt.substring(2); epordt = CommonTools.stringReplace(epordt, "-", "").trim(); epordt = epordt.substring(2); String epordtm = (String) PropertyUtils.getSimpleProperty(form, "epordtmshow"); String epordtm2 = (String) PropertyUtils.getSimpleProperty(form, "epordtm2show"); String operator = (String) PropertyUtils.getSimpleProperty(form, "operatorid"); String operdate = (String) PropertyUtils.getSimpleProperty(form, "operdate"); String opertime = (String) PropertyUtils.getSimpleProperty(form, "opertime"); // SQLBean sis=new SQLBean(); DataBean dbBean = new DataBean(); String strsql1 = "select * from ORDERR where " + selectwhere + ""; try { dbBean.executeSelect(strsql1); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Datebase.readdb")); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "E", "LYC8888882", l_end - l_begin); return (mapping.findForward("success")); } String strsql[] = new String[1]; if (dbBean.getRowCount() == 0) { strsql[0] = "insert into ORDERR (eponum,epostr,epostn,eposdt,epordt,epordtm,epoflg,operator,operdate,opertime,epordtm2) values('" + eponum + "' ,'" + epostr + "' ,'" + epostn + "','" + eposdt + "','" + epordt + "','" + epordtm + "','0','" + operator + "','" + operdate + "','" + opertime + "','" + epordtm2 + "')"; // 第一次进入并且orderr中不存在记录 // int retrunint1=sis.executeSQL(strsql); // 写日志(XIAOAI处理) commsearch.util.CommActionLog cal = new commsearch.util.CommActionLog(); cal.setAct_user(uname); cal.setAct_from("homeworldReturnOrder"); cal.setAct_do("INS"); cal.setAct_key(temp); cal.setAct_table("ORDERR"); cal.setAct_ip(request.getRemoteAddr()); cal.setAct_memo("回复插入定单编号为" + temp); cal.setAct_me(""); cal.setActionLog(); } else { operator = uname; operdate = com.idn.util.FormatDate.format(now, "yyMMdd"); opertime = com.idn.util.FormatDate.format(now, "hh:mm:ss"); strsql[0] = "update ORDERR set epotrf='', epordt='" + epordt + "',epordtm='" + epordtm + "',epordtm2='" + epordtm2 + "', operdate='" + operdate + "',opertime='" + opertime + "',operator='" + operator + "' where eponum='" + eponum + "'"; // int returnint=sis.executeSQL(strsql); // 写日志(XIAOAI处理) commsearch.util.CommActionLog cal = new commsearch.util.CommActionLog(); cal.setAct_user(uname); cal.setAct_from("homeworldReturnOrder"); cal.setAct_do("UPD"); cal.setAct_key(temp); cal.setAct_table("ORDERR"); cal.setAct_ip(request.getRemoteAddr()); cal.setAct_memo("回复修改定单编号为" + temp); cal.setAct_me(""); cal.setActionLog(); } DynaSqlBean dybBean = new DynaSqlBean(); dybBean.setSql(strsql); dybBean.executeBatch(); // setFormbeen(form,request,selectwhere,uname); PropertyUtils.setSimpleProperty(form, "freeformstate", "0"); PropertyUtils.setSimpleProperty(form, "message", "1"); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "E", "LYC8888888", l_end - l_begin); return (mapping.findForward("success")); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Database.formbean")); saveErrors(request, errors); // TODO 临时用来监测用 l_end = System.currentTimeMillis(); commsearch.util.CommActionLog.setTempLog( Long.parseLong(cdtemp.getNow(cdtemp.FORMAT_ALL_NOSIGN)), uname, hs.getId(), "ReturnOrder", "C", "LYC9999999", l_end - l_begin); return (mapping.findForward("success")); } }
/** * 将指定类代码内容传入显示FormBeen(小表格) * * @param ActionForm 显示FormBeen * @param String 工资卡号 * @return String 1、成功;0、不成功; * @exception Exception */ public String setFormbeen(ActionForm form, HttpServletRequest request, String where, String uname) throws Exception { CommDate cd = new CommDate(); DataBean dbBean = new DataBean(); String strsql = ""; int maxpage = 0; int count = 0; strsql = "SELECT * FROM eipdtl LEFT OUTER JOIN eivdtl ON (eipstr = eivstr and eipnum=eivnum and eiptyp=eivtyp ) where eipflg='2' and eipvdr='" + uname + "' order by EIPSTR,EIPNUM,EIPTYP"; try { dbBean.executeSelect(strsql); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Datebase.readdb")); return "0"; } log.debug("执行sql语句"); String temp = ""; String[] db = new String[dbBean.getRowCount()]; for (int j = 0; j < dbBean.getRowCount(); j++) { temp = dbBean.getElementValue(j, "EIPSTR").trim(); temp = temp + dbBean.getElementValue(j, "EIPNUM").trim(); temp = temp + dbBean.getElementValue(j, "EIPTYP").trim(); db[j] = temp; } String[] row = getArray(where, db); // count=dbBean.getRowCount(); count = row.length; // count=dbBean.getRowCount(); int pagerow = Integer.parseInt((String) PropertyUtils.getSimpleProperty(form, "pagerow")); // 计算分页显示的最大页数 log.debug("数组大小" + String.valueOf(count + maxpage)); String[] seq = new String[count + maxpage]; // 序号 String[] eipstr = new String[count + maxpage]; // 商店号 String[] eipnum = new String[count + maxpage]; // 单号 String[] eipamt = new String[count + maxpage]; // 金额 String[] eipdta = new String[count + maxpage]; // 交易日期 String[] eiptyp = new String[count + maxpage]; // 交易类型 String[] eipvdr = new String[count + maxpage]; // 供货商号 String[] eipyta = new String[count + maxpage]; // 应付日期 String[] eipflg = new String[count + maxpage]; // 标志 String[] eivtrk = new String[count + maxpage]; // 发票字轨 String[] eivivn = new String[count + maxpage]; // 发票号 String[] eivamt = new String[count + maxpage]; // 开票日期 String[] eivtax = new String[count + maxpage]; // 应付日期 int i = 0; int j = 0; String key = ""; for (; i < count + maxpage; i++) { log.debug("数组循环" + String.valueOf(i)); j = Integer.parseInt(row[i]); // if((i==jk*pagerow-1)||(i==count+maxpage-1)){ // if(!( tempstr.equals(dbBean.getElementValue(j,"eipstr" ).trim()) && // tempnum.equals(dbBean.getElementValue(j,"eipnum" ).trim()) && // temptyp.equals(dbBean.getElementValue(j,"eiptyp" ).trim()))){ // seq[i]=""; // eipstr[i]=""; // eipnum[i]=""; // eipamt[i]=""; // eipdta[i]=""; // eiptyp[i]=""; // eipvdr[i]=""; // eipyta[i]=""; // eipflg[i]=""; // // eivtrk[i]=""; // eivivn[i]=""; // eivamt[i]=""; // eivtax[i]=""; // // tempstr=dbBean.getElementValue(j,"eipstr" ).trim(); // tempnum=dbBean.getElementValue(j,"eipnum" ).trim(); // temptyp=dbBean.getElementValue(j,"eiptyp" ).trim(); // // i++; // if(i >=count+maxpage){ // break; // } // } seq[i] = String.valueOf(i + 1); eipstr[i] = dbBean.getElementValue(j, "eipstr").trim(); eipnum[i] = dbBean.getElementValue(j, "eipnum").trim(); eipamt[i] = DecimalTools.format(dbBean.getElementValue(j, "eipamt").trim(), "###,##0.00"); eipdta[i] = cd.dateFormat(dbBean.getElementValue(j, "eipdta").trim(), "L"); eiptyp[i] = dbBean.getElementValue(j, "eiptyp").trim(); if (!eiptyp[i].equals("")) eiptyp[i] = CodesManager.getCodeValue("20", eiptyp[i]); eipvdr[i] = dbBean.getElementValue(j, "eipvdr").trim(); eipyta[i] = cd.dateFormat(dbBean.getElementValue(j, "eipyta").trim(), "L"); eipflg[i] = dbBean.getElementValue(j, "eipflg").trim(); eivtrk[i] = dbBean.getElementValue(j, "eivtrk").trim(); eivivn[i] = dbBean.getElementValue(j, "eivivn").trim(); eivtax[i] = dbBean.getElementValue(j, "eivtax").trim(); key = dbBean.getElementValue(j, "eivser").trim(); if (!dbBean.getElementValue(j, "eivamt").trim().equals("")) eivamt[i] = DecimalTools.format(dbBean.getElementValue(j, "eivamt").trim(), "###,##0.00"); } log.debug("填充数组"); PropertyUtils.setSimpleProperty(form, "seq", seq); PropertyUtils.setSimpleProperty(form, "eipstr", eipstr); PropertyUtils.setSimpleProperty(form, "eipnum", eipnum); PropertyUtils.setSimpleProperty(form, "eipamt", eipamt); PropertyUtils.setSimpleProperty(form, "eipdta", eipdta); PropertyUtils.setSimpleProperty(form, "eiptyp", eiptyp); PropertyUtils.setSimpleProperty(form, "eipvdr", eipvdr); PropertyUtils.setSimpleProperty(form, "eipyta", eipyta); PropertyUtils.setSimpleProperty(form, "eivtrk", eivtrk); PropertyUtils.setSimpleProperty(form, "eivivn", eivivn); PropertyUtils.setSimpleProperty(form, "eivamt", eivamt); PropertyUtils.setSimpleProperty(form, "eivtax", eivtax); strsql = "SELECT distinct eivser FROM eipdtl LEFT OUTER JOIN ( select eivstr,eivnum,eivtyp,eivdtl2.eivtrk,eivdtl2.eivivn,eivseq,eivdtl2.eivamt,eivdtl2.eivtax,eivdtl2.eivser,eivdtl2.eivdat from eivdtl,eivdtl2 where eivdtl.eivser=eivdtl2.eivser) as a ON (eipstr = eivstr and eipnum=eivnum and eiptyp=eivtyp) where eipflg='2' and eivser='" + key + "' and eipvdr='" + uname + "' "; try { dbBean.executeSelect(strsql); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Datebase.readdb")); return "0"; } maxpage = dbBean.getRowCount(); strsql = "SELECT distinct eivtrk,eivivn,eivseq,eivamt,eivtax,eivser,a.eivdat FROM eipdtl LEFT OUTER JOIN ( select eivstr,eivnum,eivtyp,eivdtl2.eivtrk,eivdtl2.eivivn,eivseq,eivdtl2.eivamt,eivdtl2.eivtax,eivdtl2.eivser ,eivdtl2.eivdat from eivdtl,eivdtl2 where eivdtl.eivser=eivdtl2.eivser) as a ON (eipstr = eivstr and eipnum=eivnum and eiptyp=eivtyp) where eipflg='2' and eivser='" + key + "' and eipvdr='" + uname + "' order by eivser,eivseq"; try { dbBean.executeSelect(strsql); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Datebase.readdb")); return "0"; } count = dbBean.getRowCount(); String[] seqmx = new String[count + maxpage]; // 应付日期 String[] eivtrkmx = new String[count + maxpage]; // 发票字轨 String[] eivivnmx = new String[count + maxpage]; // 发票号 String[] eivamtmx = new String[count + maxpage]; // 开票日期 String[] eivtaxmx = new String[count + maxpage]; // 应付日期 String[] eivdat = new String[count + maxpage]; // 应付日期 String tempser = dbBean.getElementValue(0, "eivser").trim(); j = 0; i = 0; int k = 0; for (; i < count + maxpage; i++) { log.debug("数组循环" + String.valueOf(i)); if (!(tempser.equals(dbBean.getElementValue(j, "eivser").trim()))) { seqmx[i] = ""; eivtrkmx[i] = ""; eivivnmx[i] = ""; eivamtmx[i] = ""; eivtaxmx[i] = ""; eivdat[i] = ""; tempser = dbBean.getElementValue(j, "eivser").trim(); i++; if (i >= count + maxpage) { break; } k = 0; } seqmx[i] = String.valueOf(k + 1); eivtrkmx[i] = dbBean.getElementValue(j, "eivtrk").trim(); eivivnmx[i] = dbBean.getElementValue(j, "eivivn").trim(); if (!dbBean.getElementValue(j, "eivamt").trim().equals("")) eivamtmx[i] = DecimalTools.format(dbBean.getElementValue(j, "eivamt").trim(), "###,##0.00"); eivtaxmx[i] = dbBean.getElementValue(j, "eivtax").trim(); eivdat[i] = cd.dateFormat(dbBean.getElementValue(j, "eivdat").trim(), "L"); j++; k++; } PropertyUtils.setSimpleProperty(form, "seqmx", seqmx); PropertyUtils.setSimpleProperty(form, "eivtrkmx", eivtrkmx); PropertyUtils.setSimpleProperty(form, "eivivnmx", eivivnmx); PropertyUtils.setSimpleProperty(form, "eivamtmx", eivamtmx); PropertyUtils.setSimpleProperty(form, "eivtaxmx", eivtaxmx); PropertyUtils.setSimpleProperty(form, "eivdat", eivdat); log.debug("填充formbeen"); return "1"; }
/** * 将指定类代码内容传入显示FormBeen(小表格) * * @param ActionForm 显示FormBeen * @param String 工资卡号 * @return String 1、成功;0、不成功; * @exception Exception */ public String setFormbeen(ActionForm form, HttpServletRequest request, String where, String uname) throws Exception { CommDate cd = new CommDate(); DataBean dbBean = new DataBean(); String strsql = "select * from EPOHDR where " + where + " and epovnd='" + uname + "'"; try { dbBean.executeSelect(strsql); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Datebase.readdb")); return "0"; } String eponum = dbBean.getElementValue(0, "eponum").trim(); String epostr = dbBean.getElementValue(0, "epostr").trim(); String epostn = dbBean.getElementValue(0, "epostn").trim(); String eposdt = cd.dateFormat(dbBean.getElementValue(0, "eposdt").trim(), "L"); String epoqdt = cd.dateFormat(dbBean.getElementValue(0, "epoqdt").trim(), "L"); PropertyUtils.setSimpleProperty(form, "epoqdt", epoqdt); PropertyUtils.setSimpleProperty(form, "eponum", eponum); PropertyUtils.setSimpleProperty(form, "epostr", epostr); PropertyUtils.setSimpleProperty(form, "epostn", epostn); PropertyUtils.setSimpleProperty(form, "eposdt", eposdt); String strsql1 = "select * from ORDERR where " + where + " and operator='" + uname + "'"; try { dbBean.executeSelect(strsql1); } catch (Exception e) { e.printStackTrace(); errors.add("errormessage", new ActionError("Datebase.readdb")); } int count = dbBean.getRowCount(); String epordt = cd.dateFormat(dbBean.getElementValue(0, "epordt").trim(), "L"); String epordtm = dbBean.getElementValue(0, "epordtm").trim(); String epordtm2 = dbBean.getElementValue(0, "epordtm2").trim(); String epoflg = dbBean.getElementValue(0, "epoflg").trim(); String operator = dbBean.getElementValue(0, "operator").trim(); String operdate = dbBean.getElementValue(0, "operdate").trim(); String opertime = dbBean.getElementValue(0, "opertime").trim(); Date now = new Date(); String freeformstate = "0"; if (count == 0) { epoflg = "0"; operator = uname; operdate = com.idn.util.FormatDate.format(now, "yyyy-MM-dd"); opertime = com.idn.util.FormatDate.format(now, "hh:mm:ss"); freeformstate = "3"; } PropertyUtils.setSimpleProperty(form, "freeformstate", freeformstate); PropertyUtils.setSimpleProperty(form, "epordt", epordt); PropertyUtils.setSimpleProperty(form, "epordtmshow", epordtm); PropertyUtils.setSimpleProperty(form, "epordtm2show", epordtm2); PropertyUtils.setSimpleProperty(form, "epoflg", epoflg); PropertyUtils.setSimpleProperty(form, "operatorid", operator); PropertyUtils.setSimpleProperty(form, "operatorshow", operator); // PropertyUtils.setSimpleProperty(form, "operatorshow" ,getNamec(operator)); PropertyUtils.setSimpleProperty(form, "operdate", operdate); PropertyUtils.setSimpleProperty(form, "opertime", opertime); return "1"; }