From 571cee49a0d8d69458704154f084c7713b67a38b Mon Sep 17 00:00:00 2001 From: lgh Date: Thu, 5 Jan 2023 16:57:24 +0800 Subject: [PATCH] update: --- .../empty/controller/ScreenController.java | 5 ++++ .../empty/service/impl/EleServiceImpl.java | 23 ++++++++++++++++++- .../com/mt/wms/empty/task/ScheduledTask.java | 2 +- .../java/com/mt/wms/empty/vo/CountEleVo.java | 6 +++++ .../com/mt/wms/empty/vo/NowCurrTaskDetVo.java | 6 +++++ .../src/main/resources/mapper/EleMapper.xml | 19 ++++----------- 6 files changed, 45 insertions(+), 16 deletions(-) diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ScreenController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ScreenController.java index ab4163d..1f1717b 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ScreenController.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ScreenController.java @@ -35,6 +35,7 @@ import javax.annotation.Resource; import javax.validation.groups.Default; import java.io.IOException; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -126,6 +127,8 @@ public class ScreenController extends BaseController { Integer setupTime = 1; //剩余时间 Integer remainingTime = 0; + + if (kilnInfo.getType() != 4) { if (kilnInfo.getType() == 3) { remainingTime = readPlc(nameSpace, "ProgramTimeRemaining").intValue(); @@ -611,6 +614,8 @@ public class ScreenController extends BaseController { map.put("rot2", rot2ConsumeList); map.put("temp", tempConsumeList); map.put("oilTemp", oilTempConsumeList); + map.put("outerZone1Temp",outerZone1TempConsumeList); + map.put("outerZone2Temp",outerZone2TempConsumeList); return successful(JSONObject.parseObject(JSON.toJSONString(map))); } diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EleServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EleServiceImpl.java index 978f078..9c17057 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EleServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/EleServiceImpl.java @@ -1,12 +1,16 @@ package com.mt.wms.empty.service.impl; import com.mt.wms.core.base.BaseService; +import com.mt.wms.core.dal.entity.CurrTask; +import com.mt.wms.core.dal.service.CurrTaskServiceBiz; import com.mt.wms.core.vo.R; import com.mt.wms.empty.mapper.EleMapper; import com.mt.wms.empty.service.EleService; +import com.mt.wms.empty.vo.CountEleVo; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.List; /** * @Author: LGH @@ -17,9 +21,26 @@ public class EleServiceImpl extends BaseService implements EleService { @Resource EleMapper eleMapper; + @Resource + CurrTaskServiceBiz currTaskServiceBiz; @Override public R list(Long kilnId) { - return successful(eleMapper.list(kilnId)); + List list = eleMapper.list(kilnId); + for (CountEleVo countEleVo:list + ) { + CurrTask currTask = currTaskServiceBiz.getById(countEleVo.getTaskId()); + if (currTask.getStoveCode()==null){ + if (currTask.getSheetNo()!=null){ + currTask.setStoveCode(currTask.getSheetNo()); + }else { + currTask.setStoveCode(currTask.getTaskCode()); + } + + } + countEleVo.setStoveCode(currTask.getStoveCode()); + countEleVo.setCreateTime(currTask.getCreateTime()); + } + return successful(list); } } 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 5e3e129..fbaf720 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 @@ -555,7 +555,7 @@ public class ScheduledTask extends BaseService { //A向电压 Double phaseAVoltage = readPlc(nameSpaceNote, "AVoltage"); Double phaseBVoltage = readPlc(nameSpaceNote, "BVoltage"); - Double phaseCVoltage = readPlc(nameSpaceNote, "CVoltage"); + Double phaseCVoltage = readPlc(nameSpaceNote, "Cvoltage"); //ABC三向电流 Double aCurrent = readPlc(nameSpaceNote, "ACurrent"); Double bCurrent = readPlc(nameSpaceNote, "BCurrent"); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CountEleVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CountEleVo.java index 24273d4..8373fe1 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CountEleVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CountEleVo.java @@ -35,4 +35,10 @@ public class CountEleVo { */ @ApiModelProperty(value = "任务id", example = "0.0") private Long taskId; + + /** + * 炉号 + */ + @ApiModelProperty(value = "炉号", example = "0.0") + private String stoveCode; } diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/NowCurrTaskDetVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/NowCurrTaskDetVo.java index 1609eb9..9b3167b 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/NowCurrTaskDetVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/NowCurrTaskDetVo.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import java.time.LocalDateTime; import java.util.List; /** @@ -79,6 +80,11 @@ public class NowCurrTaskDetVo extends BaseVo implements PageVo.ConvertVo { */ @ApiModelProperty(value = "工艺进度", example = "0") private Integer completeness; + /** + * 开始加工时间 + */ + @ApiModelProperty(value = "开始加工时间", example = "0") + private LocalDateTime beginTime; /** * 标识卡list diff --git a/6.program/wms-empty/src/main/resources/mapper/EleMapper.xml b/6.program/wms-empty/src/main/resources/mapper/EleMapper.xml index 013292f..f40bd58 100644 --- a/6.program/wms-empty/src/main/resources/mapper/EleMapper.xml +++ b/6.program/wms-empty/src/main/resources/mapper/EleMapper.xml @@ -18,26 +18,17 @@