Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhangbb_apzl

This commit is contained in:
zhangbb 2019-09-25 14:11:02 +08:00
commit 93275ef890
6 changed files with 171 additions and 40 deletions

View File

@ -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;

View File

@ -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)){

View File

@ -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<String, String> condtion = new HashMap<String, String>();
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<String, String> getFlowStartActionParm(JBOTransaction tx,
String ObjectNo) throws Exception {

View File

@ -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)){//백도<EFBFBD>
}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<BizObject> 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<BizObject> 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;i<ladtBoList.size();i++) {
BizObject bizObject = ladtBoList.get(i);
jsonObject = jsonObject.accumulate("message"+i,bizObject.getAttribute("DEMO").toString());
}
jsonArray.add(jsonObject);
}
laolbo.setAttributeValue("APPROVE_OPINION",jsonArray.toString());
laolbo.setAttributeValue("PROCESS_NODE","MAIL_ARCHIVE");
}
laolBm.saveObject(laolbo);

View File

@ -184,7 +184,8 @@ public class CustomerInfoCheck {
if(mobileFTSpouse!=null){
String id = mobileFTSpouse.getAttribute("ID").getString();
if(!id.equals(certId)){
return "手机号跟配偶人手机号重复!";
//return "手机号跟配偶人手机号重复!";
return "SUCCESS";
}
}
}
@ -266,7 +267,8 @@ public class CustomerInfoCheck {
}else if("Y".equals(cft.getAttribute("Spouse_").getString())){
BizObject cptP = cptManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
if(cptP.getAttribute("MARRIAGE").getString().equals("01")){
return "该身份证已跟配偶身份证重复";
//return "该身份证已跟配偶身份证重复";
return "success";
}
}else{
return "该身份证已跟共同申请人身份证重复";
@ -282,6 +284,16 @@ public class CustomerInfoCheck {
}
return "success";
}
//如果是配有 不校验手机号信息
/*public String checkYesOrNoSpouse(JBOTransaction tx) throws Exception{
String returns="true";
BizObjectManager cftManage = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, tx);
BizObject cft = cftManage.createQuery("flowunid=:flowunid and CERTID=:certid and relative=:relative").setParameter("flowunid", flowunid).setParameter("certid",certid).setParameter("relative","01").getSingleResult(false);
if(cft!=null || !"".equals(cft)){
returns= "false";
}
return returns;
}*/
public String getFlowunid() {
return flowunid;

View File

@ -240,30 +240,31 @@ public class PlatformDataToTemp extends BaseBussiness {
/**计算综合融资额*/
BigDecimal totalAll = new BigDecimal(pccBo.getAttribute("EQUIP_AMT").toString());
/**购置税是否参融*/
String purchaseTaxFinan = ProductParamUtil.getProductParameterValue(productId,"PRD0315","PURCHASE_TAX","FINAN");
if("Y".equals(purchaseTaxFinan)&&pccBo.getAttribute("PURCHASE_TAX").toString().length()>0){
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);