From c60b41a154ce24c16e25f99f3adfb760812757cb Mon Sep 17 00:00:00 2001 From: ap007 Date: Mon, 1 Nov 2021 15:59:58 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessApplication/CustomerInfo.jsp | 4 +- WebContent/WEB-INF/etc/jbo/jbo_oti.xml | 29 ++++ .../serviceImp/FundIncomeVoucherJJCCB.java | 76 +++++++++ .../quartzmession/CorpusSourceFileCopy.java | 10 +- .../CorpusSourceRentPlanCopy.java | 1 + .../CorpusSourceRentPlanJJCCB.java | 146 ++++++++++++++++++ .../CorpusSourceRentResultCopy.java | 1 + 7 files changed, 265 insertions(+), 2 deletions(-) create mode 100644 src_core/com/tenwa/voucher/serviceImp/FundIncomeVoucherJJCCB.java create mode 100644 src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanJJCCB.java diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index 271182133..8f431cd14 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -755,10 +755,12 @@ } function setIdexpiry(){ + var curDate = new Date(); + ; var date = document.getElementById("IDEXPIRY"); var dateValue = ""; dateValue = date.value; - AsDialog.OpenCalender(date,"yyyy/MM/dd","1900/01/01","2100/12/31",function(dateValue){ + AsDialog.OpenCalender(date,"yyyy/MM/dd",curDate.toLocaleDateString(),"2099/12/31",function(dateValue){ var myNewValue = "",myValue=""; myValue = this.dayValue; if(typeof(myValue)!="undefined" && myValue!="undefined"){ diff --git a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml index bc2262c33..1c4a634a6 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml @@ -410,6 +410,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src_core/com/tenwa/voucher/serviceImp/FundIncomeVoucherJJCCB.java b/src_core/com/tenwa/voucher/serviceImp/FundIncomeVoucherJJCCB.java new file mode 100644 index 000000000..be5914660 --- /dev/null +++ b/src_core/com/tenwa/voucher/serviceImp/FundIncomeVoucherJJCCB.java @@ -0,0 +1,76 @@ +package com.tenwa.voucher.serviceImp; + +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.dict.als.cache.CacheLoaderFactory; + +import java.util.Map; + +public class FundIncomeVoucherJJCCB extends FundIncomeVoucherInfoServiceImpl { + @Override + public void run() { + Transaction Sqlca =null; + try { + Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); + //todo 头上线将生产环境的编号放进来 + setVoucherConfigNo("PZ2021101200000035"); + setCorpusChannelNo("JJCCB"); + generateVoucher(Sqlca); + } catch (JBOException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + }finally { + try { + if(Sqlca!=null){ + Sqlca.disConnect(); + Sqlca = null; + } + } catch (JBOException e) { + e.printStackTrace(); + try { + Sqlca.rollback(); + } catch (JBOException jboException) { + jboException.printStackTrace(); + } + } + } + } + + /** + * 每条凭证各自差异数据放到参数List + * @param param + * @throws Exception + */ + @Override + public void addRespectiveParam(Map param) throws Exception { + String money = ""; + //100202为九江银行 + if("100202".equals(param.get("subjectsCode"))){ + money=param.get("TRANS_AMT"); + param.put("contractNo",""); + param.put("customerNo",""); + param.put("customerName",""); + //应财务要求九江银行填固定值(一般编码为银行的,都是11213,分内部外部) + param.put("cashFlow","11213"); + } + //长期应收款\回租\汽车\本金 + if("1531020101".equals(param.get("subjectsCode"))){ + money=param.get("TRANS_AMT"); + } + //未实现融资收益\回租\汽车 或 长期应收款\回租\汽车\利息 + if("15320201".equals(param.get("subjectsCode"))||"1531020102".equals(param.get("subjectsCode"))){ + money=this.getInterestTotalByContractId(param.get("contractId")); + } + //debit:借;credit:贷 + if("1".equals(param.get("entrydc"))) { + param.put("debitMoney",money); + param.put("creditMoney","0.00"); + }else{ + param.put("debitMoney","0.00"); + param.put("creditMoney",money); + } + } + + +} diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java index 462c89472..38b72582b 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java @@ -36,12 +36,13 @@ public class CorpusSourceFileCopy { private String contractId; private String fileType; + private String channelNo; public void doCopy(JBOTransaction tx) throws Exception { BizObjectManager ffpBom = null; ffpBom = JBOFactory.getBizObjectManager(FC_FILE_PUSH.CLASS_NAME,tx); //todo 添加渠道商的选择,哪些需要拷表哪些不需要 - String fileSql = "select ID,FILE_STS from O where FILE_TYPE='"+fileType+"' and FILE_STS='2'"; + String fileSql = "select ID,FILE_STS from O where FILE_TYPE='"+fileType+"' and CHANNEL_NO ='"+channelNo+"' and FILE_STS='2'"; List ffpBoList = ffpBom.createQuery(fileSql).getResultList(true); if(ffpBoList.size()==0){ ARE.getLog().info("暂时没有需要拷表的资方文件"); @@ -685,5 +686,12 @@ public class CorpusSourceFileCopy { public String getFileType() { return fileType; } public void setFileType(String fileType) { this.fileType = fileType; } + public String getChannelNo() { + return channelNo; + } + + public void setChannelNo(String channelNo) { + this.channelNo = channelNo; + } } diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanCopy.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanCopy.java index 141fd9660..e7ed71048 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanCopy.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanCopy.java @@ -28,6 +28,7 @@ public class CorpusSourceRentPlanCopy extends CorpusSourceFileCopy implements Jo try { tx = JBOFactory.createJBOTransaction(); setFileType("RepayPlan"); + setChannelNo("PSBC"); doCopy(tx); tx.commit(); QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "success", "成功", curUserId); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanJJCCB.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanJJCCB.java new file mode 100644 index 000000000..bd77ce110 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentPlanJJCCB.java @@ -0,0 +1,146 @@ +package com.tenwa.lease.app.quartzmession; + +import com.amarsoft.are.ARE; +import com.amarsoft.are.jbo.*; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.Transaction; +import com.base.util.QuartzUtil; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.oti.FC_FILE_PUSH; +import jbo.oti.FC_YC_FILE_REPAY_PLAN; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 资方租金计划拷贝 + */ +public class CorpusSourceRentPlanJJCCB extends CorpusSourceFileCopy implements Job { + private String fileType; + private String channelNo; + public String getFileType() { return fileType; } + + public void setFileType(String fileType) { this.fileType = fileType; } + public String getChannelNo() { + return channelNo; + } + + public void setChannelNo(String channelNo) { + this.channelNo = channelNo; + } + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + String startime = StringFunction.getTodayNow(); + Object userId = jobExecutionContext.getTrigger().getJobDataMap().get("CurUserId"); + String curUserId = userId == null? "system" : userId.toString(); + + JBOTransaction tx = null; + try { + tx = JBOFactory.createJBOTransaction(); + setFileType("RepayPlan"); + setChannelNo("JJCCB"); + this.doCopy(tx); + tx.commit(); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "success", "成功", curUserId); + } catch (Exception e) { + e.printStackTrace(); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "error", "失败", curUserId); + try { + if (tx != null) { + tx.rollback(); + } + } catch (JBOException e1) { + e1.printStackTrace(); + } + throw new JobExecutionException(e); + } + } + /** + * 执行自己类所需的操作 + * @param fyfrpBoList + * @param tx + * @throws Exception + */ + public void respectiveDo(List fyfrpBoList , JBOTransaction tx) throws Exception { + //获取对应的合同 + Map contractMap = getContractIdMap(fyfrpBoList); + if(contractMap.size()==0){ + String fcFileId = fyfrpBoList.get(0).getAttribute("FC_REQUEST_ID").toString(); + ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID"); + throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID"); + } + Transaction Sqlca = Transaction.createTransaction(tx); + //===顺序不能错=== + //0.将租金计划拷贝到历史表 + copyRentPlanFormatToHis(contractMap,"安鹏原正式租金计划",tx); + //1.更新租金计划表(直接文件每条信息更新,不需要遍历) + updateRentPlan(fyfrpBoList,tx); + for(Map.Entry entry : contractMap.entrySet()){ + String contractId = entry.getKey(); + Map param = getParamByContractId(contractId,tx); + //2.更新剩余本金 + updateAllRemainCorpus(contractId,Sqlca); + //3.更新SP分润计划 + updateSplitSP(param,Sqlca); + //4.插入分润计划 + insertProfitPlan(param,tx); + //5.拷贝现金流到历史表 + copyCashFlowFormatToHis(contractId,"安鹏原正式现金流",tx); + //6.生成新的现金流 + createCashFlowByContractId(contractId,Sqlca); + //7.测算IRR + calcIRR(param,tx); + } + + } + + /** + * 根据文件ID获取《租金计划》信息 + * @param fcFileId + * @return + * @throws Exception + */ + public List getFileInfoByFileId(String fcFileId) throws Exception { + String sql = "select fr.CONTRACT_ID,O.FC_REQUEST_ID,O.LEND_TERM,O.ANS_REPAYMENT_DATE,O.ANS_PRINCIPAL,O.ANS_INTEREST,ANS_REPAYMENT_MONEY from O left join jbo.oti.FC_REQUEST fr on O.FC_REQUEST_ID=fr.ID where fr.DEL_FLAG='0' and O.FC_FILE_ID=:fcFileId"; + BizObjectManager fyfrpBom = JBOFactory.getBizObjectManager("FC_JJ_REPAY_PLAN.CLASS_NAME"); + List fyfrpBoList = fyfrpBom.createQuery(sql).setParameter("fcFileId",fcFileId).getResultList(false); + if(fyfrpBoList.size()==0){ + ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划"); + throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划"); + } + return fyfrpBoList; + } + public void updateRentPlan(List fyfrpBoList,JBOTransaction tx) throws JBOException, ParseException { + BizObjectManager lrpBom = null; + lrpBom = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME,tx); + //更新租金计划表 + for(BizObject bo : fyfrpBoList){ + //获取参数 + String contractId = bo.getAttribute("CONTRACT_ID").toString(); + String lendTerm = bo.getAttribute("CURR_TERM").toString(); + String principal = bo.getAttribute("LOAN_TERM_PRIN").toString(); + String interest = bo.getAttribute("LOAN_TERM_INTEREST").toString(); + String rent = bo.getAttribute("LOAN_TERM_FEE").toString(); + String repaymentDate = bo.getAttribute("PMT_DUE_DATE").toString(); + //转换日期格式 + Date date = new SimpleDateFormat("yyyyMMdd").parse(repaymentDate); + repaymentDate = new SimpleDateFormat("yyyy/MM/dd").format(date); + //更新租金计划表 + BizObject lrpBo = lrpBom.createQuery("CONTRACT_ID=:contractId and PLAN_LIST=:lendTerm").setParameter("contractId",contractId).setParameter("lendTerm",lendTerm).getSingleResult(true); + lrpBo.setAttributeValue("RENT",rent); + lrpBo.setAttributeValue("CORPUS",principal); + lrpBo.setAttributeValue("INTEREST",interest); + lrpBo.setAttributeValue("CORPUS_BUSINESS",principal); + lrpBo.setAttributeValue("INTEREST_BUSINESS",interest); + lrpBo.setAttributeValue("PLAN_DATE",repaymentDate); + lrpBom.saveObject(lrpBo); + } + } +} diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentResultCopy.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentResultCopy.java index 0737dcc52..b3a211884 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentResultCopy.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceRentResultCopy.java @@ -31,6 +31,7 @@ public class CorpusSourceRentResultCopy extends CorpusSourceFileCopy implements try { tx = JBOFactory.createJBOTransaction(); setFileType("RepayResult"); + setChannelNo("PSBC"); doCopy(tx); tx.commit(); QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CorpusSourceRentPlanCopy", "success", "成功", curUserId); From 37bdfa617da38c3639be791e7f65e7bc749fee18 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Wed, 16 Feb 2022 14:01:33 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E9=93=B6=E8=81=94=EF=BC=88NUSAGE?= =?UTF-8?q?=EF=BC=89=E5=AD=97=E6=AE=B5=E7=AE=97=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk/controller/CmbToPayController.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java index 41e39d1a6..123e7834b 100644 --- a/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java +++ b/src_cmb/com/tenwa/sdk/controller/CmbToPayController.java @@ -582,22 +582,16 @@ public class CmbToPayController extends BaseFlowStartAction { for(int i = 0; i < c.length; i ++){ //二进制超过8位则为汉字 String len = Integer.toBinaryString(c[i]); - if(ChineseFlag){ - if(len.length() > 8){ - count=count+2; + if(len.length() > 8){ + if(!ChineseFlag){ + count=count+4; ChineseFlag = true; }else{ - count ++; - ChineseFlag = false; + count=count+2; } }else{ - if(len.length() > 8){ - count=count+2+2; - ChineseFlag = true; - }else{ - count ++; - ChineseFlag = false; - } + count ++; + ChineseFlag = false; } if(count==length){ str = str.substring(0,i+1); From 160337529389c71960fbf64a6e31ac33d894334f Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Fri, 18 Feb 2022 18:10:59 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E7=BB=8F=E7=90=86=E8=A7=92=E8=89=B2=E7=94=A8=E4=BA=8E=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E7=BB=8F=E9=94=80=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributorRegister/CLMSDistributorList.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp b/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp index 2987ce6ec..f6276559a 100644 --- a/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp +++ b/WebContent/Tenwa/ChannelPortal/DistributorManage/DistributorRegister/CLMSDistributorList.jsp @@ -17,7 +17,7 @@ dwTemp.ReadOnly = "1"; //只读模式 dwTemp.setPageSize(20); dwTemp.genHTMLObjectWindow(""); - boolean flag = CurUser.hasRole("800R00000070");// 2021/02/26 作废(汽车业务部总监)角色改用(汽车业务部前台副总监) + boolean flag = CurUser.hasRole("800R00000070")||CurUser.hasRole("800R00000077");// 2021/02/26 作废(汽车业务部总监)角色改用(汽车业务部前台副总监) String sButtons[][] =null; if(flag){ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 From 8a75ee1695061c0a934f2a93786eb3f8c6015176 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Thu, 24 Feb 2022 18:04:17 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=8A=A5=E6=96=87=EF=BC=88=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=E7=89=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessProjectTempInfo.jsp | 36 +++++ config/icms.properties | 5 + src/com/ample/icms/query/ImageAttr.java | 127 ++++++++++++++++++ src/com/ample/icms/query/ImageBaseData.java | 62 +++++++++ src/com/ample/icms/query/ImageBatch.java | 87 ++++++++++++ src/com/ample/icms/query/ImageMetaData.java | 10 ++ src/com/ample/icms/query/ImageQuery.java | 5 + src/com/ample/icms/query/ImageRoot.java | 14 ++ src/com/ample/icms/query/ImageTree.java | 24 ++++ 9 files changed, 370 insertions(+) create mode 100644 config/icms.properties create mode 100644 src/com/ample/icms/query/ImageAttr.java create mode 100644 src/com/ample/icms/query/ImageBaseData.java create mode 100644 src/com/ample/icms/query/ImageBatch.java create mode 100644 src/com/ample/icms/query/ImageMetaData.java create mode 100644 src/com/ample/icms/query/ImageQuery.java create mode 100644 src/com/ample/icms/query/ImageRoot.java create mode 100644 src/com/ample/icms/query/ImageTree.java diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index c6c5febaa..9cd2fed8b 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -171,5 +171,41 @@ return true; } } + + function openFileList(){ + let url = getRequestUrl(); + let param = getRequestParam(); + post(url,param); + } + function getRequestUrl(){ + let url = RunJavaMethod("","",""); + return url; + } + function getRequestParam(){ + let param = RunJavaMethod("","",""); + return param; + } + /** + * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 + * @param URL + * @param PARAMS + */ + function post(URL, PARAMS) { + let temp_form = document.createElement("form"); + temp_form.action = URL; + temp_form.target = "_blank"; + temp_form.method = "post"; + temp_form.style.display = "none"; + for (let param in PARAMS) { + let opt = document.createElement("textarea"); + opt.name = param; + opt.value = PARAMS[param]; + temp_form.appendChild(opt); + } + document.body.appendChild(temp_form); + temp_form.submit(); + } + + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/config/icms.properties b/config/icms.properties new file mode 100644 index 000000000..6c411635a --- /dev/null +++ b/config/icms.properties @@ -0,0 +1,5 @@ +url=http://39.106.190.65:8080/SunECM/servlet/RouterServlet +#链接有效时间,单位为秒 +useful_life=10 +#业务系统授权密钥 +secret_key= diff --git a/src/com/ample/icms/query/ImageAttr.java b/src/com/ample/icms/query/ImageAttr.java new file mode 100644 index 000000000..c348c6182 --- /dev/null +++ b/src/com/ample/icms/query/ImageAttr.java @@ -0,0 +1,127 @@ +package com.ample.icms.query; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamAsAttribute; + +import java.util.List; + +@XStreamAlias("NODE") +public class ImageAttr { + + @XStreamAlias("ID") + @XStreamAsAttribute + private String id ; + + //资料名称 + @XStreamAlias("NAME") + @XStreamAsAttribute + private String name ; + + //资料权限(CRUD) + @XStreamAlias("RIGHT") + @XStreamAsAttribute + private String right ; + + //影像资料压缩大小像素 例如800*800 (非必填) + @XStreamAlias("RESEIZE") + @XStreamAsAttribute + private String reseize ; + + //是否是子节点 1-是子节点、0-父节点 + @XStreamAlias("CHILD_FLAG") + @XStreamAsAttribute + private String childFlag ; + + //资料条码 用于系统区分资料类型自动归类 (非必填) + @XStreamAlias("BARCODE") + @XStreamAsAttribute + private String barcode ; + + //资料最大上传数量 + @XStreamAlias("MAXPAGES") + @XStreamAsAttribute + private String maxPages ; + + //资料最小上传数量 + @XStreamAlias("MINPAGES") + @XStreamAsAttribute + private String minPages ; + + @XStreamAlias("NODE") + public List images ; + + public ImageAttr() { + + } + public ImageAttr(List images) { + this.images = images; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRight() { + return right; + } + + public void setRight(String right) { + this.right = right; + } + + public String getReseize() { + return reseize; + } + + public void setReseize(String reseize) { + this.reseize = reseize; + } + + public String getChildFlag() { + return childFlag; + } + + public void setChildFlag(String childFlag) { + this.childFlag = childFlag; + } + + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public String getMaxPages() { + return maxPages; + } + + public void setMaxPages(String maxPages) { + this.maxPages = maxPages; + } + + public String getMinPages() { + return minPages; + } + + public void setMinPages(String minPages) { + this.minPages = minPages; + } + + + + +} diff --git a/src/com/ample/icms/query/ImageBaseData.java b/src/com/ample/icms/query/ImageBaseData.java new file mode 100644 index 000000000..e3af26994 --- /dev/null +++ b/src/com/ample/icms/query/ImageBaseData.java @@ -0,0 +1,62 @@ +package com.ample.icms.query; + +import com.thoughtworks.xstream.annotations.XStreamAlias; + +@XStreamAlias("BASE_DATA") +public class ImageBaseData { + //操作员代码 + @XStreamAlias("USER_CODE") + private String userCode; + //操作员名称 + @XStreamAlias("USER_NAME") + private String userName; + //机构代码 + @XStreamAlias("ORG_CODE") + private String orgCode; + //机构名称 + @XStreamAlias("ORG_NAME") + private String orgName; + //操作员角色 + @XStreamAlias("ROLE_CODE") + private String roleCode; + + public String getUserCode() { + return userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getOrgCode() { + return orgCode; + } + + public void setOrgCode(String orgCode) { + this.orgCode = orgCode; + } + + public String getOrgName() { + return orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getRoleCode() { + return roleCode; + } + + public void setRoleCode(String roleCode) { + this.roleCode = roleCode; + } +} diff --git a/src/com/ample/icms/query/ImageBatch.java b/src/com/ample/icms/query/ImageBatch.java new file mode 100644 index 000000000..1d7f7c707 --- /dev/null +++ b/src/com/ample/icms/query/ImageBatch.java @@ -0,0 +1,87 @@ +package com.ample.icms.query; + +import com.thoughtworks.xstream.annotations.XStreamAlias; + +@XStreamAlias("BATCH") +public class ImageBatch { + + //业务类型代码 + @XStreamAlias("APP_CODE") + private String appCode ; + + //业务类型名称 + @XStreamAlias("APP_NAME") + private String appName ; + + //业务主索引 + @XStreamAlias("CASENO") + private String caseNo ; + + //业务扩展索引(非必填) + @XStreamAlias("CARNO") + private String carNo ; + + // + @XStreamAlias("START_TIME") + private String startTime ; + + // + @XStreamAlias("END_TIME") + private String endTime; + + // + @XStreamAlias("VTREE") + private ImageTree vTree; + + public ImageBatch(ImageTree vTree) { + this.vTree = vTree; + } + + public String getAppCode() { + return appCode; + } + + public void setAppCode(String appCode) { + this.appCode = appCode; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getCaseNo() { + return caseNo; + } + + public void setCaseNo(String caseNo) { + this.caseNo = caseNo; + } + + public String getCarNo() { + return carNo; + } + + public void setCarNo(String carNo) { + this.carNo = carNo; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } +} diff --git a/src/com/ample/icms/query/ImageMetaData.java b/src/com/ample/icms/query/ImageMetaData.java new file mode 100644 index 000000000..63419c284 --- /dev/null +++ b/src/com/ample/icms/query/ImageMetaData.java @@ -0,0 +1,10 @@ +package com.ample.icms.query; + +import com.thoughtworks.xstream.annotations.XStreamAlias; + +import java.util.List; + +@XStreamAlias("META_DATA") +public class ImageMetaData { + public List imageBatchs; +} diff --git a/src/com/ample/icms/query/ImageQuery.java b/src/com/ample/icms/query/ImageQuery.java new file mode 100644 index 000000000..46bfa33a6 --- /dev/null +++ b/src/com/ample/icms/query/ImageQuery.java @@ -0,0 +1,5 @@ +package com.ample.icms.query; + +public class ImageQuery { + +} diff --git a/src/com/ample/icms/query/ImageRoot.java b/src/com/ample/icms/query/ImageRoot.java new file mode 100644 index 000000000..28a51f67f --- /dev/null +++ b/src/com/ample/icms/query/ImageRoot.java @@ -0,0 +1,14 @@ +package com.ample.icms.query; + +import com.thoughtworks.xstream.annotations.XStreamAlias; + +@XStreamAlias("root") +public class ImageRoot { + private ImageBaseData imageBaseData; + private ImageMetaData imageMetaData; + + public ImageRoot(ImageBaseData imageBaseData, ImageMetaData imageMetaData) { + this.imageBaseData = imageBaseData; + this.imageMetaData = imageMetaData; + } +} diff --git a/src/com/ample/icms/query/ImageTree.java b/src/com/ample/icms/query/ImageTree.java new file mode 100644 index 000000000..f5c7389e4 --- /dev/null +++ b/src/com/ample/icms/query/ImageTree.java @@ -0,0 +1,24 @@ +package com.ample.icms.query; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamAsAttribute; + +import java.util.List; +@XStreamAlias("VTREE") +public class ImageTree { + + @XStreamAlias("APP_CODE") + @XStreamAsAttribute + private String appCode ; + + @XStreamAlias("APP_NAME") + @XStreamAsAttribute + private String appName ; + + private List images; + + public ImageTree(List images) { + this.images = images; + } + +} From fd6a8550df3595b579ce84d8e9734c8e28dc1fca Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Fri, 18 Mar 2022 16:06:42 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=EF=BC=88=E8=8D=89=E7=A8=BF=E7=89=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessProjectTempInfo.jsp | 28 +-- .../WEB-INF/lib/sunecm-url-encode-1.1.jar | Bin 0 -> 7928 bytes WebContent/WEB-INF/lib/sunecm_outer-1.3.jar | Bin 0 -> 26365 bytes config/icms.properties | 8 +- .../ample/icms/{query => bean}/ImageAttr.java | 2 +- .../icms/{query => bean}/ImageBaseData.java | 49 +++++- .../icms/{query => bean}/ImageBatch.java | 21 +-- src/com/ample/icms/bean/ImageBizInfo.java | 14 ++ src/com/ample/icms/bean/ImageBizType.java | 22 +++ src/com/ample/icms/bean/ImageMetaData.java | 12 ++ .../ample/icms/{query => bean}/ImageRoot.java | 4 +- .../ample/icms/{query => bean}/ImageTree.java | 3 +- src/com/ample/icms/check/ImageCheck.java | 16 ++ src/com/ample/icms/query/ImageMetaData.java | 10 -- src/com/ample/icms/query/ImageQuery.java | 4 +- src/com/ample/icms/scan/ImageScan.java | 27 +++ src/com/ample/icms/scan/ImageUpload.java | 20 +++ src/com/ample/icms/service/ImageService.java | 163 ++++++++++++++++++ src/com/ample/icms/util/PropertiesUtil.java | 38 ++++ src_core/com/tenwa/util/test.java | 146 +++++++++++++--- 20 files changed, 523 insertions(+), 64 deletions(-) create mode 100644 WebContent/WEB-INF/lib/sunecm-url-encode-1.1.jar create mode 100644 WebContent/WEB-INF/lib/sunecm_outer-1.3.jar rename src/com/ample/icms/{query => bean}/ImageAttr.java (98%) rename src/com/ample/icms/{query => bean}/ImageBaseData.java (57%) rename src/com/ample/icms/{query => bean}/ImageBatch.java (78%) create mode 100644 src/com/ample/icms/bean/ImageBizInfo.java create mode 100644 src/com/ample/icms/bean/ImageBizType.java create mode 100644 src/com/ample/icms/bean/ImageMetaData.java rename src/com/ample/icms/{query => bean}/ImageRoot.java (80%) rename src/com/ample/icms/{query => bean}/ImageTree.java (94%) create mode 100644 src/com/ample/icms/check/ImageCheck.java delete mode 100644 src/com/ample/icms/query/ImageMetaData.java create mode 100644 src/com/ample/icms/scan/ImageScan.java create mode 100644 src/com/ample/icms/scan/ImageUpload.java create mode 100644 src/com/ample/icms/service/ImageService.java create mode 100644 src/com/ample/icms/util/PropertiesUtil.java diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index 9cd2fed8b..caf84bd30 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -58,7 +58,8 @@ dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid")); dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput()); String sButtons[][] = { - {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""} + {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""}, + {"ReadOnly".equals(rightType)?"false":"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""} }; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> @@ -174,15 +175,22 @@ function openFileList(){ let url = getRequestUrl(); - let param = getRequestParam(); - post(url,param); + let params = getRequestParam(); + post(url,params); } function getRequestUrl(){ - let url = RunJavaMethod("","",""); + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); return url; } function getRequestParam(){ - let param = RunJavaMethod("","",""); + let appCode = 'BQCW-000010'; + let appName = '业务申请'; + let code = 'ECM0002'; + if(("<%=sPhaseNo%>"=="0010") && ("<%=FlowNo%>"=="BusinessApplyFlow" || "<%=FlowNo%>" == "BusinessChangeFlow")){ + code = 'ECM0001'; + } + let busiNo = '<%=sFlowUnid%>'; + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); return param; } /** @@ -190,18 +198,18 @@ * @param URL * @param PARAMS */ - function post(URL, PARAMS) { + function post(URL, param) { let temp_form = document.createElement("form"); temp_form.action = URL; temp_form.target = "_blank"; temp_form.method = "post"; temp_form.style.display = "none"; - for (let param in PARAMS) { + let opt = document.createElement("textarea"); - opt.name = param; - opt.value = PARAMS[param]; + opt.name = 'data'; + opt.value = param; temp_form.appendChild(opt); - } + document.body.appendChild(temp_form); temp_form.submit(); } diff --git a/WebContent/WEB-INF/lib/sunecm-url-encode-1.1.jar b/WebContent/WEB-INF/lib/sunecm-url-encode-1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..fc1f2057580a26654f1608a9497e528beff1a647 GIT binary patch literal 7928 zcmb7p1yo#FvvuR{ZXpod-6goYOOW91ZXvh@hu}0Wf#41S8g~MuacEouqyq#3f&AoU zX7bIvneWYCz0O^I*Q(mP?z#7zQ?<6b5*$1#0DuetR4S6G0RF>J0Pp}68Epwx1yx!0 z`!N7O{Wn)+K*fV=BO)S-$%DK7!@z$Sf4Hhhs4B?HXlb*l$eycAj4La#vdv;Bu`*3f zOgCzB%yVzqy0OSBPs!^5Vqs`mFO+@TbK^Aelr*(G^Oz)#R4&oC65>5m(c=kt zUMijA2Xd#zeU4*}Q_}Q^BM>=Hx#aO{_ig_ppZ}dY{6jt#E>7&fXZ*iC(0}vr@N)Ju zceng6o`iq#v~%|GayNIju=+1C6#p1w{KL&p*hK|L46))A=o# zp#cEPqyPZNzeJEU_psvQVY6^F_wdNm_tQ6CAowo2H`!(G8%}1XjEEQ}3*tgg!d8F{ z4PPjPFH)X?Nmt&4!Hddrvwlp&SJ_gZ?m%c# z__U($A|leGdUH`Ro53`Ua%e^PFiqfkBt~v9?W0x*iijOZ%QqWtvgd`3z)4(|<*rgL z-{eV97D!JZFdYOI@R98Y*IY-2+c;GWaWdy`Z5b#l zejXa&7o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4UKitNYT{{u7#px^)i literal 0 HcmV?d00001 diff --git a/WebContent/WEB-INF/lib/sunecm_outer-1.3.jar b/WebContent/WEB-INF/lib/sunecm_outer-1.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..20846b19b6e66bf1a3aa6b049a5613c1a6ca0e7c GIT binary patch literal 26365 zcmb@t1#n!;k}YbB(PBo6nVFd-OKLGQGn2*4%*<>tGee7+nOU-AvA)keXJ+o)m^tsh z_-{w-=#K8ntgPBAGplmdmX`(vL;VB=1@(zeUPSTJKV8tDz&^=}Dhbj`%8AjxkA3rNik7?5}mBroh)!%Mw*sx240$$Y7#hAugEaZ zynWz6CnZZGDLdm_4hF4uj5UCRg-L1lh(StrR7k~fgn_n?L7Mz&!SdGO#^LintdN~x zM-chlhv@J74=Z3kefn(~?!OEH?DxNhw$}9j)uLVQzYh}buNIEZHtzZkMt{>1{a;#| z+c-Kq=-U_?|BVdJ|0-jk@A!9u#D6d7Xzbu({#Va`K0HB9E4kk?|9P?e{`SYn|6^SL zW$izD{tpF0zs&&rsf^ChO5f2jDz?`Ggb`KLw$f#O(d8BPqR%&juGlG09=(hI4p*DT9$TKv0xzjL^>6TfdoGq2a0* z9fVWSQeU_P>kq|dIR`cgbQI%_`diVZR5Ysa^;PxE@n_P}foy2K1Z_ajGvG$etunX) zMqF3PKstf@$zFCH&+D1pg-fqMZo@kg>n;j+-d4L2rbn)#DGwcuAKjQ-<j8r!v9VLqS#0P{N` zap2kSsq+2&Cyf5*$z=HVCiA~dB=^1T5+4Kv1Tln*3j~=MMAiPQ*4yrE$JjtV>Km|Q zcQ${ZV_)g5a9~&IZFfGuPKJ;iQ>dP~hJgvnh%}k>^oZoJ=EEQuoBsaP0r`#&z%g9^%MmuMRUccvH7{F){${O#YPa|T(GEuAh7PJ zl+>g|;f|-GwV17JYf{G#fp*3az>Q?^`bO`YB=L+Us(;QDIWqYvZq+n z4VB2tj1}ny<}LD{3l9~k>MiEfEE6h?6{}zS40M63p{8v7|A>I#yIEa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SHZ`e=G{GObu1Rh8a`{^;=OmO>8IvI>OHttYHYvkW1*WfiLkR zeHoHp0cZ1nm-wm!eNjoM!ZpmWA))#AA$k!8RPh>Sl0U^Tfe?f*Yz8$91#;zmF%ayL z3F}6v=rO#!GgJ{9X7#@Z2<0(<_nd>a{p&!1dVm*PhRQ_43>}gR|L^hpv+ZB2d?7l# z#xFF15@r+s3H=8NXZQ~MH^E?-n^s81&IOJ5d*=)rzCR8|sDLocE<>oeze4*aC;WY! z;pHu$^9W}5ejgOtoBxy-hVN3SUIx5M0FlZXzY7VI6@c#^C=(H$ z*L??u47ob}@8JKgS@5GvcuMW}F6XI!8Sjf^5@7W4A6>#TF~4{D5zRj)nw9 z{`!voaVk^7Y7M#SfSecpJXn7pIbH+@&9{dcD&)QOOSr%D=HZ(U&A*4wx%~e1q4*zA z|B;Ok?*=*};g4cPVKs+bxd{Az<$sdSc~PXGr@Js~f$$A}8L4k?tgkO|=xHzf#tnMf z3o}%u-^Kjy?DwKdL#8jBX=z>L0B$325hQd!2(#qhg@ir4zXk)^oA4W$?;iu;{{}4c v^WEZ)BM5#e4&55T?7q%##^ imageBatchs ; +} diff --git a/src/com/ample/icms/query/ImageRoot.java b/src/com/ample/icms/bean/ImageRoot.java similarity index 80% rename from src/com/ample/icms/query/ImageRoot.java rename to src/com/ample/icms/bean/ImageRoot.java index 28a51f67f..e933fc91b 100644 --- a/src/com/ample/icms/query/ImageRoot.java +++ b/src/com/ample/icms/bean/ImageRoot.java @@ -1,10 +1,12 @@ -package com.ample.icms.query; +package com.ample.icms.bean; import com.thoughtworks.xstream.annotations.XStreamAlias; @XStreamAlias("root") public class ImageRoot { + @XStreamAlias("BASE_DATA") private ImageBaseData imageBaseData; + @XStreamAlias("META_DATA") private ImageMetaData imageMetaData; public ImageRoot(ImageBaseData imageBaseData, ImageMetaData imageMetaData) { diff --git a/src/com/ample/icms/query/ImageTree.java b/src/com/ample/icms/bean/ImageTree.java similarity index 94% rename from src/com/ample/icms/query/ImageTree.java rename to src/com/ample/icms/bean/ImageTree.java index f5c7389e4..985b87a72 100644 --- a/src/com/ample/icms/query/ImageTree.java +++ b/src/com/ample/icms/bean/ImageTree.java @@ -1,9 +1,10 @@ -package com.ample.icms.query; +package com.ample.icms.bean; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; import java.util.List; + @XStreamAlias("VTREE") public class ImageTree { diff --git a/src/com/ample/icms/check/ImageCheck.java b/src/com/ample/icms/check/ImageCheck.java new file mode 100644 index 000000000..806ae5dde --- /dev/null +++ b/src/com/ample/icms/check/ImageCheck.java @@ -0,0 +1,16 @@ +package com.ample.icms.check; + +import com.ample.icms.service.ImageService; + +public class ImageCheck extends ImageService { + public void getResult(){ + String result = doPost(); + if(result.contains("200")){ + //true + }else if(result.contains("-1")){ + //error + }else{ + //false + } + } +} diff --git a/src/com/ample/icms/query/ImageMetaData.java b/src/com/ample/icms/query/ImageMetaData.java deleted file mode 100644 index 63419c284..000000000 --- a/src/com/ample/icms/query/ImageMetaData.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.ample.icms.query; - -import com.thoughtworks.xstream.annotations.XStreamAlias; - -import java.util.List; - -@XStreamAlias("META_DATA") -public class ImageMetaData { - public List imageBatchs; -} diff --git a/src/com/ample/icms/query/ImageQuery.java b/src/com/ample/icms/query/ImageQuery.java index 46bfa33a6..f9a223bca 100644 --- a/src/com/ample/icms/query/ImageQuery.java +++ b/src/com/ample/icms/query/ImageQuery.java @@ -1,5 +1,7 @@ package com.ample.icms.query; -public class ImageQuery { +import com.ample.icms.service.ImageService; + +public class ImageQuery extends ImageService { } diff --git a/src/com/ample/icms/scan/ImageScan.java b/src/com/ample/icms/scan/ImageScan.java new file mode 100644 index 000000000..b7ddb3bb6 --- /dev/null +++ b/src/com/ample/icms/scan/ImageScan.java @@ -0,0 +1,27 @@ +package com.ample.icms.scan; + +import com.ample.icms.bean.ImageBaseData; +import com.ample.icms.service.ImageService; + +public class ImageScan extends ImageService { + private String oneBatch; + @Override + public void addBaseData(){ + base = new ImageBaseData(); + base.setUserCode("admin"); + base.setUserName("admin"); + base.setOrgCode("0005"); + base.setComCode("0005"); + base.setOrgName("安鹏国际融资租赁(深圳)有限公司"); + base.setRoleCode("admin"); + base.setOneBatch(oneBatch); + } + public String getOneBatch() { + return oneBatch; + } + + public void setOneBatch(String oneBatch) { + this.oneBatch = oneBatch; + } + +} diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java new file mode 100644 index 000000000..4e7023d75 --- /dev/null +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -0,0 +1,20 @@ +package com.ample.icms.scan; + +import com.sunyard.insurance.ecm.socket.client.AutoScanApi; + +public class ImageUpload { + public void doUpload(){ + String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; + try { + // " sunyard#licenseKey" :sunyard为接入系统ID,licenseKey为接入系统授权密钥 + AutoScanApi autoScanApi = new AutoScanApi("192.168.7.71",8081,"anpeng#IU2VHdejDpUFzhoeT7tUSII3"); +// // "10I" : 业务类型 +// // zipPath :要上传批次文件的zip包的路径 +// // returnMsg : 第三方上传的返回状态 + String returnMsg = autoScanApi.ScanImageFile("FBO2022031100000001", zipPath); + System.out.println(returnMsg); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java new file mode 100644 index 000000000..1fb2f7c5c --- /dev/null +++ b/src/com/ample/icms/service/ImageService.java @@ -0,0 +1,163 @@ +package com.ample.icms.service; + +import com.ample.icms.bean.ImageBaseData; +import com.ample.icms.bean.ImageBatch; +import com.ample.icms.bean.ImageMetaData; +import com.ample.icms.bean.ImageRoot; +import com.ample.icms.util.PropertiesUtil; +import com.sunyard.insurance.encode.client.EncodeAccessParam; +import com.thoughtworks.xstream.XStream; +import org.apache.log4j.Logger; + +import java.io.IOException; +import java.util.ArrayList; + +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.HttpException; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.httpclient.SimpleHttpConnectionManager; +import org.apache.commons.httpclient.methods.PostMethod; + +public class ImageService { + public Logger logger = Logger.getLogger(this.getClass()); + protected String appCode; + protected String appName; + protected String code; + protected String busiNo; + protected ImageBaseData base; + protected ImageBatch batch; + protected ImageMetaData metaData; + public void addBaseData(){ + base = new ImageBaseData(); + base.setUserCode("admin"); + base.setUserName("admin"); + base.setOrgCode("0005"); + base.setComCode("0005"); + base.setOrgName("安鹏国际融资租赁(深圳)有限公司"); + base.setRoleCode("admin"); + } + public void addBatch(){ + batch = new ImageBatch(); + batch.setAppCode(this.appCode); + batch.setAppName(this.appName); + batch.setBusiNo(this.busiNo); + } + public void addMetaData(){ + metaData = new ImageMetaData(); + metaData.imageBatchs = new ArrayList<>(); + metaData.imageBatchs.add(batch); + } + public ImageRoot createData(){ + addBaseData(); + addBatch(); + addMetaData(); + ImageRoot root = new ImageRoot(base,metaData); + return root; + } + public String getRequestXML(){ + XStream xs = new XStream(); + xs.processAnnotations(ImageRoot.class); + String xml = xs.toXML(createData()); + xml = xml.replace("__","_"); + xml = "\n" + xml; + logger.info("\n"+xml+"\n"); + return xml; + } + + public String transformXMLtoParam(String code ,String xml) throws Exception { + int time = Integer.parseInt(PropertiesUtil.get("useful_life")); + String secretKey = PropertiesUtil.get("secret_key"); + String param = EncodeAccessParam.getEncodeParam("format=xml&code="+code+"&xml="+xml, time, secretKey); + return param; + } + + public String doPost(){ + String result="0000"; + PostMethod postMethod = null; + HttpClient httpClient = null; + try { + postMethod = new PostMethod(PropertiesUtil.get("secret_key")); + // 设置格式 + postMethod.getParams().setContentCharset("UTF-8"); + postMethod.setParameter("data", getRequestParam()); + // ICMS影像系统通过referer来验证白名单,所以必须将ip填写在这里 + //todo + postMethod.setRequestHeader("Referer", "http://172.16.20.212/imaging"); + httpClient = new HttpClient(); + // 执行postMethod + int statusCode = httpClient.executeMethod(postMethod); + System.out.println("结果状态:"+statusCode); + if (statusCode == HttpStatus.SC_OK) { + byte[] bodydata = postMethod.getResponseBody(); + //取得返回值 + result = new String(bodydata, "UTF-8"); + System.out.println("影像系统返回结果:" + result); + } + }catch (HttpException e) { + //协议发生异常,URL不合法请检查URL! + e.printStackTrace(); + } catch (IOException e) { + //请检查网络是否通畅,检查网线是否插好! + e.printStackTrace(); + } catch(Exception e){ + e.printStackTrace(); + }finally { + if (postMethod != null) { + try { + postMethod.releaseConnection(); + } catch (Exception e) { + e.printStackTrace(); + } + } + if (httpClient != null) { + try { + ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown(); + } catch (Exception e) { + e.printStackTrace(); + } + httpClient = null; + } + } + return result; + } + + public String getRequestUrl(){ + return PropertiesUtil.get("url"); + } + + public String getRequestParam() throws Exception { + return transformXMLtoParam(this.code,this.getRequestXML()); + } + + public String getAppCode() { + return appCode; + } + + public void setAppCode(String appCode) { + this.appCode = appCode; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getBusiNo() { + return busiNo; + } + + public void setBusiNo(String busiNo) { + this.busiNo = busiNo; + } +} diff --git a/src/com/ample/icms/util/PropertiesUtil.java b/src/com/ample/icms/util/PropertiesUtil.java new file mode 100644 index 000000000..cace56276 --- /dev/null +++ b/src/com/ample/icms/util/PropertiesUtil.java @@ -0,0 +1,38 @@ +package com.ample.icms.util; + +import com.amarsoft.are.ARE; + + +import java.io.IOException; +import java.util.Map; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; + +public class PropertiesUtil { + private static Map attributes; + + public static void load() { + attributes = new ConcurrentHashMap(); + Properties prop = new Properties(); + try { + prop.load(PropertiesUtil.class.getResourceAsStream("/icms.properties")); + for(Map.Entry entry : prop.entrySet()) { + if(entry.getKey() == null || entry.getValue() == null) { + continue; + } + attributes.put(entry.getKey().toString(), entry.getValue().toString()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static void destroy() { + if(attributes != null) attributes.clear(); + } + + public static String get(String propName) { + if(attributes == null) load(); + return attributes.get(propName); + } +} diff --git a/src_core/com/tenwa/util/test.java b/src_core/com/tenwa/util/test.java index 750066547..36807e4e3 100644 --- a/src_core/com/tenwa/util/test.java +++ b/src_core/com/tenwa/util/test.java @@ -1,31 +1,133 @@ package com.tenwa.util; -import com.tenwa.flow.treeview.action.BaseInitTreeView; +import com.ample.icms.query.*; +import com.sunyard.insurance.ecm.socket.client.AutoScanApi; +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.HttpException; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.httpclient.SimpleHttpConnectionManager; +import org.apache.commons.httpclient.methods.PostMethod; +import org.dom4j.Attribute; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; -import jbo.app.tenwa.doc.LB_DOCATTRIBUTE; -import jbo.app.tenwa.doc.LB_DOCRELATIVE; +import java.io.File; +import java.io.IOException; +import java.util.Iterator; +import java.util.List; public class test { + public static void main(String[] args){ + String zipPath = "C:/Users/ivanl/Desktop/11111.zip"; + try { + // " sunyard#licenseKey" :sunyard为接入系统ID,licenseKey为接入系统授权密钥 + AutoScanApi autoScanApi = new AutoScanApi("192.168.7.71",8088,"anpeng#IU2VHdejDpUFzhoeT7tUSII3"); +// // "10I" : 业务类型 +// // zipPath :要上传批次文件的zip包的路径 +// // returnMsg : 第三方上传的返回状态 + String returnMsg = autoScanApi.ScanImageFile("BQCW-000010", zipPath); + System.out.println(returnMsg); + } catch (Exception e) { + e.printStackTrace(); + } + } + public static void main1(String[] args) { + ImageQuery query = new ImageQuery(); + query.setAppCode("BQCW-000010"); + query.setAppName("业务申请"); + query.setBusiNo("FBO2022031100000001"); + query.setCode("ECM0013"); - public static void main(String[] args) { - String sql = "select se.seriesid,se.seriesname from (" - + "SELECT seriesid,max(seriesname) seriesname,max(brandid) brandid FROM vi_car_data where 1=1 group by seriesid" - + ") se WHERE se.seriesname IS NOT NULL AND se.brandid='#brandid' ORDER BY se.seriesname DESC"; - - System.out.println(sql.substring(sql.toUpperCase().lastIndexOf("WHERE"), sql.length())); - System.out.println(sql.substring(0, sql.toLowerCase().lastIndexOf("where"))); - - - sql = "SELECT DISTINCT O.ID, O.DOC_NAME,r.id " + "FROM O, " - + LB_DOCRELATIVE.CLASS_NAME + " R " - + "WHERE O.RELATIVE_ID = R.ID " - + "AND O.ID NOT IN (SELECT A.LIBRARY_ID FROM " - + LB_DOCATTRIBUTE.CLASS_NAME + " A) " - + "AND R.ObjectType='BusinessApplyFlow' and R.proj_id=:projid " + "AND o.DOC_NATURE='01' " - + "ORDER BY SERIAL_NUM"; - - System.out.println(sql); - + String result=""; + PostMethod postMethod = null; + HttpClient httpClient = null; + try { + String param =query.getRequestParam(); + System.out.println("加密后数据:"+param); + postMethod = new PostMethod("http://192.168.7.71:8081/SunICMS/servlet/RouterServlet"); + // 设置格式 + postMethod.getParams().setContentCharset("UTF-8"); + postMethod.setParameter("data", param); + postMethod.setRequestHeader("Referer", "http://172.16.20.212/imaging"); + httpClient = new HttpClient(); + // 执行postMethod + int statusCode = httpClient.executeMethod(postMethod); + System.out.println("结果状态:"+statusCode); + if (statusCode == HttpStatus.SC_OK) { + byte[] bodydata = postMethod.getResponseBody(); + //取得返回值 + result = new String(bodydata, "UTF-8"); + System.out.println("结果" + result); + } else { + } + }catch (HttpException e) { + //协议发生异常,URL不合法请检查URL! + e.printStackTrace(); + } catch (IOException e) { + //请检查网络是否通畅,检查网线是否插好! + e.printStackTrace(); + } catch(Exception e){ + e.printStackTrace(); + }finally { + if (postMethod != null) { + try { + postMethod.releaseConnection(); + } catch (Exception e) { + e.printStackTrace(); + } + } + if (httpClient != null) { + try { + ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown(); + } catch (Exception e) { + e.printStackTrace(); + } + httpClient = null; + } + } } + + // private static ArrayList bookList = new ArrayList(); + + public static void dom4j() { + // 解析books.xml文件 + // 创建SAXReader的对象reader + SAXReader reader = new SAXReader(); + try { + // 通过reader对象的read方法加载books.xml文件,获取docuemnt对象。 + Document document = reader.read(new File("src/res/books.xml")); + // 通过document对象获取根节点bookstore + Element bookStore = document.getRootElement(); + // 通过element对象的elementIterator方法获取迭代器 + Iterator it = bookStore.elementIterator(); + // 遍历迭代器,获取根节点中的信息(书籍) + while (it.hasNext()) { + System.out.println("=====开始遍历某一本书====="); + Element book = (Element) it.next(); + // 获取book的属性名以及 属性值 + List bookAttrs = book.attributes(); + for (Attribute attr : bookAttrs) { + System.out.println("属性名:" + attr.getName() + "--属性值:" + + attr.getValue()); + } + Iterator itt = book.elementIterator(); + while (itt.hasNext()) { + Element bookChild = (Element) itt.next(); + System.out.println("节点名:" + bookChild.getName() + "--节点值:" + bookChild.getStringValue()); + } + System.out.println("=====结束遍历某一本书====="); + } + } catch (DocumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + + + + } From d191cd805ad5807d69bfdd6d2c1a284754d55174 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Mon, 21 Mar 2022 13:07:12 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=97=B6=EF=BC=8C=E5=BD=93=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=8F=AA=E5=89=A9=E4=B8=80=E4=BA=BA=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Common/WorkFlow/FlowSubmitDialog.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebContent/Common/WorkFlow/FlowSubmitDialog.jsp b/WebContent/Common/WorkFlow/FlowSubmitDialog.jsp index dd6367e1c..262397018 100644 --- a/WebContent/Common/WorkFlow/FlowSubmitDialog.jsp +++ b/WebContent/Common/WorkFlow/FlowSubmitDialog.jsp @@ -219,9 +219,9 @@ }else{ actionSet.hide(); }*/ - if(vUser.length==1){ + /*if(vUser.length==1){ actionSet.hide(); - } + }*/ } }else{ actionSet.html(""); From b41242fd31abede188abaeececedd6f252f4b8ae Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Fri, 15 Apr 2022 18:14:16 +0800 Subject: [PATCH 07/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comm/LBContract/LBContractPrintList.jsp | 9 +++- .../BusinessProjectTempInfo.jsp | 7 ++- config/icms.properties | 1 + src/com/ample/icms/bean/ImageBaseData.java | 4 +- src/com/ample/icms/scan/ImageUpload.java | 46 +++++++++++++++---- src/com/ample/icms/service/ImageService.java | 3 +- 6 files changed, 55 insertions(+), 15 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp index 99912da0d..bbd7241f5 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp @@ -44,6 +44,7 @@ {btnflag,"","Button","查询签约结果","查询签约结果","getStatus()","","","","btn_icon_obtain",""}, {btnflag,"","Button","重新发送短信","重新发送短信","sendMessageAgain()","","","","btn_icon_refresh",""}, {signs,"","Button","公司盖章","公司盖章","sign()","","","","btn_icon_refresh",""}, + {"true","","Button","上传合同","上传合同","uploadContract()","","","","btn_icon_refresh",""}, }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/config/icms.properties b/config/icms.properties index 1c033e0ae..cb48e8719 100644 --- a/config/icms.properties +++ b/config/icms.properties @@ -1,4 +1,5 @@ url=http://192.168.7.71:8081/SunICMS/servlet/RouterServlet +service_ip=192.168.7.71 #链接有效时间,单位为秒 useful_life=360 #业务系统授权密钥 diff --git a/src/com/ample/icms/bean/ImageBaseData.java b/src/com/ample/icms/bean/ImageBaseData.java index 9a47be8c2..bdce5f6d7 100644 --- a/src/com/ample/icms/bean/ImageBaseData.java +++ b/src/com/ample/icms/bean/ImageBaseData.java @@ -22,10 +22,10 @@ public class ImageBaseData { //操作员角色 @XStreamAlias("ROLE_CODE") private String roleCode; - //操作员角色 + //批量扫描标记 0-批量,1-单笔 @XStreamAlias("ONE_BATCH") private String oneBatch; - //操作员角色 + //操作类型 1新增,0修改 @XStreamAlias("NEW_BATCH") private String newBatch; diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java index 4e7023d75..39dfa2973 100644 --- a/src/com/ample/icms/scan/ImageUpload.java +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -1,20 +1,50 @@ package com.ample.icms.scan; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.service.ImageService; +import com.ample.icms.util.PropertiesUtil; import com.sunyard.insurance.ecm.socket.client.AutoScanApi; -public class ImageUpload { +public class ImageUpload extends ImageService { + private String zipPath ; + public void doUpload(){ String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; try { - // " sunyard#licenseKey" :sunyard为接入系统ID,licenseKey为接入系统授权密钥 - AutoScanApi autoScanApi = new AutoScanApi("192.168.7.71",8081,"anpeng#IU2VHdejDpUFzhoeT7tUSII3"); -// // "10I" : 业务类型 -// // zipPath :要上传批次文件的zip包的路径 -// // returnMsg : 第三方上传的返回状态 - String returnMsg = autoScanApi.ScanImageFile("FBO2022031100000001", zipPath); - System.out.println(returnMsg); + AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); + String result = autoScanApi.ScanImageFile(appCode, zipPath); + String returnCode = result.substring(0,result.indexOf("@")); + String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1); + intoLog(returnCode,returnMsg); } catch (Exception e) { e.printStackTrace(); } } + public void intoLog(String code ,String msg) { + Transaction transaction = null; + Transaction.createTransaction("als"); + SqlObject so = null; + try { + so = new SqlObject("insert into icms_upload_log (id,flowunid,path,code,msg,inputtime) values ()"); + transaction.executeSQL(so); + transaction.commit(); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + public void upload(){ + /** + * 1.找出需要上传的影像 + * 2.复制到指定路径 + * 3.在指定路径添加对应xml文件 + * 4.打包上传 + * 5.删除复制文件和打包文件 + */ + } + public void copyFile(){ + + } } diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index 1fb2f7c5c..8d2d4c6ec 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -58,6 +58,7 @@ public class ImageService { XStream xs = new XStream(); xs.processAnnotations(ImageRoot.class); String xml = xs.toXML(createData()); + //XStream的老毛病,转译会将_转成__,所以在这里转回来 xml = xml.replace("__","_"); xml = "\n" + xml; logger.info("\n"+xml+"\n"); @@ -86,7 +87,7 @@ public class ImageService { httpClient = new HttpClient(); // 执行postMethod int statusCode = httpClient.executeMethod(postMethod); - System.out.println("结果状态:"+statusCode); + System.out.println("结果状态码:"+statusCode); if (statusCode == HttpStatus.SC_OK) { byte[] bodydata = postMethod.getResponseBody(); //取得返回值 From afa0e6ffc035cb9374599f47f5771074b16f4c00 Mon Sep 17 00:00:00 2001 From: "zhanglei@ap-leasing.com.cn" Date: Sun, 24 Apr 2022 18:01:46 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=BC=80=E5=8F=91(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessProjectTempInfo.jsp | 2 +- config/icms.properties | 3 + src/com/ample/icms/scan/ImageDownload.java | 171 ++++++++++++++++++ src/com/ample/icms/scan/ImageUpload.java | 79 +++++++- .../flow/tabviewservice/FlowTaskViewTab.java | 2 +- .../exportcallback/impl/ZipUtils.java | 19 ++ 6 files changed, 269 insertions(+), 7 deletions(-) create mode 100644 src/com/ample/icms/scan/ImageDownload.java diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index 378430951..f39e39a8f 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -184,7 +184,7 @@ return url; } function getRequestParam(){ - let appCode = 'BQCW-000010'; + let appCode = 'BQCWHZ36_7'; let appName = '业务申请'; let code = 'ECM0002'; if(("<%=sPhaseNo%>"=="0010") && ("<%=FlowNo%>"=="BusinessApplyFlow" || "<%=FlowNo%>" == "BusinessChangeFlow")){ diff --git a/config/icms.properties b/config/icms.properties index cb48e8719..e51f648c9 100644 --- a/config/icms.properties +++ b/config/icms.properties @@ -5,4 +5,7 @@ useful_life=360 #业务系统授权密钥 secret_id=anpeng secret_key=IU2VHdejDpUFzhoeT7tUSII3 +#影像第三方上传时打包临时文件路径 +fileSavePathTemp=D:/data/files/icmsFileTemp + diff --git a/src/com/ample/icms/scan/ImageDownload.java b/src/com/ample/icms/scan/ImageDownload.java new file mode 100644 index 000000000..faf4582ce --- /dev/null +++ b/src/com/ample/icms/scan/ImageDownload.java @@ -0,0 +1,171 @@ +package com.ample.icms.scan; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.service.ImageService; +import com.ample.icms.util.PropertiesUtil; +import com.sunyard.insurance.ecm.socket.client.AutoScanApi; +import com.sunyard.insurance.encode.client.EncodeAccessParam; +import com.tenwa.officetempalte.exportcallback.impl.ZipUtils; +import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.HttpException; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.httpclient.SimpleHttpConnectionManager; +import org.apache.commons.httpclient.methods.PostMethod; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.SAXReader; +import org.dom4j.io.XMLWriter; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; + +public class ImageDownload extends ImageService { + private String zipPath ; + private String projectId; + private String flowUnid; + private String fileSavePath; + public static String testBatchDownload () throws Exception { + //准备参数 + StringBuilder sb = new StringBuilder("xml=交互参数xml字符串&code=ECM0009&format=xml"); + String param = EncodeAccessParam.getEncodeParam(sb.toString(),300, PropertiesUtil.get("secret_key")); + String result=""; + PostMethod postMethod = null; + HttpClient httpClient = null; + try{ + postMethod = new PostMethod(PropertiesUtil.get("url")); + // 设置格式 + postMethod.getParams().setContentCharset("UTF-8"); + postMethod.setParameter("data", param); + postMethod.setRequestHeader("Referer", "http://172.16.20.212/imaging"); + httpClient = new HttpClient(); + // 执行postMethod + int statusCode = httpClient.executeMethod(postMethod); + if(statusCode== HttpStatus.SC_OK){ + byte[] bodydata = postMethod.getResponseBody(); + //取得返回值 + result = new String(bodydata, "UTF-8"); + }else{ + } + }catch (HttpException e) { + //协议发生异常,URL不合法请检查URL! + } catch (IOException e) { + //请检查网络是否通畅,检查网线是否插好! + } catch(Exception e){ + + }finally { + if (postMethod != null) { + try { + postMethod.releaseConnection(); + } catch (Exception e) { + } + } + if (httpClient != null) { + try { + ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown(); + } catch (Exception e) { + } + httpClient = null; + } + } + return result; + } + + public void doUpload(){ + // String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; + String zipPath = PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip"; + try { + AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); + String result = autoScanApi.ScanImageFile(appCode, zipPath); + String returnCode = result.substring(0,result.indexOf("@")); + String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1); + intoLog(returnCode,returnMsg); + } catch (Exception e) { + e.printStackTrace(); + } + } + public void intoLog(String code ,String msg) { + Transaction transaction = null; + Transaction.createTransaction("als"); + SqlObject so = null; + try { + so = new SqlObject("insert into icms_upload_log (id,flowunid,path,code,msg,inputtime) values ()"); + transaction.executeSQL(so); + transaction.commit(); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + public void upload() throws JBOException, FileNotFoundException { + /** + * 1.找出需要上传的影像 + * 3.在指定路径添加对应xml文件 + * 4.打包上传 + * 5.删除复制文件和打包文件 + */ + FileOutputStream fos = new FileOutputStream(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip")); + ZipUtils zdo = new ZipUtils(); + zdo.toZip(copyFile(),fos); + } + + /** + * 上传成功后再删除 + */ + public void deleteTemp(){ + File f = new File(PropertiesUtil.get("fileSavePathTemp")); + if(f.length()!=0){ + ZipUtils zdo = new ZipUtils(); + zdo.deleteFile(f,false); + } + } + public List copyFile() throws JBOException { + List files = new ArrayList<>(); + BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); + List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") + .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false); + for(BizObject bo : bos){ + String filePath = bo.getAttribute("fullpath").toString(); + File file = new File(filePath); + files.add(file); + } + //todo 加上xml文件 + createXMl(); + File fileXML = new File("xmlpath"); + files.add(fileXML); + return files; + } + public void createXMl() { + String appCode = "BQCW-000010"; + String appName = "签约文件"; + this.setAppCode(appCode); + this.setAppName(appName); + this.setBusiNo(flowUnid); + String xml = getRequestXML(); + SAXReader saxReader = new SAXReader(); + Document document; + try { + document = saxReader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))); + OutputFormat format = OutputFormat.createPrettyPrint(); + format.setEncoding("UTF-8"); + XMLWriter writer = new XMLWriter(new FileWriter(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".xml")),format); + writer.write(document); + writer.close(); + } catch (DocumentException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + } + +} diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java index 39dfa2973..74a7c5e93 100644 --- a/src/com/ample/icms/scan/ImageUpload.java +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -1,16 +1,35 @@ package com.ample.icms.scan; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; import com.ample.icms.service.ImageService; import com.ample.icms.util.PropertiesUtil; import com.sunyard.insurance.ecm.socket.client.AutoScanApi; +import com.tenwa.officetempalte.exportcallback.impl.ZipUtils; +import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.SAXReader; +import org.dom4j.io.XMLWriter; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; public class ImageUpload extends ImageService { private String zipPath ; - + private String projectId; + private String flowUnid; + private String fileSavePath; public void doUpload(){ - String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; + // String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; + String zipPath = PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip"; try { AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); String result = autoScanApi.ScanImageFile(appCode, zipPath); @@ -35,16 +54,66 @@ public class ImageUpload extends ImageService { } - public void upload(){ + public void upload() throws JBOException, FileNotFoundException { /** * 1.找出需要上传的影像 - * 2.复制到指定路径 * 3.在指定路径添加对应xml文件 * 4.打包上传 * 5.删除复制文件和打包文件 */ + FileOutputStream fos = new FileOutputStream(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip")); + ZipUtils zdo = new ZipUtils(); + zdo.toZip(copyFile(),fos); } - public void copyFile(){ + + /** + * 上传成功后再删除 + */ + public void deleteTemp(){ + File f = new File(PropertiesUtil.get("fileSavePathTemp")); + if(f.length()!=0){ + ZipUtils zdo = new ZipUtils(); + zdo.deleteFile(f,false); + } + } + public List copyFile() throws JBOException { + List files = new ArrayList<>(); + BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); + List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") + .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false); + for(BizObject bo : bos){ + String filePath = bo.getAttribute("fullpath").toString(); + File file = new File(filePath); + files.add(file); + } + //todo 加上xml文件 + createXMl(); + File fileXML = new File("xmlpath"); + files.add(fileXML); + return files; + } + public void createXMl() { + String appCode = "BQCW-000010"; + String appName = "签约文件"; + this.setAppCode(appCode); + this.setAppName(appName); + this.setBusiNo(flowUnid); + String xml = getRequestXML(); + SAXReader saxReader = new SAXReader(); + Document document; + try { + document = saxReader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))); + OutputFormat format = OutputFormat.createPrettyPrint(); + format.setEncoding("UTF-8"); + XMLWriter writer = new XMLWriter(new FileWriter(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".xml")),format); + writer.write(document); + writer.close(); + } catch (DocumentException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } } + } diff --git a/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTab.java b/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTab.java index a1527c2ad..3bfb092ff 100644 --- a/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTab.java +++ b/src_core/com/tenwa/flow/tabviewservice/FlowTaskViewTab.java @@ -114,7 +114,7 @@ public class FlowTaskViewTab { BizObjectManager bm = null; BizObjectQuery bq = null; bm = JBOFactory.getFactory().getManager(OBJECTTYPE_RELA.CLASS_NAME); - bq = bm.createQuery("O.OBJECTTYPE=:OBJECTTYPE order by O.sortno ").setParameter("OBJECTTYPE", this.getObjectType()); + bq = bm.createQuery("O.OBJECTTYPE=:OBJECTTYPE and isinuse='Y' order by O.sortno ").setParameter("OBJECTTYPE", this.getObjectType()); this.viewTabItemList=bq.getResultList(true); diff --git a/src_core/com/tenwa/officetempalte/exportcallback/impl/ZipUtils.java b/src_core/com/tenwa/officetempalte/exportcallback/impl/ZipUtils.java index b592cf674..ac11ee347 100644 --- a/src_core/com/tenwa/officetempalte/exportcallback/impl/ZipUtils.java +++ b/src_core/com/tenwa/officetempalte/exportcallback/impl/ZipUtils.java @@ -154,5 +154,24 @@ public class ZipUtils { } f.delete();//最后删除该目录中所有文件后就删除该目录 } + + /** + * + * @param f + * @param deleteRoot true连当前目录一块删除,false,只删除当前目录下面的文件 + */ + public void deleteFile(File f ,boolean deleteRoot){ + File [] b = f.listFiles();//获取包含file对象对应的子目录或者文件 + for(int i =0;i Date: Tue, 10 May 2022 11:10:51 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=88=9D=E6=AD=A5=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comm/LBContract/LBContractPrintList.jsp | 7 +- .../LBContractPersonBaseInfo.jsp | 64 +++++++++++--- .../MortgageFile/LbContactInfo.jsp | 48 +++++++++++ .../BusinessProjectTempInfo.jsp | 24 +++--- .../CautionMoneyDeduction/ContractInfoPay.jsp | 47 ++++++++++ config/icms.properties | 8 +- src/com/ample/icms/check/ImageCheck.java | 4 +- src/com/ample/icms/init/IcmsRelationInit.java | 31 +++++++ src/com/ample/icms/scan/ImageUpload.java | 86 ++++++++++++++----- src/com/ample/icms/service/ImageService.java | 13 ++- src/com/ample/icms/util/GetInfoUtil.java | 81 +++++++++++++++++ .../project/commcheck/IcmsDocListCheck.java | 28 ++++++ 12 files changed, 380 insertions(+), 61 deletions(-) create mode 100644 src/com/ample/icms/init/IcmsRelationInit.java create mode 100644 src/com/ample/icms/util/GetInfoUtil.java create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp index bbd7241f5..e5d249bac 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp @@ -12,6 +12,7 @@ String contractNumber = CurPage.getParameter("ContractNumber"); String productId = CurPage.getParameter("ProductId"); String flowunid = CurPage.getParameter("FlowUnid"); + String FlowNo=CurPage.getParameter("FlowNo"); String action = CurPage.getParameter("action"); String SubjectId=CurPage.getParameter("SubjectId");//获取主体ID String operationType = CurPage.getParameter("operationType"); @@ -54,9 +55,9 @@ <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp index 256e9b61e..12f63e730 100644 --- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp @@ -6,6 +6,9 @@ History Log: */ String sPrevUrl = CurPage.getParameter("PrevUrl"); + String sFlowUnid = CurPage.getParameter("FlowUnid"); + String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 + String FlowNo=CurPage.getParameter("FlowNo");//流程名称 if(sPrevUrl == null) sPrevUrl = ""; String sTempletNo = "LbContactInfo";//--模板号-- @@ -19,6 +22,7 @@ String sButtons[][] = { //{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""}, //{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, }; //sButtonPosition = "south"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> @@ -38,5 +42,49 @@ function returnList(){ AsControl.OpenView("<%=sPrevUrl%>", "","_self",""); } + function openFileList(){ + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); + let params = getRequestParam(); + if(params!=null){ + post(url,params); + } + } + function getRequestParam(){ + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByContract", "flowUnid=<%=sFlowUnid%>,flowNo=<%=FlowNo%>"); + let index = appInfo.indexOf("@"); + if(index==-1){ + alert(appInfo); + return; + } + let appCode = appInfo.substr(0,index-1); + let appName = appInfo.substr(index+1,appInfo.length); + let code = 'ECM0002'; + if("<%=sPhaseNo%>"=="0010"){ + code = 'ECM0001'; + } + let busiNo = '<%=sFlowUnid%>'; + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); + return param; + } + /** + * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 + * @param URL + * @param PARAMS + */ + function post(URL, param) { + let temp_form = document.createElement("form"); + temp_form.action = URL; + temp_form.target = "_blank"; + temp_form.method = "post"; + temp_form.style.display = "none"; + + let opt = document.createElement("textarea"); + opt.name = 'data'; + opt.value = param; + temp_form.appendChild(opt); + + document.body.appendChild(temp_form); + temp_form.submit(); + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index f39e39a8f..07d011c7f 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -16,7 +16,6 @@ String compClientID = CurPage.getParameter("CompClientID"); String rightType = CurPage.getParameter("RightType"); String sTempletNo = "BusinessProjectTempInfo";//--模板号-- - BizObject bo=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT", "flow_unid=:flowunid").setParameter("flowunid",sFlowUnid).getSingleResult(false); String custype = CurPage.getParameter("CustomerType"); String customertype = CurPage.getParameter("customertype"); String channel = CurPage.getParameter("channel"); @@ -59,7 +58,7 @@ dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput()); String sButtons[][] = { {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""}, - {"ReadOnly".equals(rightType)?"false":"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, {"true","","Button","产品信息","产品信息","product()","","","","btn_icon_saveNew",""} }; @@ -175,17 +174,22 @@ } function openFileList(){ - let url = getRequestUrl(); - let params = getRequestParam(); - post(url,params); - } - function getRequestUrl(){ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); - return url; + let params = getRequestParam(); + if(params!=null){ + post(url,params); + } } function getRequestParam(){ - let appCode = 'BQCWHZ36_7'; - let appName = '业务申请'; + debugger; + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByProject", "flowUnid=<%=sFlowUnid%>,flowNo=<%=FlowNo%>"); + let index = appInfo.indexOf("@"); + if(index==-1){ + alert(appInfo); + return; + } + let appCode = appInfo.substr(0,index); + let appName = appInfo.substr(index+1,appInfo.length); let code = 'ECM0002'; if(("<%=sPhaseNo%>"=="0010") && ("<%=FlowNo%>"=="BusinessApplyFlow" || "<%=FlowNo%>" == "BusinessChangeFlow")){ code = 'ECM0001'; diff --git a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp index 05ca0d6df..52f7e7516 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp @@ -9,6 +9,7 @@ String orgId = CurUser.getOrgID(); String ishistory = CurPage.getParameter("IsHistory"); String flowunid = CurPage.getParameter("FlowUnid"); + String FlowNo=CurPage.getParameter("FlowNo"); String contractId = CurPage.getParameter("ContractId"); String compClientID = CurPage.getParameter("CompClientID"); String phaseNo = CurPage.getParameter("PhaseNo"); @@ -51,6 +52,7 @@ String sButtons[][] ={ {"true","","Button","保存","保存所有修改","save()","","","","btn_icon_save"}, {"true","All","Button","查看GPS定位信息","查看GPS定位信息","queryOrder()","","","","",""}, + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, }; //sButtonPosition = "south"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> @@ -167,5 +169,50 @@ window.onload = function(){ $("#A_div_1038").attr("style","display:none;"); } } + + function openFileList(){ + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); + let params = getRequestParam(); + if(params!=null){ + post(url,params); + } + } + function getRequestParam(){ + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByContract", "flowUnid=<%=flowunid%>,flowNo=<%=FlowNo%>"); + let index = appInfo.indexOf("@"); + if(index==-1){ + alert(appInfo); + return; + } + let appCode = appInfo.substr(0,index-1); + let appName = appInfo.substr(index+1,appInfo.length); + let code = 'ECM0002'; + if("<%=phaseNo%>"=="0010"){ + code = 'ECM0001'; + } + let busiNo = '<%=flowunid%>'; + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); + return param; + } + /** + * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 + * @param URL + * @param PARAMS + */ + function post(URL, param) { + let temp_form = document.createElement("form"); + temp_form.action = URL; + temp_form.target = "_blank"; + temp_form.method = "post"; + temp_form.style.display = "none"; + + let opt = document.createElement("textarea"); + opt.name = 'data'; + opt.value = param; + temp_form.appendChild(opt); + + document.body.appendChild(temp_form); + temp_form.submit(); + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/config/icms.properties b/config/icms.properties index e51f648c9..c2e4e76f0 100644 --- a/config/icms.properties +++ b/config/icms.properties @@ -1,11 +1,11 @@ url=http://192.168.7.71:8081/SunICMS/servlet/RouterServlet service_ip=192.168.7.71 -#链接有效时间,单位为秒 +#\u94FE\u63A5\u6709\u6548\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u79D2 useful_life=360 -#业务系统授权密钥 +#\u4E1A\u52A1\u7CFB\u7EDF\u6388\u6743\u5BC6\u94A5 secret_id=anpeng secret_key=IU2VHdejDpUFzhoeT7tUSII3 -#影像第三方上传时打包临时文件路径 -fileSavePathTemp=D:/data/files/icmsFileTemp +#\u5F71\u50CF\u7B2C\u4E09\u65B9\u4E0A\u4F20\u65F6\u6253\u5305\u4E34\u65F6\u6587\u4EF6\u8DEF\u5F84 +fileSavePathTemp=/Users/simba/data/files/icmsFileTemp diff --git a/src/com/ample/icms/check/ImageCheck.java b/src/com/ample/icms/check/ImageCheck.java index 806ae5dde..d8588cd4f 100644 --- a/src/com/ample/icms/check/ImageCheck.java +++ b/src/com/ample/icms/check/ImageCheck.java @@ -3,7 +3,8 @@ package com.ample.icms.check; import com.ample.icms.service.ImageService; public class ImageCheck extends ImageService { - public void getResult(){ + public String getResult(){ + this.setCode("ECM0013"); String result = doPost(); if(result.contains("200")){ //true @@ -12,5 +13,6 @@ public class ImageCheck extends ImageService { }else{ //false } + return result; } } diff --git a/src/com/ample/icms/init/IcmsRelationInit.java b/src/com/ample/icms/init/IcmsRelationInit.java new file mode 100644 index 000000000..1cde1f3f3 --- /dev/null +++ b/src/com/ample/icms/init/IcmsRelationInit.java @@ -0,0 +1,31 @@ +package com.ample.icms.init; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.flow.baseBussion.BaseBussiness; +import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP; + +public class IcmsRelationInit extends BaseBussiness { + @Override + public Object run(Transaction Sqlca) throws Exception { + JBOTransaction tx = Sqlca.getTransaction(); + BizObject boLPIT = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,tx).createQuery("flowunid=:flowunid").setParameter("flowunid",this.getAttribute("ObjectNo").toString()).getSingleResult(false); + String projectNo = boLPIT.getAttribute("project_no").toString(); + String productId = boLPIT.getAttribute("product_id").toString(); + SqlObject sql_icms = new SqlObject("select flown,app_code,app_name from icms_prd_rela where productid='"+productId+"' group by flown,app_code"); + ASResultSet rs = Sqlca.getASResultSet(sql_icms); + while (rs.next()){ + String flowNo = rs.getString("flown"); + String appCode = rs.getString("app_code"); + String appName = rs.getString("app_name"); + SqlObject sql_rela = new SqlObject("insert into icms_rela (id,project_no,flow_no,app_code,app_name) values(REPLACE(UUID(), '-', ''),'"+projectNo+"','"+flowNo+"','"+appCode+"','"+appName+"')"); + Sqlca.executeSQL(sql_rela); + } + String sMessage="true"; + return sMessage; + } +} diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java index 74a7c5e93..0c42d7858 100644 --- a/src/com/ample/icms/scan/ImageUpload.java +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -2,11 +2,12 @@ package com.ample.icms.scan; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.util.StringFunction; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; import com.ample.icms.service.ImageService; +import com.ample.icms.util.GetInfoUtil; import com.ample.icms.util.PropertiesUtil; import com.sunyard.insurance.ecm.socket.client.AutoScanApi; import com.tenwa.officetempalte.exportcallback.impl.ZipUtils; @@ -23,29 +24,33 @@ import java.util.ArrayList; import java.util.List; public class ImageUpload extends ImageService { - private String zipPath ; private String projectId; private String flowUnid; - private String fileSavePath; - public void doUpload(){ + private String flowNo; + private static final String FileSavePath = PropertiesUtil.get("fileSavePathTemp"); + public String doUpload(){ // String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; - String zipPath = PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip"; + String zipPath = FileSavePath+"/"+flowUnid+".zip"; + String result = "0"; try { AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); - String result = autoScanApi.ScanImageFile(appCode, zipPath); - String returnCode = result.substring(0,result.indexOf("@")); - String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1); - intoLog(returnCode,returnMsg); + result = autoScanApi.ScanImageFile(appCode, zipPath); } catch (Exception e) { e.printStackTrace(); } + return result; } public void intoLog(String code ,String msg) { Transaction transaction = null; Transaction.createTransaction("als"); SqlObject so = null; try { - so = new SqlObject("insert into icms_upload_log (id,flowunid,path,code,msg,inputtime) values ()"); + so = new SqlObject("insert into icms_upload_log (flowunid,path,code,msg,inputtime) values (:flowunid,:path,:code,:msg,:inputtime)"); + so.setParameter("flowunid",flowUnid); + so.setParameter("path",""); + so.setParameter("code",code); + so.setParameter("msg",msg); + so.setParameter("inputtime", StringFunction.getTodayNow()); transaction.executeSQL(so); transaction.commit(); } catch (Exception e) { @@ -54,29 +59,37 @@ public class ImageUpload extends ImageService { } - public void upload() throws JBOException, FileNotFoundException { + public String upload() throws Exception { /** * 1.找出需要上传的影像 * 3.在指定路径添加对应xml文件 * 4.打包上传 * 5.删除复制文件和打包文件 */ - FileOutputStream fos = new FileOutputStream(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".zip")); + FileOutputStream fos = new FileOutputStream(new File(FileSavePath+"/"+flowUnid+".zip")); ZipUtils zdo = new ZipUtils(); zdo.toZip(copyFile(),fos); + String result = doUpload(); + String returnCode = result.substring(0,result.indexOf("@")); + String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1); + if(returnCode == "1"){ + deleteTemp(); + }; + intoLog(returnCode,returnMsg); + return returnMsg; } /** * 上传成功后再删除 */ public void deleteTemp(){ - File f = new File(PropertiesUtil.get("fileSavePathTemp")); + File f = new File(FileSavePath); if(f.length()!=0){ ZipUtils zdo = new ZipUtils(); zdo.deleteFile(f,false); } } - public List copyFile() throws JBOException { + public List copyFile() throws Exception { List files = new ArrayList<>(); BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") @@ -88,16 +101,12 @@ public class ImageUpload extends ImageService { } //todo 加上xml文件 createXMl(); - File fileXML = new File("xmlpath"); + File fileXML = new File(FileSavePath+"/"+flowUnid+".xml"); files.add(fileXML); return files; } - public void createXMl() { - String appCode = "BQCW-000010"; - String appName = "签约文件"; - this.setAppCode(appCode); - this.setAppName(appName); - this.setBusiNo(flowUnid); + public void createXMl() throws Exception { + getAppInfo(); String xml = getRequestXML(); SAXReader saxReader = new SAXReader(); Document document; @@ -105,7 +114,7 @@ public class ImageUpload extends ImageService { document = saxReader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))); OutputFormat format = OutputFormat.createPrettyPrint(); format.setEncoding("UTF-8"); - XMLWriter writer = new XMLWriter(new FileWriter(new File(PropertiesUtil.get("fileSavePathTemp")+"/"+flowUnid+".xml")),format); + XMLWriter writer = new XMLWriter(new FileWriter(new File(FileSavePath+"/"+flowUnid+".xml")),format); writer.write(document); writer.close(); } catch (DocumentException e) { @@ -113,7 +122,40 @@ public class ImageUpload extends ImageService { } catch (IOException e) { e.printStackTrace(); } + } + public void getAppInfo() throws Exception { + GetInfoUtil gif = new GetInfoUtil(); + gif.setFlowUnid(flowUnid); + gif.setFlowNo(flowNo); + String appInfo = gif.getAppCodeByContract(); + String[] app = appInfo.split("@"); + this.setAppCode(app[0]); + this.setAppName(app[1]); + this.setBusiNo(flowUnid); + } + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getFlowUnid() { + return flowUnid; + } + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public String getFlowNo() { + return flowNo; + } + + public void setFlowNo(String flowNo) { + this.flowNo = flowNo; } } diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index 8d2d4c6ec..7dfe6b72b 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -7,16 +7,15 @@ import com.ample.icms.bean.ImageRoot; import com.ample.icms.util.PropertiesUtil; import com.sunyard.insurance.encode.client.EncodeAccessParam; import com.thoughtworks.xstream.XStream; -import org.apache.log4j.Logger; - -import java.io.IOException; -import java.util.ArrayList; - import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.SimpleHttpConnectionManager; import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.log4j.Logger; + +import java.io.IOException; +import java.util.ArrayList; public class ImageService { public Logger logger = Logger.getLogger(this.getClass()); @@ -77,13 +76,13 @@ public class ImageService { PostMethod postMethod = null; HttpClient httpClient = null; try { - postMethod = new PostMethod(PropertiesUtil.get("secret_key")); + postMethod = new PostMethod(PropertiesUtil.get("url")); // 设置格式 postMethod.getParams().setContentCharset("UTF-8"); postMethod.setParameter("data", getRequestParam()); // ICMS影像系统通过referer来验证白名单,所以必须将ip填写在这里 //todo - postMethod.setRequestHeader("Referer", "http://172.16.20.212/imaging"); + postMethod.setRequestHeader("Referer", "http://47.93.34.101/imaging"); httpClient = new HttpClient(); // 执行postMethod int statusCode = httpClient.executeMethod(postMethod); diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java new file mode 100644 index 000000000..b517ff6c3 --- /dev/null +++ b/src/com/ample/icms/util/GetInfoUtil.java @@ -0,0 +1,81 @@ +package com.ample.icms.util; + +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; + +public class GetInfoUtil { + private String flowUnid; + private String projectNo; + private String flowNo; + private String table; + public String getAppCodeByProject() throws Exception { + Transaction Sqlca = Transaction.createTransaction("als"); + SqlObject sql_icms = new SqlObject("select app_code,app_name from icms_rela where flow_no='"+flowNo+"' and project_no=(select PROJECT_NO from lb_project_info_temp where FLOWUNID='"+flowUnid+"')"); + //getStringMatrix()方法参数iMaxRow要比正常值+1,原系统bug + String[][] sReturn = Sqlca.getStringMatrix(sql_icms,2,2); + String appCode = null; + String appName = null; + if(sReturn.length>0){ + appCode = sReturn[0][0]; + appName = sReturn[0][1]; + } + if(Sqlca !=null){ + Sqlca.commit(); + } + if(appCode==null){ + return "未找到匹配的影像信息,请联系管理员"; + } + return appCode+"@"+appName; + } + + public String getAppCodeByContract() throws Exception { + Transaction Sqlca = Transaction.createTransaction("als"); + SqlObject sql_icms = new SqlObject("select app_code,app_name from icms_rela where flow_no='"+flowNo+"' and project_no=(select PROJECT_NO from lb_project_info where id=(select project_id from lb_contract_info_temp where FLOWUNID='"+flowUnid+"'))"); + String[][] sReturn = Sqlca.getStringMatrix(sql_icms,2,2); + String appCode = null; + String appName = null; + if(sReturn.length>0){ + appCode = sReturn[0][0]; + appName = sReturn[0][1]; + } + if(Sqlca !=null){ + Sqlca.commit(); + } + if(appCode==null){ + return "未找到匹配的影像信息,请联系管理员"; + } + return appCode+"@"+appName; + } + + public String getFlowUnid() { + return flowUnid; + } + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public String getProjectNo() { + return projectNo; + } + + public void setProjectNo(String projectNo) { + this.projectNo = projectNo; + } + + public String getFlowNo() { + return flowNo; + } + + public void setFlowNo(String flowNo) { + this.flowNo = flowNo; + } + + public String getTable() { + return table; + } + + public void setTable(String table) { + this.table = table; + } +} diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java new file mode 100644 index 000000000..de847edae --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java @@ -0,0 +1,28 @@ +package com.tenwa.lease.flow.project.commcheck; + +import com.amarsoft.app.alarm.AlarmBiz; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.check.ImageCheck; + +/** + * 资料清单检查 + * @author 20170524 + * + */ +public class IcmsDocListCheck extends AlarmBiz { + @Override + public Object run(Transaction Sqlca) throws Exception { + ImageCheck ic= new ImageCheck(); + ic.setAppCode(""); + ic.setAppName(""); + ic.setBusiNo(this.getAttribute("ObjectNo").toString()); + String result = ic.getResult(); + if(ic.getResult()=="200"){ + setPass(true); + }else{ + putMsg("资料清单未完全上传"); + setPass(false); + } + return null; + } +} From f60799ee61796fa2eabe322abdf866ce88338c81 Mon Sep 17 00:00:00 2001 From: ap007 Date: Tue, 24 May 2022 17:35:45 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=88=9D=E6=AD=A5=E6=B5=8B=E8=AF=95=E4=BF=AE=E5=A4=8D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBContractPersonBaseInfo.jsp | 17 +- .../MortgageFile/LbContactInfo.jsp | 10 +- .../BusinessChangeApplyList.jsp | 4 +- .../BusinessProjectTempInfo.jsp | 15 +- .../CautionMoneyDeduction/ContractInfoPay.jsp | 10 +- src/com/ample/icms/check/ImageCheck.java | 26 ++- src/com/ample/icms/init/IcmsRelationInit.java | 4 +- src/com/ample/icms/scan/ImageUpload.java | 4 +- src/com/ample/icms/service/ImageService.java | 2 +- src/com/ample/icms/util/GetInfoUtil.java | 204 +++++++++++++++--- .../project/commcheck/IcmsDocListCheck.java | 29 ++- 11 files changed, 249 insertions(+), 76 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp index 811ba6ecd..e7e556398 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp @@ -9,6 +9,7 @@ String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 String FlowNo=CurPage.getParameter("FlowNo");//流程名称 + String projectNo=CurPage.getParameter("ProjectNo");//项目编号 String sPrevUrl = CurPage.getParameter("PrevUrl"); String ishistory=CurPage.getParameter("IsHistory"); String compClientID = request.getParameter("CompClientID"); @@ -106,19 +107,26 @@ } } function getRequestParam(){ - let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByContract", "flowUnid=<%=sFlowUnid%>,flowNo=<%=FlowNo%>"); + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); let index = appInfo.indexOf("@"); if(index==-1){ alert(appInfo); return; } - let appCode = appInfo.substr(0,index-1); + let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); + if(appCode=='0000'){ + alert(appName); + return; + } let code = 'ECM0002'; - if("<%=sPhaseNo%>"=="0010"){ + if(("<%=sPhaseNo%>"=="0010")){ code = 'ECM0001'; } - let busiNo = '<%=sFlowUnid%>'; + let busiNo= "<%=projectNo%>"; + if(busiNo==null||busiNo==""||busiNo=="null"){ + busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); + } let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); return param; } @@ -133,7 +141,6 @@ temp_form.target = "_blank"; temp_form.method = "post"; temp_form.style.display = "none"; - let opt = document.createElement("textarea"); opt.name = 'data'; opt.value = param; diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp index 12f63e730..b9179fd19 100644 --- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp @@ -9,6 +9,7 @@ String sFlowUnid = CurPage.getParameter("FlowUnid"); String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 String FlowNo=CurPage.getParameter("FlowNo");//流程名称 + String projectNo=CurPage.getParameter("ProjectNo");//项目编号 if(sPrevUrl == null) sPrevUrl = ""; String sTempletNo = "LbContactInfo";//--模板号-- @@ -50,19 +51,22 @@ } } function getRequestParam(){ - let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByContract", "flowUnid=<%=sFlowUnid%>,flowNo=<%=FlowNo%>"); + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); let index = appInfo.indexOf("@"); if(index==-1){ alert(appInfo); return; } - let appCode = appInfo.substr(0,index-1); + let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); let code = 'ECM0002'; if("<%=sPhaseNo%>"=="0010"){ code = 'ECM0001'; } - let busiNo = '<%=sFlowUnid%>'; + let busiNo = '<%=projectNo%>'; + if(busiNo==null||busiNo==""||busiNo=="null"){ + busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); + } let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); return param; } diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp index 037230ef7..90c344feb 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessChangeApplyList.jsp @@ -15,7 +15,7 @@ sReturn = sReturn.split("@"); var id=sReturn[0] var product_id=sReturn[1]; - var project_id = sReturn[2]; + var projectNo = sReturn[2]; var project_name = sReturn[3]; var CustomerType = sReturn[4]; var carAttributes = sReturn[5]; @@ -35,7 +35,7 @@ return ; } var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>"; - sParams =sParams+",channel="+channel+",SubjectId="+SubjectId+",SubjectName="+SubjectName+",certtype="+certtype+",customertype="+CustomerType+",carAttributes="+carAttributes+",leasform="+leasehold+",operationType="+operationType+",ProjectId="+id+",ProductId="+product_id+",FlowKey="+project_id+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>"; + sParams =sParams+",channel="+channel+",SubjectId="+SubjectId+",SubjectName="+SubjectName+",certtype="+certtype+",customertype="+CustomerType+",carAttributes="+carAttributes+",leasform="+leasehold+",operationType="+operationType+",ProjectNo="+projectNo+",ProjectId="+id+",ProductId="+product_id+",FlowKey="+projectNo+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>"; var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams); if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return; var sReturnInfos=sReturnInfo.split("@"); diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index 07d011c7f..a090b6d5c 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -10,6 +10,7 @@ String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 String FlowNo=CurPage.getParameter("FlowNo");//流程名称 + String projectNo=CurPage.getParameter("ProjectNo");//项目编号 String sPrevUrl = CurPage.getParameter("PrevUrl"); String operationType = CurPage.getParameter("operationType");//获取产品类型 if(sPrevUrl == null) sPrevUrl = ""; @@ -181,8 +182,7 @@ } } function getRequestParam(){ - debugger; - let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByProject", "flowUnid=<%=sFlowUnid%>,flowNo=<%=FlowNo%>"); + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); let index = appInfo.indexOf("@"); if(index==-1){ alert(appInfo); @@ -191,10 +191,13 @@ let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); let code = 'ECM0002'; - if(("<%=sPhaseNo%>"=="0010") && ("<%=FlowNo%>"=="BusinessApplyFlow" || "<%=FlowNo%>" == "BusinessChangeFlow")){ + if(("<%=sPhaseNo%>"=="0010")){ code = 'ECM0001'; } - let busiNo = '<%=sFlowUnid%>'; + let busiNo="<%=projectNo%>" + if(busiNo==null||busiNo==""||busiNo=="null"){ + busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); + } let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); return param; } @@ -209,7 +212,6 @@ temp_form.target = "_blank"; temp_form.method = "post"; temp_form.style.display = "none"; - let opt = document.createElement("textarea"); opt.name = 'data'; opt.value = param; @@ -218,9 +220,6 @@ document.body.appendChild(temp_form); temp_form.submit(); } - function product(){ - RunJavaMethod("com.tenwa.util.test","product",""); - } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp index 52f7e7516..5e19eb7e3 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp @@ -13,6 +13,7 @@ String contractId = CurPage.getParameter("ContractId"); String compClientID = CurPage.getParameter("CompClientID"); String phaseNo = CurPage.getParameter("PhaseNo"); + String projectNo=CurPage.getParameter("ProjectNo");//项目编号 String ProductId = CurPage.getParameter("ProductId"); //String corpusSource = Sqlca.getString("select corpus_source from LB_CONTRACT_INFO_TEMP where flowunid = '"+flowunid+"'"); String projectId = CurPage.getParameter("ProjectId"); @@ -178,19 +179,22 @@ window.onload = function(){ } } function getRequestParam(){ - let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppCodeByContract", "flowUnid=<%=flowunid%>,flowNo=<%=FlowNo%>"); + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=flowunid%>"); let index = appInfo.indexOf("@"); if(index==-1){ alert(appInfo); return; } - let appCode = appInfo.substr(0,index-1); + let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); let code = 'ECM0002'; if("<%=phaseNo%>"=="0010"){ code = 'ECM0001'; } - let busiNo = '<%=flowunid%>'; + let busiNo = '<%=projectNo%>'; + if(busiNo==null||busiNo==""||busiNo=="null"){ + busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=flowunid%>"); + } let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); return param; } diff --git a/src/com/ample/icms/check/ImageCheck.java b/src/com/ample/icms/check/ImageCheck.java index d8588cd4f..afa7a6405 100644 --- a/src/com/ample/icms/check/ImageCheck.java +++ b/src/com/ample/icms/check/ImageCheck.java @@ -1,18 +1,26 @@ package com.ample.icms.check; import com.ample.icms.service.ImageService; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; public class ImageCheck extends ImageService { - public String getResult(){ + public String getResult() throws DocumentException { this.setCode("ECM0013"); - String result = doPost(); - if(result.contains("200")){ - //true - }else if(result.contains("-1")){ - //error - }else{ - //false + String result = this.doPost(); + String responseCode = ""; + String responseMsg = ""; + if("0000".equals(result)){ + responseCode = "0000"; + responseMsg = "连接影像系统失败,请及时联系管理员!"; + }else { + Document dom = DocumentHelper.parseText(result); + Element root = dom.getRootElement(); + responseCode = root.element("RESPONSE_CODE").getTextTrim(); + responseMsg = root.element("RESPONSE_MSG").getTextTrim(); } - return result; + return responseCode+"@"+responseMsg; } } diff --git a/src/com/ample/icms/init/IcmsRelationInit.java b/src/com/ample/icms/init/IcmsRelationInit.java index 1cde1f3f3..db3f8e840 100644 --- a/src/com/ample/icms/init/IcmsRelationInit.java +++ b/src/com/ample/icms/init/IcmsRelationInit.java @@ -16,10 +16,10 @@ public class IcmsRelationInit extends BaseBussiness { BizObject boLPIT = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,tx).createQuery("flowunid=:flowunid").setParameter("flowunid",this.getAttribute("ObjectNo").toString()).getSingleResult(false); String projectNo = boLPIT.getAttribute("project_no").toString(); String productId = boLPIT.getAttribute("product_id").toString(); - SqlObject sql_icms = new SqlObject("select flown,app_code,app_name from icms_prd_rela where productid='"+productId+"' group by flown,app_code"); + SqlObject sql_icms = new SqlObject("select flowno,app_code,app_name from icms_prd_rela where productid='"+productId+"' group by flowno,app_code"); ASResultSet rs = Sqlca.getASResultSet(sql_icms); while (rs.next()){ - String flowNo = rs.getString("flown"); + String flowNo = rs.getString("flowno"); String appCode = rs.getString("app_code"); String appName = rs.getString("app_name"); SqlObject sql_rela = new SqlObject("insert into icms_rela (id,project_no,flow_no,app_code,app_name) values(REPLACE(UUID(), '-', ''),'"+projectNo+"','"+flowNo+"','"+appCode+"','"+appName+"')"); diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java index 0c42d7858..8b657ca9c 100644 --- a/src/com/ample/icms/scan/ImageUpload.java +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -125,9 +125,7 @@ public class ImageUpload extends ImageService { } public void getAppInfo() throws Exception { GetInfoUtil gif = new GetInfoUtil(); - gif.setFlowUnid(flowUnid); - gif.setFlowNo(flowNo); - String appInfo = gif.getAppCodeByContract(); + String appInfo = gif.getAppInfoByFlowUnid(flowUnid); String[] app = appInfo.split("@"); this.setAppCode(app[0]); this.setAppName(app[1]); diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index 7dfe6b72b..c85c95e12 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -82,7 +82,7 @@ public class ImageService { postMethod.setParameter("data", getRequestParam()); // ICMS影像系统通过referer来验证白名单,所以必须将ip填写在这里 //todo - postMethod.setRequestHeader("Referer", "http://47.93.34.101/imaging"); + postMethod.setRequestHeader("Referer", "http://47.93.34.101"); httpClient = new HttpClient(); // 执行postMethod int statusCode = httpClient.executeMethod(postMethod); diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java index b517ff6c3..1ab119ff9 100644 --- a/src/com/ample/icms/util/GetInfoUtil.java +++ b/src/com/ample/icms/util/GetInfoUtil.java @@ -1,50 +1,175 @@ package com.ample.icms.util; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; +import java.sql.SQLException; + public class GetInfoUtil { private String flowUnid; private String projectNo; + private String productId; private String flowNo; - private String table; - public String getAppCodeByProject() throws Exception { - Transaction Sqlca = Transaction.createTransaction("als"); - SqlObject sql_icms = new SqlObject("select app_code,app_name from icms_rela where flow_no='"+flowNo+"' and project_no=(select PROJECT_NO from lb_project_info_temp where FLOWUNID='"+flowUnid+"')"); - //getStringMatrix()方法参数iMaxRow要比正常值+1,原系统bug - String[][] sReturn = Sqlca.getStringMatrix(sql_icms,2,2); - String appCode = null; - String appName = null; - if(sReturn.length>0){ - appCode = sReturn[0][0]; - appName = sReturn[0][1]; - } - if(Sqlca !=null){ - Sqlca.commit(); - } - if(appCode==null){ - return "未找到匹配的影像信息,请联系管理员"; - } - return appCode+"@"+appName; + private String sTable; + + /** + * 根据流程ID获取appCode和appName + * + * @return + * @throws Exception + */ + public String getAppInfoByFlowUnidRJM() throws Exception { + return getAppInfoByFlowUnid(this.flowUnid); } - public String getAppCodeByContract() throws Exception { + public String getAppInfoByFlowUnid(String flowUnid) throws Exception { Transaction Sqlca = Transaction.createTransaction("als"); - SqlObject sql_icms = new SqlObject("select app_code,app_name from icms_rela where flow_no='"+flowNo+"' and project_no=(select PROJECT_NO from lb_project_info where id=(select project_id from lb_contract_info_temp where FLOWUNID='"+flowUnid+"'))"); - String[][] sReturn = Sqlca.getStringMatrix(sql_icms,2,2); - String appCode = null; - String appName = null; - if(sReturn.length>0){ - appCode = sReturn[0][0]; - appName = sReturn[0][1]; + String projectNo = this.getProjectNoByFlowUnid(flowUnid, Sqlca); + if (projectNo == null || "".equals(projectNo)) { + return "0000@未找到当前流程对应的项目编号"; } - if(Sqlca !=null){ + String flowNo = this.getFlowNoByFlowUnid(flowUnid, Sqlca); + if (flowNo == null || "".equals(flowNo)) { + return "0000@未找到当前流程对应的流程编号"; + } + String appInfo = getAppInfoByProjectNo(projectNo, flowNo, Sqlca); + if(appInfo==null){ + String productId = getProductIdByFlowUnid(flowUnid, Sqlca); + appInfo = this.getAppInfoByProductId(productId, flowNo, Sqlca); + } + if (Sqlca != null) { Sqlca.commit(); } - if(appCode==null){ - return "未找到匹配的影像信息,请联系管理员"; + return appInfo; + } + + /** + * 根据项目编号和流程编号获取appCode和appName + * + * @return + * @throws SQLException + */ + public String getAppInfoByProjectNoRJM() throws SQLException, JBOException { + return getAppInfoByProjectNo(this.projectNo, this.flowNo); + } + + public String getAppInfoByProjectNo(String projectNo, String flowNo) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction("als"); + String appInfo = this.getAppInfoByProjectNo(projectNo, flowNo, Sqlca); + return appInfo; + } + + public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException, JBOException { + String sql = "select app_code,app_name from icms_rela where flow_no='" + flowNo + "' and project_no='" + projectNo + "'"; + SqlObject sql_icms = new SqlObject(sql); + ASResultSet rs = Sqlca.getASResultSet(sql_icms); + String appCode = null; + String appName = null; + while (rs.next()) { + appCode = rs.getString("app_code"); + appName = rs.getString("app_name"); } - return appCode+"@"+appName; + String appInfo = appCode + "@" + appName; + if (appCode == null) { + return null; + } + + return appInfo; + } + + /** + * 根据productId和流程编号获取appCode和appName + * + * @return + * @throws SQLException + */ + public String getAppInfoByProductIdRJM() throws SQLException, JBOException { + return getAppInfoByProjectNo(this.productId, this.flowNo); + } + + public String getAppInfoByProductId(String productId, String flowNo) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction("als"); + String appInfo = this.getAppInfoByProductId(productId, flowNo, Sqlca); + return appInfo; + } + + public String getAppInfoByProductId(String productId, String flowNo, Transaction Sqlca) throws SQLException, JBOException { + String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "' and productid='" + productId + "'"; + SqlObject sql_icms = new SqlObject(sql); + ASResultSet rs = Sqlca.getASResultSet(sql_icms); + String appCode = null; + String appName = null; + while (rs.next()) { + appCode = rs.getString("app_code"); + appName = rs.getString("app_name"); + } + if (appCode == null) { + return "0000@未找到初始化的影像信息配置,请联系管理员"; + } + String appInfo = appCode + "@" + appName; + return appInfo; + } + + /** + * 根据flowunid获取projectNo + * + * @return + * @throws SQLException + */ + public String getProjectNoByFlowUnidRJM() throws SQLException, JBOException { + return getProjectNoByFlowUnid(this.flowUnid); + } + + public String getProjectNoByFlowUnid(String flowUnid) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction("als"); + String projectNo = getProjectNoByFlowUnid(flowUnid, Sqlca); + if (Sqlca != null) { + Sqlca.commit(); + } + return projectNo; + } + + public String getProjectNoByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException { + String sql = "select PROJECT_NO from lb_project_info_temp where FLOWUNID='" + flowUnid + "'"; + String projectNo = Sqlca.getString(new SqlObject(sql)); + if (projectNo == null || "".equals(projectNo) || projectNo.length() == 0) { + sql = "select PROJECT_NO from lb_project_info where id=(select project_id from lb_contract_info_temp where FLOWUNID='" + flowUnid + "')"; + projectNo = Sqlca.getString(new SqlObject(sql)); + } + if (projectNo == null || "".equals(projectNo) || projectNo.length() == 0) { + return null; + } + return projectNo; + } + + /** + * 根据流程编号 + * + * @param flowUnid + * @param Sqlca + * @return + * @throws SQLException + */ + public String getFlowNoByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException { + String sql = "select flowno from flow_object where objectno='" + flowUnid + "'"; + String flowNo = Sqlca.getString(new SqlObject(sql)); + return flowNo; + } + + /** + * 根据flowunid获取productid + * + * @param flowUnid + * @param Sqlca + * @return + * @throws SQLException + */ + public String getProductIdByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException { + String sql = "select productId from flow_bussiness_object where flow_unid='" + flowUnid + "'"; + String productId = Sqlca.getString(new SqlObject(sql)); + return productId; } public String getFlowUnid() { @@ -71,11 +196,20 @@ public class GetInfoUtil { this.flowNo = flowNo; } - public String getTable() { - return table; + public String getsTable() { + return sTable; } - public void setTable(String table) { - this.table = table; + public void setsTable(String sTable) { + this.sTable = sTable; } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + } diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java index de847edae..b43ef1e48 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java @@ -3,6 +3,7 @@ package com.tenwa.lease.flow.project.commcheck; import com.amarsoft.app.alarm.AlarmBiz; import com.amarsoft.awe.util.Transaction; import com.ample.icms.check.ImageCheck; +import com.ample.icms.util.GetInfoUtil; /** * 资料清单检查 @@ -12,17 +13,35 @@ import com.ample.icms.check.ImageCheck; public class IcmsDocListCheck extends AlarmBiz { @Override public Object run(Transaction Sqlca) throws Exception { + String flowUnid = this.getAttribute("ObjectNo").toString(); + GetInfoUtil gif = new GetInfoUtil(); + String projectNo = gif.getProjectNoByFlowUnid(flowUnid); + if(projectNo==null){ + setPass(false); + putMsg("未找到匹配的项目编号,请联系管理员!"); + 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; + } ImageCheck ic= new ImageCheck(); - ic.setAppCode(""); - ic.setAppName(""); - ic.setBusiNo(this.getAttribute("ObjectNo").toString()); + ic.setAppCode(appCode); + ic.setAppName(appName); + ic.setBusiNo(projectNo); String result = ic.getResult(); - if(ic.getResult()=="200"){ + String[] resultInfo = result.split("@"); + if("200".equals(resultInfo[0])){ setPass(true); }else{ - putMsg("资料清单未完全上传"); setPass(false); } + putMsg(resultInfo[1]); return null; } } From bd2762000c606ba8f0cf87be8daeb730db140553 Mon Sep 17 00:00:00 2001 From: ap007 Date: Wed, 22 Jun 2022 16:34:44 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E9=82=AE=E5=AF=84=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E7=AD=89=E5=86=85=E5=AE=B9=E7=9A=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBnotAllMailHndHandoverTempList.jsp | 54 ++- .../Flow/Comm/LBProject/LBProjectInfo.jsp | 107 +++-- .../FileMailArching/FileMailArchivingList.jsp | 30 ++ WebContent/WEB-INF/etc/jbo/jbo_doc.xml | 413 ++++++++++-------- config/icms.properties | 4 +- src/com/ample/icms/bean/ImageMetaData.java | 12 - .../icms/bean/{ => image}/ImageAttr.java | 2 +- .../icms/bean/{ => image}/ImageBaseData.java | 2 +- .../icms/bean/{ => image}/ImageBatch.java | 14 +- .../icms/bean/{ => image}/ImageBizInfo.java | 2 +- .../icms/bean/{ => image}/ImageBizType.java | 2 +- .../ample/icms/bean/image/ImageMetaData.java | 22 + src/com/ample/icms/bean/image/ImageNode.java | 49 +++ src/com/ample/icms/bean/image/ImagePage.java | 124 ++++++ src/com/ample/icms/bean/image/ImagePages.java | 19 + .../icms/bean/{ => image}/ImageRoot.java | 2 +- .../icms/bean/{ => image}/ImageTree.java | 2 +- src/com/ample/icms/query/ImageCount.java | 13 + src/com/ample/icms/query/ImageQuery.java | 47 ++ src/com/ample/icms/scan/ImageDownload.java | 7 +- src/com/ample/icms/scan/ImageScan.java | 2 +- src/com/ample/icms/scan/ImageUpload.java | 123 ++++-- src/com/ample/icms/service/ImageService.java | 58 ++- src/com/ample/icms/util/GetInfoUtil.java | 137 +++++- .../app/tenwa/doc/LB_MAILARCHIVING_INFO.java | 39 ++ .../tenwa/doc/LB_MAILARCHIVING_INFO_TEMP.java | 41 ++ .../project/businessapply/DocMailAction.java | 97 +++- .../commbusiness/LBFileMailTempToFormal.java | 30 +- 28 files changed, 1098 insertions(+), 356 deletions(-) create mode 100644 WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp delete mode 100644 src/com/ample/icms/bean/ImageMetaData.java rename src/com/ample/icms/bean/{ => image}/ImageAttr.java (98%) rename src/com/ample/icms/bean/{ => image}/ImageBaseData.java (98%) rename src/com/ample/icms/bean/{ => image}/ImageBatch.java (85%) rename src/com/ample/icms/bean/{ => image}/ImageBizInfo.java (88%) rename src/com/ample/icms/bean/{ => image}/ImageBizType.java (93%) create mode 100644 src/com/ample/icms/bean/image/ImageMetaData.java create mode 100644 src/com/ample/icms/bean/image/ImageNode.java create mode 100644 src/com/ample/icms/bean/image/ImagePage.java create mode 100644 src/com/ample/icms/bean/image/ImagePages.java rename src/com/ample/icms/bean/{ => image}/ImageRoot.java (92%) rename src/com/ample/icms/bean/{ => image}/ImageTree.java (93%) create mode 100644 src/com/ample/icms/query/ImageCount.java create mode 100644 src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO.java create mode 100644 src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO_TEMP.java diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp index 1e0cfd6e2..0c6b2c8cd 100644 --- a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp +++ b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp @@ -7,6 +7,7 @@ */ String flowunid = CurPage.getParameter("ObjectNo"); String PhaseNo = CurPage.getParameter("PhaseNo"); + String projectNo = CurPage.getParameter("projectNo"); ASObjectModel doTemp = new ASObjectModel("LBnotAllMailHndHandoverTempList"); if("0010".equals(PhaseNo)){ // doTemp.setVisible("ALLHANDOVERSTATUS", false);//显示归档状态 @@ -145,26 +146,8 @@ },"邮寄详情"); } function viewOpinionFilelist(i){ - var contract_id=getItemValue(0, i, "PROJECT_ID"); - var ProductId=getItemValue(0, i, "PRODUCT_ID"); - var id=getItemValue(0, i, "id"); - var sUrl="/Tenwa/Apzl/FileUpload/PayDocMailList.jsp"; - AsDialog.PopView(sUrl,"contract_id="+contract_id+"&productId="+ProductId+"&FlowUnid=<%=flowunid%>&PhaseNo=<%=CurPage.getParameter("PhaseNo")%>&id="+id+"&type=his","dialogWidth=1200px;dialogHeight=600px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf(); - for(var i=0;i邮寄明细'; - } - if(getObj(0,i,"opinion")!=null&&getObj(0,i,"opinion")!="null"){ - getObj(0,i,"opinion").innerHTML='签署意见'; - } - if(getObj(0,i,"filelist")!=null&&getObj(0,i,"filelist")!="null"){ - getObj(0,i,"filelist").innerHTML='历史附件查看'; - } - if(getObj(0,i,"BusinessConditions")!=null&&getObj(0,i,"BusinessConditions")!="null"){ - getObj(0,i,"BusinessConditions").innerHTML='商务条件'; - } - } - },"邮寄详情"); + var projectId=getItemValue(0, i, "PROJECT_ID"); + openFileList(projectId); } function viewBusinessConditions(i){ var contract_id=getItemValue(0, i, "PROJECT_ID"); @@ -218,6 +201,37 @@ } } } + function openFileList(projectId){ + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); + let params = getRequestParam(projectId); + if(params!=null){ + post(url,params); + } + } + function getRequestParam(projectId){ + let code = 'ECM0002'; + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParamByProjectId","projectId="+projectId+",code="+code); + return param; + } + /** + * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 + * @param URL + * @param PARAMS + */ + function post(URL, param) { + let temp_form = document.createElement("form"); + temp_form.action = URL; + temp_form.target = "_blank"; + temp_form.method = "post"; + temp_form.style.display = "none"; + let opt = document.createElement("textarea"); + opt.name = 'data'; + opt.value = param; + temp_form.appendChild(opt); + + document.body.appendChild(temp_form); + temp_form.submit(); + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp index 6ca9ca668..4f62c3616 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp @@ -9,7 +9,7 @@ Content: 项目基本信息详情页面 Input Param: Output param: - History Log: + History Log: */ %> <%/*~END~*/%> @@ -26,6 +26,8 @@ <% String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 String FlowNo = CurPage.getParameter("FlowNo");//流程编号 + String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 + String projectNo=CurPage.getParameter("ProjectNo");//项目编号 if(sFlowUnid == null) sFlowUnid=""; String sTempletNo = CurPage.getParameter("TempletNo");//模板号 if(sTempletNo == null) sTempletNo = "LBProjectInfoTemp"; @@ -42,13 +44,13 @@ levelOrgId=orgid.substring(0, 9+(i+1)*4); } orgdeptname+=CurUser.getOrgName(); - + }else{ orgdeptname=CurUser.getOrgName(); orgidname=CurUser.getOrgName(); } String userid = CurUser.getUserID();//用户id - String useridname = CurUser.getUserName();//用户姓名 + String useridname = CurUser.getUserName();//用户姓名 String today = StringFunction.getToday(); String RightType=CurPage.getParameter("RightType"); String ishistory=CurPage.getParameter("IsHistory"); @@ -56,13 +58,13 @@ String productId = CurPage.getParameter("ProductId"); %> <%/*~END~*/%> - - + + <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%> - <% - + <% + ASObjectModel doTemp = new ASObjectModel(sTempletNo); - + if(null!=ishistory&&ishistory.equals("true") && !"ProjectApprovalFlow".equals(FlowNo)){ doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据 } @@ -73,36 +75,39 @@ doTemp.setRequired("LEAS_FORM", false); doTemp.setVisible("LEAS_FORM", false); } - + %> <%@ include file="/Tenwa/Lease/Flow/Comm/baseShowFormal.jspf"%> -<% +<% ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform + String ShowButton = "false"; if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ dwTemp.ReadOnly = "-2";//只读模式 RightType="ReadOnly"; - isShowButton=false; + // isShowButton=false; }else{ - isShowButton=true; + // isShowButton=true; + ShowButton = "true"; } - if(isShowForaml.equals("true")){ + if(isShowForaml.equals("true")){ dwTemp.genHTMLObjectWindow(sProjectId); }else{ dwTemp.genHTMLObjectWindow(sFlowUnid); } - + CurPage.getCurComp().setAttribute("RightType",RightType); %> <%/*~END~*/%> - - + + <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%> -<% +<% String sButtons[][] =null; sButtons= new String[][]{ - {"true","All","Button","保存","保存所有修改","saveRecord()","","","",""} + {ShowButton,"All","Button","保存","保存所有修改","saveRecord()","","","",""}, + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""} }; %> <%/*~END~*/%> @@ -118,10 +123,10 @@ //---------------------定义按钮事件------------------------------------ /*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/ function saveRecord(){ - - as_save("myiframe0"); + + as_save("myiframe0"); } - + <%/*~END~*/%> @@ -142,7 +147,7 @@ //选择项目协办 function selectAssist(){ AsDialog.OpenSelector("SelectManager","orgid,<%=orgid%>","dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.3) + "px",function(sReturn){ - + if(!sReturn || sReturn == "_CANCEL_"||sReturn=="_NONE_"||sReturn=="_CLEAR_"){ return; } @@ -150,11 +155,11 @@ setItemValue(0,getRow(),"PROJECT_ASSIST_NAME",sReturn[1]); setItemValue(0,getRow(),"PROJECT_ASSIST",sReturn[0]); },"请选项目协办"); - } + } <%/*~END~*/%> - - + + <%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%> + + <%/*~END~*/%> <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp new file mode 100644 index 000000000..26ef1fd5a --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/FileManager/FileMailArching/FileMailArchivingList.jsp @@ -0,0 +1,30 @@ + +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + ASObjectModel doTemp = new ASObjectModel("LBFileArchivingList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; + dwTemp.ReadOnly = "1"; + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); + + String sButtons[][] =new String[][] { + {"true","","Button","归档","归档","fileArchiving()","","","","btn_icon_edit"} + }; + +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_doc.xml b/WebContent/WEB-INF/etc/jbo/jbo_doc.xml index cacb4318d..39ffc6e35 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_doc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_doc.xml @@ -165,36 +165,36 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + @@ -212,174 +212,219 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/icms.properties b/config/icms.properties index c2e4e76f0..f90bfa037 100644 --- a/config/icms.properties +++ b/config/icms.properties @@ -1,5 +1,5 @@ -url=http://192.168.7.71:8081/SunICMS/servlet/RouterServlet -service_ip=192.168.7.71 +url=http://192.168.7.72:8081/SunICMS/servlet/RouterServlet +service_ip=192.168.7.72 #\u94FE\u63A5\u6709\u6548\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u79D2 useful_life=360 #\u4E1A\u52A1\u7CFB\u7EDF\u6388\u6743\u5BC6\u94A5 diff --git a/src/com/ample/icms/bean/ImageMetaData.java b/src/com/ample/icms/bean/ImageMetaData.java deleted file mode 100644 index 5a8fe4d91..000000000 --- a/src/com/ample/icms/bean/ImageMetaData.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.ample.icms.bean; - -import com.thoughtworks.xstream.annotations.XStreamAlias; -import com.thoughtworks.xstream.annotations.XStreamImplicit; - -import java.util.List; - -@XStreamAlias("META_DATA") -public class ImageMetaData { - @XStreamImplicit - public List imageBatchs ; -} diff --git a/src/com/ample/icms/bean/ImageAttr.java b/src/com/ample/icms/bean/image/ImageAttr.java similarity index 98% rename from src/com/ample/icms/bean/ImageAttr.java rename to src/com/ample/icms/bean/image/ImageAttr.java index 2b8c67a62..f37862156 100644 --- a/src/com/ample/icms/bean/ImageAttr.java +++ b/src/com/ample/icms/bean/image/ImageAttr.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; diff --git a/src/com/ample/icms/bean/ImageBaseData.java b/src/com/ample/icms/bean/image/ImageBaseData.java similarity index 98% rename from src/com/ample/icms/bean/ImageBaseData.java rename to src/com/ample/icms/bean/image/ImageBaseData.java index bdce5f6d7..d749e534f 100644 --- a/src/com/ample/icms/bean/ImageBaseData.java +++ b/src/com/ample/icms/bean/image/ImageBaseData.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; diff --git a/src/com/ample/icms/bean/ImageBatch.java b/src/com/ample/icms/bean/image/ImageBatch.java similarity index 85% rename from src/com/ample/icms/bean/ImageBatch.java rename to src/com/ample/icms/bean/image/ImageBatch.java index b94511dff..f1413cf06 100644 --- a/src/com/ample/icms/bean/ImageBatch.java +++ b/src/com/ample/icms/bean/image/ImageBatch.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; @@ -30,6 +30,10 @@ public class ImageBatch { private String endTime; + @XStreamAlias("PAGES") + private ImagePages pages; + + public String getAppCode() { return appCode; } @@ -77,4 +81,12 @@ public class ImageBatch { public void setEndTime(String endTime) { this.endTime = endTime; } + + public ImagePages getPages() { + return pages; + } + + public void setPages(ImagePages pages) { + this.pages = pages; + } } diff --git a/src/com/ample/icms/bean/ImageBizInfo.java b/src/com/ample/icms/bean/image/ImageBizInfo.java similarity index 88% rename from src/com/ample/icms/bean/ImageBizInfo.java rename to src/com/ample/icms/bean/image/ImageBizInfo.java index bb0ae82d6..b56929e51 100644 --- a/src/com/ample/icms/bean/ImageBizInfo.java +++ b/src/com/ample/icms/bean/image/ImageBizInfo.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; diff --git a/src/com/ample/icms/bean/ImageBizType.java b/src/com/ample/icms/bean/image/ImageBizType.java similarity index 93% rename from src/com/ample/icms/bean/ImageBizType.java rename to src/com/ample/icms/bean/image/ImageBizType.java index 6ec860f68..f7c6f48e1 100644 --- a/src/com/ample/icms/bean/ImageBizType.java +++ b/src/com/ample/icms/bean/image/ImageBizType.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; diff --git a/src/com/ample/icms/bean/image/ImageMetaData.java b/src/com/ample/icms/bean/image/ImageMetaData.java new file mode 100644 index 000000000..db19469a0 --- /dev/null +++ b/src/com/ample/icms/bean/image/ImageMetaData.java @@ -0,0 +1,22 @@ +package com.ample.icms.bean.image; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamImplicit; + +import java.util.List; + +@XStreamAlias("META_DATA") +public class ImageMetaData { + + @XStreamImplicit + private List imageBatchs ; + + public List getImageBatchs() { + return imageBatchs; + } + + public void setImageBatchs(List imageBatchs) { + this.imageBatchs = imageBatchs; + } + +} diff --git a/src/com/ample/icms/bean/image/ImageNode.java b/src/com/ample/icms/bean/image/ImageNode.java new file mode 100644 index 000000000..1843942dd --- /dev/null +++ b/src/com/ample/icms/bean/image/ImageNode.java @@ -0,0 +1,49 @@ +package com.ample.icms.bean.image; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamAsAttribute; + +import java.util.List; +@XStreamAlias("NODE") +public class ImageNode { + //影像资料归类代码 + @XStreamAlias("ID") + @XStreamAsAttribute + private String Id ; + + /** + * ADD:为新增 + * CLEAN_ADD:为整个资料分类下先删除再新增 + * MOD_ID:为根据PAGEID替换文件 + * DEL_ID:为根据PAGEID删除文件 + */ + @XStreamAlias("ACTION") + @XStreamAsAttribute + private String action ; + + private List page; + + public String getId() { + return Id; + } + + public void setId(String id) { + Id = id; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public List getPage() { + return page; + } + + public void setPage(List page) { + this.page = page; + } +} diff --git a/src/com/ample/icms/bean/image/ImagePage.java b/src/com/ample/icms/bean/image/ImagePage.java new file mode 100644 index 000000000..4c59c9cc1 --- /dev/null +++ b/src/com/ample/icms/bean/image/ImagePage.java @@ -0,0 +1,124 @@ +package com.ample.icms.bean.image; + +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamAsAttribute; + +@XStreamAlias("PAGE") +public class ImagePage { + //文件名称 + @XStreamAlias("FILE_NAME") + @XStreamAsAttribute + private String fileName ; + + //影像代码(在需要进行制定PAGEID删除和替换影像时需要传递) + @XStreamAlias("PAGEID") + @XStreamAsAttribute + private String pageId ; + + //影像序号(第三方系统图像编号,用于返回时告诉业务系统编号) + @XStreamAlias("FILE_NO") + @XStreamAsAttribute + private String fileNo ; + + //上传用户编号 + @XStreamAlias("UP_USER") + @XStreamAsAttribute + private String upUser ; + + //上传用户名称 + @XStreamAlias("UP_USER_NAME") + @XStreamAsAttribute + private String upUserName ; + + //上传用户机构编号 + @XStreamAlias("UP_ORG") + @XStreamAsAttribute + private String upOrg ; + + //上传用户机构名称 + @XStreamAlias("UP_ORGNAME") + @XStreamAsAttribute + private String upOrgName ; + + //上传时间 + @XStreamAlias("UP_TIME") + @XStreamAsAttribute + private String upTime ; + + //备注 + @XStreamAlias("REMARK") + @XStreamAsAttribute + private String remark ; + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getPageId() { + return pageId; + } + + public void setPageId(String pageId) { + this.pageId = pageId; + } + + public String getFileNo() { + return fileNo; + } + + public void setFileNo(String fileNo) { + this.fileNo = fileNo; + } + + public String getUpUser() { + return upUser; + } + + public void setUpUser(String upUser) { + this.upUser = upUser; + } + + public String getUpUserName() { + return upUserName; + } + + public void setUpUserName(String upUserName) { + this.upUserName = upUserName; + } + + public String getUpOrg() { + return upOrg; + } + + public void setUpOrg(String upOrg) { + this.upOrg = upOrg; + } + + public String getUpOrgName() { + return upOrgName; + } + + public void setUpOrgName(String upOrgName) { + this.upOrgName = upOrgName; + } + + public String getUpTime() { + return upTime; + } + + public void setUpTime(String upTime) { + this.upTime = upTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/com/ample/icms/bean/image/ImagePages.java b/src/com/ample/icms/bean/image/ImagePages.java new file mode 100644 index 000000000..b75e1c789 --- /dev/null +++ b/src/com/ample/icms/bean/image/ImagePages.java @@ -0,0 +1,19 @@ +package com.ample.icms.bean.image; + +import com.thoughtworks.xstream.annotations.XStreamAlias; + +import java.util.List; + +@XStreamAlias("PAGES") +public class ImagePages { + + private List nodes; + + public List getNodes() { + return nodes; + } + + public void setNodes(List nodes) { + this.nodes = nodes; + } +} diff --git a/src/com/ample/icms/bean/ImageRoot.java b/src/com/ample/icms/bean/image/ImageRoot.java similarity index 92% rename from src/com/ample/icms/bean/ImageRoot.java rename to src/com/ample/icms/bean/image/ImageRoot.java index e933fc91b..c736dbb42 100644 --- a/src/com/ample/icms/bean/ImageRoot.java +++ b/src/com/ample/icms/bean/image/ImageRoot.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; diff --git a/src/com/ample/icms/bean/ImageTree.java b/src/com/ample/icms/bean/image/ImageTree.java similarity index 93% rename from src/com/ample/icms/bean/ImageTree.java rename to src/com/ample/icms/bean/image/ImageTree.java index 985b87a72..43103650c 100644 --- a/src/com/ample/icms/bean/ImageTree.java +++ b/src/com/ample/icms/bean/image/ImageTree.java @@ -1,4 +1,4 @@ -package com.ample.icms.bean; +package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; diff --git a/src/com/ample/icms/query/ImageCount.java b/src/com/ample/icms/query/ImageCount.java new file mode 100644 index 000000000..8e6b59814 --- /dev/null +++ b/src/com/ample/icms/query/ImageCount.java @@ -0,0 +1,13 @@ +package com.ample.icms.query; + +import com.ample.icms.service.ImageService; + +public class ImageCount extends ImageService { + + public String getResult(){ + this.setCode("ECM0006"); + String result = this.doPost(); + return result; + } + +} diff --git a/src/com/ample/icms/query/ImageQuery.java b/src/com/ample/icms/query/ImageQuery.java index f9a223bca..e3105dd04 100644 --- a/src/com/ample/icms/query/ImageQuery.java +++ b/src/com/ample/icms/query/ImageQuery.java @@ -1,7 +1,54 @@ package com.ample.icms.query; +import com.alibaba.fastjson.JSONArray; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.bean.image.ImageBatch; +import com.ample.icms.bean.image.ImageMetaData; +import com.ample.icms.bean.image.ImageRoot; import com.ample.icms.service.ImageService; +import com.ample.icms.util.GetInfoUtil; + +import java.util.ArrayList; +import java.util.List; public class ImageQuery extends ImageService { + private String projectId; + private JSONArray allAppInfoJson; + public ImageRoot createData() throws Exception { + addBaseData(); + List batchs = new ArrayList<>(); + for(int i=0;i copyFile() throws JBOException { + public List copyFile() throws Exception { List files = new ArrayList<>(); BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") @@ -144,7 +143,7 @@ public class ImageDownload extends ImageService { files.add(fileXML); return files; } - public void createXMl() { + public void createXMl() throws Exception { String appCode = "BQCW-000010"; String appName = "签约文件"; this.setAppCode(appCode); diff --git a/src/com/ample/icms/scan/ImageScan.java b/src/com/ample/icms/scan/ImageScan.java index b7ddb3bb6..52be66e03 100644 --- a/src/com/ample/icms/scan/ImageScan.java +++ b/src/com/ample/icms/scan/ImageScan.java @@ -1,6 +1,6 @@ package com.ample.icms.scan; -import com.ample.icms.bean.ImageBaseData; +import com.ample.icms.bean.image.ImageBaseData; import com.ample.icms.service.ImageService; public class ImageScan extends ImageService { diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java index 8b657ca9c..67c3fd1b6 100644 --- a/src/com/ample/icms/scan/ImageUpload.java +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -6,6 +6,8 @@ import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.util.StringFunction; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; +import com.amarsoft.dict.als.manage.NameManager; +import com.ample.icms.bean.image.*; import com.ample.icms.service.ImageService; import com.ample.icms.util.GetInfoUtil; import com.ample.icms.util.PropertiesUtil; @@ -27,11 +29,57 @@ public class ImageUpload extends ImageService { private String projectId; private String flowUnid; private String flowNo; + private String projecNo; + private List files; private static final String FileSavePath = PropertiesUtil.get("fileSavePathTemp"); + + public List addNodes() throws Exception { + files = new ArrayList<>(); + List pages = new ArrayList<>(); + BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); + List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") + .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false); + for(BizObject bo : bos){ + String projectId = bo.getAttribute("project_id").toString(); + String fileName = bo.getAttribute("filename").toString(); + String inputUserId = bo.getAttribute("inputuserid").toString(); + String inputOrgId = bo.getAttribute("inputorgid").toString(); + String filePath = bo.getAttribute("fullpath").toString(); + + ImagePage page = new ImagePage(); + page.setFileName(fileName); + page.setUpUser(inputUserId); + page.setUpUserName(NameManager.getUserName(inputUserId)); + page.setUpOrg(inputOrgId); + page.setUpOrgName(NameManager.getOrgName(inputOrgId)); + page.setUpTime(StringFunction.getTodayNow()); + pages.add(page); + + File file = new File(filePath); + files.add(file); + } + ImageNode node = new ImageNode(); + //融资租赁合同套系 + node.setId("APZLJJ000080"); + node.setAction("ADD"); + node.setPage(pages); + List nodes = new ArrayList<>(); + nodes.add(node); + return nodes; + } + public ImageRoot createData() throws Exception { + addBaseData(); + ImagePages pages = addPages(addNodes()); + List batchs = new ArrayList<>(); + batchs.add(addBatch(appCode,appName,busiNo,pages)); + ImageMetaData metaData = addMetaData(batchs); + ImageRoot root = new ImageRoot(base,metaData); + return root; + } public String doUpload(){ // String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; - String zipPath = FileSavePath+"/"+flowUnid+".zip"; - String result = "0"; + String zipPath = FileSavePath+"/"+flowUnid+".zip"; + String result = "0"; try { AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); result = autoScanApi.ScanImageFile(appCode, zipPath); @@ -40,35 +88,18 @@ public class ImageUpload extends ImageService { } return result; } - public void intoLog(String code ,String msg) { - Transaction transaction = null; - Transaction.createTransaction("als"); - SqlObject so = null; - try { - so = new SqlObject("insert into icms_upload_log (flowunid,path,code,msg,inputtime) values (:flowunid,:path,:code,:msg,:inputtime)"); - so.setParameter("flowunid",flowUnid); - so.setParameter("path",""); - so.setParameter("code",code); - so.setParameter("msg",msg); - so.setParameter("inputtime", StringFunction.getTodayNow()); - transaction.executeSQL(so); - transaction.commit(); - } catch (Exception e) { - e.printStackTrace(); - } - - } public String upload() throws Exception { /** * 1.找出需要上传的影像 - * 3.在指定路径添加对应xml文件 - * 4.打包上传 - * 5.删除复制文件和打包文件 + * 2.在指定路径添加对应xml文件 + * 3.打包上传 + * 4.删除复制文件和打包文件 */ + createXMl(); FileOutputStream fos = new FileOutputStream(new File(FileSavePath+"/"+flowUnid+".zip")); ZipUtils zdo = new ZipUtils(); - zdo.toZip(copyFile(),fos); + zdo.toZip(files,fos); String result = doUpload(); String returnCode = result.substring(0,result.indexOf("@")); String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1); @@ -89,22 +120,6 @@ public class ImageUpload extends ImageService { zdo.deleteFile(f,false); } } - public List copyFile() throws Exception { - List files = new ArrayList<>(); - BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); - List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") - .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false); - for(BizObject bo : bos){ - String filePath = bo.getAttribute("fullpath").toString(); - File file = new File(filePath); - files.add(file); - } - //todo 加上xml文件 - createXMl(); - File fileXML = new File(FileSavePath+"/"+flowUnid+".xml"); - files.add(fileXML); - return files; - } public void createXMl() throws Exception { getAppInfo(); String xml = getRequestXML(); @@ -129,7 +144,7 @@ public class ImageUpload extends ImageService { String[] app = appInfo.split("@"); this.setAppCode(app[0]); this.setAppName(app[1]); - this.setBusiNo(flowUnid); + this.setBusiNo(projecNo); } public String getProjectId() { @@ -156,4 +171,30 @@ public class ImageUpload extends ImageService { this.flowNo = flowNo; } + public String getProjecNo() { + return projecNo; + } + + public void setProjecNo(String projecNo) { + this.projecNo = projecNo; + } + + public void intoLog(String code ,String msg) { + Transaction transaction = null; + Transaction.createTransaction("als"); + SqlObject so = null; + try { + so = new SqlObject("insert into icms_upload_log (flowunid,path,code,msg,inputtime) values (:flowunid,:path,:code,:msg,:inputtime)"); + so.setParameter("flowunid",flowUnid); + so.setParameter("path",""); + so.setParameter("code",code); + so.setParameter("msg",msg); + so.setParameter("inputtime", StringFunction.getTodayNow()); + transaction.executeSQL(so); + transaction.commit(); + } catch (Exception e) { + e.printStackTrace(); + } + + } } diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index c85c95e12..1fb69fb4a 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -1,9 +1,6 @@ package com.ample.icms.service; -import com.ample.icms.bean.ImageBaseData; -import com.ample.icms.bean.ImageBatch; -import com.ample.icms.bean.ImageMetaData; -import com.ample.icms.bean.ImageRoot; +import com.ample.icms.bean.image.*; import com.ample.icms.util.PropertiesUtil; import com.sunyard.insurance.encode.client.EncodeAccessParam; import com.thoughtworks.xstream.XStream; @@ -16,9 +13,11 @@ import org.apache.log4j.Logger; import java.io.IOException; import java.util.ArrayList; +import java.util.List; -public class ImageService { +public abstract class ImageService { public Logger logger = Logger.getLogger(this.getClass()); + protected String allAppInfo; protected String appCode; protected String appName; protected String code; @@ -35,25 +34,40 @@ public class ImageService { base.setOrgName("安鹏国际融资租赁(深圳)有限公司"); base.setRoleCode("admin"); } - public void addBatch(){ - batch = new ImageBatch(); - batch.setAppCode(this.appCode); - batch.setAppName(this.appName); - batch.setBusiNo(this.busiNo); + + public void addNode(String id ,String action ,List page){ + ImageNode node = new ImageNode(); + node.setId(id); + node.setAction(action); + node.setPage(page); } - public void addMetaData(){ - metaData = new ImageMetaData(); - metaData.imageBatchs = new ArrayList<>(); - metaData.imageBatchs.add(batch); + public ImagePages addPages(List nodes){ + ImagePages pages = new ImagePages(); + pages.setNodes(nodes); + return pages; } - public ImageRoot createData(){ + public ImageBatch addBatch(String appCode, String appName, String busiNo, ImagePages pages) { + ImageBatch batch = new ImageBatch(); + batch.setAppCode(appCode); + batch.setAppName(appName); + batch.setBusiNo(busiNo); + batch.setPages(pages); + return batch; + } + public ImageMetaData addMetaData(List batchs){ + ImageMetaData metaData = new ImageMetaData(); + metaData.setImageBatchs(batchs); + return metaData; + } + public ImageRoot createData() throws Exception { addBaseData(); - addBatch(); - addMetaData(); + List batchs = new ArrayList<>(); + batchs.add(addBatch(appCode,appName,busiNo,null)); + ImageMetaData metaData = addMetaData(batchs); ImageRoot root = new ImageRoot(base,metaData); return root; } - public String getRequestXML(){ + public String getRequestXML() throws Exception { XStream xs = new XStream(); xs.processAnnotations(ImageRoot.class); String xml = xs.toXML(createData()); @@ -160,4 +174,12 @@ public class ImageService { public void setBusiNo(String busiNo) { this.busiNo = busiNo; } + public String getAllAppInfo() { + return allAppInfo; + } + + public void setAllAppInfo(String allAppInfo) { + this.allAppInfo = allAppInfo; + } + } diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java index 1ab119ff9..d935d7229 100644 --- a/src/com/ample/icms/util/GetInfoUtil.java +++ b/src/com/ample/icms/util/GetInfoUtil.java @@ -1,6 +1,9 @@ package com.ample.icms.util; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; @@ -9,7 +12,9 @@ import java.sql.SQLException; public class GetInfoUtil { private String flowUnid; + private String projectId; private String projectNo; + private String contractId; private String productId; private String flowNo; private String sTable; @@ -60,7 +65,11 @@ public class GetInfoUtil { String appInfo = this.getAppInfoByProjectNo(projectNo, flowNo, Sqlca); return appInfo; } - + public String getAppInfoByProjectNo(String projectNo,String flowNo,JBOTransaction tx) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction(tx); + String appInfo = getAppInfoByProjectNo(projectNo,flowNo,Sqlca); + return appInfo; + } public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException, JBOException { String sql = "select app_code,app_name from icms_rela where flow_no='" + flowNo + "' and project_no='" + projectNo + "'"; SqlObject sql_icms = new SqlObject(sql); @@ -73,12 +82,74 @@ public class GetInfoUtil { } String appInfo = appCode + "@" + appName; if (appCode == null) { - return null; + String productId = getProductIdByProjectNo(projectNo,Sqlca); + appInfo = this.getAppInfoByProductId(productId, flowNo, Sqlca); } return appInfo; } + + public String getAllAppInfoByProjectIdRJMT(JBOTransaction tx) throws SQLException, JBOException { + return getAllAppInfoByProjectId(this.projectId,tx); + } + public String getAllAppInfoByProjectId(String projectId,JBOTransaction tx) throws SQLException, JBOException { + String projectNo = getProjectNoByProjectId(projectId,tx); + return getAllAppInfoByProjectNo(projectNo,tx); + } + public JSONArray getAllAppInfoJsonByProjectId(String projectId,JBOTransaction tx) throws SQLException, JBOException { + String projectNo = getProjectNoByProjectId(projectId,tx); + Transaction Sqlca = Transaction.createTransaction(tx); + return getAllAppInfoJsonByProjectNo(projectNo,Sqlca); + } + /** + * 根据项目编号和流程编号获取appCode和appName + * + * @return + * @throws SQLException + */ + public String getAllAppInfoByProjectNoRJM() throws SQLException, JBOException { + return getAllAppInfoByProjectNo(this.projectNo); + } + public String getAllAppInfoByProjectNoRJMT(JBOTransaction tx) throws SQLException, JBOException { + return getAllAppInfoByProjectNo(this.projectNo,tx); + } + public String getAllAppInfoByProjectNo(String projectNo) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction("als"); + String appInfo = this.getAllAppInfoByProjectNo(projectNo, Sqlca); + return appInfo; + } + public String getAllAppInfoByProjectNo(String projectNo,JBOTransaction tx) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction(tx); + String appInfo = this.getAllAppInfoByProjectNo(projectNo, Sqlca); + return appInfo; + } + + public String getAllAppInfoByProjectNo(String projectNo, Transaction Sqlca) throws SQLException { + return getAllAppInfoJsonByProjectNo(projectNo,Sqlca).toJSONString(); + } + public JSONArray getAllAppInfoJsonByProjectNo(String projectNo, Transaction Sqlca) throws SQLException { + String sql = "select app_code,app_name from icms_rela where project_no='" + projectNo + "'"; + SqlObject sql_icms = new SqlObject(sql); + ASResultSet rs = Sqlca.getASResultSet(sql_icms); + String appCode = null; + String appName = null; + JSONArray ja = new JSONArray(); + while (rs.next()) { + appCode = rs.getString("app_code"); + appName = rs.getString("app_name"); + JSONObject appInfo = new JSONObject(); + appInfo.put("app_code",appCode); + appInfo.put("app_name",appName); + appInfo.put("project_no",appName); + ja.add(appInfo); + } + if (appCode == null) { + return null; + } + return ja; + } + /** * 根据productId和流程编号获取appCode和appName * @@ -143,7 +214,48 @@ public class GetInfoUtil { } return projectNo; } - + /** + * 根据项目编号 + * + * @param tx + * @return + * @throws SQLException,JBOException + */ + public String getProjectNoByProjectIdRJMT(JBOTransaction tx) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction(tx); + String projectNo = getProjectNoByProjectId(projectId,Sqlca); + return projectNo; + } + public String getProjectNoByProjectId(String projectId, JBOTransaction tx) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction(tx); + String projectNo = getProjectNoByProjectId(projectId,Sqlca); + return projectNo; + } + public String getProjectNoByProjectId(String projectId, Transaction Sqlca) throws SQLException { + String sql = "select project_no from lb_project_info where id='" + projectId + "'"; + String projectNo = Sqlca.getString(new SqlObject(sql)); + return projectNo; + } + public String getProjectNoByContractIdRJMT(JBOTransaction tx) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction(tx); + String projectNo = getProjectNoByContractId(contractId,Sqlca); + return projectNo; + } + public String getProjectNoByContractId(String contractId, JBOTransaction tx) throws SQLException, JBOException { + Transaction Sqlca = Transaction.createTransaction(tx); + String projectNo = getProjectNoByContractId(contractId,Sqlca); + return projectNo; + } + public String getProjectNoByContractId(String contractId,Transaction Sqlca) throws SQLException { + String sql = "select project_no from lb_project_info where id=(select project_id from lb_contract_info where id=')"+contractId+"'"; + String projectNo = Sqlca.getString(new SqlObject(sql)); + return projectNo; + } + public String getProjectIdByContractId(String contractId,Transaction Sqlca) throws SQLException { + String sql = "select project_id from lb_contract_info where id='"+contractId+"'"; + String projectNo = Sqlca.getString(new SqlObject(sql)); + return projectNo; + } /** * 根据流程编号 * @@ -171,6 +283,11 @@ public class GetInfoUtil { String productId = Sqlca.getString(new SqlObject(sql)); return productId; } + public String getProductIdByProjectNo(String projectNo, Transaction Sqlca) throws SQLException { + String sql = "select product_id from lb_project_info where project_no=')"+projectNo+"'"; + String productId = Sqlca.getString(new SqlObject(sql)); + return productId; + } public String getFlowUnid() { return flowUnid; @@ -212,4 +329,18 @@ public class GetInfoUtil { this.productId = productId; } + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + public String getContractId() { + return contractId; + } + + public void setContractId(String contractId) { + this.contractId = contractId; + } } diff --git a/src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO.java b/src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO.java new file mode 100644 index 000000000..e621b81d2 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO.java @@ -0,0 +1,39 @@ +package jbo.app.tenwa.doc; + +/** +* - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LB_MAILARCHIVING_INFO { + /** + *

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.doc.LB_MAILARCHIVING_INFO"; + + public static final String ID = "ID"; + + public static final String PRODUCT_ID = "PRODUCT_ID"; + + public static final String PROJECT_NO = "PROJECT_NO"; + + public static final String PROJECT_ID = "PROJECT_ID"; + + public static final String CONTRACT_ID = "CONTRACT_ID"; + + public static final String MAILS_TATUS = "MAIL_STATUS"; + + public static final String HANDOVER_STATUS = "HANDOVER_STATUS"; + + public static final String APP_CODE = "APP_CODE"; + + public static final String APP_NAME = "APP_NAME"; + + public static final String NEW_FILE_CODE = "NEW_FILE_CODE"; + + public static final String NEW_FILE_NAME = "NEW_FILE_NAME"; + + public static final String IS_MUST = "IS_MUST"; + +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO_TEMP.java new file mode 100644 index 000000000..a7ece2508 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/doc/LB_MAILARCHIVING_INFO_TEMP.java @@ -0,0 +1,41 @@ +package jbo.app.tenwa.doc; + +/** +* - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LB_MAILARCHIVING_INFO_TEMP { + /** + *

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.doc.LB_MAILARCHIVING_INFO_TEMP"; + + public static final String ID = "ID"; + + public static final String PRODUCT_ID = "PRODUCT_ID"; + + public static final String PROJECT_NO = "PROJECT_NO"; + + public static final String PROJECT_ID = "PROJECT_ID"; + + public static final String CONTRACT_ID = "CONTRACT_ID"; + + public static final String MAILS_TATUS = "MAIL_STATUS"; + + public static final String HANDOVER_STATUS = "HANDOVER_STATUS"; + + public static final String APP_CODE = "APP_CODE"; + + public static final String APP_NAME = "APP_NAME"; + + public static final String NEW_FILE_CODE = "NEW_FILE_CODE"; + + public static final String NEW_FILE_NAME = "NEW_FILE_NAME"; + + public static final String IS_MUST = "IS_MUST"; + + public static final String FLOWUNID = "FLOWUNID"; + +} \ No newline at end of file diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/DocMailAction.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/DocMailAction.java index e1f143833..ee81d0307 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/DocMailAction.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/DocMailAction.java @@ -1,25 +1,24 @@ package com.tenwa.lease.flow.project.businessapply; +import com.amarsoft.are.jbo.*; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.query.ImageCount; +import com.ample.icms.util.GetInfoUtil; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import jbo.app.tenwa.doc.*; +import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import java.sql.SQLException; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; -import com.amarsoft.awe.util.Transaction; -import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO; -import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO_TEMP; -import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC; -import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC_TEMP; -import jbo.app.tenwa.doc.LM_MAILONLINE_DOC_TEMP; -import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; - -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOException; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.are.util.StringFunction; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; - public class DocMailAction { private String userid; @@ -42,6 +41,10 @@ public class DocMailAction { String [] contractlist = contractid.split("@"); Transaction Sqlca = Transaction.createTransaction(tx); for(String contractId:contractlist){ + String icmsResult = getDocList(contractId,tx); + if(!"sucess".equals(icmsResult)){ + return icmsResult; + } //邮寄状态 String ALLSTATUS = "none"; //总接收状态 @@ -76,6 +79,7 @@ public class DocMailAction { bo.setAttributeValue(LB_FILE_MAILARCHIVING_INFO_TEMP.opinion_comments, result); } lfmitBom.saveObject(bo); + fromCondtion.put("contract_id", contractId); otherProperty.put("flowunid", flowunid); DataOperatorUtil.copyJBOSet(LM_APPROVALOPINION_DOC.CLASS_NAME, fromCondtion,LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME, null, otherProperty,null, tx); @@ -85,13 +89,14 @@ public class DocMailAction { } public String deleteReadyMailList(JBOTransaction tx) throws JBOException{ BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx); - BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, tx); + //BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, tx); + BizObjectManager lmaitBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx); BizObjectManager ladtBom = JBOFactory.getBizObjectManager(LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME, tx); String [] contractlist = contractid.split("@"); for(String contractId:contractlist){ lfmitBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate(); - lmdtBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate(); + lmaitBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate(); ladtBom.createQuery("delete from O where contract_id = '"+contractId+"' and flowunid='"+flowunid+"'").executeUpdate(); } return "success"; @@ -178,6 +183,62 @@ public class DocMailAction { fboManage.saveObject(fbo); return "success"; } + public String getDocList(String contractid,JBOTransaction tx) throws SQLException, JBOException, DocumentException { + Transaction Sqlca = Transaction.createTransaction(tx); + String responseCode = ""; + String responseMsg = "sucess"; + GetInfoUtil giu = new GetInfoUtil(); + String projectNo = giu.getProjectNoByContractId(contractid,tx); + String app = giu.getAppInfoByProjectNo(projectNo,"MortgageFileMailFlow",tx); + String [] appInfo = app.split("@"); + String appCode = appInfo[0]; + String appName = appInfo[1]; + if("0000".equals(appCode)){ + responseMsg = appName; + return responseMsg; + } + ImageCount ic = new ImageCount(); + ic.setAppCode(appCode); + ic.setAppName(appName); + ic.setBusiNo(projectNo); + String result = ic.getResult(); + if("0000".equals(result)){ + responseMsg = "连接影像系统失败,请及时联系管理员!"; + return responseMsg; + }else { + BizObjectManager lfmitBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, tx); + Document dom = DocumentHelper.parseText(result); + Element root = dom.getRootElement(); + responseCode = root.element("RESPONSE_CODE").getTextTrim(); + if("400".equals(responseCode)){ + responseMsg = root.element("RESPONSE_MSG").getTextTrim(); + return responseMsg; + } + List nodes = root.element("ATREE_ALL").elements("NODE"); + for (Iterator it = nodes.iterator(); it.hasNext();){ + Element elm = (Element) it.next(); + String newFileCode = elm.element("DOC_CODE").getTextTrim(); + String newFileName = elm.element("DOC_NAME").getTextTrim(); + String isMust = elm.element("IS_MUST").getTextTrim(); + BizObject bo = lfmitBom.newObject(); + bo.setAttributeValue("PRODUCT_ID",giu.getProductIdByProjectNo(projectNo,Sqlca)); + bo.setAttributeValue("PROJECT_NO",projectNo); + bo.setAttributeValue("PROJECT_ID",giu.getProjectIdByContractId(contractid,Sqlca)); + bo.setAttributeValue("CONTRACT_ID",contractid); + bo.setAttributeValue("MAIL_STATUS","all"); + bo.setAttributeValue("HANDOVER_STATUS","none"); + bo.setAttributeValue("APP_CODE",appCode); + bo.setAttributeValue("APP_NAME",appName); + bo.setAttributeValue("NEW_FILE_CODE",newFileCode); + bo.setAttributeValue("NEW_FILE_NAME",newFileName); + bo.setAttributeValue("IS_MUST",isMust); + bo.setAttributeValue("FLOW_UNID",flowunid); + lfmitBom.saveObject(bo); + } + + } + return responseMsg; + } public String getUserid() { return userid; diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBFileMailTempToFormal.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBFileMailTempToFormal.java index 4ab69e56d..0cba5fbf8 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBFileMailTempToFormal.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBFileMailTempToFormal.java @@ -1,28 +1,16 @@ package com.tenwa.lease.flow.project.commbusiness; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import jbo.app.tenwa.calc.LC_RENT_PLAN; -import jbo.app.tenwa.calc.LC_RENT_PLAN_HIS; -import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO; -import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO_TEMP; -import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC; -import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC_TEMP; -import jbo.app.tenwa.doc.LM_MAILONLINE_DOC; -import jbo.app.tenwa.doc.LM_MAILONLINE_DOC_TEMP; - -import com.amarsoft.app.lc.workflow.action.GetFlowAction; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.awe.util.Transaction; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.flow.baseBussion.BaseBussiness; -import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService; -import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum; -import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp; +import jbo.app.tenwa.doc.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class LBFileMailTempToFormal extends BaseBussiness { @@ -35,10 +23,12 @@ public class LBFileMailTempToFormal extends BaseBussiness { MapotherProperty=new HashMap(); //获取所有邮寄的合同 BizObjectManager lfmiBom = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, Sqlca); - BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, Sqlca); + //BizObjectManager lmdtBom = JBOFactory.getBizObjectManager(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, Sqlca); + BizObjectManager lmatBom = JBOFactory.getBizObjectManager(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, Sqlca); List lfmitlist = lfmiBom.createQuery("flowunid =:flowunid").setParameter("flowunid", flowUnid).getResultList(true); fromCondtion.put("flowunid", flowUnid); DataOperatorUtil.copyJBOSet(LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME, fromCondtion, LM_APPROVALOPINION_DOC.CLASS_NAME, null, null, null, Sqlca); + DataOperatorUtil.copyJBOSet(LB_MAILARCHIVING_INFO_TEMP.CLASS_NAME, fromCondtion, LB_MAILARCHIVING_INFO.CLASS_NAME, null, null, null, Sqlca); for(BizObject bo:lfmitlist){ fromCondtion.put("flowunid", flowUnid); fromCondtion.put("contract_id", bo.getAttribute("contract_id").getString()); @@ -46,12 +36,12 @@ public class LBFileMailTempToFormal extends BaseBussiness { bo.setAttributeValue("is_flowing", "1"); lfmiBom.saveObject(bo); DataOperatorUtil.copySingleJBO(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME, fromCondtion, LB_FILE_MAILARCHIVING_INFO.CLASS_NAME,toCondtion, null, Sqlca); - List lmdtlist = lmdtBom.createQuery("flowunid=:flowunid and contract_id =:contract_id").setParameter("flowunid", flowUnid).setParameter("contract_id", bo.getAttribute("contract_id").getString()).getResultList(false); + /*List lmdtlist = lmatBom.createQuery("flowunid=:flowunid and contract_id =:contract_id").setParameter("flowunid", flowUnid).setParameter("contract_id", bo.getAttribute("contract_id").getString()).getResultList(false); for(BizObject bo1:lmdtlist){ fromCondtion.put("libraryid", bo1.getAttribute("libraryid").getString()); toCondtion.put("libraryid", bo1.getAttribute("libraryid").getString()); DataOperatorUtil.copySingleJBO(LM_MAILONLINE_DOC_TEMP.CLASS_NAME, fromCondtion, LM_MAILONLINE_DOC.CLASS_NAME,toCondtion, null,Sqlca); - } + }*/ fromCondtion.clear(); toCondtion.clear(); otherProperty.clear(); From 4e49195312b7b81d9aa371d4bc25603f900ac1dc Mon Sep 17 00:00:00 2001 From: ap007 Date: Fri, 24 Jun 2022 18:06:48 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E9=82=AE=E5=AF=84=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E7=AD=89=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Apzl/FileUpload/LBMailArchivingList.jsp | 81 +++++++++++++++++++ .../Apzl/FileUpload/LBPlaceFileTempInfo.jsp | 10 +-- .../LBnotAllMailHndHandoverTempList.jsp | 8 +- .../LmApprovaloppinionDocTempList.jsp | 4 +- .../BusinessProjectTempInfo.jsp | 4 + WebContent/WEB-INF/etc/jbo/jbo_doc.xml | 4 +- src/com/ample/icms/query/ImageQuery.java | 26 ++++-- src/com/ample/icms/util/GetInfoUtil.java | 36 +++++++-- .../app/tenwa/doc/LB_MAILARCHIVING_INFO.java | 55 +++++++++---- .../tenwa/doc/LB_MAILARCHIVING_INFO_TEMP.java | 59 ++++++++++---- .../project/businessapply/DocMailAction.java | 34 +++++++- 11 files changed, 264 insertions(+), 57 deletions(-) create mode 100644 WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp new file mode 100644 index 000000000..b66f3ec23 --- /dev/null +++ b/WebContent/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp @@ -0,0 +1,81 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2019-07-11 + Content: + History Log: + */ + String flowunid = CurPage.getParameter("FlowUnid"); + String PhaseNo = CurPage.getParameter("PhaseNo"); + String projectNo = CurPage.getParameter("projectNo"); + String contractId = CurPage.getParameter("contract_id"); + String isHistory = CurPage.getParameter("IsHistory"); + String model = "LBMailArchivingListTemp"; + String params = flowunid+","+contractId; + if("true".equals(isHistory)){ + model = "LBMailArchivingList"; + params = contractId; + } + ASObjectModel doTemp = new ASObjectModel(model); + if("0010".equals(PhaseNo)){ + doTemp.setVisible("HANDOVER_STATUS", false); + } + if("0020".equals(PhaseNo)){ + doTemp.setReadOnly("MAIL_STATUS", true); + } +// doTemp.setLockCount(2); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; + //--设置为Grid风格-- + dwTemp.ReadOnly = "0"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(params); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"0010".equals(CurPage.getParameter("PhaseNo"))&&!"true".equals(isHistory)?"true":"false","","Button","保存","保存邮寄状态","saveMailStatus()","","","",""}, + }; +%> +<%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp index fabb48598..6325eac49 100644 --- a/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp +++ b/WebContent/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp @@ -14,7 +14,7 @@ String sFlowNo= CurPage.getParameter("FlowNo"); String PhaseNo= CurPage.getParameter("PhaseNo"); String userName = CurUser.getUserName(); - + String isHistory = CurPage.getParameter("IsHistory"); sFlowNo = "MortgageFileMailFlow"; BizObject flow=GetFlowAction.getFlowBussinessObject(sFlowunid); String product=CurPage.getParameter("productId"); @@ -49,13 +49,13 @@ dwTemp.Style = "2";//freeform //dwTemp.ReadOnly = "-2";//只读模式 dwTemp.genHTMLObjectWindow(CurPage.getParameter("id")); - dwTemp.replaceColumn("placefile", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("placefile", "", CurPage.getObjectWindowOutput()); dwTemp.replaceColumn("opinion", "", CurPage.getObjectWindowOutput()); String sButtons[][] = { {"true","All","Button","保存","保存所有修改","save()","","","",""}, {"false","All","Button","返回","返回列表","returnList()","","","",""}, - {"0020".equals(CurPage.getParameter("PhaseNo"))&&!"his".equals(type)?"true":"false","","Button","一键归档","一键归档","guidang()","","","",""}, + {"0020".equals(CurPage.getParameter("PhaseNo"))&&!"true".equals(isHistory)?"true":"false","All","Button","一键归档","一键归档","guidang()","","","",""}, }; // sButtonPosition = "south"; @@ -79,11 +79,11 @@ } //as_save(0,'frame_list.window.saveRecordForApprove()'); IE浏览器不起作用 - as_save(0,'$("#frame_list")[0].contentWindow.saveRecordForApprove();'); + as_save(0,'$("#frame_list")[0].contentWindow.saveAcrhivingStatus();'); } function guidang(){ - $("#frame_list")[0].contentWindow.guidang(); + $("#frame_list")[0].contentWindow.doAcrhiving(); } diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp index 0c6b2c8cd..1a0c50513 100644 --- a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp +++ b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp @@ -124,7 +124,7 @@ var contract_id=getItemValue(0, i, "contract_id"); var ProductId=getItemValue(0, i, "PRODUCT_ID"); var id=getItemValue(0, i, "id"); - var sUrl="/Tenwa/Apzl/FileUpload/DocMailListMain.jsp"; + var sUrl="/Tenwa/Apzl/FileUpload/LBMailArchivingList.jsp"; if('0010'!='<%=PhaseNo%>'){ sUrl="/Tenwa/Apzl/FileUpload/LBPlaceFileTempInfo.jsp"; } @@ -204,13 +204,17 @@ function openFileList(projectId){ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); let params = getRequestParam(projectId); + if(params=='error'){ + alert('未找到对应的影像配置,请联系管理员'); + return; + } if(params!=null){ post(url,params); } } function getRequestParam(projectId){ let code = 'ECM0002'; - let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParamByProjectId","projectId="+projectId+",code="+code); + let param = RunJavaMethodTrans("com.ample.icms.query.ImageQuery","getRequestParamByProjectIdJMT","projectId="+projectId+",code="+code); return param; } /** diff --git a/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp index 60f0911f7..6a42982d9 100644 --- a/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp +++ b/WebContent/Tenwa/Apzl/FileUpload/LmApprovaloppinionDocTempList.jsp @@ -18,8 +18,8 @@ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 String sButtons[][] = { {"0010".equals(PhaseNo)?"false":"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, - {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, - {"0010".equals(PhaseNo)?"false":"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, + {"true","All","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"0010".equals(PhaseNo)?"false":"true","All","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""}, }; %><%@include file="/Frame/resources/include/ui/include_list.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp index b9179fd19..915c15608 100644 --- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbContactInfo.jsp @@ -5,6 +5,8 @@ Content: 示例详情页面 History Log: */ + String userId= CurUser.getUserID(); + String userName = CurUser.getUserName(); String sPrevUrl = CurPage.getParameter("PrevUrl"); String sFlowUnid = CurPage.getParameter("FlowUnid"); String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 @@ -47,7 +49,7 @@ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); let params = getRequestParam(); if(params!=null){ - post(url,params); + AsControl.postICMS(url,params); } } function getRequestParam(){ @@ -59,6 +61,10 @@ } let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); + if(appCode=='0000'){ + alert(appName); + return; + } let code = 'ECM0002'; if("<%=sPhaseNo%>"=="0010"){ code = 'ECM0001'; @@ -67,28 +73,9 @@ if(busiNo==null||busiNo==""||busiNo=="null"){ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); } - let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"); return param; } - /** - * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 - * @param URL - * @param PARAMS - */ - function post(URL, param) { - let temp_form = document.createElement("form"); - temp_form.action = URL; - temp_form.target = "_blank"; - temp_form.method = "post"; - temp_form.style.display = "none"; - let opt = document.createElement("textarea"); - opt.name = 'data'; - opt.value = param; - temp_form.appendChild(opt); - - document.body.appendChild(temp_form); - temp_form.submit(); - } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index ddaff7e11..46020e1d6 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -7,6 +7,8 @@ Content: 示例详情页面 History Log: */ + String userId= CurUser.getUserID(); + String userName = CurUser.getUserName(); String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 String FlowNo=CurPage.getParameter("FlowNo");//流程名称 @@ -178,7 +180,7 @@ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); let params = getRequestParam(); if(params!=null){ - post(url,params); + AsControl.postICMS(url,params); } } function getRequestParam(){ @@ -195,35 +197,17 @@ return; } let code = 'ECM0002'; - if(("<%=sPhaseNo%>"=="0010")){ + if(("<%=FlowNo%>"=="BusinessApplyFlow"||"<%=FlowNo%>"=="BusinessChangeFlow")&&"<%=sPhaseNo%>"=="0010"){ code = 'ECM0001'; } let busiNo="<%=projectNo%>" if(busiNo==null||busiNo==""||busiNo=="null"){ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); } - let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"); return param; } - /** - * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 - * @param URL - * @param PARAMS - */ - function post(URL, param) { - let temp_form = document.createElement("form"); - temp_form.action = URL; - temp_form.target = "_blank"; - temp_form.method = "post"; - temp_form.style.display = "none"; - let opt = document.createElement("textarea"); - opt.name = 'data'; - opt.value = param; - temp_form.appendChild(opt); - document.body.appendChild(temp_form); - temp_form.submit(); - } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp index 5e19eb7e3..54a4499d3 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/ContractInfoPay.jsp @@ -6,6 +6,8 @@ Content: 示例详情页面 History Log: */ + String userId= CurUser.getUserID(); + String userName = CurUser.getUserName(); String orgId = CurUser.getOrgID(); String ishistory = CurPage.getParameter("IsHistory"); String flowunid = CurPage.getParameter("FlowUnid"); @@ -18,7 +20,6 @@ //String corpusSource = Sqlca.getString("select corpus_source from LB_CONTRACT_INFO_TEMP where flowunid = '"+flowunid+"'"); String projectId = CurPage.getParameter("ProjectId"); String gpsVendor = Sqlca.getString("select cl.itemname from lb_project_info lpi left join LM_GPS_ORDER lgr on lgr.apply_no=lpi.project_no left join code_library cl on cl.itemno=lgr.source and cl.codeno='gpsVendor' where lpi.id='"+projectId+"'"); - String userId = CurUser.getUserID(); //gps来源 中瑞1 天易0 String source = Sqlca.getString("SELECT SOURCE from LM_GPS_ORDER where PROJECT_ID='"+projectId+"'"); String orderNo = Sqlca.getString("SELECT ORDER_NO from LM_GPS_ORDER where PROJECT_ID='"+projectId+"'"); @@ -175,7 +176,7 @@ window.onload = function(){ let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); let params = getRequestParam(); if(params!=null){ - post(url,params); + AsControl.postICMS(url,params); } } function getRequestParam(){ @@ -187,6 +188,10 @@ window.onload = function(){ } let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); + if(appCode=='0000'){ + alert(appName); + return; + } let code = 'ECM0002'; if("<%=phaseNo%>"=="0010"){ code = 'ECM0001'; @@ -195,28 +200,9 @@ window.onload = function(){ if(busiNo==null||busiNo==""||busiNo=="null"){ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=flowunid%>"); } - let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"); return param; } - /** - * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 - * @param URL - * @param PARAMS - */ - function post(URL, param) { - let temp_form = document.createElement("form"); - temp_form.action = URL; - temp_form.target = "_blank"; - temp_form.method = "post"; - temp_form.style.display = "none"; - let opt = document.createElement("textarea"); - opt.name = 'data'; - opt.value = param; - temp_form.appendChild(opt); - - document.body.appendChild(temp_form); - temp_form.submit(); - } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index 1fb69fb4a..be3b0a676 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -18,6 +18,8 @@ import java.util.List; public abstract class ImageService { public Logger logger = Logger.getLogger(this.getClass()); protected String allAppInfo; + protected String userCode; + protected String userName; protected String appCode; protected String appName; protected String code; @@ -25,10 +27,15 @@ public abstract class ImageService { protected ImageBaseData base; protected ImageBatch batch; protected ImageMetaData metaData; + public void addBaseData(){ base = new ImageBaseData(); - base.setUserCode("admin"); - base.setUserName("admin"); + if("".equals(userCode)||userCode==null){ + userCode = "system"; + userName = "system"; + } + base.setUserCode(userCode); + base.setUserName(userName); base.setOrgCode("0005"); base.setComCode("0005"); base.setOrgName("安鹏国际融资租赁(深圳)有限公司"); @@ -182,4 +189,19 @@ public abstract class ImageService { this.allAppInfo = allAppInfo; } + public String getUserCode() { + return userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } } From 8ef28c5c3ce86d2d9c0df8d6485dbf5b21ede1e0 Mon Sep 17 00:00:00 2001 From: ap007 Date: Tue, 5 Jul 2022 18:16:16 +0800 Subject: [PATCH 16/20] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=92=8C=E7=AC=AC=E4=B8=89=E6=96=B9=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBnotAllMailHndHandoverTempList.jsp | 22 +-- .../Lessee/Person/CustomerCompanyTempInfo.jsp | 8 + .../Comm/LBContract/LBContractPrintList.jsp | 7 +- .../LBContractPersonBaseInfo.jsp | 5 +- .../MortgageFile/LbContactInfo.jsp | 54 +++--- .../BusinessProjectTempInfo.jsp | 6 +- .../BusinessApplication/CustomerInfo.jsp | 10 +- src/com/ample/icms/bean/image/ImageBatch.java | 23 +++ src/com/ample/icms/bean/image/ImageNode.java | 3 +- src/com/ample/icms/bean/image/ImagePages.java | 3 +- src/com/ample/icms/check/ImageCheck.java | 24 ++- src/com/ample/icms/init/IcmsRelationInit.java | 5 +- src/com/ample/icms/query/ImageQuery.java | 23 +-- src/com/ample/icms/scan/ImageUpload.java | 160 +++--------------- .../ample/icms/service/ImageQueryService.java | 120 +++++++++++++ src/com/ample/icms/service/ImageService.java | 18 ++ .../icms/service/ImageUploadService.java | 147 ++++++++++++++++ .../project/commcheck/IcmsDocListCheck.java | 4 +- 18 files changed, 423 insertions(+), 219 deletions(-) create mode 100644 src/com/ample/icms/service/ImageQueryService.java create mode 100644 src/com/ample/icms/service/ImageUploadService.java diff --git a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp index 1a0c50513..575487c85 100644 --- a/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp +++ b/WebContent/Tenwa/Apzl/FileUpload/LBnotAllMailHndHandoverTempList.jsp @@ -209,33 +209,15 @@ return; } if(params!=null){ - post(url,params); + AsControl.postICMS(url,params); } } function getRequestParam(projectId){ let code = 'ECM0002'; - let param = RunJavaMethodTrans("com.ample.icms.query.ImageQuery","getRequestParamByProjectIdJMT","projectId="+projectId+",code="+code); + let param = RunJavaMethodTrans("com.ample.icms.service.ImageQueryService","getRequestParamByProjectIdJMT","projectId="+projectId+",code="+code); return param; } - /** - * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 - * @param URL - * @param PARAMS - */ - function post(URL, param) { - let temp_form = document.createElement("form"); - temp_form.action = URL; - temp_form.target = "_blank"; - temp_form.method = "post"; - temp_form.style.display = "none"; - let opt = document.createElement("textarea"); - opt.name = 'data'; - opt.value = param; - temp_form.appendChild(opt); - document.body.appendChild(temp_form); - temp_form.submit(); - } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Customer/Lessee/Person/CustomerCompanyTempInfo.jsp b/WebContent/Tenwa/Customer/Lessee/Person/CustomerCompanyTempInfo.jsp index 7381c2037..c96470b7f 100644 --- a/WebContent/Tenwa/Customer/Lessee/Person/CustomerCompanyTempInfo.jsp +++ b/WebContent/Tenwa/Customer/Lessee/Person/CustomerCompanyTempInfo.jsp @@ -197,5 +197,13 @@ document.getElementById("NETCERTNAME").value = ''; } } + function getIdentity(){ + var certId = getItemValue(0,getRow(),"CERTID"); + return certId; + } + function getCustomerName(){ + var customerName = getItemValue(0,getRow(),"enterprisename"); + return customerName; + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp index e5d249bac..495d24eb8 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp @@ -8,7 +8,7 @@ String custtype = CurPage.getParameter("CustomerType"); String PhaseNo = CurPage.getParameter("PhaseNo"); String projectId = CurPage.getParameter("ProjectId"); -// String signStatus = CurPage.getParameter("SignStatus"); + String ProjectNo = CurPage.getParameter("ProjectNo"); String contractNumber = CurPage.getParameter("ContractNumber"); String productId = CurPage.getParameter("ProductId"); String flowunid = CurPage.getParameter("FlowUnid"); @@ -55,8 +55,9 @@ <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index 46020e1d6..27dcf44e3 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -200,11 +200,13 @@ if(("<%=FlowNo%>"=="BusinessApplyFlow"||"<%=FlowNo%>"=="BusinessChangeFlow")&&"<%=sPhaseNo%>"=="0010"){ code = 'ECM0001'; } - let busiNo="<%=projectNo%>" + let busiNo="<%=projectNo%>"; if(busiNo==null||busiNo==""||busiNo=="null"){ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); } - let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"); + let identity = $("#frame_list")[0].contentWindow.getIdentity(); + let customerName = $("#frame_list")[0].contentWindow.getCustomerName(); + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"+",identity="+identity+",customerName="+customerName); return param; } diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index 8f431cd14..de5888cc2 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -693,7 +693,7 @@ } function ValidityCheck(){ - if(<%=customerType%> == '03'){ //个人客户 + if('<%=customerType%>' == '03'){ //个人客户 //校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致 var certType = getItemValue(0,getRow(),"CERTTYPE"); var certID = getItemValue(0,getRow(),"CERTID"); @@ -898,5 +898,13 @@ var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertIdAll",sParams); return sReturnInfo; } + function getIdentity(){ + var certId = getItemValue(0,getRow(),"CERTID"); + return certId; + } + function getCustomerName(){ + var customerName = getItemValue(0,getRow(),"FULLNAME"); + return customerName; + } <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/src/com/ample/icms/bean/image/ImageBatch.java b/src/com/ample/icms/bean/image/ImageBatch.java index f1413cf06..c56bfd85e 100644 --- a/src/com/ample/icms/bean/image/ImageBatch.java +++ b/src/com/ample/icms/bean/image/ImageBatch.java @@ -17,6 +17,14 @@ public class ImageBatch { @XStreamAlias("BUSI_NO") private String busiNo ; + //客户身份证号 + @XStreamAlias("IDENTITY") + private String identity; + //客户名称 + + @XStreamAlias("CUSTOMER_NAME") + private String customerName; + //业务扩展索引(非必填) @XStreamAlias("CARNO") private String carNo ; @@ -89,4 +97,19 @@ public class ImageBatch { public void setPages(ImagePages pages) { this.pages = pages; } + public String getIdentity() { + return identity; + } + + public void setIdentity(String identity) { + this.identity = identity; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } } diff --git a/src/com/ample/icms/bean/image/ImageNode.java b/src/com/ample/icms/bean/image/ImageNode.java index 1843942dd..4c149c964 100644 --- a/src/com/ample/icms/bean/image/ImageNode.java +++ b/src/com/ample/icms/bean/image/ImageNode.java @@ -2,6 +2,7 @@ package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; +import com.thoughtworks.xstream.annotations.XStreamImplicit; import java.util.List; @XStreamAlias("NODE") @@ -20,7 +21,7 @@ public class ImageNode { @XStreamAlias("ACTION") @XStreamAsAttribute private String action ; - + @XStreamImplicit private List page; public String getId() { diff --git a/src/com/ample/icms/bean/image/ImagePages.java b/src/com/ample/icms/bean/image/ImagePages.java index b75e1c789..337480d4c 100644 --- a/src/com/ample/icms/bean/image/ImagePages.java +++ b/src/com/ample/icms/bean/image/ImagePages.java @@ -1,12 +1,13 @@ package com.ample.icms.bean.image; import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamImplicit; import java.util.List; @XStreamAlias("PAGES") public class ImagePages { - + @XStreamImplicit private List nodes; public List getNodes() { diff --git a/src/com/ample/icms/check/ImageCheck.java b/src/com/ample/icms/check/ImageCheck.java index afa7a6405..9fa850a6a 100644 --- a/src/com/ample/icms/check/ImageCheck.java +++ b/src/com/ample/icms/check/ImageCheck.java @@ -10,17 +10,31 @@ public class ImageCheck extends ImageService { public String getResult() throws DocumentException { this.setCode("ECM0013"); String result = this.doPost(); - String responseCode = ""; + return result; + } + public String resultAnalysis(String result) throws DocumentException { + String falg = "false"; String responseMsg = ""; if("0000".equals(result)){ - responseCode = "0000"; responseMsg = "连接影像系统失败,请及时联系管理员!"; }else { Document dom = DocumentHelper.parseText(result); Element root = dom.getRootElement(); - responseCode = root.element("RESPONSE_CODE").getTextTrim(); - responseMsg = root.element("RESPONSE_MSG").getTextTrim(); + String responseCode = root.element("RESPONSE_CODE").getTextTrim(); + String batchVer = root.element("BATCH_VER").getTextTrim(); + if("200".equals(responseCode)){ + falg = "true"; + responseMsg = "资料已提交"; + } + if("400".equals(responseCode)){ + if("0".equals(batchVer)){ + responseMsg = "资料未上传"; + }else { + responseMsg = root.element("RESPONSE_MSG").getTextTrim(); + } + + } } - return responseCode+"@"+responseMsg; + return falg+"@"+responseMsg; } } diff --git a/src/com/ample/icms/init/IcmsRelationInit.java b/src/com/ample/icms/init/IcmsRelationInit.java index db3f8e840..93249e668 100644 --- a/src/com/ample/icms/init/IcmsRelationInit.java +++ b/src/com/ample/icms/init/IcmsRelationInit.java @@ -16,13 +16,14 @@ public class IcmsRelationInit extends BaseBussiness { BizObject boLPIT = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,tx).createQuery("flowunid=:flowunid").setParameter("flowunid",this.getAttribute("ObjectNo").toString()).getSingleResult(false); String projectNo = boLPIT.getAttribute("project_no").toString(); String productId = boLPIT.getAttribute("product_id").toString(); - SqlObject sql_icms = new SqlObject("select flowno,app_code,app_name from icms_prd_rela where productid='"+productId+"' group by flowno,app_code"); + SqlObject sql_icms = new SqlObject("select flowno,app_code,app_name,is_must from icms_prd_rela where productid='"+productId+"' group by flowno,app_code"); ASResultSet rs = Sqlca.getASResultSet(sql_icms); while (rs.next()){ String flowNo = rs.getString("flowno"); String appCode = rs.getString("app_code"); String appName = rs.getString("app_name"); - SqlObject sql_rela = new SqlObject("insert into icms_rela (id,project_no,flow_no,app_code,app_name) values(REPLACE(UUID(), '-', ''),'"+projectNo+"','"+flowNo+"','"+appCode+"','"+appName+"')"); + String isMust = rs.getString("is_must"); + SqlObject sql_rela = new SqlObject("insert into icms_rela (id,project_no,flow_no,app_code,app_name,is_must) values(REPLACE(UUID(), '-', ''),'"+projectNo+"','"+flowNo+"','"+appCode+"','"+appName+"','"+isMust+"')"); Sqlca.executeSQL(sql_rela); } String sMessage="true"; diff --git a/src/com/ample/icms/query/ImageQuery.java b/src/com/ample/icms/query/ImageQuery.java index afc816c18..de4079208 100644 --- a/src/com/ample/icms/query/ImageQuery.java +++ b/src/com/ample/icms/query/ImageQuery.java @@ -1,13 +1,10 @@ package com.ample.icms.query; import com.alibaba.fastjson.JSONArray; -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.awe.util.Transaction; import com.ample.icms.bean.image.ImageBatch; import com.ample.icms.bean.image.ImageMetaData; import com.ample.icms.bean.image.ImageRoot; import com.ample.icms.service.ImageService; -import com.ample.icms.util.GetInfoUtil; import java.util.ArrayList; import java.util.List; @@ -30,23 +27,19 @@ public class ImageQuery extends ImageService { batchs.add(addBatch(appCode,appName,busiNo,null)); } }else { - batchs.add(addBatch(appCode,appName,busiNo,null)); + ImageBatch batch = new ImageBatch(); + batch.setAppCode(appCode); + batch.setAppName(appName); + batch.setBusiNo(busiNo); + batch.setIdentity(identity); + batch.setCustomerName(customerName); + batchs.add(batch); } ImageMetaData metaData = addMetaData(batchs); ImageRoot root = new ImageRoot(base,metaData); return root; } - public String getRequestParamByProjectIdJMT(JBOTransaction tx) throws Exception { - Transaction Sqlca = Transaction.createTransaction(tx); - GetInfoUtil gif = new GetInfoUtil(); - this.setBusiNo(gif.getProjectNoByProjectId(projectId,Sqlca)); - JSONArray ja = gif.getAllAppInfoJsonByProjectId(projectId,Sqlca); - if(ja==null){ - return "error"; - } - this.setAllAppInfoJson(ja); - return transformXMLtoParam(this.code,this.getRequestXML()); - } + public String getProjectId() { diff --git a/src/com/ample/icms/scan/ImageUpload.java b/src/com/ample/icms/scan/ImageUpload.java index 67c3fd1b6..2a730ef9c 100644 --- a/src/com/ample/icms/scan/ImageUpload.java +++ b/src/com/ample/icms/scan/ImageUpload.java @@ -1,66 +1,31 @@ package com.ample.icms.scan; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.util.StringFunction; -import com.amarsoft.awe.util.SqlObject; -import com.amarsoft.awe.util.Transaction; -import com.amarsoft.dict.als.manage.NameManager; import com.ample.icms.bean.image.*; import com.ample.icms.service.ImageService; -import com.ample.icms.util.GetInfoUtil; import com.ample.icms.util.PropertiesUtil; import com.sunyard.insurance.ecm.socket.client.AutoScanApi; -import com.tenwa.officetempalte.exportcallback.impl.ZipUtils; -import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.io.OutputFormat; import org.dom4j.io.SAXReader; import org.dom4j.io.XMLWriter; -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; public class ImageUpload extends ImageService { - private String projectId; - private String flowUnid; - private String flowNo; - private String projecNo; - private List files; + private List pageList; private static final String FileSavePath = PropertiesUtil.get("fileSavePathTemp"); - public List addNodes() throws Exception { - files = new ArrayList<>(); - List pages = new ArrayList<>(); - BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); - List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") - .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false); - for(BizObject bo : bos){ - String projectId = bo.getAttribute("project_id").toString(); - String fileName = bo.getAttribute("filename").toString(); - String inputUserId = bo.getAttribute("inputuserid").toString(); - String inputOrgId = bo.getAttribute("inputorgid").toString(); - String filePath = bo.getAttribute("fullpath").toString(); - - ImagePage page = new ImagePage(); - page.setFileName(fileName); - page.setUpUser(inputUserId); - page.setUpUserName(NameManager.getUserName(inputUserId)); - page.setUpOrg(inputOrgId); - page.setUpOrgName(NameManager.getOrgName(inputOrgId)); - page.setUpTime(StringFunction.getTodayNow()); - pages.add(page); - - File file = new File(filePath); - files.add(file); - } + public List addNodes(List pages) throws Exception { ImageNode node = new ImageNode(); //融资租赁合同套系 - node.setId("APZLJJ000080"); + node.setId("APZLJJ000400"); node.setAction("ADD"); node.setPage(pages); List nodes = new ArrayList<>(); @@ -69,59 +34,21 @@ public class ImageUpload extends ImageService { } public ImageRoot createData() throws Exception { addBaseData(); - ImagePages pages = addPages(addNodes()); + ImagePages pages = addPages(addNodes(pageList)); List batchs = new ArrayList<>(); batchs.add(addBatch(appCode,appName,busiNo,pages)); ImageMetaData metaData = addMetaData(batchs); ImageRoot root = new ImageRoot(base,metaData); return root; } - public String doUpload(){ - // String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip"; - String zipPath = FileSavePath+"/"+flowUnid+".zip"; + public String doUpload(String zipPath) throws Exception { String result = "0"; - try { - AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); - result = autoScanApi.ScanImageFile(appCode, zipPath); - } catch (Exception e) { - e.printStackTrace(); - } + AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key")); + result = autoScanApi.ScanImageFile(appCode, zipPath); return result; } - public String upload() throws Exception { - /** - * 1.找出需要上传的影像 - * 2.在指定路径添加对应xml文件 - * 3.打包上传 - * 4.删除复制文件和打包文件 - */ - createXMl(); - FileOutputStream fos = new FileOutputStream(new File(FileSavePath+"/"+flowUnid+".zip")); - ZipUtils zdo = new ZipUtils(); - zdo.toZip(files,fos); - String result = doUpload(); - String returnCode = result.substring(0,result.indexOf("@")); - String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1); - if(returnCode == "1"){ - deleteTemp(); - }; - intoLog(returnCode,returnMsg); - return returnMsg; - } - - /** - * 上传成功后再删除 - */ - public void deleteTemp(){ - File f = new File(FileSavePath); - if(f.length()!=0){ - ZipUtils zdo = new ZipUtils(); - zdo.deleteFile(f,false); - } - } - public void createXMl() throws Exception { - getAppInfo(); + public String createXMl() throws Exception { String xml = getRequestXML(); SAXReader saxReader = new SAXReader(); Document document; @@ -129,72 +56,25 @@ public class ImageUpload extends ImageService { document = saxReader.read(new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8))); OutputFormat format = OutputFormat.createPrettyPrint(); format.setEncoding("UTF-8"); - XMLWriter writer = new XMLWriter(new FileWriter(new File(FileSavePath+"/"+flowUnid+".xml")),format); + XMLWriter writer = new XMLWriter(new FileWriter(new File(FileSavePath+"/busi.xml")),format); writer.write(document); writer.close(); + return FileSavePath+"/busi.xml"; } catch (DocumentException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } - } - public void getAppInfo() throws Exception { - GetInfoUtil gif = new GetInfoUtil(); - String appInfo = gif.getAppInfoByFlowUnid(flowUnid); - String[] app = appInfo.split("@"); - this.setAppCode(app[0]); - this.setAppName(app[1]); - this.setBusiNo(projecNo); + return "error"; } - public String getProjectId() { - return projectId; + + public List getPageList() { + return pageList; } - public void setProjectId(String projectId) { - this.projectId = projectId; + public void setPageList(List pageList) { + this.pageList = pageList; } - public String getFlowUnid() { - return flowUnid; - } - - public void setFlowUnid(String flowUnid) { - this.flowUnid = flowUnid; - } - - public String getFlowNo() { - return flowNo; - } - - public void setFlowNo(String flowNo) { - this.flowNo = flowNo; - } - - public String getProjecNo() { - return projecNo; - } - - public void setProjecNo(String projecNo) { - this.projecNo = projecNo; - } - - public void intoLog(String code ,String msg) { - Transaction transaction = null; - Transaction.createTransaction("als"); - SqlObject so = null; - try { - so = new SqlObject("insert into icms_upload_log (flowunid,path,code,msg,inputtime) values (:flowunid,:path,:code,:msg,:inputtime)"); - so.setParameter("flowunid",flowUnid); - so.setParameter("path",""); - so.setParameter("code",code); - so.setParameter("msg",msg); - so.setParameter("inputtime", StringFunction.getTodayNow()); - transaction.executeSQL(so); - transaction.commit(); - } catch (Exception e) { - e.printStackTrace(); - } - - } } diff --git a/src/com/ample/icms/service/ImageQueryService.java b/src/com/ample/icms/service/ImageQueryService.java new file mode 100644 index 000000000..6c5482d51 --- /dev/null +++ b/src/com/ample/icms/service/ImageQueryService.java @@ -0,0 +1,120 @@ +package com.ample.icms.service; + +import com.alibaba.fastjson.JSONArray; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.query.ImageQuery; +import com.ample.icms.util.GetInfoUtil; + +public class ImageQueryService { + private String code; + private String projectId; + private String flowUnid; + private String userCode; + private String userName; + private String projectNo; + private String flowNo; + public String getRequestParamByFlowNoRJM() throws Exception { + GetInfoUtil gif = new GetInfoUtil(); + String projectNo = gif.getProjectNoByFlowUnid(flowUnid); + String app = gif.getAppInfoByProjectNo(projectNo,flowNo); + String[] appInfo = app.split("@"); + ImageQuery iq = new ImageQuery(); + iq.setBusiNo(projectNo); + if("0000".equals(appInfo[0])){ + return app; + } + iq.setAppCode(appInfo[0]); + iq.setAppName(appInfo[1]); + iq.setUserCode(userCode); + iq.setUserName(userName); + return iq.transformXMLtoParam(this.code,iq.getRequestXML()); + } + public String getRequestParamByFlowUnidRJM() throws Exception { + GetInfoUtil gif = new GetInfoUtil(); + String projectNo = gif.getProjectNoByFlowUnid(flowUnid); + String app = gif.getAppInfoByFlowUnid(flowUnid); + String[] appInfo = app.split("@"); + ImageQuery iq = new ImageQuery(); + iq.setBusiNo(projectNo); + if("0000".equals(appInfo[0])){ + return app; + } + iq.setAppCode(appInfo[0]); + iq.setAppName(appInfo[1]); + iq.setUserCode(userCode); + iq.setUserName(userName); + return iq.transformXMLtoParam(this.code,iq.getRequestXML()); + } + public String getRequestParamByProjectIdJMT(JBOTransaction tx) throws Exception { + Transaction Sqlca = Transaction.createTransaction(tx); + GetInfoUtil gif = new GetInfoUtil(); + String projectNo = gif.getProjectNoByProjectId(projectId,Sqlca); + JSONArray ja = gif.getAllAppInfoJsonByProjectId(projectId,Sqlca); + if(ja==null){ + return "error"; + } + ImageQuery iq = new ImageQuery(); + iq.setBusiNo(projectNo); + iq.setAllAppInfoJson(ja); + iq.setUserCode(userCode); + iq.setUserName(userName); + return iq.transformXMLtoParam(this.code,iq.getRequestXML()); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getFlowUnid() { + return flowUnid; + } + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public String getUserCode() { + return userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getProjectNo() { + return projectNo; + } + + public void setProjectNo(String projectNo) { + this.projectNo = projectNo; + } + + public String getFlowNo() { + return flowNo; + } + + public void setFlowNo(String flowNo) { + this.flowNo = flowNo; + } +} diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index be3b0a676..229a11267 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -20,6 +20,8 @@ public abstract class ImageService { protected String allAppInfo; protected String userCode; protected String userName; + protected String identity; + protected String customerName ; protected String appCode; protected String appName; protected String code; @@ -204,4 +206,20 @@ public abstract class ImageService { public void setUserName(String userName) { this.userName = userName; } + + public String getIdentity() { + return identity; + } + + public void setIdentity(String identity) { + this.identity = identity; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } } diff --git a/src/com/ample/icms/service/ImageUploadService.java b/src/com/ample/icms/service/ImageUploadService.java new file mode 100644 index 000000000..fc36f80cf --- /dev/null +++ b/src/com/ample/icms/service/ImageUploadService.java @@ -0,0 +1,147 @@ +package com.ample.icms.service; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.dict.als.manage.NameManager; +import com.ample.icms.bean.image.ImagePage; +import com.ample.icms.scan.ImageUpload; +import com.ample.icms.util.GetInfoUtil; +import com.ample.icms.util.PropertiesUtil; +import com.tenwa.officetempalte.exportcallback.impl.ZipUtils; +import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; +import org.apache.commons.io.FileUtils; + +import java.io.File; +import java.io.FileOutputStream; +import java.util.ArrayList; +import java.util.List; + +public class ImageUploadService { + private String projectId; + private String flowUnid; + private String projectNo; + private String flowNo; + private final String FILE_SAVE_PATH_TEMP = PropertiesUtil.get("fileSavePathTemp"); + public List getFileBo() throws JBOException { + BizObjectManager bom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); + List bos = bom.createQuery("sign_type='COMPLETE' and file_flag='yes' and project_id=:projectId and flow_unid=:flowUnid") + .setParameter("projectId",projectId).setParameter("flowUnid",flowUnid).getResultList(false); + return bos; + } + public List getFile(List bos) throws Exception { + List files = new ArrayList<>(); + for(BizObject bo : bos){ + String fileName = bo.getAttribute("filename").toString(); + String filePath = bo.getAttribute("fullpath").toString(); + + File srcFile = new File(filePath); + File destFile = new File(FILE_SAVE_PATH_TEMP+"/"+fileName); + if(!destFile.getParentFile().exists()){ + destFile.getParentFile().mkdirs(); + } + FileUtils.copyFile(srcFile, destFile, true); + files.add(destFile); + } + return files; + } + public List getPages(List bos) throws Exception { + List pages = new ArrayList<>(); + for(BizObject bo : bos){ + String fileName = bo.getAttribute("filename").toString(); + String inputUserId = bo.getAttribute("inputuserid").toString(); + String inputOrgId = bo.getAttribute("inputorgid").toString(); + + ImagePage page = new ImagePage(); + page.setFileName(fileName); + page.setUpUser(inputUserId); + page.setUpUserName(NameManager.getUserName(inputUserId)); + page.setUpOrg(inputOrgId); + page.setUpOrgName(NameManager.getOrgName(inputOrgId)); + page.setUpTime(StringFunction.getTodayNow()); + pages.add(page); + } + return pages; + } + public String[] getAppInfo() throws Exception { + GetInfoUtil gif = new GetInfoUtil(); + String appInfo = gif.getAppInfoByProjectNo(projectNo,flowNo); + String[] app = appInfo.split("@"); + return app; + } + public String upload() throws Exception { + /** + * 1.找出需要上传的影像 + * 2.在指定路径添加对应xml文件 + * 3.打包上传 + * 4.删除复制文件和打包文件 + */ + + List boList = this.getFileBo(); + List files = this.getFile(boList); + List pageList = this.getPages(boList); + + ImageUpload imageUp = new ImageUpload(); + String[] appInfo = this.getAppInfo(); + imageUp.setAppCode(appInfo[0]); + imageUp.setAppName(appInfo[1]); + imageUp.setBusiNo(projectNo); + imageUp.setPageList(pageList); + String xmlUrl = imageUp.createXMl(); + + files.add(new File(xmlUrl)); + String zipUrl = FILE_SAVE_PATH_TEMP+"/"+flowUnid+".zip"; + FileOutputStream fos = new FileOutputStream(new File(zipUrl)); + ZipUtils zdo = new ZipUtils(); + zdo.toZip(files,fos); + String result = imageUp.doUpload(zipUrl); + String returnCode = result.substring(0,result.indexOf("@")); + String returnMsg = result.substring(result.indexOf("@")+1,result.length()); + // deleteTemp(); + return returnMsg; + } + /** + * 上传成功后再删除 + */ + public void deleteTemp(){ + File f = new File(FILE_SAVE_PATH_TEMP); + if(f.length()!=0){ + ZipUtils zdo = new ZipUtils(); + zdo.deleteFile(f,false); + } + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getFlowUnid() { + return flowUnid; + } + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public String getProjectNo() { + return projectNo; + } + + public void setProjectNo(String projectNo) { + this.projectNo = projectNo; + } + + public String getFlowNo() { + return flowNo; + } + + public void setFlowNo(String flowNo) { + this.flowNo = flowNo; + } +} diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java index b43ef1e48..408626f99 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheck.java @@ -34,9 +34,9 @@ public class IcmsDocListCheck extends AlarmBiz { ic.setAppCode(appCode); ic.setAppName(appName); ic.setBusiNo(projectNo); - String result = ic.getResult(); + String result =ic.resultAnalysis(ic.getResult()); String[] resultInfo = result.split("@"); - if("200".equals(resultInfo[0])){ + if("true".equals(resultInfo[0])){ setPass(true); }else{ setPass(false); From 75df22d142662b6a388800c3a91b6189350d70ff Mon Sep 17 00:00:00 2001 From: ap007 Date: Mon, 25 Jul 2022 09:31:45 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E4=B8=8A=E4=BC=A0=E4=BC=98=E5=8C=96=EF=BC=9B=E5=BD=B1?= =?UTF-8?q?=E5=83=8F=E8=B5=84=E6=BA=90=E8=AF=B7=E6=B1=82=E5=92=8COCR?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FundPaymentInvoice/LbInvoiceTemp.jsp | 26 ++- .../Comm/LBContract/LBContractPrintList.jsp | 9 +- .../LBContractPersonBaseInfo.jsp | 1 - .../MortgageFile/LbContactInfo.jsp | 4 +- src/com/ample/icms/init/IcmsRelationInit.java | 5 +- src/com/ample/icms/query/ImageInfo.java | 13 ++ src/com/ample/icms/scan/ImageOcr.java | 163 ++++++++++++++++++ src/com/ample/icms/scan/ImageUpload.java | 10 +- .../ample/icms/service/ImageInfoService.java | 100 +++++++++++ .../ample/icms/service/ImageOcrService.java | 54 ++++++ .../icms/service/ImageUploadService.java | 110 +++++++++--- .../exportcallback/impl/ZipUtils.java | 13 +- 12 files changed, 470 insertions(+), 38 deletions(-) create mode 100644 src/com/ample/icms/query/ImageInfo.java create mode 100644 src/com/ample/icms/scan/ImageOcr.java create mode 100644 src/com/ample/icms/service/ImageInfoService.java create mode 100644 src/com/ample/icms/service/ImageOcrService.java diff --git a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp index 0da453464..17c07b2f4 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp @@ -45,12 +45,36 @@ String sButtons[][] = { {flag,"All","Button","保存","保存所有修改","save()","","","",""}, - {"true","All","Button","返回","返回列表","returnList()","","","",""} + {"true","All","Button","返回","返回列表","returnList()","","","",""}, + {"true","","Button","识别发票","识别发票","invoiceOrcDo()","","","",""} }; sButtonPosition = "north"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> +<%/*~END~*/%> + + + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%> + +<%/*~END~*/%> + + + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%> + +<%/*~END~*/%> +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index ed8636251..15e42feff 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4639,6 +4639,23 @@ + + + + + + + + + + + + + + + + + diff --git a/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodAction.java b/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodAction.java new file mode 100644 index 000000000..c06c57c89 --- /dev/null +++ b/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodAction.java @@ -0,0 +1,116 @@ +package com.tenwa.channelportal.action.alpha; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.reckon.util.UUIDUtil; +import com.tenwa.util.SerialNumberUtil; +import jbo.app.tenwa.calc.LB_RENT_DORMANT_EXTENSION_PERIOD; +import org.apache.commons.lang3.StringUtils; + +/** + * 休眠还款申请-信息保存 + */ +public class RentDormantExtensionPeriodAction { + + String flowUnid;;//流程编号 + + + public String getFlowUnid() { + return flowUnid; + } + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + /** + * 休眠还款信息保存 + * @param tx + * @throws Exception + */ + public String saveRentDormantExtensionPeriodAction(JBOTransaction tx) throws Exception{ + String res = ""; + try { + String contractDate="contractDate"; + String zcContractNum="zcContractNum"; + System.out.println("saveRentDormantAction-----------------------flowUnid="+flowUnid); + BizObjectManager lcctBm = JBOFactory.getBizObjectManager(jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP.CLASS_NAME); + BizObject lcctBo = lcctBm.createQuery("FLOWUNID=:FLOWUNID ") + .setParameter("FLOWUNID", flowUnid).getSingleResult(false); + String contractId = lcctBo.getAttribute("CONTRACT_ID").getString(); + BizObjectManager lciBm = JBOFactory.getBizObjectManager(jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO.CLASS_NAME); + BizObject lciBo = lciBm.createQuery("ID=:CONTRACT_ID ") + .setParameter("CONTRACT_ID", contractId).getSingleResult(false); + String contractNo = lciBo.getAttribute("CONTRACT_NO").getString(); + String projectId = lciBo.getAttribute("PROJECT_ID").getString(); + zcContractNum = lciBo.getAttribute("ZC_CONTRACT_NUMBER").getString(); + System.out.println("saveRentDormantAction-----------------------contractNo="+contractNo); + System.out.println("saveRentDormantAction-----------------------contractNo2="+contractNo); + System.out.println("saveRentDormantAction-----------------------zcContractNum="+zcContractNum); + String rentDormantNum = null; + String contractDate2 = null; + String zcContractNum2 = null; + String rentDormantId = null; + // TODO: 2022/2/15 休眠还款信息保存 + BizObjectManager bomLRD = JBOFactory.getFactory().getManager(LB_RENT_DORMANT_EXTENSION_PERIOD.CLASS_NAME,tx); + BizObject bolLRD = bomLRD.createQuery("FLOWUNID=:FLOWUNID ") + .setParameter("FLOWUNID", flowUnid).getSingleResult(true); + if(bolLRD != null){ + rentDormantNum = bolLRD.getAttribute("rent_dormant_num").getString(); + contractDate2 = bolLRD.getAttribute("contract_date").getString(); + zcContractNum2 = bolLRD.getAttribute("zc_contract_num").getString(); + rentDormantId = bolLRD.getAttribute("ID").getString(); + if(rentDormantNum != null){ + if(contractDate2 == null || StringUtils.isEmpty(contractDate2) || !contractDate2.equals(contractDate) + || zcContractNum2 == null || StringUtils.isEmpty(zcContractNum2) || !zcContractNum2.equals(zcContractNum)){ + bolLRD.setAttributeValue("contract_date", contractDate); + bolLRD.setAttributeValue("zc_contract_num", zcContractNum); + bomLRD.saveObject(bolLRD);//修改数据 + } + return rentDormantNum; + } + } + rentDormantNum = createContractNo(lciBo, tx); + bolLRD = bomLRD.newObject(); + bolLRD.setAttributeValue("ID", UUIDUtil.getUUID()); + bolLRD.setAttributeValue("PROJECT_ID", projectId); + bolLRD.setAttributeValue("CONTRACT_ID", contractId); + bolLRD.setAttributeValue("FLOWUNID", flowUnid); + bolLRD.setAttributeValue("rent_dormant_num", rentDormantNum); + bolLRD.setAttributeValue("contract_date", contractDate); + bolLRD.setAttributeValue("zc_contract_num", zcContractNum); + bomLRD.saveObject(bolLRD); + res = rentDormantNum; + }catch (Exception e){ + e.printStackTrace(); + } + return res; + } + + /** + * 休眠还款协议生成 + * @return + */ + private String createContractNo(BizObject lciBo, JBOTransaction tx) throws Exception{ + String area_code=lciBo.getAttribute("AREA_CODE").getString(); + String subjectid=lciBo.getAttribute("subjectid").getString(); + String dept="BQAP("; + if(area_code.equals(null)||area_code.equals("")){ + area_code="0"; + } + dept+="A"; + if(lciBo.getAttribute("LEAS_FORM").toString().equals("01")){//直租 + dept+="Z"; + }else{//回租 + dept+="H"; + } + if("d989246c11c111eaaa0000163e0e11e6".equals(subjectid)){ + dept+=")TJ"; + }else{ + dept+=")SZ"; + } + return SerialNumberUtil.getContractSerialNaumber(dept,area_code, tx); + } +} \ No newline at end of file diff --git a/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodDeleteAction.java b/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodDeleteAction.java new file mode 100644 index 000000000..72d1e4162 --- /dev/null +++ b/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodDeleteAction.java @@ -0,0 +1,97 @@ +package com.tenwa.channelportal.action.alpha; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; +import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP; + +import java.util.HashMap; +import java.util.Map; + +/** + * 删除征信合同记录 + */ +public class RentDormantExtensionPeriodDeleteAction { + + String objectType;//文件类型 + String planNumber;//项目编号 + String flowUnid;;//流程编号 + + + public String getFlowUnid() { + return flowUnid; + } + + public void setFlowUnid(String flowUnid) { + this.flowUnid = flowUnid; + } + + public String getObjectType() { + return objectType; + } + + public void setObjectType(String objectType) { + this.objectType = objectType; + } + + public String getPlanNumber() { + return planNumber; + } + + public void setPlanNumber(String planNumber) { + this.planNumber = planNumber; + } + + /** + * 删除征信授权文件 + * @param tx + * @throws Exception + */ + public void deleteRentDormantExtensionPeriod(JBOTransaction tx) throws Exception{ + BizObjectManager bom = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME); + BizObject lbDocBiz = bom.createQuery("OBJECTTYPE='contractExtensionPeriod' and plan_number=:planNumber ") + .setParameter("objectType",objectType).setParameter("planNumber",planNumber).getSingleResult(false); + if(null != lbDocBiz){ + String lbDocBizId = lbDocBiz.getAttribute("id").toString(); + BizObjectManager bom1 = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME); + String lbDocLibraryId = bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", lbDocBizId).getSingleResult(false).getAttribute("id").toString(); + BizObjectManager bom2 = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME); + String docAttributeId = bom2.createQuery("library_id=:library_id").setParameter("library_id", lbDocLibraryId).getSingleResult(false).getAttribute("id").toString(); + BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx); + // 查询lb_doc_contract_list表 +// BizObject bo = contBom.createQuery("attribute_id=:attributeId and file_flag='yes' and sendprocess='1' ") + BizObject bo = contBom.createQuery("attribute_id=:attributeId") + .setParameter("attributeId", docAttributeId).getSingleResult(false); +// if(null == bo){ + if(null != bo){ + Map condtion= new HashMap(); + condtion.put("id", lbDocBizId); + DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME, condtion, tx); + condtion.clear(); + condtion.put("id", lbDocLibraryId); + DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME, condtion, tx); + condtion.clear(); + condtion.put("id", docAttributeId); + DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME, condtion, tx); + } + } + } + + /** + * 判断担保人是否为法人 + * @param tx + * @throws Exception + */ + public String checkCreditAuth(JBOTransaction tx) throws Exception{ + BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, tx); + BizObject pbo = pbm.createQuery("FLOWUNID=:flowUnid") + .setParameter("flowUnid", flowUnid).getSingleResult(true); + if(null == pbo){ + return ""; + } + return pbo.getAttribute("CERTTYPE").toString(); + } +} \ No newline at end of file diff --git a/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodSignAction.java b/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodSignAction.java new file mode 100644 index 000000000..2621fa1d1 --- /dev/null +++ b/src/com/tenwa/channelportal/action/alpha/RentDormantExtensionPeriodSignAction.java @@ -0,0 +1,190 @@ +package com.tenwa.channelportal.action.alpha; + +import com.alibaba.fastjson.JSONObject; +import com.amarsoft.are.jbo.*; +import com.tenwa.app.dao.ContractSignInfo; +import com.tenwa.app.manage.qiyuesuo.v2.ContractSignEnums; +import com.tenwa.app.manage.qiyuesuo.v2.ContractSignVtwoUtils; +import com.tenwa.app.manage.qiyuesuo.v2.QYSParams; +import com.tenwa.channelportal.action.generativecontract.WordToPDFUtil; +import jbo.app.tenwa.doc.LB_DOCATTRIBUTE; +import jbo.app.tenwa.doc.LB_DOCLIBRARY; +import jbo.app.tenwa.doc.LB_DOCRELATIVE; +import org.apache.log4j.Logger; + +import java.io.File; + +public class RentDormantExtensionPeriodSignAction { + + private static Logger logger=Logger.getLogger(RentDormantExtensionPeriodSignAction.class); + + private String projectId; + + private String planNumber;; + + private String contractNo; + + private String contractId; + + private String subjectId; + + private String tempId; + + public String getPlanNumber() { + return planNumber; + } + + public void setPlanNumber(String planNumber) { + this.planNumber = planNumber; + } + + public String getContractNo() { + return contractNo; + } + + public void setContractNo(String contractNo) { + this.contractNo = contractNo; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getContractId() { + return contractId; + } + + public void setContractId(String contractId) { + this.contractId = contractId; + } + + public String getSubjectId() { + return subjectId; + } + + public void setSubjectId(String subjectId) { + this.subjectId = subjectId; + } + + public String getTempId() { + return tempId; + } + + public void setTempId(String tempId) { + this.tempId = tempId; + } + + /** + * 保险委托授权书附件用LibreOffice实现word转换pdf + * word转换pdf + * @throws JBOException + */ + @SuppressWarnings({ "unchecked", "static-access" }) + public String wordToPdfRentDormantExtensionPeriod(JBOTransaction tx) throws JBOException { + BizObjectManager bom=JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME); + BizObject DOCRELATIVE=bom.createQuery(" OBJECTTYPE='contractExtensionPeriod' and plan_number=:planNumber ").setParameter("planNumber", planNumber).getSingleResult(false); + BizObjectManager attrBom=JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME); + BizObject attrBo=null; + WordToPDFUtil wordTopdf = new WordToPDFUtil(); + File file = null; + Boolean result = null; + String sql = ""; + try { + if (DOCRELATIVE != null) { + String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString(); + BizObjectManager bom1=JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME); + String DOCLIBRARYid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString(); + attrBo = attrBom.createQuery("library_id=:library_id").setParameter("library_id", DOCLIBRARYid).getSingleResult(true); + + String path = attrBo.getAttribute("FULLPATH").toString(); + String lastFilePath = path.replace(".docx", ".pdf"); + File filePath = new File(path); + if(!filePath.exists()){ + logger.info("word转换pdf的源文件不存在"); + } + String lastFilePathpdf = filePath.getParent(); + try { + result = wordTopdf.Word2Pdf(path, lastFilePathpdf); + } catch (Exception e) { + result = false; + e.printStackTrace(); + } + if (result) { + file =new File(lastFilePath); + attrBo.setAttributeValue("FULLPATH",attrBo.getAttribute("FULLPATH").toString().replace(".docx", ".pdf")); + attrBo.setAttributeValue("FILENAME",attrBo.getAttribute("FILENAME").toString().replace(".docx", ".pdf")); + attrBo.setAttributeValue("FILEPATH",attrBo.getAttribute("FILEPATH").toString().replace(".docx", ".pdf")); + attrBo.setAttributeValue("FileSize",file.length()); + attrBo.setAttributeValue("CONTENT_TYPE","application/pdf"); + attrBom.saveObject(attrBo); + } + } + } catch (JBOException e) { + e.printStackTrace(); + } + return attrBo.getAttribute("ID").toString(); + } + + + /** + * 休眠还款协议盖章:对接契约锁2.0 + * @param tx + * @return + * @throws Exception + */ + public String claimSignRentDormantTwo(JBOTransaction tx) throws Exception { + logger.info("claimSignRentDormantTwo 休眠还款协议盖章:对接契约锁2.0 开始 0126"); + String libraryid=""; + BizObjectManager bom=JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME); + BizObject DOCRELATIVE=bom.createQuery("OBJECTTYPE='contractExtensionPeriod' and CONTRACT_ID=:contractid ").setParameter("contractid", contractId).getSingleResult(false); + logger.info("claimSignRentDormantTwo 查询文件关联信息"); + if (DOCRELATIVE != null) { + logger.info("claimSignRentDormantTwo 查询文件关联信息不为空时"); + String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString(); + BizObjectManager bom1=JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME); + libraryid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString(); + logger.info("claimSignRentDormantTwo 查询文件关联信息libraryid="+libraryid); + } + BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx); + ContractSignInfo con = null; + BizObject bo = null; + String info=""; + try{ + bo = contBom.createQuery("library_id=:libraryid").setParameter("libraryid", libraryid).getSingleResult(true); + logger.info("claimSignRentDormantTwo 查询文件信息"); + if(bo != null){ + logger.info("claimSignRentDormantTwo 查询文件信息不为空时"); + String fileName = bo.getAttribute("FILENAME").toString(); + String filePath = bo.getAttribute("FULLPATH").toString(); + logger.info("claimSignRentDormantTwo fileName="+fileName); + logger.info("claimSignRentDormantTwo filePath="+filePath); + ContractSignVtwoUtils contractSignVtwoUtils = new ContractSignVtwoUtils(); + logger.info("claimSignRentDormantTwo 发起公司盖章"); + QYSParams qysParams = new QYSParams(); + qysParams.setList(null);//手签,无需传承租人、共同申请人、担保人信息 + qysParams.setContractSignTypeEnum(ContractSignEnums.ContractSignTypeEnum.SIGNATURE_DEFAULT);//客户手签 + qysParams.setFileName(fileName); + qysParams.setFilePath(filePath); + qysParams.setSubjectId(subjectId); + qysParams.setTempId(tempId);//合同模板id + JSONObject resJson = contractSignVtwoUtils.sign(qysParams); + if (null == resJson) { + logger.warn("claimSignRentDormantTwo 20210415 调用契约锁盖章异常,返回盖章失败"); + return "error"; + } + logger.info("claimSignRentDormantTwo 20210415 调用契约锁盖章成功,res=" + resJson.toJSONString()); + return "success"; + } else { + return "error"; + } + } catch (Exception e) { + logger.error("claimSignInsuranceTwo 系统错误,错误信息: ", e); + e.printStackTrace(); + return "error"; + } + } +} \ No newline at end of file diff --git a/src_jbo/jbo/app/tenwa/calc/LB_RENT_DORMANT_EXTENSION_PERIOD.java b/src_jbo/jbo/app/tenwa/calc/LB_RENT_DORMANT_EXTENSION_PERIOD.java new file mode 100644 index 000000000..8b4de3ac9 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LB_RENT_DORMANT_EXTENSION_PERIOD.java @@ -0,0 +1,44 @@ +package jbo.app.tenwa.calc; + +/** +* 休眠还款协议信息表 - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface LB_RENT_DORMANT_EXTENSION_PERIOD { + /** + * 休眠租金临时表

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LB_RENT_DORMANT_EXTENSION_PERIOD"; + /** + * 标识 STRING(32)
+ */ + public static final String ID = "ID"; + /** + * 流程编号 STRING(32)
+ */ + public static final String FLOWUNID = "FLOWUNID"; + /** + * 项目编号 STRING(32)
+ */ + public static final String PROJECT_ID = "PROJECT_ID"; + /** + * 合同编号 STRING(32)
+ */ + public static final String CONTRACT_ID = "CONTRACT_ID"; + /** + * 中车合同编号 STRING(32)
+ */ + public static final String zc_contract_num = "zc_contract_num"; + /** + * 休眠还款协议编号 STRING(32)
+ */ + public static final String rent_dormant_num = "rent_dormant_num"; + + /** + * 合同签署时间 STRING(32)
+ */ + public static final String contract_date = "contract_date"; + +} \ No newline at end of file From 0db4302044b776fef2e1267a8fa5807740c97178 Mon Sep 17 00:00:00 2001 From: ap007 Date: Tue, 6 Sep 2022 10:40:28 +0800 Subject: [PATCH 19/20] =?UTF-8?q?=E7=BB=8F=E9=94=80=E5=95=86=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BD=B1=E5=83=8F=E8=B5=84=E6=96=99=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FundPaymentInvoice/LbInvoiceTemp.jsp | 2 +- .../DistributorApproval/LDistributorInfo.jsp | 49 +++++++++++++++- .../DistributorChange/LDistributorInfo.jsp | 49 +++++++++++++++- .../Comm/LBContract/LBContractPrintList.jsp | 2 +- .../Flow/Comm/LBProject/LBProjectInfo.jsp | 58 +++++++++---------- .../BusinessProjectTempInfo.jsp | 3 +- .../ample/icms/service/ImageInfoService.java | 4 +- .../ample/icms/service/ImageOcrService.java | 10 +++- src/com/ample/icms/util/GetInfoUtil.java | 28 ++++++++- .../IcmsDocListCheckOfDistributor.java | 43 ++++++++++++++ 10 files changed, 203 insertions(+), 45 deletions(-) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckOfDistributor.java diff --git a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp index 17c07b2f4..d5f5249eb 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/FundPaymentInvoice/LbInvoiceTemp.jsp @@ -52,7 +52,7 @@ %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp index 4cc48399d..085fe3f72 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp @@ -8,7 +8,8 @@ String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 String RightType=CurPage.getParameter("RightType"); if(sFlowUnid == null) sFlowUnid=""; - + String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号 + String FlowNo = CurPage.getParameter("FlowNo");//流程编号 ASObjectModel temp = new ASObjectModel("LDistributorChangeInfoHis"); //获取法人原始信息 ASObjectWindow wtemp = new ASObjectWindow(CurPage, temp,request); ASResultSet rs = Sqlca.getResultSet(new SqlObject(wtemp.getDataObject().getJboSql().replaceAll("v\\.", "").replaceAll("jbo\\.[\\w+\\.]+\\.","").replaceAll(" O ", " "+temp.getJboClass().replaceAll("jbo\\.[\\w+\\.]+\\.","")+" O ")).setParameter("FlowUnid", sFlowUnid)); @@ -49,7 +50,8 @@ dwTemp.replaceColumn("beforechange", "", CurPage.getObjectWindowOutput()); String sButtons[][] = { - {"true","All","Button","保存","保存所有修改","save()","","","",""} + {"true","All","Button","保存","保存所有修改","save()","","","",""}, + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""} /* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} */ }; sButtonPosition = "north"; @@ -211,6 +213,47 @@ function saveproj_name(){ setItemRequired(0,'LIMIT_END_DATE',true); } } - +function openFileList(){ + let appInfo = getAppInfo(); + let index = appInfo.indexOf("@"); + if(index==-1){ + alert(appInfo); + return; + } + let appCode = appInfo.substr(0,index); + let appName = appInfo.substr(index+1,appInfo.length); + if(appCode=='0000'){ + alert(appName); + return; + } + openAppointFileList(appCode,appName); +} +function openAppointFileList(appCode,appName){ + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); + let code = getCode(); + let params = getRequestParam(appCode,appName,code); + if(params!=null){ + AsControl.postICMS(url,params); + } +} +function getAppInfo(){ + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowNoRJM", "flowNo=<%=FlowNo%>"); + return appInfo; +} +function getCode(){ + let code = 'ECM0002'; + if( + "<%=FlowNo%>"=="DistributorApprovalFlow"&&("<%=sPhaseNo%>"=="0010")|| + "<%=FlowNo%>"=="DistributorChangeFlow"&&("<%=sPhaseNo%>"=="0010") + ){ + code = 'ECM0001'; + } + return code; +} +function getRequestParam(appCode,appName,code){ + let busiNo = getItemValue(0,0,'DISTRIBUTOR_NO'); + let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); + return param; +} <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp index 637f664de..007e377f8 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContract/LBContractPrintList.jsp @@ -58,7 +58,7 @@ //因为要传到付款阶段的合同套系,所以这里的flowNo固定为FundPaymentCarFlow var sParams="ProjectId=<%=projectId%>,flowUnid=<%=flowunid%>,projectNo=<%=ProjectNo%>,flowNo=FundPaymentCarFlow"; var sReturn = RunJavaMethodTrans("com.ample.icms.service.ImageUploadService","upload",sParams); - // alert(sReturn); + alert(sReturn); } //测试电子签约 function sign(){ diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp index 4f62c3616..2b5239cf3 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBProject/LBProjectInfo.jsp @@ -107,7 +107,8 @@ String sButtons[][] =null; sButtons= new String[][]{ {ShowButton,"All","Button","保存","保存所有修改","saveRecord()","","","",""}, - {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""} + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, + {"true","","Button","尽职信审报告","尽职信审报告","openAppointFileList('APZLCTYWXSCL','传统业务信审资料')","","","","btn_icon_saveNew",""} }; %> <%/*~END~*/%> @@ -213,14 +214,7 @@ init(); } function openFileList(){ - let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); - let params = getRequestParam(); - if(params!=null){ - post(url,params); - } - } - function getRequestParam(){ - let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); + let appInfo = getAppInfo(); let index = appInfo.indexOf("@"); if(index==-1){ alert(appInfo); @@ -228,10 +222,35 @@ init(); } let appCode = appInfo.substr(0,index); let appName = appInfo.substr(index+1,appInfo.length); + if(appCode=='0000'){ + alert(appName); + return; + } + openAppointFileList(appCode,appName); + } + function openAppointFileList(appCode,appName){ + let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl",""); + let code = getCode(); + let params = getRequestParam(appCode,appName,code); + if(params!=null){ + AsControl.postICMS(url,params); + } + } + function getAppInfo(){ + let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); + return appInfo; + } + function getCode(){ let code = 'ECM0002'; - if("<%=sPhaseNo%>"=="0010"){ + if( + "<%=FlowNo%>"=="ProjectApprovalFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040"||"<%=sPhaseNo%>"=="0050")|| + "<%=FlowNo%>"=="ProjectCreditFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040") + ){ code = 'ECM0001'; } + return code; + } + function getRequestParam(appCode,appName,code){ let busiNo = '<%=projectNo%>'; if(busiNo==null||busiNo==""||busiNo=="null"){ busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>"); @@ -239,26 +258,7 @@ init(); let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo); return param; } - /** - * 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式 - * @param URL - * @param PARAMS - */ - function post(URL, param) { - let temp_form = document.createElement("form"); - temp_form.action = URL; - temp_form.target = "_blank"; - temp_form.method = "post"; - temp_form.style.display = "none"; - let opt = document.createElement("textarea"); - opt.name = 'data'; - opt.value = param; - temp_form.appendChild(opt); - - document.body.appendChild(temp_form); - temp_form.submit(); - } diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index 27dcf44e3..00d7d143b 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -61,8 +61,7 @@ dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput()); String sButtons[][] = { {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""}, - {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}, - {"true","","Button","产品信息","产品信息","product()","","","","btn_icon_saveNew",""} + {"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""} }; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> diff --git a/src/com/ample/icms/service/ImageInfoService.java b/src/com/ample/icms/service/ImageInfoService.java index d7d8c1d5a..cd6bef407 100644 --- a/src/com/ample/icms/service/ImageInfoService.java +++ b/src/com/ample/icms/service/ImageInfoService.java @@ -16,10 +16,10 @@ public class ImageInfoService { private String projectNo; private String flowNo; - public String getFileUrl(JBOTransaction tx) throws Exception { + public String getFileUrl(String folderNo ,JBOTransaction tx) throws Exception { String result = this.getResponseResult(tx); //APZLJJ000400 APZLJJ000060 - String FileUrl = this.getFileUrlByResultAnalysis(result,"APZLJJ000060"); + String FileUrl = this.getFileUrlByResultAnalysis(result,folderNo); return FileUrl; } public String getResponseResult(JBOTransaction tx) throws SQLException, JBOException { diff --git a/src/com/ample/icms/service/ImageOcrService.java b/src/com/ample/icms/service/ImageOcrService.java index 814866327..60122b998 100644 --- a/src/com/ample/icms/service/ImageOcrService.java +++ b/src/com/ample/icms/service/ImageOcrService.java @@ -8,14 +8,18 @@ public class ImageOcrService { private String contractId; private String projectNo; private String flowNo; - public String invoiceOrcDo(JBOTransaction tx) throws Exception { + public String invoiceOrcOfInvoice(JBOTransaction tx) throws Exception { + + return this.invoiceOrc("APZLJJ000060",ImageOcr.ocrType.vehicle_invoice_ocr,tx); + } + public String invoiceOrc(String floder,ImageOcr.ocrType ocrType,JBOTransaction tx) throws Exception { ImageInfoService iis = new ImageInfoService(); iis.setContractId(contractId); iis.setFlowNo(flowNo); - String fileUrl = iis.getFileUrl(tx); + String fileUrl = iis.getFileUrl(floder,tx); ImageOcr io = new ImageOcr(); - String result = io.doPost(fileUrl, ImageOcr.ocrType.vehicle_invoice_ocr); + String result = io.doPost(fileUrl, ocrType); return result; } diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java index f0d4b1aa2..c0957ef68 100644 --- a/src/com/ample/icms/util/GetInfoUtil.java +++ b/src/com/ample/icms/util/GetInfoUtil.java @@ -70,7 +70,7 @@ public class GetInfoUtil { String appInfo = getAppInfoByProjectNo(projectNo,flowNo,Sqlca); return appInfo; } - public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException, JBOException { + public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException { String sql = "select app_code,app_name from icms_rela where flow_no='" + flowNo + "' and project_no='" + projectNo + "'"; SqlObject sql_icms = new SqlObject(sql); ASResultSet rs = Sqlca.getASResultSet(sql_icms); @@ -310,7 +310,31 @@ public class GetInfoUtil { String productId = Sqlca.getString(new SqlObject(sql)); return productId; } - + public String getAppInfoByFlowNoRJM() throws SQLException { + Transaction Sqlca = Transaction.createTransaction("als"); + return getAppInfoByFlowNo(flowNo,Sqlca); + } + public String getAppInfoByFlowNo(String flowNo, Transaction Sqlca) throws SQLException { + String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "'"; + SqlObject sql_icms = new SqlObject(sql); + ASResultSet rs = Sqlca.getASResultSet(sql_icms); + String appCode = null; + String appName = null; + while (rs.next()) { + appCode = rs.getString("app_code"); + appName = rs.getString("app_name"); + } + if (appCode == null) { + return "0000@未找到初始化的影像信息配置,请联系管理员"; + } + String appInfo = appCode + "@" + appName; + return appInfo; + } + public String getDistributorIdByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException { + String sql = "select distributor_no from distributor_info_temp where flowunid='" + flowUnid + "'"; + String distributorNo = Sqlca.getString(new SqlObject(sql)); + return distributorNo; + } public String getFlowUnid() { return flowUnid; } diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckOfDistributor.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckOfDistributor.java new file mode 100644 index 000000000..2eadcb8d5 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/IcmsDocListCheckOfDistributor.java @@ -0,0 +1,43 @@ +package com.tenwa.lease.flow.project.commcheck; + +import com.amarsoft.app.alarm.AlarmBiz; +import com.amarsoft.awe.util.Transaction; +import com.ample.icms.check.ImageCheck; +import com.ample.icms.util.GetInfoUtil; + +/** + * 资料清单检查 + * @author 20170524 + * + */ +public class IcmsDocListCheckOfDistributor extends AlarmBiz { + @Override + public Object run(Transaction Sqlca) throws Exception { + String flowUnid = this.getAttribute("ObjectNo").toString(); + GetInfoUtil gif = new GetInfoUtil(); + String busiNo = gif.getDistributorIdByFlowUnid(flowUnid,Sqlca); + String flowNo = gif.getFlowNoByFlowUnid(flowUnid,Sqlca); + String app = gif.getAppInfoByFlowNo(flowNo,Sqlca); + String [] appInfo = app.split("@"); + String appCode = appInfo[0]; + String appName = appInfo[1]; + if("0000".equals(appCode)){ + setPass(false); + putMsg(appName); + return null; + } + ImageCheck ic= new ImageCheck(); + ic.setAppCode(appCode); + ic.setAppName(appName); + ic.setBusiNo(busiNo); + String result =ic.resultAnalysis(ic.getResult()); + String[] resultInfo = result.split("@"); + if("true".equals(resultInfo[0])){ + setPass(true); + }else{ + setPass(false); + } + putMsg(resultInfo[1]); + return null; + } +} From 91933a79461118821de0637b95f93bf6e2de41a2 Mon Sep 17 00:00:00 2001 From: ap007 Date: Thu, 22 Sep 2022 09:37:54 +0800 Subject: [PATCH 20/20] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E5=89=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2=EF=BC=8C=E5=B0=86?= =?UTF-8?q?admin=E6=94=B9=E4=B8=BAmarket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/ample/icms/scan/ImageScan.java | 2 +- src/com/ample/icms/service/ImageService.java | 4 ++-- src/com/ample/icms/util/GetInfoUtil.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/ample/icms/scan/ImageScan.java b/src/com/ample/icms/scan/ImageScan.java index 52be66e03..f3e1865cc 100644 --- a/src/com/ample/icms/scan/ImageScan.java +++ b/src/com/ample/icms/scan/ImageScan.java @@ -13,7 +13,7 @@ public class ImageScan extends ImageService { base.setOrgCode("0005"); base.setComCode("0005"); base.setOrgName("安鹏国际融资租赁(深圳)有限公司"); - base.setRoleCode("admin"); + base.setRoleCode("market"); base.setOneBatch(oneBatch); } public String getOneBatch() { diff --git a/src/com/ample/icms/service/ImageService.java b/src/com/ample/icms/service/ImageService.java index 229a11267..2cc643002 100644 --- a/src/com/ample/icms/service/ImageService.java +++ b/src/com/ample/icms/service/ImageService.java @@ -41,7 +41,7 @@ public abstract class ImageService { base.setOrgCode("0005"); base.setComCode("0005"); base.setOrgName("安鹏国际融资租赁(深圳)有限公司"); - base.setRoleCode("admin"); + base.setRoleCode("market"); } public void addNode(String id ,String action ,List page){ @@ -105,7 +105,7 @@ public abstract class ImageService { postMethod.setParameter("data", getRequestParam()); // ICMS影像系统通过referer来验证白名单,所以必须将ip填写在这里 //todo - postMethod.setRequestHeader("Referer", "http://47.93.34.101"); + postMethod.setRequestHeader("Referer", PropertiesUtil.get("license_ip")); httpClient = new HttpClient(); // 执行postMethod int statusCode = httpClient.executeMethod(postMethod); diff --git a/src/com/ample/icms/util/GetInfoUtil.java b/src/com/ample/icms/util/GetInfoUtil.java index c0957ef68..8f08c402f 100644 --- a/src/com/ample/icms/util/GetInfoUtil.java +++ b/src/com/ample/icms/util/GetInfoUtil.java @@ -152,7 +152,7 @@ public class GetInfoUtil { return ja; } public JSONArray getAllAppInfoJsonByProductId(String productId, Transaction Sqlca) throws SQLException { - String sql = "select app_code,app_name from icms_prd_rela where productid='" + productId + "' and flowno<>'MortgageFileMailFlow' group by app_code"; + String sql = "select app_code,app_name from icms_prd_rela where productid='" + productId + "' and flowno<>'MortgageFileMailFlow' group by app_code order by update_time desc"; SqlObject sql_icms = new SqlObject(sql); ASResultSet rs = Sqlca.getASResultSet(sql_icms); String appCode = null; @@ -189,7 +189,7 @@ public class GetInfoUtil { } public String getAppInfoByProductId(String productId, String flowNo, Transaction Sqlca) throws SQLException { - String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "' and productid='" + productId + "'"; + String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "' and productid='" + productId + "' order by update_time desc"; SqlObject sql_icms = new SqlObject(sql); ASResultSet rs = Sqlca.getASResultSet(sql_icms); String appCode = null; @@ -315,7 +315,7 @@ public class GetInfoUtil { return getAppInfoByFlowNo(flowNo,Sqlca); } public String getAppInfoByFlowNo(String flowNo, Transaction Sqlca) throws SQLException { - String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "'"; + String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "' order by update_time desc"; SqlObject sql_icms = new SqlObject(sql); ASResultSet rs = Sqlca.getASResultSet(sql_icms); String appCode = null;