rev:限制任务号相同
This commit is contained in:
@@ -113,6 +113,18 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
jsonItem.put("task_type",json.getString("task_type"));
|
||||
}
|
||||
|
||||
// 判断是否有相同任务号的任务
|
||||
SchBaseTask taskCode = taskService.getByCode(jsonItem.getString("TaskCode"));
|
||||
if (ObjectUtil.isNotEmpty(taskCode)) {
|
||||
JSONObject jsonErro = new JSONObject();
|
||||
jsonErro.put("TaskCode", jsonItem.getString("TaskCode"));
|
||||
jsonErro.put("ReturnStatus", 1);
|
||||
jsonErro.put("ReturnInfo", "5.不能立即派送" + "此任务号已下发过任务!");
|
||||
jsonErro.put("ReturnCount", null);
|
||||
jsonErro.put("MsgTime", DateUtil.now());
|
||||
erroList.add(jsonErro);
|
||||
}
|
||||
|
||||
taskCreateList.add(jsonItem);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user