外部律所流程转外部用户,外部人员生成修改
parent
2cf21242eb
commit
80a25413b6
|
@ -3,6 +3,7 @@ package weaver.aiyh_pcn.workflow_to_customer;
|
||||||
|
|
||||||
import aiyh.utils.zwl.common.ToolUtil;
|
import aiyh.utils.zwl.common.ToolUtil;
|
||||||
import com.engine.crm.util.CrmCommonUtil;
|
import com.engine.crm.util.CrmCommonUtil;
|
||||||
|
import com.engine.crm.util.CrmRemindUtil;
|
||||||
import org.h2.util.StringUtils;
|
import org.h2.util.StringUtils;
|
||||||
import weaver.aiyh_pcn.workflow_to_customer.config.CRM_Config;
|
import weaver.aiyh_pcn.workflow_to_customer.config.CRM_Config;
|
||||||
import weaver.aiyh_pcn.workflow_to_customer.exception.DataExistsException;
|
import weaver.aiyh_pcn.workflow_to_customer.exception.DataExistsException;
|
||||||
|
@ -124,6 +125,13 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户
|
||||||
|
*
|
||||||
|
* @param mainResult
|
||||||
|
* @param configInfoMap
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateCustomerModel(MainResult mainResult, Map<String, List<Map<String, Object>>> configInfoMap, String customerId) {
|
public void updateCustomerModel(MainResult mainResult, Map<String, List<Map<String, Object>>> configInfoMap, String customerId) {
|
||||||
// 1、更新客户基本信息crm_customerinfo
|
// 1、更新客户基本信息crm_customerinfo
|
||||||
if (Utils.conformSql(configInfoMap, "CRM_CustomerInfo")) {
|
if (Utils.conformSql(configInfoMap, "CRM_CustomerInfo")) {
|
||||||
|
@ -172,6 +180,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户基本信息
|
||||||
|
*
|
||||||
|
* @param mapList
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateCustomerInfo(List<Map<String, Object>> mapList, String customerId) {
|
public void updateCustomerInfo(List<Map<String, Object>> mapList, String customerId) {
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
// 查询客户表,是否存在该客户,如果存在则对客户信息进行修改,如果不存在则跳过
|
// 查询客户表,是否存在该客户,如果存在则对客户信息进行修改,如果不存在则跳过
|
||||||
|
@ -183,6 +197,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户基本信息
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateCustomerInfo(Map<String, Object> map, String customerId) {
|
public void updateCustomerInfo(Map<String, Object> map, String customerId) {
|
||||||
map.put("lastupdateddate", Utils.getTime("yyyy-MM-dd"));
|
map.put("lastupdateddate", Utils.getTime("yyyy-MM-dd"));
|
||||||
map.put("lastupdatedtime", Utils.getTime("HH:mm:ss"));
|
map.put("lastupdatedtime", Utils.getTime("HH:mm:ss"));
|
||||||
|
@ -192,6 +212,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
.create());
|
.create());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户联系人
|
||||||
|
*
|
||||||
|
* @param mapList
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateCustomerContacter(List<Map<String, Object>> mapList, String customerId) {
|
public void updateCustomerContacter(List<Map<String, Object>> mapList, String customerId) {
|
||||||
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -218,6 +244,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户联系人
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @param contacter
|
||||||
|
*/
|
||||||
public void updateCustomerContacter(Map<String, Object> map, String contacter) {
|
public void updateCustomerContacter(Map<String, Object> map, String contacter) {
|
||||||
map.put("lastupdateddate", Utils.getTime("yyyy-MM-dd"));
|
map.put("lastupdateddate", Utils.getTime("yyyy-MM-dd"));
|
||||||
map.put("lastupdatedtime", Utils.getTime("HH:mm:ss"));
|
map.put("lastupdatedtime", Utils.getTime("HH:mm:ss"));
|
||||||
|
@ -227,6 +259,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
.create());
|
.create());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户联系地址
|
||||||
|
*
|
||||||
|
* @param mapList
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateCustomerAddress(List<Map<String, Object>> mapList, String customerId) {
|
public void updateCustomerAddress(List<Map<String, Object>> mapList, String customerId) {
|
||||||
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -245,6 +283,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户商机
|
||||||
|
*
|
||||||
|
* @param mapList
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateCustomerSellChance(List<Map<String, Object>> mapList, String customerId) {
|
public void updateCustomerSellChance(List<Map<String, Object>> mapList, String customerId) {
|
||||||
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -263,6 +307,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人员虚拟分部信息
|
||||||
|
*
|
||||||
|
* @param mapList
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateHrmsubcompanyvirtual(List<Map<String, Object>> mapList, String customerId) {
|
public void updateHrmsubcompanyvirtual(List<Map<String, Object>> mapList, String customerId) {
|
||||||
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -284,6 +334,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人员虚拟部门信息
|
||||||
|
*
|
||||||
|
* @param mapList
|
||||||
|
* @param customerId
|
||||||
|
*/
|
||||||
public void updateHrmdepartmentvirtual(List<Map<String, Object>> mapList, String customerId) {
|
public void updateHrmdepartmentvirtual(List<Map<String, Object>> mapList, String customerId) {
|
||||||
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
// 存在BUG,如果批量修改则会出现所有联系人都会被修改为同一个
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -338,7 +394,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
// TODO 将客户联系信息插入到客户联系表中
|
// TODO 将客户联系信息插入到客户联系表中
|
||||||
this.insertCustomerSellChance(configInfoMap.get("CRM_SellChance"), customer);
|
this.insertCustomerSellChance(configInfoMap.get("CRM_SellChance"), customer);
|
||||||
}
|
}
|
||||||
// 5、判断插入虚拟分部信息hrmsubcompanyvirtual
|
/*// 5、判断插入虚拟分部信息hrmsubcompanyvirtual
|
||||||
|
|
||||||
if (Utils.conformSql(configInfoMap, "hrmsubcompanyvirtual") || this.mainResult.getIsOutUser() == 0) {
|
if (Utils.conformSql(configInfoMap, "hrmsubcompanyvirtual") || this.mainResult.getIsOutUser() == 0) {
|
||||||
// TODO 将客户信息插入到虚拟分部信息表中
|
// TODO 将客户信息插入到虚拟分部信息表中
|
||||||
|
@ -353,7 +409,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
this.deprtId = this.insertHrmdepartmentvirtual(configInfoMap.get("hrmdepartmentvirtual"), customer, subId);
|
this.deprtId = this.insertHrmdepartmentvirtual(configInfoMap.get("hrmdepartmentvirtual"), customer, subId);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
// 7、判断插入外部人员信息hrmresource
|
// 7、判断插入外部人员信息hrmresource
|
||||||
if (Utils.conformSql(configInfoMap, "hrmResource") || this.mainResult.getIsOutUser() == 0) {
|
if (Utils.conformSql(configInfoMap, "hrmResource") || this.mainResult.getIsOutUser() == 0) {
|
||||||
// TODO 将客户插入到外部人员信息表中
|
// TODO 将客户插入到外部人员信息表中
|
||||||
|
@ -370,7 +426,6 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
int finalHrmvId = hrmvId;
|
int finalHrmvId = hrmvId;
|
||||||
int finalHrmvId1 = hrmvId;
|
int finalHrmvId1 = hrmvId;
|
||||||
CustomerInfoComInfo comInfo = new CustomerInfoComInfo();
|
|
||||||
String queryCompanyId = "select id from HrmCompanyVirtual where companyname like '%客户维度%'";
|
String queryCompanyId = "select id from HrmCompanyVirtual where companyname like '%客户维度%'";
|
||||||
rs.executeQuery(queryCompanyId);
|
rs.executeQuery(queryCompanyId);
|
||||||
rs.next();
|
rs.next();
|
||||||
|
@ -405,12 +460,12 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
String hrmid;
|
String hrmid;
|
||||||
// 获取人员id
|
// 获取人员id
|
||||||
rs.executeProc("HrmResourceMaxId_Get", "");
|
// rs.executeProc("HrmResourceMaxId_Get", "");
|
||||||
rs.next();
|
// rs.next();
|
||||||
hrmid = rs.getString(1);
|
// hrmid = rs.getString(1);
|
||||||
// 整理数据
|
// 整理数据
|
||||||
item.put("createdate", Utils.getTime("yyyy-MM-dd"));
|
item.put("createdate", Utils.getTime("yyyy-MM-dd"));
|
||||||
item.put("id", hrmid);
|
// item.put("id", hrmid);
|
||||||
item.put("createrid", this.request.getRequestManager().getCreater());
|
item.put("createrid", this.request.getRequestManager().getCreater());
|
||||||
if (!item.containsKey("lastname")) {
|
if (!item.containsKey("lastname")) {
|
||||||
item.put("lastname", customer.get("name"));
|
item.put("lastname", customer.get("name"));
|
||||||
|
@ -419,10 +474,10 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
item.put("loginid", crmCommonUtil.getPinYin((String) customer.get("name"), 7).get("pinyin"));
|
item.put("loginid", crmCommonUtil.getPinYin((String) customer.get("name"), 7).get("pinyin"));
|
||||||
}
|
}
|
||||||
if (item.containsKey("seclevel") && Integer.parseInt((String) item.get("seclevel")) > 0) {
|
if (item.containsKey("seclevel") && Integer.parseInt((String) item.get("seclevel")) > 0) {
|
||||||
item.put("seclevel", -1);
|
item.put("seclevel", -10);
|
||||||
}
|
}
|
||||||
if (!item.containsKey("seclevel")) {
|
if (!item.containsKey("seclevel")) {
|
||||||
item.put("seclevel", -1);
|
item.put("seclevel", -10);
|
||||||
}
|
}
|
||||||
if (!item.containsKey("password")) {
|
if (!item.containsKey("password")) {
|
||||||
item.put("password", Util.getEncrypt((String) crmCommonUtil.getPinYin((String) customer.get("name"), 7).get("pinyin")));
|
item.put("password", Util.getEncrypt((String) crmCommonUtil.getPinYin((String) customer.get("name"), 7).get("pinyin")));
|
||||||
|
@ -442,11 +497,11 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
if (!item.containsKey("departmentid")) {
|
if (!item.containsKey("departmentid")) {
|
||||||
// customerInfo.getCustomerInfoSubcompanyid(String.valueOf(customer.get("customerId")))
|
// customerInfo.getCustomerInfoSubcompanyid(String.valueOf(customer.get("customerId")))
|
||||||
item.put("departmentid", 0);
|
item.put("departmentid", deprtId);
|
||||||
}
|
}
|
||||||
if (!item.containsKey("subcompanyid1")) {
|
if (!item.containsKey("subcompanyid1")) {
|
||||||
// customerInfo.getCustomerInfoDepartmentid(String.valueOf(customer.get("customerId")))
|
// customerInfo.getCustomerInfoDepartmentid(String.valueOf(customer.get("customerId")))
|
||||||
item.put("subcompanyid1", 0);
|
item.put("subcompanyid1", subId);
|
||||||
}
|
}
|
||||||
if (!item.containsKey("status")) {
|
if (!item.containsKey("status")) {
|
||||||
item.put("status", 1);
|
item.put("status", 1);
|
||||||
|
@ -455,7 +510,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
item.put("accounttype", 0);
|
item.put("accounttype", 0);
|
||||||
}
|
}
|
||||||
if (!item.containsKey("dsporder")) {
|
if (!item.containsKey("dsporder")) {
|
||||||
item.put("dsporder", hrmid);
|
// item.put("dsporder", hrmid);
|
||||||
}
|
}
|
||||||
item.put("ecology_pinyin_search", crmCommonUtil.getPinYin((String) customer.get("name"), 7));
|
item.put("ecology_pinyin_search", crmCommonUtil.getPinYin((String) customer.get("name"), 7));
|
||||||
// 查询loginid是否已经存在
|
// 查询loginid是否已经存在
|
||||||
|
@ -465,10 +520,32 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
// 存在登录名
|
// 存在登录名
|
||||||
throw new LoginIdRepeatException("loginid is repeat,Please re-enter logind!");
|
throw new LoginIdRepeatException("loginid is repeat,Please re-enter logind!");
|
||||||
}
|
}
|
||||||
this.insertHandle("hrmresource", item);
|
HrmOutInterface hrmOutInterface = new HrmOutInterface();
|
||||||
|
Map<String, String> param = new HashMap<>();
|
||||||
|
param.put("crmid", Util.null2String(customer.get("customerId")));
|
||||||
|
param.put("lastname", Util.null2String(item.get("lastname")));
|
||||||
|
param.put("loginid", Util.null2String(item.get("loginid")));
|
||||||
|
param.put("password", Util.null2String(item.get("password")));
|
||||||
|
param.put("seclevel", Util.null2String(item.get("seclevel")));
|
||||||
|
param.put("mobile", Util.null2String(item.get("mobile")));
|
||||||
|
param.put("email", Util.null2String(item.get("email")));
|
||||||
|
param.put("isoutmanager", Util.null2s(Util.null2String(item.get("isoutmanager")),"0"));
|
||||||
|
param.put("wxname", Util.null2String(item.get("wxname")));
|
||||||
|
param.put("wxopenid", Util.null2String(item.get("wxopenid")));
|
||||||
|
param.put("wxuuid", Util.null2String(item.get("wxuuid")));
|
||||||
|
param.put("country", Util.null2String(item.get("country")));
|
||||||
|
param.put("province", Util.null2String(item.get("province")));
|
||||||
|
param.put("city", Util.null2String(item.get("city")));
|
||||||
|
param.put("customfrom", Util.null2String(item.get("customfrom")));
|
||||||
|
Map<String, String> returnObj = hrmOutInterface.createResource4Card(param);
|
||||||
|
String resourceid = returnObj.get("resourceid");
|
||||||
|
String sql = "INSERT INTO CRM_ShareInfo (relateditemid, sharetype, seclevel, sharelevel, crmid, contents, deleted, seclevelMax, jobtitleid, joblevel, scopeid) VALUES (?, '1', '10','1','0',?, '0', '100', ?, '0', ',0,')";
|
||||||
|
rs.executeUpdate(sql, customer.get("customerId"), resourceid, resourceid);
|
||||||
|
|
||||||
|
// this.insertHandle("hrmresource", item);
|
||||||
if (this.mainResult.getManagerType() == 3) {
|
if (this.mainResult.getManagerType() == 3) {
|
||||||
// 将外部客户的客户经理更新为当前插入的外部用户,方便外部用户参与流程审批
|
// 将外部客户的客户经理更新为当前插入的外部用户,方便外部用户参与流程审批
|
||||||
this.updateHandle("CRM_CustomerInfo", Utils.createMap().uPut("manager", hrmid)
|
this.updateHandle("CRM_CustomerInfo", Utils.createMap().uPut("manager", resourceid)
|
||||||
.uPut("lastupdatedtime", Utils.getTime("HH:mm:ss"))
|
.uPut("lastupdatedtime", Utils.getTime("HH:mm:ss"))
|
||||||
.uPut("lastupdatedtime", Utils.getTime("HH:mm:ss")),
|
.uPut("lastupdatedtime", Utils.getTime("HH:mm:ss")),
|
||||||
PrepSQLWhere.creatPrepWhere()
|
PrepSQLWhere.creatPrepWhere()
|
||||||
|
@ -476,7 +553,6 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
.create());
|
.create());
|
||||||
}
|
}
|
||||||
|
|
||||||
HrmOutInterface hrmOutInterface = new HrmOutInterface();
|
|
||||||
CustomerInfoComInfo customerInfo = new CustomerInfoComInfo();
|
CustomerInfoComInfo customerInfo = new CustomerInfoComInfo();
|
||||||
customerInfo.removeCustomerInfoCache();
|
customerInfo.removeCustomerInfoCache();
|
||||||
customerInfo.removeCache();
|
customerInfo.removeCache();
|
||||||
|
@ -485,8 +561,10 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
(new CustomerSizeComInfo()).removeCache();
|
(new CustomerSizeComInfo()).removeCache();
|
||||||
(new CustomerStatusComInfo()).removeCache();
|
(new CustomerStatusComInfo()).removeCache();
|
||||||
customerInfo.addCustomerInfoCache(String.valueOf(customer.get("customerId")));
|
customerInfo.addCustomerInfoCache(String.valueOf(customer.get("customerId")));
|
||||||
|
CrmRemindUtil crmRemindUtil = new CrmRemindUtil(request.getRequestManager().getUser());
|
||||||
|
crmRemindUtil.outResourceAddRemind(Integer.parseInt(resourceid));
|
||||||
// 应该是
|
// 应该是
|
||||||
hrmOutInterface.initMatrixDataOutManager(subId, hrmid);
|
// hrmOutInterface.initMatrixDataOutManager(subId, hrmid);
|
||||||
|
|
||||||
ResourceComInfo resourceComInfo = null;
|
ResourceComInfo resourceComInfo = null;
|
||||||
try {
|
try {
|
||||||
|
@ -498,26 +576,26 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
resourceComInfo.removeResourceCache();
|
resourceComInfo.removeResourceCache();
|
||||||
resourceComInfo.removeCache();
|
resourceComInfo.removeCache();
|
||||||
}
|
}
|
||||||
this.insertHrmresourceVirtual(customer, hrmid, subId, deparId);
|
// this.insertHrmresourceVirtual(customer, hrmid, subId, deparId);
|
||||||
Map<String, Object> map = new HashMap<String, Object>() {{
|
// Map<String, Object> map = new HashMap<String, Object>() {{
|
||||||
put("relateditemid", Util.null2String(customer.get("customerId")));
|
// put("relateditemid", Util.null2String(customer.get("customerId")));
|
||||||
put("sharetype", "1");
|
// put("sharetype", "1");
|
||||||
put("seclevel", "10");
|
// put("seclevel", "10");
|
||||||
put("sharelevel", "1");
|
// put("sharelevel", "1");
|
||||||
put("crmid", "0");
|
// put("crmid", "0");
|
||||||
put("contents", hrmid);
|
// put("contents", hrmid);
|
||||||
put("deleted", "0");
|
// put("deleted", "0");
|
||||||
put("seclevelMax", "100");
|
// put("seclevelMax", "100");
|
||||||
put("jobtitleid", hrmid);
|
// put("jobtitleid", hrmid);
|
||||||
put("joblevel", "0");
|
// put("joblevel", "0");
|
||||||
put("scopeid", "0");
|
// put("scopeid", "0");
|
||||||
}};
|
// }};
|
||||||
this.insertHandle("CRM_ShareInfo", map);
|
// this.insertHandle("CRM_ShareInfo", map);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public String insertHrmdepartmentvirtual(List<Map<String, Object>> mapList, Map<String, Object> customer, String subId) {
|
public String insertHrmdepartmentvirtual(List<Map<String, Object>> mapList, Map<String, Object> customer, String subId) {
|
||||||
if (Objects.isNull(mapList) || mapList.size() == 0) {
|
if (Objects.isNull(mapList) || mapList.isEmpty()) {
|
||||||
mapList = new ArrayList<>();
|
mapList = new ArrayList<>();
|
||||||
mapList.add(new HashMap<>());
|
mapList.add(new HashMap<>());
|
||||||
}
|
}
|
||||||
|
@ -567,7 +645,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String insertHrmsubcompanyvirtual(List<Map<String, Object>> mapList, Map<String, Object> customer) {
|
public String insertHrmsubcompanyvirtual(List<Map<String, Object>> mapList, Map<String, Object> customer) {
|
||||||
if (Objects.isNull(mapList) || mapList.size() == 0) {
|
if (Objects.isNull(mapList) || mapList.isEmpty()) {
|
||||||
mapList = new ArrayList<>();
|
mapList = new ArrayList<>();
|
||||||
mapList.add(new HashMap<>());
|
mapList.add(new HashMap<>());
|
||||||
}
|
}
|
||||||
|
@ -816,7 +894,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
item.put("lastupdatedby", this.request.getRequestManager().getCreater());
|
item.put("lastupdatedby", this.request.getRequestManager().getCreater());
|
||||||
}
|
}
|
||||||
if (!item.containsKey("status")) {
|
if (!item.containsKey("status")) {
|
||||||
item.put("status", 1);
|
item.put("status", 2);
|
||||||
}
|
}
|
||||||
if (!item.containsKey("language")) {
|
if (!item.containsKey("language")) {
|
||||||
item.put("language", 7);
|
item.put("language", 7);
|
||||||
|
@ -894,6 +972,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
// TODO 插入客户基本信息
|
// TODO 插入客户基本信息
|
||||||
this.insertHandle("CRM_CustomerInfo", mapList);
|
this.insertHandle("CRM_CustomerInfo", mapList);
|
||||||
CustomerInfoComInfo customerInfo = new CustomerInfoComInfo();
|
CustomerInfoComInfo customerInfo = new CustomerInfoComInfo();
|
||||||
|
|
||||||
customerInfo.removeCustomerInfoCache();
|
customerInfo.removeCustomerInfoCache();
|
||||||
customerInfo.removeCache();
|
customerInfo.removeCache();
|
||||||
String queryIdSql = "select max(id) from CRM_CustomerInfo where name= ? and manager = ?";
|
String queryIdSql = "select max(id) from CRM_CustomerInfo where name= ? and manager = ?";
|
||||||
|
@ -901,6 +980,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
rs.executeQuery(queryIdSql, cusMap.get("name"), managerId);
|
rs.executeQuery(queryIdSql, cusMap.get("name"), managerId);
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
customerId = rs.getString(1);
|
customerId = rs.getString(1);
|
||||||
|
customerInfo.addCustomerInfoCache(customerId);
|
||||||
if (!"".equals(customerId)) {
|
if (!"".equals(customerId)) {
|
||||||
CustomerModifyLog customerModifyLog = new CustomerModifyLog();
|
CustomerModifyLog customerModifyLog = new CustomerModifyLog();
|
||||||
customerModifyLog.modify(customerId, String.valueOf(this.request.getRequestManager().getCreater()), managerId);
|
customerModifyLog.modify(customerId, String.valueOf(this.request.getRequestManager().getCreater()), managerId);
|
||||||
|
@ -937,7 +1017,6 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
cusMap.put("customerId", customerId);
|
cusMap.put("customerId", customerId);
|
||||||
this.customerID = customerId;
|
this.customerID = customerId;
|
||||||
// @debug
|
// @debug
|
||||||
// cusMap.put("customerId", 1);
|
|
||||||
return cusMap;
|
return cusMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -958,8 +1037,6 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
SqlResult sqlResult = BuilderSqlUtil.builderInsertSql(tableName, map);
|
SqlResult sqlResult = BuilderSqlUtil.builderInsertSql(tableName, map);
|
||||||
if (!Objects.isNull(sqlResult)) {
|
if (!Objects.isNull(sqlResult)) {
|
||||||
// TODO 插入数据库数据
|
// TODO 插入数据库数据
|
||||||
// Console.log(sqlResult.getSqlStr());
|
|
||||||
// Console.log(Arrays.toString(sqlResult.getArgs()) + "\n");
|
|
||||||
this.writeDebuggerLog(sqlResult.getSqlStr());
|
this.writeDebuggerLog(sqlResult.getSqlStr());
|
||||||
this.writeDebuggerLog(Arrays.toString(sqlResult.getArgs()) + "\n");
|
this.writeDebuggerLog(Arrays.toString(sqlResult.getArgs()) + "\n");
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
|
|
Loading…
Reference in New Issue