From 1dd028a2028a577f7bf47e0fbb937f891c3cca95 Mon Sep 17 00:00:00 2001 From: lgh Date: Thu, 4 Aug 2022 11:29:21 +0800 Subject: [PATCH] =?UTF-8?q?update:=20bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mt/wms/empty/controller/EnergyController.java | 3 ++- .../com/mt/wms/empty/task/AsynRunTaskService.java | 2 +- .../java/com/mt/wms/empty/task/ScheduledTask.java | 11 +++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EnergyController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EnergyController.java index cddfc95..f427852 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EnergyController.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/EnergyController.java @@ -89,7 +89,8 @@ public class EnergyController extends BaseController { @PostMapping(value = "energyList") @ApiOperation(value = "根据加工炉id获取能源消耗情况") public R energyList(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam){ - TaskHis currTask = taskHisServiceBiz.getById(electricQueryParam.getTaskId()); + //TaskHis currTask = taskHisServiceBiz.getById(electricQueryParam.getTaskId()); + TaskHis currTask = taskHisServiceBiz.getOne(new QueryWrapper().eq(TaskHis.TASK_ID, electricQueryParam.getTaskId())); Long kilnId = currTask.getKilnId(); KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId); Integer kilnType = kilnInfo.getType(); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java index 5a7a526..e91f6c9 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java @@ -149,7 +149,7 @@ public class AsynRunTaskService extends BaseService { if (threeSetp>0){ //当前任务为自动任务里的第三步,先上报第二步的apms处理endProcess AutoExeTask autoExeTask = autoExeTaskServiceBiz.getOne(new QueryWrapper().eq(AutoExeTask.TH_TASK_ID, currTaskId)); - CurrTask secondCurrTask = currTaskServiceBiz.getById(autoExeTask.getFTaskId()); + CurrTask secondCurrTask = currTaskServiceBiz.getById(autoExeTask.getTTaskId()); secondCurrTask.setIsIn(2); secondCurrTask.setStatus(2); currTaskServiceBiz.updateById(secondCurrTask); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java index 8334f45..513ab24 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java @@ -543,9 +543,16 @@ public class ScheduledTask extends BaseService { //因为readyIn在多用炉第一托盘下油后一直存在,到出炉为止.所以查询当前炉子在加工的任务,大于一条,则不再根据readyIn发起任务 List currTaskList = currTaskServiceBiz.list(new QueryWrapper() .eq(CurrTask.KILN_ID, kilnInfo.getId()).eq(CurrTask.IS_IN, 1).eq(CurrTask.STATUS,1)); - if (currTaskList.size()>1){ - continue; + if (kilnInfo.getType()==1){ + if (currTaskList.size()>1){ + continue; + } + }else { + if (currTaskList.size()>0){ + continue; + } } + //缓存区是否有目标位置为工业炉的待加工任务 List inStockInfoList = inStockInfoServiceBiz.list(new QueryWrapper() .eq(InStockInfo.TYPE, 1)