From 045cb18a7fca4e33422f270b54dc4b8f364d6535 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Tue, 16 Jun 2020 09:32:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9app=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E6=94=B9=E4=B8=BA=E9=80=9A=E7=94=A8=E5=92=8C?= =?UTF-8?q?=E7=BD=91=E7=BA=A6=E8=BD=A6=E4=BF=A1=E6=81=AF=E9=9D=9E=E5=BF=85?= =?UTF-8?q?=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MortgageFile/MortgageFileApplyList.jsp | 2 +- .../BusinessApplication/CustomerInfo.jsp | 30 +++++------ .../impl/BusinessDocDetailServiceImpl.java | 53 ++++++++++++++----- .../controller/ContractMakeController.java | 2 +- .../service/Impl/FlowDataServiceImpl.java | 10 ++-- 5 files changed, 63 insertions(+), 34 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp index f5c511d7a..8f7ad8272 100644 --- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp @@ -36,7 +36,7 @@ } else { - var mes=sReturnInfos[1]; + var mes=sReturnInfos[0]; alert(mes); } reloadSelf(); diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index 7258d15f4..4f90b2071 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -843,21 +843,21 @@ var netcar = getItemValue(0,0,"IS_NETCAR"); if("1" == netcar){ $("#A_Group_0040").attr("style","display:block;"); - setItemRequired(0,"IS_OPERATION",true); - setItemRequired(0,"IS_AFFILIATED",true); - setItemRequired(0,"IS_OPERATION_QUALIFICATION",true); -// setItemRequired(0,"TRANSPORTCERTID",true); - setItemRequired(0,"AFFILIATEDNAME",true); - setItemRequired(0,"NETCERTNAME",true); - setItemRequired(0,"LEGALPERSONNAME",true); - setItemRequired(0,"AFFILIATEDDATE",true); - setItemRequired(0,"AFFILIATEDENDDATE",true); - setItemRequired(0,"REGISTEREDMONEY",true); - setItemRequired(0,"AFFILIATEDACTUALADDRESS",true); - setItemRequired(0,"AFFILIATEDADDRESS",true); -// setItemRequired(0,"",true); - setItemRequired(0,"NETCERTID",true); - setItemRequired(0,"LEGALPERSONID",true); +// setItemRequired(0,"IS_OPERATION",true); +// setItemRequired(0,"IS_AFFILIATED",true); +// setItemRequired(0,"IS_OPERATION_QUALIFICATION",true); +// // setItemRequired(0,"TRANSPORTCERTID",true); + setItemRequired(0,"AFFILIATEDNAME",true); +// setItemRequired(0,"NETCERTNAME",true); + setItemRequired(0,"LEGALPERSONNAME",true); +// setItemRequired(0,"AFFILIATEDDATE",true); +// setItemRequired(0,"AFFILIATEDENDDATE",true); +// setItemRequired(0,"REGISTEREDMONEY",true); +// setItemRequired(0,"AFFILIATEDACTUALADDRESS",true); +// setItemRequired(0,"AFFILIATEDADDRESS",true); +// // setItemRequired(0,"",true); + setItemRequired(0,"NETCERTID",true); +// setItemRequired(0,"LEGALPERSONID",true); document.getElementById("NETCERTNAME").value = '营业执照'; }else{ $("#A_Group_0040").attr("style","display:none;"); diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/detail/service/impl/BusinessDocDetailServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/detail/service/impl/BusinessDocDetailServiceImpl.java index 8f120defb..f76e2b40c 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/detail/service/impl/BusinessDocDetailServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/doc/detail/service/impl/BusinessDocDetailServiceImpl.java @@ -12,6 +12,8 @@ import jbo.app.tenwa.doc.LB_DOCATTRIBUTE; import jbo.app.tenwa.doc.LB_DOCLIBRARY; import jbo.app.tenwa.doc.LB_DOCRELATIVE; import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; +import jbo.sys.FLOW_OBJECT; +import jbo.sys.FLOW_TASK; import net.sf.json.JSONObject; import apx.com.amarsoft.als.apzl.apply.business.doc.detail.service.BusinessDocDetailService; import apx.com.amarsoft.als.apzl.apply.business.start.init.InitDocListTools; @@ -106,10 +108,15 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService { ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("fail").toString(), "获取车辆属性信息失败!"); return ReturnMapUtil.getReturnMap(); } + + //查询当前流程编号 + BizObjectManager foM = JBOFactory.getBizObjectManager(FLOW_OBJECT.CLASS_NAME); + BizObject fb = foM.createQuery("objectno=:flow_unid").setParameter("flow_unid", flowUnid).getSingleResult(false); + String applyFlow = fb == null?"":fb.getAttribute("FLOWNO").getString(); // 加载附件 // carAttributes - boolean flag = InitDocListTools.initDocList(flowUnid, fieldMap.get("userid").toString(), carAttributes, "BusinessApplyFlow"); + boolean flag = InitDocListTools.initDocList(flowUnid, fieldMap.get("userid").toString(), carAttributes, applyFlow); BizObjectManager businessManage = JBOFactory .getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME); @@ -162,7 +169,7 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService { // RestfullConstant.baseProperty.get("SUCCESS").toString(), ""); // return ReturnMapUtil.getReturnMap(); return doc(flowUnid, docName, request, response, tx, sqlca, - ReturnMapUtil); + ReturnMapUtil,fieldMap.get("userid").toString()); } @SuppressWarnings("unchecked") @@ -285,7 +292,7 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService { @SuppressWarnings("unchecked") public Map doc(String objectNo, String docName, HttpServletRequest request, HttpServletResponse response, - JBOTransaction tx, Transaction sqlca, ReturnMapUtil ReturnMapUtil) + JBOTransaction tx, Transaction sqlca, ReturnMapUtil ReturnMapUtil,String userId) throws JBOException { // String flowUnid = fieldMap.get("objectno") == null ? "" : fieldMap.get( @@ -314,11 +321,27 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService { RestfullConstant.baseProperty.get("FAIL").toString(), "未找到该业务流程的资料清单!"); return ReturnMapUtil.getReturnMap(); - } + } + BizObjectManager ftM = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME); + List ftList = ftM.createQuery(" objectno=:flow_unid AND phaseno='0010'").setParameter("flow_unid", objectNo).getResultList(false); + + String proj_id = fbo.getAttribute("proj_id").getString(); BizObjectManager relaManage = JBOFactory - .getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME); - BizObject rela = relaManage.createQuery("O.ObjectType='BusinessApplyFlow' and O.proj_id=:projid") + .getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME); + + BizObjectManager foM = JBOFactory.getBizObjectManager(FLOW_OBJECT.CLASS_NAME); + BizObject fo = foM.createQuery("objectno=:flow_unid").setParameter("flow_unid", objectNo).getSingleResult(false); + String applyFlow = fo == null?"":fo.getAttribute("FLOWNO").getString(); + String phaseno = fo == null ? "" : fo.getAttribute("PHASENO").getString(); + + String othwhere = ""; + if("BusinessApplyFlow".equals(applyFlow)||"BusinessChangeFlow".equals(applyFlow)||"BusinessCancelFlow".equals(applyFlow)||"BContractApproveFlow".equals(applyFlow)||"BContractCancelFlow".equals(applyFlow)||"".equals(applyFlow)){ + othwhere = " and O.ObjectType='BusinessApplyFlow'"; + }else{ + othwhere = " and O.ObjectType='"+applyFlow+"'"; + } + BizObject rela = relaManage.createQuery("O.proj_id=:projid " +othwhere) .setParameter("projid", proj_id).getSingleResult(false); String relaId = ""; if (null == rela) { @@ -333,11 +356,8 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService { BizObjectManager libraryManage = JBOFactory .getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME); - List librarys = libraryManage - .createQuery( - "RELATIVE_ID=:RELATIVE_ID AND DOC_NAME IN (" + docName - + ") ORDER BY DOC_NATURE, ONE_CLASSIFY, SERIAL_NUM") - .setParameter("RELATIVE_ID", relaId).getResultList(false); + //List librarys = libraryManage.createQuery("RELATIVE_ID=:RELATIVE_ID AND DOC_NAME IN (" + docName +") ORDER BY DOC_NATURE, ONE_CLASSIFY, SERIAL_NUM").setParameter("RELATIVE_ID", relaId).getResultList(false); + List librarys = libraryManage.createQuery("RELATIVE_ID=:RELATIVE_ID ORDER BY DOC_NATURE, ONE_CLASSIFY, SERIAL_NUM").setParameter("RELATIVE_ID", relaId).getResultList(false); List> list = new ArrayList>(); for (BizObject library : librarys) { Map libraryMap = new HashMap(); @@ -385,12 +405,21 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService { : att.getAttribute("CONTENT_TYPE").toString(); String attRemark = att.getAttribute("REMARK") == null ? "" : att.getAttribute("REMARK").toString(); - + String objecttype = att.getAttribute("objecttype") == null ? "" + : att.getAttribute("objecttype").toString(); + String inputuserid = att.getAttribute("inputuserid") == null ? "" + : att.getAttribute("inputuserid").toString(); attMap.put("attId", attId); attMap.put("fileName", fileName); attMap.put("fileSize", fileSize); attMap.put("fileType", fileType); attMap.put("attRemark", attRemark); + if( "0010".equals(phaseno) && applyFlow.equals(objecttype) && userId.equals(inputuserid)&& ftList.size()<=1){ + attMap.put("isDelete", "Y"); + }else{ + attMap.put("isDelete", "N"); + } + attList.add(attMap); } libraryMap.put("fileList", attList); diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/controller/ContractMakeController.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/controller/ContractMakeController.java index 3e34a997e..167672da0 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/controller/ContractMakeController.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/controller/ContractMakeController.java @@ -85,7 +85,7 @@ public class ContractMakeController { /** - * 获取模板编号 + * 生成合同 */ @Path("/generate/contract") @POST diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java index 63ad7c869..f668c4300 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java @@ -138,10 +138,10 @@ public class FlowDataServiceImpl implements FlowDataService{ Map testMap = (Map) MultipartDataUtil .readRequestParam(request, "UTF-8"); fieldMap = (Map) testMap.get("fieldMap"); // 参数 - String productId = fieldMap.get("product_id") == null ? "" : fieldMap.get("product_id").toString(); - String ContractId = fieldMap.get("ContractId") == null ? "" : fieldMap.get("ContractId").toString(); - String FlowUnid = fieldMap.get("FlowUnid") == null ? "" : fieldMap.get("FlowUnid").toString(); - String sql = "SELECT id,acc_number,bank_name,account,customerid,project_id,mobile,certid FROM customer_account WHERE acc_type='Debit' and project_id='"+productId+"'"; + String projectid = fieldMap.get("projectid") == null ? "" : fieldMap.get("projectid").toString(); + String ContractId = fieldMap.get("contractid") == null ? "" : fieldMap.get("contractid").toString(); + String FlowUnid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString(); + String sql = "SELECT id,acc_number,bank_name,account,customerid,project_id,mobile,certid FROM customer_account WHERE acc_type='Debit' and project_id='"+projectid+"'"; List> dataList = DataOperatorUtil.getDataBySql(sql); Map body = new HashMap(); Map data = new HashMap(); @@ -159,7 +159,7 @@ public class FlowDataServiceImpl implements FlowDataService{ data.put("acc_number", ""); data.put("bank_name", ""); data.put("account", ""); - data.put("project_id", productId); + data.put("project_id", projectid); data.put("mobile", ""); data.put("certid", "");