rev:清洗机上料
This commit is contained in:
@@ -187,14 +187,12 @@ public class PdaWashController {
|
||||
}
|
||||
Param limit_time = paramService.getOne(new QueryWrapper<Param>().eq("code", "pda_wash_time"));
|
||||
//开启清洗上料时间限制
|
||||
if (limit_time!=null &&limit_time.getValue().equals("1")){
|
||||
if (limit_time!=null && !limit_time.getValue().equals("0")){
|
||||
SchBaseTask lastTask = taskService.getOne(new QueryWrapper<SchBaseTask>()
|
||||
.eq("task_type", AcsTaskEnum.REQUEST_WASH_SEND_MATERIAL.getCode()).orderByDesc("task_code").last("limit 1"));
|
||||
String materialId = lastTask.getMaterial_id();
|
||||
if (!list.get(0).getMaterial_id().equals(materialId)){
|
||||
long between = DateUtil.between(new Date(), lastTask.getCreate_time(), DateUnit.MINUTE);
|
||||
if (between<5){
|
||||
throw new BadRequestException("不同物料任务间隔小于5分钟,任务:"+lastTask.getTask_code());
|
||||
if (lastTask!=null){
|
||||
if (DateUtil.between(new Date(), lastTask.getCreate_time(), DateUnit.MINUTE)<Integer.valueOf(limit_time.getValue())){
|
||||
throw new BadRequestException("清洗上料任务间隔不小于"+limit_time.getValue()+"分钟,任务:"+lastTask.getTask_code());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user