代码更新

This commit is contained in:
2022-11-26 19:18:43 +08:00
parent 37dc4606bc
commit 447edb4470
4 changed files with 12 additions and 2 deletions

View File

@@ -151,11 +151,14 @@ public class LocalStorageServiceImpl implements LocalStorageService {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
List<Map<String, Object>> listMap = EasyExcel.read(path).sheet().doReadSync();
List<Map<String, Object>> listMap = EasyExcel.read(path).sheet(1).doReadSync();
// listMap.remove(0);
for (int i = 0; i < listMap.size(); i++) {
Map<String, Object> map = listMap.get(i);
String material_code = String.valueOf(map.get(5));
if (StrUtil.isEmpty(material_code)){
continue;
}
String material_name = String.valueOf(map.get(6));
String unit_code = String.valueOf(map.get(7));
JSONObject object = measureunitTab.query("unit_code = '" + unit_code + "'").uniqueResult(0);

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);