From 6b76dc607508cbae897b73313dcff4026b0ac4c1 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Fri, 21 Apr 2023 14:11:28 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=82=AE=E5=AF=84=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E6=B5=81=E7=A8=8B=E5=8E=86=E5=8F=B2=E8=B5=84?= =?UTF-8?q?=E6=96=99=E6=B8=85=E5=8D=95=E7=BC=BA=E5=B0=91=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/ample/icms/util/GetInfoUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java index 1f993871b..0b51caee7 100644 --- a/src/com/ample/icms/util/GetInfoUtil.java +++ b/src/com/ample/icms/util/GetInfoUtil.java @@ -143,6 +143,7 @@ public class GetInfoUtil { String appCode = null; String appName = null; JSONArray ja = new JSONArray(); + rs.beforeFirst(); while (rs.next()) { appCode = rs.getString("app_code"); appName = rs.getString("app_name"); From c368a71270bbdfa53d909145a27846ca7cf7a370 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Thu, 25 May 2023 09:29:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E8=B5=84=E6=96=99?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E6=A0=A1=E9=AA=8C=E9=87=87=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1=E6=A0=A1=E9=AA=8C=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commcheck/IcmsDocListCheckAll.java | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckAll.java diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckAll.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckAll.java new file mode 100644 index 000000000..4e6ed7f84 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckAll.java @@ -0,0 +1,99 @@ +package com.tenwa.lease.flow.project.commcheck; + +import com.amarsoft.app.alarm.AlarmBiz; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.query.ImageCount; +import com.ample.icms.util.GetInfoUtil; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; +import org.dom4j.Node; + +import java.util.Iterator; +import java.util.List; + +/** + * 资料清单检查 + * @author 20170524 + * + */ +public class IcmsDocListCheckAll extends AlarmBiz { + @Override + public Object run(Transaction Sqlca) throws Exception { + String responseCode = ""; + String responseMsg = "资料未初始化,请联系IT管理员!"; + String flowUnid = this.getAttribute("ObjectNo").toString(); + GetInfoUtil gif = new GetInfoUtil(); + String projectNo = gif.getProjectNoByFlowUnid(flowUnid); + if (projectNo == null) { + setPass(false); + putMsg("未找到匹配的项目编号,请联系IT管理员!"); + return null; + } + String app = gif.getAppInfoByFlowUnid(flowUnid); + String[] appInfo = app.split("@"); + String appCode = appInfo[0]; + String appName = appInfo[1]; + if ("0000".equals(appCode)) { + setPass(false); + putMsg(appName); + return null; + } + ImageCount ic = new ImageCount(); + ic.setAppCode(appCode); + ic.setAppName(appName); + ic.setBusiNo(projectNo); + String result = ic.getResult(); + //校验链接是否成功 + if ("0000".equals(result)) { + setPass(false); + putMsg("连接影像系统失败,请及时联系IT管理员!"); + return null; + } + Document dom = DocumentHelper.parseText(result); + Element root = dom.getRootElement(); + responseCode = root.element("RESPONSE_CODE").getTextTrim(); + //校验返回结果 + if ("400".equals(responseCode)) { + setPass(false); + responseMsg = root.element("RESPONSE_MSG").getTextTrim(); + putMsg(responseMsg); + return null; + } + //校验总个数 + String sumImgs = root.element("RETURN_DATA").element("SUM_IMGS").getTextTrim(); + if ("0".equals(sumImgs)) { + setPass(false); + responseMsg = root.element("RESPONSE_MSG").getTextTrim(); + putMsg(responseMsg); + return null; + } + List nodes = root.element("ATREE_ALL").elements("NODE"); + for (Iterator it = nodes.iterator(); it.hasNext(); ) { + Element elm = (Element) it.next(); + String isMust = elm.element("IS_MUST").getTextTrim(); + String docName = elm.element("DOC_NAME").getTextTrim(); + if ("0".equals(isMust)) { + continue; + } + String docCode = elm.element("DOC_CODE").getTextTrim(); + Node node = root.element("RETURN_DATA").element("NODES").selectSingleNode("//NODE/NODE_ID[text()='" + docCode + "']"); + if (node == null) { + setPass(false); + putMsg( docName + ":未上传"); + return null; + } + Element test = node.getParent(); + String imgNum = test.elementText("IMG_NUM"); + if (Integer.parseInt(imgNum)<=0) { + setPass(false); + putMsg(docName + ":未上传"); + return null; + } + } + + setPass(true); + putMsg("资料已按规则上传完成"); + return null; + } +} From 16c0521d084b8470099a779a200c7a92fb550d59 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Thu, 25 May 2023 09:30:45 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=94=BE=E6=AC=BE=E5=9B=9E=E6=AC=BE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quartzmession/InsertReportFlowCount.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src_tenwa/com/tenwa/lease/app/quartzmession/InsertReportFlowCount.java diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/InsertReportFlowCount.java b/src_tenwa/com/tenwa/lease/app/quartzmession/InsertReportFlowCount.java new file mode 100644 index 000000000..f191ba3ab --- /dev/null +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/InsertReportFlowCount.java @@ -0,0 +1,62 @@ +package com.tenwa.lease.app.quartzmession; + + +import com.amarsoft.are.ARE; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.log.Log; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.base.util.QuartzUtil; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +public class InsertReportFlowCount implements Job{ + + @Override + public void execute(JobExecutionContext arg0) throws JobExecutionException { + JBOTransaction tx=null; + Transaction Sqlca=null; + String startime =StringFunction.getTodayNow(); + startime = startime.substring(0, 10); + + Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); + String curUserId = userId == null? "system" : userId.toString(); + + try { + tx= JBOFactory.createJBOTransaction(); + Sqlca=Transaction.createTransaction(tx); + + String sql="{CALL insert_flow_report()};"; + SqlObject asql = new SqlObject(sql); + Sqlca.executeSQL(asql); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "成功", curUserId); + } catch (Exception e) { + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "失败", curUserId); + logger.error(e.getMessage()); + e.printStackTrace(); + if(Sqlca!=null){ + try { + Sqlca.rollback(); + Sqlca = null; + } catch (JBOException e1) { + e1.printStackTrace(); + } + } + }finally{ + if(Sqlca!=null){ + try { + Sqlca.commit(); + Sqlca.disConnect(); + Sqlca = null; + } catch (JBOException e) { + e.printStackTrace(); + } + } + } + } + private static Log logger=ARE.getLog(); +} From 68a1a0a26f5002abdc3d7a28eaad64409ccc2aff Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Thu, 25 May 2023 09:34:40 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E5=90=88=E5=90=8C=E6=96=87=E4=BB=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/ample/icms/service/ImageUploadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/ample/icms/service/ImageUploadService.java b/src/com/ample/icms/service/ImageUploadService.java index e8ed7891b..ef2ae2d17 100644 --- a/src/com/ample/icms/service/ImageUploadService.java +++ b/src/com/ample/icms/service/ImageUploadService.java @@ -139,7 +139,7 @@ public class ImageUploadService { throw new Exception(responseMsg); } - if(root.toString().contains("APZLJJ000080")){ + if(countResult.contains("APZLJJ000080")){ return true; } //todo From be5944da6d3e37bcb94c61de5255d679656ea3e5 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Thu, 25 May 2023 09:41:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=90=88=E5=90=8C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0=E5=BD=B1=E5=83=8F=E8=B5=84?= =?UTF-8?q?=E6=96=99=E6=B8=85=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contractInfoAllViewList.jsp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp index f456c570b..b7d5c881c 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp @@ -81,6 +81,7 @@ String sButtons[][] =new String[][] { {"true","","Button","流程信息","流程信息","viewAllFlow()","","","","btn_icon_detail",""}, {"true","","Button","附件信息","附件信息","viewAllFlowAttachment()","","","","btn_icon_detail",""}, + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, {"true","","Button","合同信息","合同信息","viewContractInfo()","","","","btn_icon_detail",""} }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> @@ -126,5 +127,25 @@ function viewContractInfo(){ var sparm='ContractId='+sPara+"&ProjectId="+getItemValue(0,getRow(0),'project_id')+"&ShowType="+ShowType+"&RightType=ReadOnly&IsHistory=false"+"&contract_no="+contract_no+"&productId="+productId+"&FlowUnid="+FlowUnid; AsControl.OpenTab(sUrl,sparm,{title:'合同基本信息【'+ getItemValue(0,getRow(0),'contract_no')+'】'}); } +function openFileList(){ + let proj_id=getItemValue(0,getRow(0),'project_id'); + openFileListByProjectId(proj_id); +} +function openFileListByProjectId(proj_id){ + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); + let params = getRequestParam(proj_id); + if(params=='error'){ + alert('未找到对应的影像配置,请联系管理员'); + return; + } + if(params!=null){ + AsControl.postICMS(url,params); + } +} +function getRequestParam(proj_id){ + let code = 'ECM0002'; + let param = RunJavaMethodTrans("com.ample.icms.service.ImageQueryService","getRequestParamByProjectIdJMT","projectId="+proj_id+",code="+code); + return param; +} <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file