diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp index 70f3e7d4e..05f5c3d4e 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp @@ -118,31 +118,37 @@ function checkTel(){//校验担保人手机号格式 var mobile = getItemValue(0,getRow(0),"mobile"); + //var certid = getItemValue(0,getRow(),"CERTID"); if(mobile==""){ //setErrorTips("mobile","手机号不能为空!"); -// alert("手机号不能为空!"); + //alert("手机号不能为空!"); return true; } - var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/; - if(phone.test(mobile)){ - var customerType = "03"; - var id = getItemValue(0,getRow(),"id"); - var sParams = "certId="+id+",mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>"; - var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams); - if("SUCCESS"!=sReturnInfo){ - //setErrorTips("tel","该手机号已重复!"); - setErrorTips("mobile",sReturnInfo); - //alert("该手机号已重复!"); - return false; + // 判断担保人是否配偶, 配偶不做手机号校验 + //var params1="certid="+certid+",flowunid="+"<%=sFlowUnid%>"; + //var returns = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkYesOrNoSpouse",params1); + //if("true"==returns){ + var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/; + if(phone.test(mobile)){ + var customerType = "03"; + var id = getItemValue(0,getRow(),"id"); + var sParams = "certId="+id+",mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>"; + var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams); + if("SUCCESS"!=sReturnInfo){ + //setErrorTips("tel","该手机号已重复!"); + setErrorTips("mobile",sReturnInfo); + //alert("该手机号已重复!"); + return false; + }else{ + setErrorTips("mobile",""); + return true; + } }else{ - setErrorTips("mobile",""); - return true; + setErrorTips("mobile","手机号格式不正确!"); + //alert("手机号格式不正确!"); + return false; } - }else{ - setErrorTips("mobile","手机号格式不正确!"); - //alert("手机号格式不正确!"); - return false; - } + //} /* if(CheckPhoneCode(mobile)){ return true; diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp index 742097a90..ce6469332 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp @@ -256,12 +256,12 @@ if(name.length > 0){ if(certid.length > 0){ - if(certid.length!=18){ + /* if(certid.length!=18){ // parent.parent.openDWDialog(); setErrorTips("certid","身份证必须是18位!"); // parent.parent.resetDWDialog("配偶身份证信息错误!",false); return false; - } + } */ if(CheckLicense(certid)){ setItemValue(0,0,"certid",certid); //setItemUnit(0,0,"certid",""); @@ -272,12 +272,12 @@ // setErrorTips("certid","配偶证件号码不可与承租人相同!"); // return false; // } - else{ + /* else{ // parent.parent.openDWDialog(); setErrorTips("certid","身份证格式错误!"); // parent.parent.resetDWDialog("配偶身份证信息错误!",false); return false; - } + } */ } if(tel.length > 0){ if(!CheckPhoneCode(tel)){ diff --git a/src/com/amarsoft/app/flow/FlowAction.java b/src/com/amarsoft/app/flow/FlowAction.java index 5ef5bcbe8..06e6f1a9c 100644 --- a/src/com/amarsoft/app/flow/FlowAction.java +++ b/src/com/amarsoft/app/flow/FlowAction.java @@ -1,6 +1,7 @@ package com.amarsoft.app.flow; import java.sql.SQLException; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; @@ -18,6 +19,7 @@ import jbo.sys.FLOW_ENTRUSTED_USER; import jbo.sys.FLOW_MODEL; import jbo.sys.FLOW_TASK; import jbo.sys.FLOW_TASK_USER_HIS; +import jbo.sys.LM_APPROVAL_OPINION_LOG; import jbo.sys.USER_TASK_DATA; import jbo.sys.USER_TASK_INFO; @@ -263,6 +265,8 @@ public class FlowAction { */ public String delete(JBOTransaction tx) throws Exception { try { + /**接口平台业务取消通知推送*/ + cancelOpinionLog(tx); Map condtion = new HashMap(); condtion.put("flow_unid", objectNo); BaseFlowTaskDataService deleteTaskService = null; @@ -293,6 +297,50 @@ public class FlowAction { return "fail@删除失败"; } } + + /**接口平台业务取消通知入表*/ + public void cancelOpinionLog(JBOTransaction tx) throws JBOException { + + BizObjectManager fboBm = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME,tx); + BizObject fboBo = fboBm.createQuery(" select O.FixedFlowParam from O where O.flow_unid=:flow_unid").setParameter("flow_unid",objectNo).getSingleResult(false); + String fixedFlowParam = fboBo.getAttribute("FixedFlowParam").toString(); + net.sf.json.JSONObject flowParamJson = net.sf.json.JSONObject.fromObject(fixedFlowParam); + if(!flowParamJson.containsKey("channel"))return; + + String channel = flowParamJson.getString("channel");; + String applyType = flowParamJson.getString("ApplyType"); + String flowunid = flowParamJson.getString("FlowUnid"); + String projectNo = flowParamJson.getString("ProjectNo"); + String applicationNo = flowParamJson.getString("applicationNo"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss") ; + String thisDate = dateFormat.format(new Date()); + ASUser asUser=new ASUser(flowParamJson.getString("CurUserID")); + BizObjectManager ftBm = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME,tx); + BizObject ftBo = ftBm.createQuery(" SELECT O.begintime FROM O WHERE OBJECTNO=:OBJECTNO AND O.ENDTIME IS NULL AND O.phaseno = '0010'").setParameter("OBJECTNO",flowunid).getSingleResult(false); + BizObjectManager laolBm = JBOFactory.getBizObjectManager(LM_APPROVAL_OPINION_LOG.CLASS_NAME,tx); + BizObject laolbo = laolBm.newObject(); + + laolbo.setAttributeValue("CHANNEL",channel); + laolbo.setAttributeValue("APPLICATION_NO",applicationNo); + laolbo.setAttributeValue("PROJECT_NO",projectNo); + laolbo.setAttributeValue("FLOWUNID",flowunid); + laolbo.setAttributeValue("ITEMNO",applyType); + laolbo.setAttributeValue("APPROVE_STATUS","CANCEL"); + laolbo.setAttributeValue("APPROVE_BEGINTIME",ftBo.getAttribute("begintime")); + laolbo.setAttributeValue("APPROVE_ENDTIME",thisDate); + laolbo.setAttributeValue("PUSH_NUMBER","0"); + laolbo.setAttributeValue("INPUTTIME",thisDate); + laolbo.setAttributeValue("INPUTUSERID",asUser.getUserID()); + laolbo.setAttributeValue("INPUTORGID",asUser.getOrgID()); + if("ContractBasicInfoChangeApply".equals(applyType)){//起租后客户基本信息变更 + laolbo.setAttributeValue("APPROVE_OPINION","起租后客户基本信息变更业务取消"); + laolbo.setAttributeValue("PROCESS_NODE","CHANGE_INFORMATION_AFTER_LEASE"); + }else if("AccountChangeApply".equals(applyType)){//起租后客户扣款卡信息变更 + laolbo.setAttributeValue("APPROVE_OPINION","起租后客户扣款卡信息变更业务取消"); + laolbo.setAttributeValue("PROCESS_NODE","CHANGE_ACCOUNT_AFTER_LEASE"); + } + laolBm.saveObject(laolbo); + } public Map getFlowStartActionParm(JBOTransaction tx, String ObjectNo) throws Exception { diff --git a/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/GeneratePassOpinionLog.java b/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/GeneratePassOpinionLog.java index 39323b078..4ee5a5919 100644 --- a/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/GeneratePassOpinionLog.java +++ b/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/GeneratePassOpinionLog.java @@ -3,8 +3,15 @@ package com.tenwa.lease.flow.contract.commbusiness; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; + +import net.sf.json.JSONObject; +import jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO_TEMP; +import jbo.app.tenwa.doc.LM_APPROVALOPINION_DOC_TEMP; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; import jbo.sys.FLOW_TASK; import jbo.sys.LM_APPROVAL_OPINION_LOG; + +import com.alibaba.fastjson.JSONArray; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; @@ -24,8 +31,12 @@ public class GeneratePassOpinionLog extends BaseBussiness{ String channel = this.getAttribute("channel").toString(); String applyType = this.getAttribute("ApplyType").toString(); String flowunid = this.getAttribute("FlowUnid").toString(); - String projectNo = this.getAttribute("ProjectNo").toString(); - String applicationNo = this.getAttribute("applicationNo").toString(); + String projectNo = ""; + if(this.getAttribute("ProjectNo")!=null) + projectNo = this.getAttribute("ProjectNo").toString(); + String applicationNo = ""; + if(this.getAttribute("applicationNo")!=null) + applicationNo = this.getAttribute("applicationNo").toString(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); String thisDate = dateFormat.format(new Date()); @@ -63,8 +74,27 @@ public class GeneratePassOpinionLog extends BaseBussiness{ laolbo.setAttributeValue("PROCESS_NODE","CONTRACT_CHANGES"); }else if("FundPaymentCarApply".equals(applyType)){//放款申请 laolbo.setAttributeValue("PROCESS_NODE","FINANCE_AUDIT"); - }else if("FileReturnApply".equals(applyType)){//归档申请 + }else if("FileReturnApply".equals(applyType)){//放款后督 laolbo.setAttributeValue("PROCESS_NODE","DATA_ARCHIVE"); + }else if("MortgageFileMailApply".equals(applyType)){//邮寄归档 + BizObjectManager lfmitBm = JBOFactory.getBizObjectManager(LB_FILE_MAILARCHIVING_INFO_TEMP.CLASS_NAME,Sqlca); + BizObjectManager ladtBm = JBOFactory.getBizObjectManager(LM_APPROVALOPINION_DOC_TEMP.CLASS_NAME,Sqlca); + BizObjectManager lciBm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME,Sqlca); + List lfmitBoList = lfmitBm.createQuery("SELECT O.CONTRACT_ID FROM O WHERE O.FLOWUNID=:FLOWUNID").setParameter("FLOWUNID",flowunid).getResultList(false); + JSONArray jsonArray = new JSONArray(); + for (BizObject lfmitBo : lfmitBoList) { + BizObject lciBo = lciBm.createQuery("SELECT lpi.APPLICATION_NO FROM O LEFT JOIN jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi ON O.PROJECT_ID=lpi.id WHERE O.ID=:ID ").setParameter("ID",lfmitBo.getAttribute("CONTRACT_ID").toString()).getSingleResult(false); + JSONObject jsonObject = new JSONObject(); + jsonObject = jsonObject.accumulate("applicationNo",lciBo.getAttribute("APPLICATION_NO").toString()); + List ladtBoList = ladtBm.createQuery("SELECT O.DEMO FROM O WHERE O.CONTRACT_ID=:CONTRACT_ID AND O.FLOWUNID=:FLOWUNID").setParameter("CONTRACT_ID",lfmitBo.getAttribute("CONTRACT_ID").toString()).setParameter("FLOWUNID",flowunid).getResultList(false); + for (int i=0;i0){ - totalAll.add(new BigDecimal(pccBo.getAttribute("PURCHASE_TAX").toString())); + totalAll = totalAll.add(new BigDecimal(pccBo.getAttribute("PURCHASE_TAX").toString())); } - + /**GPS设备费是否参融*/ + BigDecimal gpsFee = new BigDecimal(pccBo.getAttribute("GPS_FEE").toString()); String gpsFeeFinan = ProductParamUtil.getProductParameterValue(productId,"PRD0315","GPS_FEE","FINAN"); - String gpsFee = ProductParamUtil.getProductParameterValue(productId,"GPS_FEE","CostType08"); - if("Y".equals(gpsFeeFinan)&&gpsFee.length()>0){ - totalAll.add(new BigDecimal(gpsFee)); + if("Y".equals(gpsFeeFinan)&&pccBo.getAttribute("GPS_FEE").toString().length()>0){ + totalAll = totalAll.add(new BigDecimal(pccBo.getAttribute("GPS_FEE").toString())); } - + /**加装费是否参融*/ String tablewareFeeFinan = ProductParamUtil.getProductParameterValue(productId,"PRD0315","TABLEWARE_FEE","FINAN"); if("Y".equals(tablewareFeeFinan)&&pccBo.getAttribute("TABLEWARE_FEE").toString().length()>0){ - totalAll.add(new BigDecimal(pccBo.getAttribute("TABLEWARE_FEE").toString())); + totalAll = totalAll.add(new BigDecimal(pccBo.getAttribute("TABLEWARE_FEE").toString())); } - + /**保险费是否参融*/ String insurancePremiumFinan = ProductParamUtil.getProductParameterValue(productId,"PRD0315","INSURANCE_PREMIUM","FINAN"); if("Y".equals(insurancePremiumFinan)&&pccBo.getAttribute("INSURANCE_PREMIUM").toString().length()>0){ - totalAll.add(new BigDecimal(pccBo.getAttribute("INSURANCE_PREMIUM").toString())); + totalAll = totalAll.add(new BigDecimal(pccBo.getAttribute("INSURANCE_PREMIUM").toString())); } - + /**杂费是否参融*/ String incidentalFinan = ProductParamUtil.getProductParameterValue(productId,"PRD0315","INCIDENTAL","FINAN"); if("Y".equals(incidentalFinan)&&pccBo.getAttribute("INCIDENTAL").toString().length()>0){ - totalAll.add(new BigDecimal(pccBo.getAttribute("INCIDENTAL").toString())); + totalAll = totalAll.add(new BigDecimal(pccBo.getAttribute("INCIDENTAL").toString())); } /**首付款比例*/ @@ -305,6 +306,37 @@ public class PlatformDataToTemp extends BaseBussiness { }else if ("TOTAL_ALL".equals(tablewareFeeRefer)){ tablewareFeeReferB = new BigDecimal(pccBo.getAttribute("TABLEWARE_FEE").toString()).divide(totalAll,4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); } + + + /**购置锐比例*/ + String purchaseTaxRefer=ProductParamUtil.getProductParameterValue(productId,"PRD0315","PURCHASE_TAX","CostType07"); + BigDecimal purchaseTaxReferB = new BigDecimal(0.00); + if(pccBo.getAttribute("PURCHASE_TAX").toString().length()>0) + if("EquipAmt".equals(purchaseTaxRefer)){ + purchaseTaxReferB = new BigDecimal(pccBo.getAttribute("PURCHASE_TAX").toString()).divide(new BigDecimal(pccBo.getAttribute("EQUIP_AMT").toString()),4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); + }else if ("TOTAL_ALL".equals(purchaseTaxRefer)){ + purchaseTaxReferB = new BigDecimal(pccBo.getAttribute("PURCHASE_TAX").toString()).divide(totalAll,4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); + } + + /**保险费比例*/ + String insurancePremiumRefer=ProductParamUtil.getProductParameterValue(productId,"PRD0315","INSURANCE_PREMIUM","CostType07"); + BigDecimal insurancePremiumReferB = new BigDecimal(0.00); + if(pccBo.getAttribute("INSURANCE_PREMIUM").toString().length()>0) + if("EquipAmt".equals(insurancePremiumRefer)){ + insurancePremiumReferB = new BigDecimal(pccBo.getAttribute("INSURANCE_PREMIUM").toString()).divide(new BigDecimal(pccBo.getAttribute("EQUIP_AMT").toString()),4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); + }else if ("TOTAL_ALL".equals(insurancePremiumRefer)){ + insurancePremiumReferB = new BigDecimal(pccBo.getAttribute("INSURANCE_PREMIUM").toString()).divide(totalAll,4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); + } + + /**杂费比例*/ + String incidentalRefer=ProductParamUtil.getProductParameterValue(productId,"PRD0315","INCIDENTAL","CostType07"); + BigDecimal incidentalReferB = new BigDecimal(0.00); + if(pccBo.getAttribute("INCIDENTAL").toString().length()>0) + if("EquipAmt".equals(incidentalRefer)){ + incidentalReferB = new BigDecimal(pccBo.getAttribute("INCIDENTAL").toString()).divide(new BigDecimal(pccBo.getAttribute("EQUIP_AMT").toString()),4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); + }else if ("TOTAL_ALL".equals(incidentalRefer)){ + incidentalReferB = new BigDecimal(pccBo.getAttribute("INCIDENTAL").toString()).divide(totalAll,4,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN); + } if(lcctBo==null){ lcctBo = lcctBm.newObject(); @@ -330,7 +362,7 @@ public class PlatformDataToTemp extends BaseBussiness { // 设置还款间隔 lcctBo.setAttributeValue("INCOME_NUMBER_YEAR","income_12"); lcctBo.setAttributeValue("INCOME_INTERVAL_MONTH","1"); - lcctBo.setAttributeValue("GPS_FEE",gpsFee); + lcctBo.setAttributeValue("GPS_FEE",gpsFee.toString()); lcctBo.setAttributeValue("LEASE_TERM",pccBo.getAttribute( "INCOME_NUMBER" )); // 计算第一,第二期租金支付日 setFirstSecondPlan(otherProperty,productId,pccBo); @@ -347,13 +379,16 @@ public class PlatformDataToTemp extends BaseBussiness { lcctBo.setAttributeValue("CAUTION_MONEY_RATIO",cautionMoneyReferB); lcctBo.setAttributeValue("GPS_FEE_FINA",pccBo.getAttribute("GPS_FEE_FINA")); lcctBo.setAttributeValue("PURCHASE_TAX",pccBo.getAttribute("PURCHASE_TAX")); + lcctBo.setAttributeValue("PURCHASE_TAX_RATIO",purchaseTaxReferB); lcctBo.setAttributeValue("INSURANCE_PREMIUM",pccBo.getAttribute("INSURANCE_PREMIUM")); + lcctBo.setAttributeValue("INSURANCE_PREMIUM_RATIO",insurancePremiumReferB); lcctBo.setAttributeValue("SETTLE_METHOD",pccBo.getAttribute("SETTLE_METHOD")); lcctBo.setAttributeValue("INCOME_NUMBER",pccBo.getAttribute("INCOME_NUMBER")); lcctBo.setAttributeValue("DefaultDueDay",pccBo.getAttribute("DefaultDueDay")); lcctBo.setAttributeValue("TABLEWARE_FEE",pccBo.getAttribute("TABLEWARE_FEE")); lcctBo.setAttributeValue("TABLEWARE_FEE_RATIO",tablewareFeeReferB); lcctBo.setAttributeValue("INCIDENTAL",pccBo.getAttribute("INCIDENTAL")); + lcctBo.setAttributeValue("INCIDENTAL_RATIO",incidentalReferB); lcctBo.setAttributeValue("TOTAL_ALL",totalAll); lcctBo.setAttributeValue("ALL_FIRST_PAYMENT",pccBo.getAttribute("FIRST_PAYMENT").toString()); lcctBo.setAttributeValue("ALL_FIRST_PAYMENT_RATIO",firstPaymentReferB);