This commit is contained in:
2022-11-26 19:21:30 +08:00
29 changed files with 733 additions and 170 deletions

View File

@@ -62,12 +62,13 @@ public class CrmToLmsServiceImpl implements CrmToLmsService {
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
JSONObject customer_jo = WQLObject.getWQLObject("").query("cust_code = '"+customer_name+"'").uniqueResult(0);
JSONObject customer_jo = WQLObject.getWQLObject("md_cs_customerbase").query("cust_code = '"+customer_name+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(customer_jo)){
customer_jo = new JSONObject();
customer_jo.put("cust_id",IdUtil.getSnowflake(1,1).nextId());
customer_jo.put("cust_code",customer_name);
customer_jo.put("cust_name",description);
customer_jo.put("cust_simple_name",company);
customer_jo.put("create_id",currentUserId);
customer_jo.put("create_name",nickName);
customer_jo.put("create_time",now);
@@ -77,6 +78,10 @@ public class CrmToLmsServiceImpl implements CrmToLmsService {
WQLObject.getWQLObject("md_cs_customerbase").insert(customer_jo);
}else {
customer_jo.put("cust_name",description);
customer_jo.put("cust_simple_name",company);
customer_jo.put("update_optid",currentUserId);
customer_jo.put("update_optname",nickName);
customer_jo.put("update_time",now);
WQLObject.getWQLObject("md_cs_customerbase").update(customer_jo);
}

View File

@@ -891,6 +891,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String ContainerName = param.getString("ContainerName");
String SaleOrderName = param.getString("SaleOrderName");
String isUnPlanProduction = param.getString("isUnPlanProduction");
String sale_order_description = param.getString("Attribute1");
if (isUnPlanProduction.equals("1")){
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
@@ -903,6 +904,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
sub_jo.put("workorder_id",IdUtil.getSnowflake(1, 1).nextId() + "");
WQLObject.getWQLObject("PDM_BI_SubPackageRelationChangeFlow").insert(sub_jo);*/
sub_jo.put("sale_order_name",SaleOrderName);
sub_jo.put("sale_order_description",sale_order_description);
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(sub_jo);
/*JSONObject new_sub = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("container_name = '"+ContainerName+"' AND status = '2'").uniqueResult(0);