This commit is contained in:
2022-08-03 21:49:31 +08:00
parent 938f22dc00
commit f0fbf69345
7 changed files with 96 additions and 58 deletions

View File

@@ -139,7 +139,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject map = new JSONObject();
map.put("produceorder_id", ext_order_id);
map.put("order_status", "04");
map.put("update_optid", 1111111111);
map.put("update_optid", 1001001);
map.put("device_id", "");
map.put("update_optname", "acs");
map.put("update_time", now);
@@ -164,7 +164,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String device_id = device_json.getString("device_id");
WQLObject wo_status = WQLObject.getWQLObject("PDM_BI_DeviceRunStatusRecord");
JSONObject status_json = wo_status.query("device_id = '" + device_id + "' and (end_time is null or end_time = '' )").uniqueResult(0);
if (ObjectUtil.isNotEmpty(status_json)){
if (ObjectUtil.isNotEmpty(status_json)) {
status_json.put("end_time", start_time);
wo_status.update(status_json);
}
@@ -173,10 +173,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
map.put("device_id", device_id);
map.put("status_type", status_type);
map.put("start_time", start_time);
if (error_code > 0 && error_code < 50){
map.put("err_status_id",error_code);
} else if (error_code > 50){
map.put("err_status_id", error_code - 50);
if (error_code > 0) {
map.put("err_status_id", error_code);
} else {
map.put("err_status_id", null);
}
@@ -195,8 +193,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String real_qty = param.getString("real_qty");
WQLObject wo = WQLObject.getWQLObject("mps_bd_produceshiftorder");
JSONObject map = new JSONObject();
map.put("real_qty",real_qty);
wo.update(map,"produceorder_code = '"+order_code+"'");
map.put("real_qty", real_qty);
wo.update(map, "produceorder_code = '" + order_code + "' and order_status != '04'");
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "设备状态反馈成功");

View File

@@ -200,17 +200,17 @@
IF 输入.flag = "9"
QUERY
SELECT DISTINCT
device.device_id
device.device_id
FROM
pdm_bi_device device
LEFT JOIN mps_bd_produceshiftorder shift ON shift.device_id = device.device_id
LEFT JOIN pdm_bi_devicerunstatusrecord run ON run.device_id = device.device_id
pdm_bi_device device
INNER JOIN mps_bd_produceshiftorder shift ON shift.device_id = device.device_id
INNER JOIN pdm_bi_devicerunstatusrecord run ON run.device_id = device.device_id AND IFNULL(run.end_time,'') =''
WHERE
shift.is_delete = '0'
shift.is_delete = '0'
AND
shift.order_status <> '04'
shift.order_status <> '04'
AND
(run.status_type <> '05' OR (run.status_type = '05' AND IFNULL(run.end_time,'') <> '') OR run.status_type IS NULL)
run.status_type <> '05'
OPTION 输入.workprocedure_id <> ""
device.workprocedure_id = 输入.workprocedure_id
ENDOPTION