From bb957ab4eab394524f84b491230669ac73ebf2e3 Mon Sep 17 00:00:00 2001 From: lgh0010 <1746689524@qq.com> Date: Sat, 5 Mar 2022 16:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=83=BD=E6=BA=90=E6=B6=88?= =?UTF-8?q?=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mt/wms/empty/controller/EnergyController.java | 7 ++++++- .../java/com/mt/wms/empty/params/ElectricQueryParam.java | 2 +- .../com/mt/wms/empty/service/impl/OutStockServiceImpl.java | 2 +- 3 files changed, 8 insertions(+), 3 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 17af2f4..6c9d336 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 @@ -77,6 +77,8 @@ public class EnergyController extends BaseController { private ParTemValueServiceBiz parTemValueServiceBiz; @Autowired private KilnInfoServiceBiz kilnInfoServiceBiz; + @Autowired + private CurrTaskServiceBiz currTaskServiceBiz; @PostMapping(value = "eletric") @ApiOperation(value = "根据窑炉id获取消耗情况") @@ -213,7 +215,10 @@ public class EnergyController extends BaseController { @PostMapping(value = "energyList") @ApiOperation(value = "根据加工炉id获取能源消耗情况") public R energyList(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam){ - KilnInfo kilnInfo = kilnInfoServiceBiz.getById(electricQueryParam.getKilnId()); + electricQueryParam.getTaskId(); + CurrTask currTask = currTaskServiceBiz.getById(electricQueryParam.getTaskId()); + Long kilnId = currTask.getKilnId(); + KilnInfo kilnInfo = kilnInfoServiceBiz.getById(kilnId); Integer kilnType = kilnInfo.getType(); //传入任务号,窑炉号,查询消耗数据,返回json字符串 JSONObject jsonObject=new JSONObject(); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/ElectricQueryParam.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/ElectricQueryParam.java index add339f..4287fb9 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/ElectricQueryParam.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/ElectricQueryParam.java @@ -22,7 +22,7 @@ public class ElectricQueryParam extends BaseParam { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "窑炉id", required = true) + @ApiModelProperty(value = "窑炉id", required = false) private Long kilnId; @ApiModelProperty(value = "任务id", required = true) diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java index ce7a873..f5803f6 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java @@ -71,7 +71,7 @@ public class OutStockServiceImpl extends BaseService implements OutStockService setCommonField(runTask); runTaskServiceBiz.save(runTask); //异步调用车辆 - asynRunTaskService.asynRunOutStock(runTask.getId(),locationId); + asynRunTaskService.asynRunOutStock(locationId); //修改库位状态 InStockInfo inStockInfo = inStockInfoServiceBiz .getOne(new QueryWrapper().eq("Location_id", locationId));