diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/board/domain/DmsRealtimeStatusHistory.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/board/domain/DmsRealtimeStatusHistory.java index b7980eb1..db7119c5 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/board/domain/DmsRealtimeStatusHistory.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/board/domain/DmsRealtimeStatusHistory.java @@ -45,7 +45,13 @@ public class DmsRealtimeStatusHistory implements Serializable { private Date syncTime; private Date hour; private Long timeCount; + public Long getTimeCount() { + return timeCount; + } + public void setTimeCount(Long timeCount) { + this.timeCount = timeCount; + } public Long getHistoryId() { return historyId; @@ -118,6 +124,13 @@ public class DmsRealtimeStatusHistory implements Serializable { public void setSyncTime(Date syncTime) { this.syncTime = syncTime; } + public Date getHour() { + return hour; + } + + public void setHour(Date hour) { + this.hour = hour; + } } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/ThirdMesBorderService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/ThirdMesBorderService.java index fd299bbc..9daabc63 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/ThirdMesBorderService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/ThirdMesBorderService.java @@ -1,11 +1,9 @@ package com.hw.mes.board.service; -import com.hw.common.core.web.domain.AjaxResult; import com.hw.mes.board.domain.RawAmount; import com.hw.mes.board.domain.RecordIotenvInstant; import com.hw.mes.domain.MesProductOrder; -import java.math.BigDecimal; import java.util.List; import java.util.Map; diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/impl/ThirdMesBorderServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/impl/ThirdMesBorderServiceImpl.java index dcdcdb71..5dbea4df 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/impl/ThirdMesBorderServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/board/service/impl/ThirdMesBorderServiceImpl.java @@ -5,14 +5,13 @@ import com.hw.mes.board.domain.RecordIotenvInstant; import com.hw.mes.board.service.ThirdMesBorderService; import com.hw.mes.domain.MesProductOrder; import com.hw.mes.mapper.MesProductOrderMapper; -import com.hw.wms.api.domain.vo.WmsRawStockVo; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Map; - +@Service public class ThirdMesBorderServiceImpl implements ThirdMesBorderService { @Autowired private MesProductOrderMapper mesProductOrderMapper; @@ -39,6 +38,7 @@ public class ThirdMesBorderServiceImpl implements ThirdMesBorderService { rawAmount.setInStock(map.getInStock()); if (map.getMaterialId().equals(decimalMap.getMaterialId())){ rawAmount.setOutStock(decimalMap.getOutStock()); + rawAmounts.add(rawAmount); } } } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesProductOrderMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesProductOrderMapper.java index 424dde6a..3c1cb85a 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesProductOrderMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesProductOrderMapper.java @@ -9,6 +9,7 @@ import com.hw.mes.board.domain.DmsRealtimeStatusHistory; import com.hw.mes.board.domain.RawAmount; import com.hw.mes.board.domain.RecordIotenvInstant; import com.hw.mes.domain.MesProductOrder; +import org.apache.ibatis.annotations.Mapper; /** * 生产工单Mapper接口 @@ -16,6 +17,7 @@ import com.hw.mes.domain.MesProductOrder; * @author Yinq * @date 2024-02-20 */ +@Mapper public interface MesProductOrderMapper { /** diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductOrderMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductOrderMapper.xml index 9b6d70c1..17bdc59a 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductOrderMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductOrderMapper.xml @@ -416,19 +416,19 @@ wms_product_instock where begin_time > now() -interval 7 day and warehouse_id = 231 - group by hour order by hour desc + group by day order by day desc + + diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml index 565238e4..42e29d5e 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml @@ -400,14 +400,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + update wms_product_outstock