存量客户更新网约车信息
This commit is contained in:
parent
69c1e31b16
commit
ad71fedadb
@ -19,7 +19,9 @@ import jbo.app.tenwa.customer.CUSTOMER_TYPE_TEMP;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
|
||||
import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS;
|
||||
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
|
||||
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE;
|
||||
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
|
||||
import jbo.prd.PRD_SPECIFIC_LIBRARY;
|
||||
|
||||
@ -132,8 +134,12 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
|
||||
|
||||
}
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_TYPE.CLASS_NAME, fromCondtion, CUSTOMER_TYPE_TEMP.CLASS_NAME, null, otherProperty, tx);
|
||||
BizObject lul = JBOFactory.getBizObjectManager(LB_UNION_LESSEE.CLASS_NAME,tx).createQuery(" customer_id=:customer_id ").setParameter("customer_id", customerId).getSingleResult(false);
|
||||
|
||||
BizObject lpi = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME,tx).createQuery(" id=:project_id ").setParameter("project_id", lul == null ?"":lul.getAttribute("project_id").toString()).getSingleResult(false);
|
||||
|
||||
//无论是不是存量客户都在 项目表 和 客户和项目关联表 中都新增一条数据,客户和项目是一对多的
|
||||
this.saveProjInfo(bm, tx, asUser,distributoIid);
|
||||
this.saveProjInfo(bm, tx, asUser,distributoIid,lpi == null ? null : lpi.getAttribute("is_netcar").toString());
|
||||
this.saveEquipmentCar(bmLECT, tx, asUser,vndrName); //车辆租赁物信息表
|
||||
this.saveUnionLessee(bmLULT,tx,customerId,asUser);
|
||||
this.saveBusinessStatus(bsbom, tx, asUser);//项目进度表
|
||||
@ -156,7 +162,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
|
||||
this.savePersonOrCompany(bomC, tx, colName,customerId,asUser);//自然人||法人
|
||||
this.saveEquipmentCar(bmLECT, tx, asUser,vndrName); //车辆租赁物信息表
|
||||
this.saveUnionLessee(bmLULT, tx, customerId, asUser);//union表
|
||||
this.saveProjInfo(bm, tx, asUser,distributoIid);//保存项目信息表
|
||||
this.saveProjInfo(bm, tx, asUser,distributoIid,null);//±£´æÏîÄ¿ÐÅÏ¢±í
|
||||
this.saveBusinessStatus(bsbom, tx, asUser);//项目进度表
|
||||
}
|
||||
String sMessage="true";
|
||||
@ -271,7 +277,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
private void saveProjInfo(BizObjectManager bomLPI,JBOTransaction tx ,ASUser asUser,String distributoIid) throws Exception{
|
||||
private void saveProjInfo(BizObjectManager bomLPI,JBOTransaction tx ,ASUser asUser,String distributoIid ,String isNetCar) throws Exception{
|
||||
String productId=this.getAttribute("ProductId").toString();
|
||||
BizObject bo1 = JBOFactory.createBizObjectQuery(PRD_SPECIFIC_LIBRARY.CLASS_NAME,"PRODUCTID=:PRODUCTID")
|
||||
.setParameter("PRODUCTID",productId).getSingleResult(false);
|
||||
@ -298,6 +304,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
|
||||
bo.setAttributeValue("PROJECT_DATE",StringFunction.getTodayNow());//项目状态
|
||||
bo.setAttributeValue("source_type",this.getAttribute("sourcetype"));//申请类型
|
||||
bo.setAttributeValue("HaveCommission",haveCommission);
|
||||
bo.setAttributeValue("is_netcar",isNetCar == null ? "" : isNetCar);
|
||||
bomLPI.saveObject(bo);
|
||||
}catch (Exception e){
|
||||
tx.rollback();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user