接口平台业务申请
This commit is contained in:
parent
88adb4f5cb
commit
5ba78261d8
@ -76,6 +76,7 @@
|
||||
</class>
|
||||
<class name="LB_PROJECT_INFO_TEMP" label="项目基本信息表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="APPLICATION_NO" label="渠道申请编号" type="STRING" length="32"/>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="PRODUCT_ID" label="业务品种编号" type="STRING" length="32"/>
|
||||
<attribute name="PRODUCT_NAME" label="业务品种" type="STRING" length="100"/>
|
||||
@ -218,6 +219,7 @@
|
||||
</class>
|
||||
<class name="LB_PROJECT_INFO" label="项目基本信息表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="APPLICATION_NO" label="渠道申请编号" type="STRING" length="32"/>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="PRODUCT_ID" label="业务品种编号" type="STRING" length="32"/>
|
||||
<attribute name="PRODUCT_NAME" label="业务品种" type="STRING" length="100"/>
|
||||
|
||||
@ -51,9 +51,7 @@ public class DocListInitAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static synchronized void initDocList(Map<String, String> param,
|
||||
Map<String, String> other, String docno, Configure curConfig)
|
||||
throws Exception {
|
||||
public static synchronized void initDocList(Map<String, String> param,Map<String, String> other, String docno, Configure curConfig)throws Exception {
|
||||
String CustomerType = other.get("CustomerType");
|
||||
String[] itemnos = docno.split(",");
|
||||
String s = "";
|
||||
|
||||
@ -67,7 +67,7 @@ public class FlowController extends HttpServlet {
|
||||
throw new Exception( "Ìá½»Á÷³Ìʧ°Ü" );
|
||||
}
|
||||
}
|
||||
result = sResult.split("@")[1];
|
||||
result = sResult;
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
result = "ERR-9999";
|
||||
|
||||
@ -5,13 +5,10 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ADDRESS_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
|
||||
@ -19,12 +16,10 @@ import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
|
||||
import jbo.sys.PF_CALC_CONDITION;
|
||||
import jbo.sys.PF_CUSTOMER_ACCOUNT;
|
||||
import jbo.sys.PF_CUSTOMER_ADDRESS;
|
||||
import jbo.sys.PF_CUSTOMER_COMPANY;
|
||||
import jbo.sys.PF_CUSTOMER_FAMILY;
|
||||
import jbo.sys.PF_CUSTOMER_PERSON;
|
||||
import jbo.sys.PF_GUARANTEE_UNIT;
|
||||
import jbo.sys.PF_PROJECT_INFO;
|
||||
|
||||
import com.amarsoft.app.als.sys.tools.DateUtil;
|
||||
import com.amarsoft.app.util.ProductParamUtil;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -56,178 +51,223 @@ public class PlatformDataToTemp extends BaseBussiness {
|
||||
String customerId = Sqlca.getString("SELECT customerid FROM customer_info_temp WHERE flowunid='"+flowunid+"'");
|
||||
String projectId = this.getAttribute("ProjectId").toString();
|
||||
String customerType = this.getAttribute("CustomerType").toString();
|
||||
String productId = this.getAttribute( "ProductId" ).toString();
|
||||
String planNumber = null;
|
||||
String calType = "proj_process";
|
||||
|
||||
Map<String,String> fromCondtion = new HashMap<String,String>();
|
||||
Map<String,String> toCondtion = new HashMap<String,String>();
|
||||
toCondtion.put("customerid",customerId);
|
||||
toCondtion.put("flowunid",flowunid);
|
||||
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
|
||||
int number = Integer.valueOf(Sqlca.getString("select count(1) from PF_CUSTOMER_ACCOUNT where flowunid='"+flowunid+"'"));
|
||||
|
||||
//判断是新增申请还是修改申请,新增申请没有流程编号,用流水号查询,修改申请有流程编号
|
||||
fromCondtion.put("SERIAL",serial);
|
||||
String sqlWhere = " SERIAL = '"+serial+"'";
|
||||
String bowhere ="SERIAL=:SERIAL";
|
||||
String boKey = "SERIAL";
|
||||
String boValue = serial;
|
||||
if(number>0){
|
||||
fromCondtion.clear();
|
||||
fromCondtion.put("FLOWUNID",flowunid);
|
||||
sqlWhere = " FLOWUNID = '"+flowunid+"'";
|
||||
bowhere ="FLOWUNID=:FLOWUNID";
|
||||
boKey = "FLOWUNID";
|
||||
boValue = flowunid;
|
||||
}
|
||||
/**共同申请人拷表和配偶信息*/
|
||||
otherProperty.put("customerid",customerId);
|
||||
otherProperty.put("flowunid",flowunid);
|
||||
otherProperty.put("PROJECT_ID",projectId);
|
||||
Sqlca.executeSQL(new SqlObject("delete from CUSTOMER_FAMILY_TEMP where flowunid='"+flowunid+"'"));
|
||||
String sql = "select id from PF_CUSTOMER_FAMILY where "+sqlWhere;
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql));
|
||||
while(res.next()){
|
||||
fromCondtion.put("id",res.getString("id"));
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_FAMILY.CLASS_NAME,fromCondtion,CUSTOMER_FAMILY_TEMP.CLASS_NAME,null,otherProperty,Sqlca);
|
||||
}
|
||||
res.close();
|
||||
fromCondtion.remove("id");
|
||||
|
||||
/**自然人客户居住地址信息*/
|
||||
Sqlca.executeSQL(new SqlObject("delete from CUSTOMER_ADDRESS_TEMP where flowunid='"+flowunid+"'"));
|
||||
String dressdetail = Sqlca.getString("select dressdetail from PF_CUSTOMER_ADDRESS where "+sqlWhere);
|
||||
if(!"".equals(dressdetail)&&!"null".equals(dressdetail)){
|
||||
String province = Sqlca.getString("select province from PF_CUSTOMER_ADDRESS where "+sqlWhere);
|
||||
String itemname = Sqlca.getString("select itemname from CODE_LIBRARY where codeno='AreaCode' and itemno='"+province+"'");
|
||||
otherProperty.remove("PROJECT_ID");
|
||||
int number = Integer.valueOf(Sqlca.getString("select count(1) from PF_CUSTOMER_ACCOUNT where flowunid='"+flowunid+"'"));
|
||||
|
||||
String bowhere = null;
|
||||
String boKey = null;
|
||||
String boValue = null;
|
||||
|
||||
/**判断是新增业务申请还是修改业务申请*/
|
||||
if(number==0){
|
||||
boKey="SERIAL";
|
||||
boValue=serial;
|
||||
bowhere=boKey+"=:"+boKey;
|
||||
}else{
|
||||
//修改业务申请
|
||||
boKey="FLOWUNID";
|
||||
boValue=flowunid;
|
||||
bowhere=boKey+"=:"+boKey;
|
||||
}
|
||||
|
||||
fromCondtion.put(boKey,boValue);
|
||||
/**判断客户类型*/
|
||||
if("03".equals(customerType)){
|
||||
/**配偶信息拷表*/
|
||||
String marriage = Sqlca.getString("select MARRIAGE from PF_CUSTOMER_PERSON where SERIAL='"+serial+"'");
|
||||
/**判断是否已婚*/
|
||||
if("01".equals(marriage)){
|
||||
fromCondtion.put("Spouse_","Y");
|
||||
toCondtion.put("Spouse_","Y");
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_FAMILY.CLASS_NAME,fromCondtion,CUSTOMER_FAMILY_TEMP.CLASS_NAME,toCondtion,otherProperty,Sqlca);
|
||||
}
|
||||
|
||||
/**共同申请人信息拷表*/
|
||||
fromCondtion.put("Spouse_","N");
|
||||
toCondtion.put("Spouse_","N");
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_FAMILY.CLASS_NAME,fromCondtion,CUSTOMER_FAMILY_TEMP.CLASS_NAME,toCondtion,otherProperty,Sqlca);
|
||||
fromCondtion.remove("Spouse_");
|
||||
toCondtion.remove("Spouse_");
|
||||
|
||||
/**自然人基本信息拷表*/
|
||||
otherProperty.remove("PROJECT_ID");
|
||||
|
||||
otherProperty.put("CERTTYPE",this.getAttribute("certtype").toString());
|
||||
otherProperty.put("CERTID",this.getAttribute("certid").toString());
|
||||
otherProperty.put("INPUTUSERID",asUser.getUserID());
|
||||
otherProperty.put("INPUTORGID",asUser.getOrgID());
|
||||
otherProperty.put("inputtime",StringFunction.getTodayNow());
|
||||
otherProperty.put("FULLNAME",this.getAttribute("custname").toString());
|
||||
otherProperty.put("BALANCESHEET","申请人");
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_PERSON.CLASS_NAME,fromCondtion,CUSTOMER_PERSON_TEMP.CLASS_NAME,toCondtion,otherProperty,Sqlca);
|
||||
|
||||
/**自然人客户居住地址信息拷表*/
|
||||
String dressdetail = Sqlca.getString("select dressdetail from PF_CUSTOMER_ADDRESS where "+boKey+"='"+boValue+"'");
|
||||
String itemname = Sqlca.getString("SELECT cl.itemname FROM PF_CUSTOMER_ADDRESS pca INNER JOIN CODE_LIBRARY cl ON pca.province=cl.itemno WHERE codeno='AreaCode' AND "+boKey+"='"+boValue+"'");
|
||||
otherProperty.clear();
|
||||
otherProperty.put("customerid",customerId);
|
||||
otherProperty.put("flowunid",flowunid);
|
||||
otherProperty.put("addtype","0060");
|
||||
otherProperty.put("isadd","yes");
|
||||
otherProperty.put("isnew","yes");
|
||||
otherProperty.put("country","CHN");
|
||||
otherProperty.put("FULLADDRESS",itemname+dressdetail);
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_ADDRESS.CLASS_NAME,fromCondtion,CUSTOMER_ADDRESS_TEMP.CLASS_NAME,null,otherProperty,Sqlca);
|
||||
}
|
||||
|
||||
/**客户信息拷表*/
|
||||
otherProperty.clear();
|
||||
otherProperty.put("flowunid",flowunid);
|
||||
otherProperty.put("customerid",customerId);
|
||||
otherProperty.put("CERTTYPE",this.getAttribute("certtype").toString());
|
||||
otherProperty.put("CERTID",this.getAttribute("certid").toString());
|
||||
otherProperty.put("INPUTUSERID",asUser.getUserID());
|
||||
otherProperty.put("INPUTORGID",asUser.getOrgID());
|
||||
otherProperty.put("inputtime",StringFunction.getTodayNow());
|
||||
/**判断法人客户还是自然人客户*/
|
||||
if("03".equals(customerType)){
|
||||
otherProperty.put("FULLNAME",this.getAttribute("custname").toString());
|
||||
otherProperty.put("BALANCESHEET","申请人");
|
||||
Sqlca.executeSQL(new SqlObject("delete from CUSTOMER_PERSON_TEMP where flowunid='"+flowunid+"'"));
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_PERSON.CLASS_NAME,fromCondtion,CUSTOMER_PERSON_TEMP.CLASS_NAME,null,otherProperty,Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_ADDRESS.CLASS_NAME,fromCondtion,CUSTOMER_ADDRESS_TEMP.CLASS_NAME,toCondtion,otherProperty,Sqlca);
|
||||
}else{
|
||||
Sqlca.executeSQL(new SqlObject("delete from CUSTOMER_COMPANY_TEMP where flowunid='"+flowunid+"'"));
|
||||
/**法人客户基本信息拷表*/
|
||||
otherProperty.put("customerid",customerId);
|
||||
otherProperty.put("flowunid",flowunid);
|
||||
otherProperty.put("CERTTYPE",this.getAttribute("certtype").toString());
|
||||
otherProperty.put("CERTID",this.getAttribute("certid").toString());
|
||||
otherProperty.put("INPUTUSERID",asUser.getUserID());
|
||||
otherProperty.put("INPUTORGID",asUser.getOrgID());
|
||||
otherProperty.put("inputtime",StringFunction.getTodayNow());
|
||||
otherProperty.put("company_name",this.getAttribute("custname").toString());
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_COMPANY.CLASS_NAME,fromCondtion,CUSTOMER_COMPANY_TEMP.CLASS_NAME,null,otherProperty,Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(PF_CUSTOMER_ADDRESS.CLASS_NAME,fromCondtion,CUSTOMER_ADDRESS_TEMP.CLASS_NAME,toCondtion,otherProperty,Sqlca);
|
||||
}
|
||||
|
||||
/**项目基本信息拷表*/
|
||||
BizObjectManager lpitBm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
BizObject lpitBo = lpitBm.createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(true);
|
||||
BizObject ppiBo = JBOFactory.createBizObjectQuery(PF_PROJECT_INFO.CLASS_NAME,bowhere).setParameter(boKey,boValue).getSingleResult(false);
|
||||
|
||||
lpitBo.setAttributeValue("inputName",ppiBo.getAttribute("inputName").toString());
|
||||
lpitBo.setAttributeValue("inputTel",ppiBo.getAttribute("inputTel").toString());
|
||||
lpitBo.setAttributeValue("IS_NETCAR",ppiBo.getAttribute("IS_NETCAR").toString());
|
||||
if(!"0".equals(ppiBo.getAttribute("IS_NETCAR").toString())){
|
||||
lpitBo.setAttributeValue("IS_OPERATION",ppiBo.getAttribute("IS_OPERATION").toString());
|
||||
lpitBo.setAttributeValue("IS_AFFILIATED",ppiBo.getAttribute("IS_AFFILIATED").toString());
|
||||
lpitBo.setAttributeValue("IS_OPERATION_QUALIFICATION",ppiBo.getAttribute("IS_OPERATION_QUALIFICATION").toString());
|
||||
lpitBo.setAttributeValue("AFFILIATEDNAME",ppiBo.getAttribute("AFFILIATEDNAME").toString());
|
||||
lpitBo.setAttributeValue("TRANSPORTCERTID",ppiBo.getAttribute("TRANSPORTCERTID").toString());
|
||||
lpitBo.setAttributeValue("TRANSPORTDATE",ppiBo.getAttribute("TRANSPORTDATE").toString());
|
||||
lpitBo.setAttributeValue("NETCERTID",ppiBo.getAttribute("NETCERTID").toString());
|
||||
lpitBo.setAttributeValue("LEGALPERSONNAME",ppiBo.getAttribute("LEGALPERSONNAME").toString());
|
||||
lpitBo.setAttributeValue("LEGALPERSONID",ppiBo.getAttribute("LEGALPERSONID").toString());
|
||||
lpitBo.setAttributeValue("AFFILIATEDDATE",ppiBo.getAttribute("AFFILIATEDDATE").toString());
|
||||
lpitBo.setAttributeValue("AFFILIATEDENDDATE",ppiBo.getAttribute("AFFILIATEDENDDATE").toString());
|
||||
lpitBo.setAttributeValue("REGISTEREDMONEY",ppiBo.getAttribute("REGISTEREDMONEY").toString());
|
||||
lpitBo.setAttributeValue("AFFILIATEDACTUALADDRESS",ppiBo.getAttribute("AFFILIATEDACTUALADDRESS").toString());
|
||||
lpitBo.setAttributeValue("AFFILIATEDADDRESS",ppiBo.getAttribute("AFFILIATEDADDRESS").toString());
|
||||
}
|
||||
lpitBm.saveObject(lpitBo);
|
||||
|
||||
/**担保人拷表*/
|
||||
Sqlca.executeSQL(new SqlObject("delete from LB_GUARANTEE_UNIT_TEMP where flowunid='"+flowunid+"'"));
|
||||
/**担保人信息拷表*/
|
||||
Sqlca.executeSQL(new SqlObject("delete from PF_GUARANTEE_UNIT where flowunid='"+flowunid+"'"));
|
||||
otherProperty.clear();
|
||||
otherProperty.put("FLOWUNID",this.getAttribute("FlowUnid").toString());
|
||||
otherProperty.put("PROJECT_ID",this.getAttribute("ProjectId").toString());
|
||||
sql = "select id from PF_GUARANTEE_UNIT where "+sqlWhere;
|
||||
res = Sqlca.getASResultSet(new SqlObject(sql));
|
||||
otherProperty.put("FLOWUNID",flowunid);
|
||||
otherProperty.put("PROJECT_ID",projectId);
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject("select id from PF_GUARANTEE_UNIT where "+boKey+"='"+boValue+"'"));
|
||||
while(res.next()){
|
||||
fromCondtion.put("id",res.getString("id"));
|
||||
DataOperatorUtil.copyJBOSet(PF_GUARANTEE_UNIT.CLASS_NAME,fromCondtion,LB_GUARANTEE_UNIT_TEMP.CLASS_NAME,null,otherProperty,null,Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(PF_GUARANTEE_UNIT.CLASS_NAME,fromCondtion,LB_GUARANTEE_UNIT_TEMP.CLASS_NAME,null,otherProperty,Sqlca);
|
||||
}
|
||||
res.close();
|
||||
fromCondtion.remove("id");
|
||||
|
||||
/**扣款卡信息*/
|
||||
Sqlca.executeSQL(new SqlObject("delete from CUSTOMER_ACCOUNT_TEMP where flowunid='"+flowunid+"'"));
|
||||
otherProperty.clear();
|
||||
otherProperty.put("flowunid",flowunid);
|
||||
otherProperty.put("customerid",customerId);
|
||||
otherProperty.put("acc_info","Debit");
|
||||
otherProperty.put("acc_type","Debit");
|
||||
otherProperty.put("CUSTTYPE","lessee");
|
||||
DataOperatorUtil.copyJBOSet(PF_CUSTOMER_ACCOUNT.CLASS_NAME,fromCondtion,CUSTOMER_ACCOUNT_TEMP.CLASS_NAME,null,otherProperty,null,Sqlca);
|
||||
BizObjectManager catBm = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME,Sqlca);
|
||||
BizObject catBo = catBm.createQuery("flowunid=:flowunid and customerid=:customerid").setParameter("flowunid",flowunid).setParameter("customerid",customerId).getSingleResult(true);
|
||||
BizObject pcaBo = JBOFactory.createBizObjectQuery(PF_CUSTOMER_ACCOUNT.CLASS_NAME,bowhere).setParameter(boKey,boValue).getSingleResult(false);
|
||||
if(catBo==null){
|
||||
catBo = catBm.newObject();
|
||||
catBo.setAttributeValue("flowunid",flowunid);
|
||||
catBo.setAttributeValue("customerid",customerId);
|
||||
catBo.setAttributeValue("acc_info","Debit");
|
||||
catBo.setAttributeValue("acc_type","Debit");
|
||||
catBo.setAttributeValue("CUSTTYPE","lessee");
|
||||
}
|
||||
catBo.setAttributeValue("acc_number",pcaBo.getAttribute("acc_number"));
|
||||
catBo.setAttributeValue("bank_name",pcaBo.getAttribute("bank_name"));
|
||||
catBo.setAttributeValue("account",pcaBo.getAttribute("account"));
|
||||
catBo.setAttributeValue("MOBILE",pcaBo.getAttribute("MOBILE"));
|
||||
catBm.saveObject(catBo);
|
||||
|
||||
/**商务条件*/
|
||||
Sqlca.executeSQL(new SqlObject("delete from LC_CALC_CONDITION_TEMP where flowunid='"+flowunid+"'"));
|
||||
String calType = "proj_process";
|
||||
otherProperty.clear();
|
||||
otherProperty.put("FLOWUNID",this.getAttribute("FlowUnid").toString());
|
||||
String planNumber = SerialNumberUtil.getPlannumber(this.getAttribute("ProjectNo").toString(),calType,Sqlca);
|
||||
otherProperty.put("PROJECT_PLAN_NUMBER", planNumber);
|
||||
BizObject fcc = DataOperatorUtil.getSingleJBO(PF_CALC_CONDITION.CLASS_NAME,fromCondtion,Sqlca);
|
||||
|
||||
/**项目基本信息拷表*/
|
||||
BizObjectManager lpitBm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
BizObject lpitBo = lpitBm.createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(true);
|
||||
BizObject ppiBo = JBOFactory.createBizObjectQuery(PF_PROJECT_INFO.CLASS_NAME,bowhere).setParameter(boKey,boValue).getSingleResult(false);
|
||||
lpitBo.setAttributeValue("inputName",ppiBo.getAttribute("inputName"));
|
||||
lpitBo.setAttributeValue("inputTel",ppiBo.getAttribute("inputTel"));
|
||||
lpitBo.setAttributeValue("IS_NETCAR",ppiBo.getAttribute("IS_NETCAR"));
|
||||
lpitBo.setAttributeValue("APPLICATION_NO",ppiBo.getAttribute("APPLICATION_NO"));
|
||||
if(!"0".equals(ppiBo.getAttribute("IS_NETCAR").toString())){
|
||||
lpitBo.setAttributeValue("IS_OPERATION",ppiBo.getAttribute("IS_OPERATION"));
|
||||
lpitBo.setAttributeValue("IS_AFFILIATED",ppiBo.getAttribute("IS_AFFILIATED"));
|
||||
lpitBo.setAttributeValue("IS_OPERATION_QUALIFICATION",ppiBo.getAttribute("IS_OPERATION_QUALIFICATION").toString());
|
||||
lpitBo.setAttributeValue("AFFILIATEDNAME",ppiBo.getAttribute("AFFILIATEDNAME"));
|
||||
lpitBo.setAttributeValue("TRANSPORTCERTID",ppiBo.getAttribute("TRANSPORTCERTID"));
|
||||
lpitBo.setAttributeValue("TRANSPORTDATE",ppiBo.getAttribute("TRANSPORTDATE"));
|
||||
lpitBo.setAttributeValue("NETCERTID",ppiBo.getAttribute("NETCERTID"));
|
||||
lpitBo.setAttributeValue("LEGALPERSONNAME",ppiBo.getAttribute("LEGALPERSONNAME"));
|
||||
lpitBo.setAttributeValue("LEGALPERSONID",ppiBo.getAttribute("LEGALPERSONID"));
|
||||
lpitBo.setAttributeValue("AFFILIATEDDATE",ppiBo.getAttribute("AFFILIATEDDATE"));
|
||||
lpitBo.setAttributeValue("AFFILIATEDENDDATE",ppiBo.getAttribute("AFFILIATEDENDDATE"));
|
||||
lpitBo.setAttributeValue("REGISTEREDMONEY",ppiBo.getAttribute("REGISTEREDMONEY"));
|
||||
lpitBo.setAttributeValue("AFFILIATEDACTUALADDRESS",ppiBo.getAttribute("AFFILIATEDACTUALADDRESS"));
|
||||
lpitBo.setAttributeValue("AFFILIATEDADDRESS",ppiBo.getAttribute("AFFILIATEDADDRESS"));
|
||||
}
|
||||
lpitBm.saveObject(lpitBo);
|
||||
|
||||
/**商务条件*/
|
||||
BizObjectManager lcctBm = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_TEMP.CLASS_NAME,Sqlca);
|
||||
BizObject lcctBo = lcctBm.createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(true);
|
||||
BizObject pccBo = JBOFactory.createBizObjectQuery(PF_CALC_CONDITION.CLASS_NAME,bowhere).setParameter(boKey,boValue).getSingleResult(false);
|
||||
|
||||
String productId = this.getAttribute( "ProductId" ).toString();
|
||||
// 净融资额
|
||||
setCleanLeaseMoney( otherProperty, productId, fcc );
|
||||
if(lcctBo==null){
|
||||
lcctBo = lcctBm.newObject();
|
||||
}
|
||||
|
||||
lcctBo.setAttributeValue("FLOWUNID",flowunid);
|
||||
lcctBo.setAttributeValue("PROJECT_ID",projectId);
|
||||
planNumber = SerialNumberUtil.getPlannumber(this.getAttribute("ProjectNo").toString(),calType,Sqlca);
|
||||
lcctBo.setAttributeValue("PROJECT_PLAN_NUMBER",planNumber);
|
||||
// 调息方式
|
||||
setProductAdjustRules( otherProperty, productId );
|
||||
setProductAdjustRules(otherProperty,productId);
|
||||
lcctBo.setAttributeValue("ADJUST_TYPE",otherProperty.get("ADJUST_TYPE"));
|
||||
lcctBo.setAttributeValue("ADJUST_STYLE",otherProperty.get("ADJUST_STYLE"));
|
||||
// 投放日
|
||||
String today = DateUtil.getToday();
|
||||
otherProperty.put( "LEASE_AMT_DATE", today );
|
||||
otherProperty.put( "START_DATE", today );
|
||||
lcctBo.setAttributeValue("LEASE_AMT_DATE",DateUtil.getToday());
|
||||
lcctBo.setAttributeValue("START_DATE",DateUtil.getToday());
|
||||
// 租金推算方式
|
||||
otherProperty.put( "RENT_OR_RATE", "rate" );
|
||||
lcctBo.setAttributeValue("RENT_OR_RATE","rate");
|
||||
// 设置年利率
|
||||
setYearRate( otherProperty, productId );
|
||||
setYearRate(otherProperty,productId);
|
||||
lcctBo.setAttributeValue("PERIOD_TYPE",otherProperty.get("PERIOD_TYPE"));
|
||||
lcctBo.setAttributeValue("YEAR_RATE",otherProperty.get("YEAR_RATE"));
|
||||
// 设置还款间隔
|
||||
setIncomeNubmer( otherProperty, productId, fcc );
|
||||
lcctBo.setAttributeValue("INCOME_NUMBER_YEAR","income_12");
|
||||
lcctBo.setAttributeValue("INCOME_INTERVAL_MONTH","1");
|
||||
lcctBo.setAttributeValue("GPS_FEE",ProductParamUtil.getProductParameterValue(productId,"GPS_FEE","CostType08"));
|
||||
//净融资额
|
||||
lcctBo.setAttributeValue("CLEAN_LEASE_MONEY",setCleanLeaseMoney(pccBo,productId));
|
||||
lcctBo.setAttributeValue("LEASE_TERM",pccBo.getAttribute( "INCOME_NUMBER" ));
|
||||
// 计算第一,第二期租金支付日
|
||||
setFirstSecondPlan( otherProperty, productId, fcc );
|
||||
|
||||
DataOperatorUtil.copyJBOSet(PF_CALC_CONDITION.CLASS_NAME,fromCondtion,LC_CALC_CONDITION_TEMP.CLASS_NAME,null,otherProperty,null,Sqlca);
|
||||
System.out.println( "=====================" + flowunid + "====================" );
|
||||
// 自动测算
|
||||
autoCalc(flowunid,calType,planNumber,productId,Sqlca);
|
||||
setFirstSecondPlan(otherProperty,productId,pccBo);
|
||||
lcctBo.setAttributeValue("FIRST_PLAN_DATE",otherProperty.get("FIRST_PLAN_DATE"));
|
||||
lcctBo.setAttributeValue("SECOND_PLAN_DATE",otherProperty.get("SECOND_PLAN_DATE"));
|
||||
lcctBo.setAttributeValue("EQUIP_AMT",pccBo.getAttribute("EQUIP_AMT"));
|
||||
lcctBo.setAttributeValue("FIRST_PAYMENT",pccBo.getAttribute("FIRST_PAYMENT"));
|
||||
lcctBo.setAttributeValue("FINAL_PAYMENT",pccBo.getAttribute("FINAL_PAYMENT"));
|
||||
lcctBo.setAttributeValue("NOMINAL_PRICE",pccBo.getAttribute("NOMINAL_PRICE"));
|
||||
lcctBo.setAttributeValue("HANDLING_CHARGE_MONEY",pccBo.getAttribute("HANDLING_CHARGE_MONEY"));
|
||||
lcctBo.setAttributeValue("CAUTION_MONEY",pccBo.getAttribute("CAUTION_MONEY"));
|
||||
lcctBo.setAttributeValue("GPS_FEE_FINA",pccBo.getAttribute("GPS_FEE_FINA"));
|
||||
lcctBo.setAttributeValue("PURCHASE_TAX",pccBo.getAttribute("PURCHASE_TAX"));
|
||||
lcctBo.setAttributeValue("INSURANCE_PREMIUM",pccBo.getAttribute("INSURANCE_PREMIUM"));
|
||||
lcctBo.setAttributeValue("SETTLE_METHOD",pccBo.getAttribute("SETTLE_METHOD"));
|
||||
lcctBo.setAttributeValue("INCOME_NUMBER",pccBo.getAttribute("INCOME_NUMBER"));
|
||||
lcctBo.setAttributeValue("DefaultDueDay",pccBo.getAttribute("DefaultDueDay"));
|
||||
lcctBm.saveObject(lcctBo);
|
||||
|
||||
// 自动测算
|
||||
autoCalc(flowunid,calType,planNumber,productId,Sqlca);
|
||||
|
||||
return "true";
|
||||
}
|
||||
|
||||
public void setCleanLeaseMoney( Map<String, String> otherProperty, String productId, BizObject fcc ) throws Exception {
|
||||
public String setCleanLeaseMoney(BizObject fcc,String productId) throws Exception {
|
||||
String equipAmt = fcc.getAttribute( "EQUIP_AMT" ).toString();
|
||||
String firstPayment = fcc.getAttribute( "FIRST_PAYMENT" ).toString();
|
||||
String gpsFee = fcc.getAttribute( "GPS_FEE" ).toString();
|
||||
String gpsFee = ProductParamUtil.getProductParameterValue(productId,"GPS_FEE","CostType08");
|
||||
|
||||
BigDecimal financingMoney = BigDecimal.ZERO;
|
||||
financingMoney = financingMoney.add( new BigDecimal( "".equals( gpsFee ) ? "0" : gpsFee ) );
|
||||
// TODO 补充其他融资项
|
||||
|
||||
otherProperty.put( "CLEAN_LEASE_MONEY",
|
||||
new BigDecimal( "".equals( equipAmt ) ? "0" : equipAmt ).subtract(
|
||||
new BigDecimal( "".equals( firstPayment ) ? "0" : firstPayment ) ).add( financingMoney ).toString() );
|
||||
return new BigDecimal("".equals( equipAmt ) ? "0" : equipAmt ).subtract(new BigDecimal( "".equals( firstPayment ) ? "0" : firstPayment ) ).add( financingMoney ).toString();
|
||||
}
|
||||
|
||||
public void setProductAdjustRules( Map<String, String> otherProperty, String productId ) throws Exception {
|
||||
Map<String,Map<String,String>> map = ProductParamUtil.getProductComponentType( productId, "PRD0320" );
|
||||
Map<String,Map<String,String>> map = ProductParamUtil.getProductComponentType(productId,"PRD0320");
|
||||
if ( map.containsKey( "ADJUST_INTEREST" ) ){
|
||||
Map<String,String> rule=map.get( "ADJUST_INTEREST" );
|
||||
if ( null != rule.get( "rate_float_type" ) && null != rule.get( "adjust_style" ) ) {
|
||||
@ -250,18 +290,10 @@ public class PlatformDataToTemp extends BaseBussiness {
|
||||
}
|
||||
}
|
||||
|
||||
public void setIncomeNubmer( Map<String, String> otherProperty, String productId, BizObject fcc ) throws Exception {
|
||||
otherProperty.put( "INCOME_NUMBER_YEAR", "income_12" );
|
||||
String incomeIntervalMonth = "1";
|
||||
otherProperty.put( "INCOME_INTERVAL_MONTH", incomeIntervalMonth );
|
||||
String incomeNumber = fcc.getAttribute( "INCOME_NUMBER" ).toString();
|
||||
otherProperty.put( "LEASE_TERM", Integer.parseInt( incomeNumber ) * Integer.parseInt( incomeIntervalMonth ) + "" );
|
||||
}
|
||||
|
||||
public void setFirstSecondPlan( Map<String, String> otherProperty, String productId, BizObject fcc ) throws Exception {
|
||||
String periodType = otherProperty.get( "PERIOD_TYPE" );
|
||||
String leaseAmtDate = otherProperty.get( "LEASE_AMT_DATE" );
|
||||
String incomeIntervalMonth = otherProperty.get( "INCOME_INTERVAL_MONTH" );
|
||||
String leaseAmtDate = DateUtil.getToday();
|
||||
String incomeIntervalMonth = "1";
|
||||
String defaultDueDay = fcc.getAttribute( "DefaultDueDay" ).toString();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat( "yyyy/MM/dd" );
|
||||
Date lad = sdf.parse( leaseAmtDate );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user