From 2be464f3b68a16377d9535687856b108f4024121 Mon Sep 17 00:00:00 2001 From: yjf <2211675158@qq.com> Date: Thu, 21 Sep 2023 15:06:36 +0800 Subject: [PATCH] =?UTF-8?q?2.=E8=AF=81=E4=BB=B6=E5=8F=B7=E5=8F=98=E7=BA=A2?= =?UTF-8?q?=204.=E5=A4=8D=E5=AE=A1=E6=8F=90=E4=BA=A4=E6=97=B6=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E5=BD=93=E5=89=8D=E5=A4=8D=E5=AE=A1=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E6=95=9E=E5=8F=A3=E5=AF=B9=E5=BA=94=E7=9A=84=E5=A4=8D=E5=AE=A1?= =?UTF-8?q?=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FlowManager/FlowPage/FlowPageViewTab.jsp | 2 + .../BusinessApplication/ApprovalForm.jsp | 117 +++++++++--------- .../BusinessApplication/CustomerInfo.jsp | 6 +- .../businessapply/CustomerInfoCheck.java | 71 ++++++----- .../businessapply/LBBusinessPrimary.java | 3 +- .../commcheck/ReviewExposureCheck.java | 40 ++++++ 6 files changed, 144 insertions(+), 95 deletions(-) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commcheck/ReviewExposureCheck.java diff --git a/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp b/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp index 5d307285a..72f6a47a7 100644 --- a/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp +++ b/WebContent/Tenwa/Core/FlowManager/FlowPage/FlowPageViewTab.jsp @@ -63,6 +63,8 @@ if(ReaderId.equals("")){ if (StringUtils.isEmpty(delTabs)) { out.write(new Button("关闭流程", "关闭流程", "closePage()", "", "btn_icon_close").getHtmlText()); + }else{ + flag = true; } }else{ rightType = "ReadOnly"; diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp index 2c4348099..b62ced999 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp @@ -1,13 +1,11 @@ -<%@page import="java.lang.Integer"%> -<%@page import="java.lang.Double"%> <%@page import="com.tenwa.reckon.product.ASObjectWindowCalc"%> -<%@ page import="jbo.oti.RC_SCORE_RESULT" %> +<%@page import="jbo.oti.RC_SCORE_RESULT"%> <%@ page contentType="text/html; charset=GBK"%> <%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% /* Author: undefined 2017-07-12 Content: 示例详情页面 - History Log: + History Log: */ String ishistory=CurPage.getParameter("IsHistory"); @@ -29,7 +27,7 @@ } double money = Double.parseDouble(clean_lease_money); CurPage.getCurComp().setAttribute("RightType", null); - + String sTempletNo = "VI_PROJECTINFO_APPROVAL";//--模板号-- ASObjectModel doTemp = new ASObjectModel(sTempletNo); if("01".equals(customerType)){ @@ -73,7 +71,7 @@ }else { dwTemp.getDataObject().setVisible("subjectname", false); } - + if("0010".equals(phaseNo)){//经销商 dwTemp.setGroupHidden("0020,0030,0040,0050"); }else if("0030".equals(phaseNo)){//初审 @@ -195,10 +193,11 @@ dwTemp.setGroupHidden("0030,0040,0050"); } } + dwTemp.setGroupHidden("0040");//去除信审审批 dwTemp.genHTMLObjectWindow(flowunid); - + String sButtons[][] = { - {"0010,0020".indexOf(phaseNo)>-1?"false":"true","","Button","保存","保存所有修改","save()","","","",""} + {"0010,0020".indexOf(phaseNo)>-1?"false":"true","","Button","保存","保存所有修改","save()","","","",""} }; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> -<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index c4352bf44..cc7b3d500 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -281,10 +281,10 @@ // $("#FULLNAME").css("color","red"); // } - if("0030"=="<%=sPhaseNo%>" ||"0040"=="<%=sPhaseNo%>"||"0050"=="<%=sPhaseNo%>"||"0060"=="<%=sPhaseNo%>"|| ("0070"=="<%=sPhaseNo%>" && "false"=="<%=IsHistory%>")){//经销商阶段看不见标红,初审、复审、信审可以标红 + if("0030"=="<%=sPhaseNo%>" ||"0040"=="<%=sPhaseNo%>"||/5/.test("<%=sPhaseNo%>")||"0060"=="<%=sPhaseNo%>"|| ("0070"=="<%=sPhaseNo%>" && "false"=="<%=IsHistory%>")){//经销商阶段看不见标红,初审、复审、信审可以标红 var certResult = checkCertIdAll(); - if(certResult=="4"){ + if(certResult=='true'){ //$("#FULLNAME").attr("style","color:red;"); $("#CERTID").css("color","red"); } @@ -989,7 +989,7 @@ function checkCertIdAll(){//校验证件号 var certId = getItemValue(0,getRow(),"CERTID"); var sParams = "certId="+certId+",flowunid="+"<%=flowunid%>"; - var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertIdAll",sParams); + var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkExistsByCertid",sParams); return sReturnInfo; } function getIdentity(){ diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java index 21337cfa0..a1c791228 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java @@ -1,35 +1,20 @@ package com.tenwa.lease.flow.project.businessapply; +import com.amarsoft.are.jbo.*; +import com.amarsoft.awe.util.ASResultSet; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; import com.tenwa.reckon.util.Conn; -import jbo.app.tenwa.customer.CUSTOMER_COMPANY; -import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP; -import jbo.app.tenwa.customer.CUSTOMER_FAMILY; -import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; -import jbo.app.tenwa.customer.CUSTOMER_PERSON; -import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; -import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; +import jbo.app.tenwa.customer.*; import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; -import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT; import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP; -import jbo.com.tenwa.lease.comm.LB_MANY_SUBJECT; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP; import jbo.sys.CODE_LIBRARY; -import java.text.SimpleDateFormat; -import java.util.Date; import java.util.List; import java.util.Map; -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.awe.util.ASResultSet; -import com.amarsoft.awe.util.SqlObject; -import com.amarsoft.awe.util.Transaction; - public class CustomerInfoCheck { private String CustomerName; @@ -48,7 +33,7 @@ public class CustomerInfoCheck { private String projectNo; private String FULLNAME; private String SubjectId; - + public String getFULLNAME() { return FULLNAME; } @@ -138,7 +123,7 @@ public class CustomerInfoCheck { } return mobileResult; } - + public String checkMobileRepeat(JBOTransaction tx) throws JBOException{//校验手机号是否重复 if(customerType.equals("03")){//自然人 //BizObject mobileP=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON.CLASS_NAME,"mobile=:mobile").setParameter("mobile", this.mobile).getSingleResult(false); @@ -217,12 +202,12 @@ public class CustomerInfoCheck { // return "手机号跟配偶人手机号重复!"; // } // } - } + } } } return "SUCCESS"; } - + public String checkDebitCardMobile(JBOTransaction tx) throws JBOException{//校验扣款卡手机号 if(customerType.equals("03")){//自然人校验共同人和担保人 BizObject mobilePT=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FLOWUNID=:flowunid and mobile=:mobile").setParameter("flowunid", this.flowunid).setParameter("mobile", this.mobile).getSingleResult(false); @@ -243,7 +228,7 @@ public class CustomerInfoCheck { } return mobileResult; } - + public String checkSex(JBOTransaction tx) throws Exception{ BizObjectManager cptMange = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME, tx); BizObject cpt = cptMange.createQuery("flowunid =:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); @@ -257,7 +242,7 @@ public class CustomerInfoCheck { } return "error"; } - + public String checkNameAndCertId(JBOTransaction tx)throws Exception{ String CustomerId=""; Transaction Sqlca=null; @@ -323,7 +308,7 @@ public class CustomerInfoCheck { BizObject cptP = cptManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); String MARRIAGE = cptP.getAttribute("MARRIAGE").getString(); String name1 = cft.getAttribute("name").getString(); - + if("01".equals(MARRIAGE) && name1.equals(FULLNAME)){ return "success"; }else{ @@ -353,7 +338,7 @@ public class CustomerInfoCheck { } return returns; }*/ - + public String getFlowunid() { return flowunid; } @@ -432,7 +417,7 @@ public class CustomerInfoCheck { public void setId(String id) { this.id = id; } - + public String getProjectNo() { return projectNo; } @@ -457,7 +442,7 @@ public class CustomerInfoCheck { } return mas; } - + public String checkProjectNo(JBOTransaction tx) throws JBOException{//校验姓名是否存在LB_PROJECT_INFO_TEMP BizObjectManager lpitManage = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx); BizObjectManager lpiManage = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx); @@ -473,7 +458,7 @@ public class CustomerInfoCheck { }else{ return "error"; } - + } return "success"; } @@ -506,6 +491,30 @@ public class CustomerInfoCheck { } return msg; } + + /** + * 校验当前证件号是否在本系统参与业务制作(走过业务信审就算,不包含当前单) + * @param tx + * @return + * @throws JBOException + */ + public String checkExistsByCertid(JBOTransaction tx) throws Exception { + Transaction Sqlca = Transaction.createTransaction(tx); + StringBuilder querySqlSb = new StringBuilder(); + querySqlSb.append("select count(1) as num from lb_project_info_temp lpi") + .append(" left join lc_calc_condition_temp lpc on lpc.FLOWUNID = lpi.FLOWUNID") + .append(" left join lb_union_lessee_temp lul on lul.FLOWUNID = lpi.FLOWUNID and IS_MAIN = 'Y'") + .append(" left join customer_info_temp ci on ci.customerid = lul.CUSTOMER_ID") + .append(" left join customer_family_temp cf on cf.flowunid = lpi.FLOWUNID and cf.Partner_ = 'Y'") + .append(" left join lb_guarantee_unit_temp lgu on lgu.FLOWUNID = lpi.FLOWUNID") + .append(" left join flow_task ft on lpi.FLOWUNID = ft.objectno and ft.phaseno = '0030'") + .append(" where lpi.FLOWUNID <> '" + flowunid + "' and ft.flowno = 'BusinessApplyFlow' ") + .append(" and (ci.certid in ('" + certId + "') or cf.certid in ('" + certId + "') or lgu.CERTID in ('" + certId + "')) "); + ASResultSet asResultSet = Sqlca.getASResultSet(new SqlObject(querySqlSb.toString())); + if (asResultSet.next() && asResultSet.getInt("num") > 0) return "true"; + return "false"; + } + //如果是北汽的产品修改FLOW_BUSSINESS_OBJECT中的flow_key public String changFlowKey(JBOTransaction tx) throws Exception{ BizObjectManager fboManage = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME, tx); diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/LBBusinessPrimary.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/LBBusinessPrimary.java index 6a83829c7..9cc7de255 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/LBBusinessPrimary.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/LBBusinessPrimary.java @@ -111,7 +111,8 @@ public class LBBusinessPrimary extends BaseBussiness { } } //流程中金额获取(当前流程) - String InFlowSql = "select CLEAN_LEASE_MONEY-ifnull(CAUTION_MONEY,0) as inFlowMoney from lc_calc_condition_temp where FLOWUNID = '"+flowUnid+"'"; + String InFlowSql = "select CLEAN_LEASE_MONEY-ifnull(CAUTION_MONEY,0) as inFlowMoney from lc_calc_condition_temp lcct " + + " left join flow_object fo on lcct.FLOWUNID = fo.objectno where lcct.FLOWUNID = '"+flowUnid+"' and fo.phaseno not in ('1000')"; ASResultSet rsIn = Sqlca.getASResultSet(new SqlObject(InFlowSql)); BigDecimal inFlowMoney = BigDecimal.valueOf(0); if (rsIn.next()) { diff --git a/src_tenwa/com/tenwa/lease/flow/project/commcheck/ReviewExposureCheck.java b/src_tenwa/com/tenwa/lease/flow/project/commcheck/ReviewExposureCheck.java new file mode 100644 index 000000000..87cae9c42 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commcheck/ReviewExposureCheck.java @@ -0,0 +1,40 @@ +package com.tenwa.lease.flow.project.commcheck; + +import com.amarsoft.awe.util.Transaction; +import com.tenwa.lease.flow.project.businessapply.LBBusinessPrimary; +import com.tenwa.template.check.DefaultBussinessCheck; +import org.apache.commons.lang3.StringUtils; + +import java.math.BigDecimal; + +/** + * 业务申请-复审敞口校验 + */ +public class ReviewExposureCheck extends DefaultBussinessCheck { + @Override + public Object run(Transaction Sqlca) throws Exception { + String flowunid = this.getAttribute("ObjectNo").toString(); + String phaseNo = this.getAttribute("PhaseNo").toString(); + String custType = Sqlca.getString("select cit.customertype from lb_union_lessee_temp lult join customer_info_temp cit on lult.FLOWUNID = cit.flowunid where lult.FLOWUNID = '" + flowunid + "' and lult.IS_MAIN = 'Y' "); + if (StringUtils.isEmpty(custType)) throw new RuntimeException("客户类型不存在,请联系管理员"); + BigDecimal compareMoney = BigDecimal.ZERO; + if ("0040".equals(phaseNo)) {//个人小于等于60万,法人小于等于100万 信审复审初级 + compareMoney = "03".equals(custType) ? BigDecimal.valueOf(600000) : BigDecimal.valueOf(1000000); + } else if ("0050".equals(phaseNo)) {//个人小于等于100万,法人小于等于200万 信审复审中级 + compareMoney = "03".equals(custType) ? BigDecimal.valueOf(1000000) : BigDecimal.valueOf(2000000); + } else if ("0051".equals(phaseNo)) {//个人小于等于200万,法人小于等于300万 信审复审高级 + compareMoney = "03".equals(custType) ? BigDecimal.valueOf(2000000) : BigDecimal.valueOf(3000000); + } else if ("0052".equals(phaseNo)) {//个人小于等于300万,法人小于等于500万 信审复审资深 + compareMoney = "03".equals(custType) ? BigDecimal.valueOf(3000000) : BigDecimal.valueOf(5000000); + } else if ("0053".equals(phaseNo)) {//个人大于300万,法人大于500万 信审会和贷审会 + setPass(true); + } + BigDecimal exposureMoney = LBBusinessPrimary.obtainExposureMoney(Sqlca, flowunid); + if (exposureMoney.compareTo(compareMoney) > -1) { + setPass(false); + } else { + setPass(true); + } + return null; + } +}