opt:优化任务更新
This commit is contained in:
@@ -191,6 +191,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONArray array = JSONArray.parseArray(string);
|
||||
//返回处理失败的任务
|
||||
JSONArray errArr = new JSONArray();
|
||||
JSONObject result = new JSONObject();
|
||||
for (int i = 0; i < array.size(); i++) {
|
||||
JSONObject row = array.getJSONObject(i);
|
||||
String task_id = row.getString("task_id");
|
||||
@@ -204,6 +205,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (ObjectUtil.isEmpty(task)){
|
||||
throw new BadRequestException("未找到任务标识为:" + task_id + "的任务!");
|
||||
}
|
||||
if ("1".equals(task.getString("is_delete"))){
|
||||
log.debug(task_id+"当前LMS任务已删除,不需要再次反馈更新!");
|
||||
continue;
|
||||
}
|
||||
if ("08,07".contains(task.getString("task_status"))){
|
||||
log.debug(task_id+"当前LMS任务完成或取消,不需要再次反馈更新!");
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(row.getString("car_no"))) {
|
||||
WQLObject.getWQLObject("SCH_BASE_Task")
|
||||
.update(MapOf.of("car_no",row.getString("car_no")),"task_id = '" + task_id + "'");
|
||||
@@ -231,7 +240,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
}
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "任务状态反馈成功!");
|
||||
result.put("data", new JSONObject());
|
||||
|
||||
Reference in New Issue
Block a user