add: 添加工单的校验
This commit is contained in:
@@ -102,6 +102,9 @@ public class PlotterCallEmptyTask extends AbstractAcsTask {
|
|||||||
if(StrUtil.isEmpty(end_point_code)) {
|
if(StrUtil.isEmpty(end_point_code)) {
|
||||||
throw new BadRequestException("终点不能为空!");
|
throw new BadRequestException("终点不能为空!");
|
||||||
}
|
}
|
||||||
|
if(StrUtil.isEmpty(workorder)) {
|
||||||
|
throw new BadRequestException("工单不能为空!");
|
||||||
|
}
|
||||||
// 判断当前点是否有未完成的任务
|
// 判断当前点是否有未完成的任务
|
||||||
JSONObject taskObj = taskTab.query("is_delete='0' and point_code2 = '" + end_point_code + "' " +
|
JSONObject taskObj = taskTab.query("is_delete='0' and point_code2 = '" + end_point_code + "' " +
|
||||||
"and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "' " +
|
"and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "' " +
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ public class WrapCallMaterialTask extends AbstractAcsTask {
|
|||||||
if(StrUtil.isEmpty(end_point_code)) {
|
if(StrUtil.isEmpty(end_point_code)) {
|
||||||
throw new BadRequestException("终点不能为空!");
|
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);
|
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)) {
|
if (ObjectUtil.isNotEmpty(taskObj)) {
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ public class PlotterSendMaterialTask extends AbstractAcsTask {
|
|||||||
if (ObjectUtil.isNotEmpty(taskObj)) {
|
if (ObjectUtil.isNotEmpty(taskObj)) {
|
||||||
throw new BadRequestException("当前点位" + start_point_code + "存在未完成的任务");
|
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);
|
JSONObject workOrderObj = workOrderTab.query("workorder_code = '" + workorder + "' and workorder_status <> '" + StatusEnum.TASK_FINISH.getCode() + "' and is_delete ='0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(workOrderObj)){
|
if (ObjectUtil.isEmpty(workOrderObj)){
|
||||||
|
|||||||
Reference in New Issue
Block a user