add: 添加工单的校验

This commit is contained in:
2023-04-06 09:26:00 +08:00
parent 92c7134da6
commit 13fffc8c97
3 changed files with 9 additions and 0 deletions

View File

@@ -102,6 +102,9 @@ public class PlotterCallEmptyTask extends AbstractAcsTask {
if(StrUtil.isEmpty(end_point_code)) {
throw new BadRequestException("终点不能为空!");
}
if(StrUtil.isEmpty(workorder)) {
throw new BadRequestException("工单不能为空!");
}
// 判断当前点是否有未完成的任务
JSONObject taskObj = taskTab.query("is_delete='0' and point_code2 = '" + end_point_code + "' " +
"and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "' " +

View File

@@ -101,6 +101,9 @@ public class WrapCallMaterialTask extends AbstractAcsTask {
if(StrUtil.isEmpty(end_point_code)) {
throw new BadRequestException("终点不能为空!");
}
if(StrUtil.isEmpty(workorder)) {
throw new BadRequestException("工单不能为空!");
}
// 判断当前点是否有未完成的任务
JSONObject taskObj = taskTab.query("is_delete='0' and point_code2 = '" + end_point_code + "' and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(taskObj)) {

View File

@@ -109,6 +109,9 @@ public class PlotterSendMaterialTask extends AbstractAcsTask {
if (ObjectUtil.isNotEmpty(taskObj)) {
throw new BadRequestException("当前点位" + start_point_code + "存在未完成的任务");
}
if(StrUtil.isEmpty(workorder)) {
throw new BadRequestException("工单不能为空!");
}
// 判断工单
JSONObject workOrderObj = workOrderTab.query("workorder_code = '" + workorder + "' and workorder_status <> '" + StatusEnum.TASK_FINISH.getCode() + "' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(workOrderObj)){