修改
This commit is contained in:
@@ -143,7 +143,16 @@ public class CrmToLmsServiceImpl implements CrmToLmsService {
|
||||
map.put("width", width);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(packageboxsn)) {
|
||||
map.put("packageboxsn", packageboxsn);
|
||||
String[] split = packageboxsn.split(",");
|
||||
String ids = "('";
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
if (i == split.length - 1 || split.length == 1) {
|
||||
ids += split[i] + "')";
|
||||
} else {
|
||||
ids += split[i] + "','";
|
||||
}
|
||||
}
|
||||
map.put("packageboxsn", ids);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(dateoffginbound)) {
|
||||
map.put("dateoffginbound", dateoffginbound);
|
||||
@@ -152,10 +161,28 @@ public class CrmToLmsServiceImpl implements CrmToLmsService {
|
||||
map.put("warehouse_code", warehouse_code);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(container_name)) {
|
||||
map.put("container_name", container_name);
|
||||
String[] split = container_name.split(",");
|
||||
String ids = "('";
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
if (i == split.length - 1 || split.length == 1) {
|
||||
ids += split[i] + "')";
|
||||
} else {
|
||||
ids += split[i] + "','";
|
||||
}
|
||||
}
|
||||
map.put("container_name", ids);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(pcsn)) {
|
||||
map.put("sap_pcsn", pcsn);
|
||||
String[] split = pcsn.split(",");
|
||||
String ids = "('";
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
if (i == split.length - 1 || split.length == 1) {
|
||||
ids += split[i] + "')";
|
||||
} else {
|
||||
ids += split[i] + "','";
|
||||
}
|
||||
}
|
||||
map.put("sap_pcsn", ids);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(width_standard)) {
|
||||
map.put("width_standard", width_standard);
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
输入.material_name TYPEAS s_string
|
||||
输入.mfgordername TYPEAS f_string
|
||||
输入.customername TYPEAS s_string
|
||||
输入.packageboxsn TYPEAS s_string
|
||||
输入.packageboxsn TYPEAS f_string
|
||||
输入.dateoffginbound TYPEAS s_string
|
||||
输入.warehouse_code TYPEAS s_string
|
||||
输入.customerdescription TYPEAS s_string
|
||||
输入.sap_pcsn TYPEAS s_string
|
||||
输入.container_name TYPEAS s_string
|
||||
输入.sap_pcsn TYPEAS f_string
|
||||
输入.container_name TYPEAS f_string
|
||||
输入.thickness TYPEAS s_string
|
||||
输入.thickness_request TYPEAS s_string
|
||||
输入.width TYPEAS f_string
|
||||
@@ -78,49 +78,56 @@
|
||||
INNER JOIN st_ivt_structattr sa On sa.storagevehicle_code = sub.package_box_sn
|
||||
INNER JOIN st_ivt_bsrealstorattr stor ON stor.stor_id = sa.stor_id
|
||||
WHERE
|
||||
sub.`status` = '2'
|
||||
OPTION 输入.material_code <> ""
|
||||
product_name = 输入.material_code
|
||||
ENDOPTION
|
||||
OPTION 输入.material_name <> ""
|
||||
product_description = 输入.material_name
|
||||
ENDOPTION
|
||||
OPTION 输入.mfgordername <> ""
|
||||
SUBSTRING_INDEX(sale_order_name, "-", 1) IN 输入.mfgordername
|
||||
ENDOPTION
|
||||
OPTION 输入.customername <> ""
|
||||
customer_name = 输入.customername
|
||||
ENDOPTION
|
||||
OPTION 输入.customerdescription <> ""
|
||||
customer_description = 输入.customerdescription
|
||||
ENDOPTION
|
||||
OPTION 输入.width <> ""
|
||||
sub.width >= 输入.width
|
||||
ENDOPTION
|
||||
OPTION 输入.warehouse_code <> ""
|
||||
stor.ext_id = 输入.warehouse_code
|
||||
ENDOPTION
|
||||
OPTION 输入.dateoffginbound <> ""
|
||||
sub.date_of_FG_inbound = 输入.dateoffginbound
|
||||
ENDOPTION
|
||||
OPTION 输入.packageboxsn <> ""
|
||||
sub.package_box_sn = 输入.packageboxsn
|
||||
ENDOPTION
|
||||
OPTION 输入.container_name <> ""
|
||||
sub.container_name = 输入.container_name
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn = 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.width_standard <> ""
|
||||
sub.width_standard >= 输入.width_standard
|
||||
ENDOPTION
|
||||
OPTION 输入.thickness <> ""
|
||||
sub.thickness = 输入.thickness
|
||||
ENDOPTION
|
||||
OPTION 输入.thickness_request <> ""
|
||||
sub.thickness_request = 输入.thickness_request
|
||||
ENDOPTION
|
||||
sub.package_box_sn IN (
|
||||
SELECT DISTINCT
|
||||
package_box_sn
|
||||
FROM
|
||||
pdm_bi_subpackagerelation sub
|
||||
WHERE
|
||||
sub.`status` = '2'
|
||||
OPTION 输入.material_code <> ""
|
||||
product_name = 输入.material_code
|
||||
ENDOPTION
|
||||
OPTION 输入.material_name <> ""
|
||||
product_description = 输入.material_name
|
||||
ENDOPTION
|
||||
OPTION 输入.mfgordername <> ""
|
||||
SUBSTRING_INDEX(sale_order_name, "-", 1) IN 输入.mfgordername
|
||||
ENDOPTION
|
||||
OPTION 输入.customername <> ""
|
||||
customer_name = 输入.customername
|
||||
ENDOPTION
|
||||
OPTION 输入.customerdescription <> ""
|
||||
customer_description = 输入.customerdescription
|
||||
ENDOPTION
|
||||
OPTION 输入.width <> ""
|
||||
sub.width >= 输入.width
|
||||
ENDOPTION
|
||||
OPTION 输入.dateoffginbound <> ""
|
||||
sub.date_of_FG_inbound = 输入.dateoffginbound
|
||||
ENDOPTION
|
||||
OPTION 输入.packageboxsn <> ""
|
||||
sub.package_box_sn IN 输入.packageboxsn
|
||||
ENDOPTION
|
||||
OPTION 输入.container_name <> ""
|
||||
sub.container_name IN 输入.container_name
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn IN 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.width_standard <> ""
|
||||
sub.width_standard >= 输入.width_standard
|
||||
ENDOPTION
|
||||
OPTION 输入.thickness <> ""
|
||||
sub.thickness = 输入.thickness
|
||||
ENDOPTION
|
||||
OPTION 输入.thickness_request <> ""
|
||||
sub.thickness_request = 输入.thickness_request
|
||||
ENDOPTION
|
||||
)
|
||||
OPTION 输入.warehouse_code <> ""
|
||||
stor.ext_id = 输入.warehouse_code
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -53,6 +53,7 @@ public class OutTask extends AbstractAcsTask {
|
||||
|
||||
// 1.查询此任务是否有任务组
|
||||
if (ObjectUtil.isEmpty(json.getString("task_group_id"))) {
|
||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length()-1);
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.ext_task_id(json.getString("task_id"))
|
||||
.task_code(json.getString("task_code"))
|
||||
@@ -61,6 +62,7 @@ public class OutTask extends AbstractAcsTask {
|
||||
.next_device_code(json.getString("point_code2"))
|
||||
.vehicle_code(json.getString("vehicle_code"))
|
||||
.priority(json.getString("priority"))
|
||||
.dtl_type(String.valueOf(dtl_type))
|
||||
.remark(json.getString("remark"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
@@ -71,6 +73,8 @@ public class OutTask extends AbstractAcsTask {
|
||||
for (int j = 0; j < taskArr.size(); j++) {
|
||||
JSONObject json2 = taskArr.getJSONObject(j);
|
||||
|
||||
char dtl_type = json2.getString("task_type").charAt(json.getString("task_type").length()-1);
|
||||
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.ext_task_id(json2.getString("task_id"))
|
||||
.task_code(json2.getString("task_code"))
|
||||
@@ -79,6 +83,7 @@ public class OutTask extends AbstractAcsTask {
|
||||
.next_device_code(json2.getString("point_code2"))
|
||||
.vehicle_code(json2.getString("vehicle_code"))
|
||||
.priority(json2.getString("priority"))
|
||||
.dtl_type(String.valueOf(dtl_type))
|
||||
.remark(json2.getString("remark"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
@@ -172,6 +177,7 @@ public class OutTask extends AbstractAcsTask {
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", currentUsername);
|
||||
json.put("create_time", DateUtil.now());
|
||||
json.put("acs_task_type", "7");
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
|
||||
|
||||
return json.getString("task_id");
|
||||
|
||||
Reference in New Issue
Block a user