|
@ -228,7 +228,8 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa |
|
|
} |
|
|
} |
|
|
// 根据标识找到任务
|
|
|
// 根据标识找到任务
|
|
|
SchBaseTask taskOne = schBaseTaskMapper.selectById(task_id); |
|
|
SchBaseTask taskOne = schBaseTaskMapper.selectById(task_id); |
|
|
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())) { |
|
|
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode()) |
|
|
|
|
|
&&!"feedback".equals(method_name)) { |
|
|
throw new BadRequestException("任务已完成或已取消!"); |
|
|
throw new BadRequestException("任务已完成或已取消!"); |
|
|
} |
|
|
} |
|
|
// 根据配置去工厂类获得类对象
|
|
|
// 根据配置去工厂类获得类对象
|
|
@ -248,9 +249,22 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa |
|
|
case "cancel": |
|
|
case "cancel": |
|
|
abstractTask.cancel(task_id); |
|
|
abstractTask.cancel(task_id); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case "feedback": |
|
|
|
|
|
sendToMes(taskOne); |
|
|
|
|
|
break; |
|
|
default: |
|
|
default: |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void sendToMes(SchBaseTask task){ |
|
|
|
|
|
if(task.getPoint_code2().startsWith("YL")){ |
|
|
|
|
|
// QPMES062
|
|
|
|
|
|
}else if(task.getPoint_code2().startsWith("HW")){ |
|
|
|
|
|
// QPMES065
|
|
|
|
|
|
}else{ |
|
|
|
|
|
throw new RuntimeException("目的地非入原材料库或出库,无需反馈MES!"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|