业务发起 变更

This commit is contained in:
liujiaji 2018-06-21 13:47:23 +08:00
parent 74a142d630
commit 1cb428ce50
4 changed files with 119 additions and 54 deletions

View File

@ -1,8 +1,16 @@
package apx.com.amarsoft.als.apzl.apply.business.start.bo;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class BusinessBO {
import net.sf.json.JSONObject;
public class BusinessBO implements Serializable {
private static final long serialVersionUID = -25060991874562555L;
private String carAttributes; // 车辆属性
private String leasehold; // 租赁方式
private String productModel; // 品牌选择
@ -15,6 +23,10 @@ public class BusinessBO {
private String customerType; // 客户类别
private String certtype; // 证件类型
private String certid; // 证件号码
private String curUserId;
private String fixedFlowParam;
public void setParam(Map<String, Object> fieldMap, String param, Object obj) {
obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get(
@ -22,43 +34,54 @@ public class BusinessBO {
}
public BusinessBO(Map<String, Object> fieldMap) {
// setParam(fieldMap, "carAttributes", this.carAttributes);
// setParam(fieldMap, "leasehold", this.leasehold);
// setParam(fieldMap, "productModel", this.productModel);
// setParam(fieldMap, "carSeries", this.carSeries);
// setParam(fieldMap, "carSystem", this.carSystem);
// setParam(fieldMap, "productId", this.productId);
// setParam(fieldMap, "productName", this.productName);
// setParam(fieldMap, "CUSTOMERID", this.CUSTOMERID);
// setParam(fieldMap, "CUSTOMERNAME", this.CUSTOMERNAME);
// setParam(fieldMap, "customerType", this.customerType);
// setParam(fieldMap, "certtype", this.certtype);
// setParam(fieldMap, "certid", this.certid);
this.carAttributes = fieldMap.get("carAttributes".toLowerCase()) == null ? null
: fieldMap.get("carAttributes".toLowerCase()).toString();
this.leasehold = fieldMap.get("leasehold".toLowerCase()) == null ? null
: fieldMap.get("leasehold".toLowerCase()).toString();
this.productModel = fieldMap.get("productModel".toLowerCase()) == null ? null
: fieldMap.get("productModel".toLowerCase()).toString();
this.carSeries = fieldMap.get("carSeries".toLowerCase()) == null ? null
: fieldMap.get("carSeries".toLowerCase()).toString();
this.carSystem = fieldMap.get("carSystem".toLowerCase()) == null ? null
: fieldMap.get("carSystem".toLowerCase()).toString();
this.carAttributes = fieldMap.get("carAttributes".toLowerCase()) == null ? "1"
: fieldMap.get("carAttributes".toLowerCase()).toString(); // 车辆属性 1,新车,2,二手车
this.leasehold = fieldMap.get("leasehold".toLowerCase()) == null ? "3"
: fieldMap.get("leasehold".toLowerCase()).toString(); // 租赁方式 3,直租,4,回租
this.productModel = fieldMap.get("productModel".toLowerCase()) == null ? "DefaultCarBrand"
: fieldMap.get("productModel".toLowerCase()).toString(); // 品牌
this.carSeries = fieldMap.get("carSeries".toLowerCase()) == null ? "DefaultCarSeries"
: fieldMap.get("carSeries".toLowerCase()).toString(); // 车系
this.carSystem = fieldMap.get("carSystem".toLowerCase()) == null ? "DefaultCarSystem"
: fieldMap.get("carSystem".toLowerCase()).toString(); // 车型
this.productId = fieldMap.get("productId".toLowerCase()) == null ? null
: fieldMap.get("productId".toLowerCase()).toString();
this.productName = fieldMap.get("productName".toLowerCase()) == null ? null
: fieldMap.get("productName".toLowerCase()).toString();
: fieldMap.get("productId".toLowerCase()).toString(); // 产品类型
this.productName = fieldMap.get("productName".toLowerCase()) == null ? "DefaultProduct"
: fieldMap.get("productName".toLowerCase()).toString(); // 产品名称
this.CUSTOMERID = fieldMap.get("CUSTOMERID".toLowerCase()) == null ? null
: fieldMap.get("CUSTOMERID".toLowerCase()).toString();
this.CUSTOMERNAME = fieldMap.get("CUSTOMERNAME".toLowerCase()) == null ? null
: fieldMap.get("CUSTOMERNAME".toLowerCase()).toString();
this.customerType = fieldMap.get("customerType".toLowerCase()) == null ? null
: fieldMap.get("customerType".toLowerCase()).toString();
this.certtype = fieldMap.get("certtype".toLowerCase()) == null ? null
: fieldMap.get("certtype".toLowerCase()).toString();
this.certid = fieldMap.get("certid".toLowerCase()) == null ? null
: fieldMap.get("certid".toLowerCase()).toString();
: fieldMap.get("CUSTOMERID".toLowerCase()).toString(); // 客户编号
this.CUSTOMERNAME = fieldMap.get("CUSTOMERNAME".toLowerCase()) == null ? "DefaultUser"
: fieldMap.get("CUSTOMERNAME".toLowerCase()).toString(); // 客户名称
this.customerType = fieldMap.get("customerType".toLowerCase()) == null ? "03"
: fieldMap.get("customerType".toLowerCase()).toString(); // 客户类型 01,法人,03,个人
this.certtype = "01".equals(this.customerType) ? "Ent02" : "Ind01"; // 证件类型 Ent02,组织机构号,Ind01,身份证
this.certid = fieldMap.get("certid".toLowerCase()) == null ? ""
: fieldMap.get("certid".toLowerCase()).toString(); // 证件号
this.curUserId = fieldMap.get("userid".toLowerCase()) == null ? ""
: fieldMap.get("userid".toLowerCase()).toString(); // 证件号
Map<String, Object> map = new HashMap<String, Object>();
map.put("ProductId", productId);
map.put("ProductName", productName);
map.put("ApplyType", "BusinessApplyApply");
map.put("CurUserID", curUserId);
map.put("leasehold", leasehold);
map.put("productModel", productModel);
map.put("carSeries", carSeries);
map.put("carAttributes", carAttributes);
map.put("carSystem", carSystem);
map.put("CustomerType", customerType);
map.put("certid", certid);
map.put("certtype", certtype);
map.put("custname", CUSTOMERNAME);
JSONObject jsonObject = JSONObject.fromObject(map);
this.fixedFlowParam = jsonObject.toString();
}
public String getCarAttributes() {
@ -156,4 +179,20 @@ public class BusinessBO {
public void setCertid(String certid) {
this.certid = certid;
}
public String getFixedFlowParam() {
return fixedFlowParam;
}
public void setFixedFlowParam(String fixedFlowParam) {
this.fixedFlowParam = fixedFlowParam;
}
public String getCurUserId() {
return curUserId;
}
public void setCurUserId(String curUserId) {
this.curUserId = curUserId;
}
}

View File

@ -6,17 +6,16 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO;
import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.Transaction;
import com.base.constant.RestfullConstant;
import com.base.util.MultipartDataUtil;
import com.base.util.ReturnMapUtil;
import com.tenwa.flow.action.comm.CommonAction;
import com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction;
import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO;
import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService;
public class BusinessApplyStartServiceImpl implements BusinessApplyStartService {
private Map<String, Object> fieldMap;
@ -34,26 +33,26 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
String uid = fieldMap.get("userid") == null ? "" : fieldMap.get(
"userid").toString();
BusinessApprovalStartAction BusinessApprovalStartAction = new BusinessApprovalStartAction();
BusinessApprovalStartAction.setApplyType(applyType);
BusinessApprovalStartAction.setCurUserID(uid);
// FixedFlowParam:{'ApplyType':'BusinessApplyApply'@'CurUserID':'administrator'@'ProductId':'004'@'ProductName':'融资租赁产品(汽车业务)'@'CustomerType':'03'@'carAttributes':'1'@'leasehold':'1'@'carSystem':'2016款 华凯皮卡 2.8T豪华型短轴JE493ZQ8'}
// ProductId:004
String param = "{'ApplyType':'"+applyType+"'@'CurUserID':'"
+ uid + "'" + "@'ProductId':'" + bo.getProductId() + "'"
+ "@'ProductName':'" + bo.getProductName() + "'"
+ "@'CustomerType':'" + bo.getCustomerType() + "'"
+ "@'carAttributes':'" + bo.getCarAttributes() + "'"
+ "@'leasehold':'" + bo.getLeasehold() + "'@'carSystem':'"
+ bo.getCarSystem() + "'}";
BusinessApprovalStartAction.setFixedFlowParam(bo.getFixedFlowParam());
// 产品租赁信息
BusinessApprovalStartAction.setProductID(bo.getProductId());
BusinessApprovalStartAction.setCarAttributes(bo.getCarAttributes());
BusinessApprovalStartAction.setProductId(bo.getProductId());
BusinessApprovalStartAction.setLeasehold(bo.getLeasehold());
// 车辆信息
BusinessApprovalStartAction.setCarAttributes(bo.getCarAttributes());
BusinessApprovalStartAction.setProductModel(bo.getProductModel());
BusinessApprovalStartAction.setCarSystem(bo.getCarSystem());
BusinessApprovalStartAction.setCarSeries(bo.getCarSeries());
BusinessApprovalStartAction.setFixedFlowParam(param);
BusinessApprovalStartAction.setProductId(bo.getProductId());
//用户信息
// 用户信息
BusinessApprovalStartAction.setCertid(bo.getCertid());
BusinessApprovalStartAction.setCerttype(bo.getCerttype());
BusinessApprovalStartAction.setCustname(bo.getCUSTOMERNAME());
BusinessApprovalStartAction.setCustomerType(bo.getCustomerType());

View File

@ -0,0 +1,22 @@
package apx.com.amarsoft.als.base.awe.execute.method;
import jbo.app.tenwa.customer.CUSTOMER_CERT;
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;
public class BusinessCustomerMethod {
public String getCustomerIdByCertId(String certId) throws JBOException {
BizObjectManager bom = JBOFactory
.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
BizObject bo = bom.createQuery("certid=:certid and certtype='Ind01'")
.setParameter("certid", certId).getSingleResult(false);
if (null == bo)
return "";
return bo.getAttribute("customerid").toString();
}
}

View File

@ -290,7 +290,12 @@ public class SelectCatalogWin {
}
}
// ÏÔʾÃû ,
col.put("display", aSelFieldName[i-1]);
try {
col.put("display", aSelFieldName[i-1]);
} catch (Exception e) {
ARE.getLog().error(e);
col.put("display", "");
}
colList.add(col);
}
row.put("row", colList);