From 3531fc5abe97253a63ac90754fdf2d3b0571ae3a Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Sun, 20 Nov 2022 16:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=B1=E5=A3=B3=E8=87=AA=E5=8A=A8=E6=88=90?= =?UTF-8?q?=E5=9E=8B=E7=BA=BF=E7=BB=9F=E8=AE=A1=EF=BC=88=E6=8C=89=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E4=BA=A7=E9=87=8F=E7=BB=9F=E8=AE=A1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/scada/UShellMesController.java | 7 ++++++- .../java/com/ruoyi/system/mapper/ImosPrPlanMapper.java | 4 ++++ .../java/com/ruoyi/system/service/IImosPrPlanService.java | 7 +++++++ .../ruoyi/system/service/impl/ImosPrPlanServiceImpl.java | 6 ++++++ .../src/main/resources/mapper/system/ImosPrPlanMapper.xml | 3 +++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java index 03fd2b2..467e9a0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/UShellMesController.java @@ -14,6 +14,7 @@ import com.ruoyi.system.service.IImosPrPlanService; import com.ruoyi.system.service.IScadaUhullDeviceinfoService; import com.ruoyi.system.service.ProductionPlanService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -42,6 +43,9 @@ public class UShellMesController { private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + @Value("${in_id}") + private int in_id; + @Autowired private IMosPrPlanRepository iMosPrPlanRepository; @@ -222,7 +226,8 @@ public class UShellMesController { calendar.set(Calendar.SECOND, 0); Date endTime = calendar.getTime(); - List info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime); +// List info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime); + List info = imosPrPlanService.findByRecordTimeBetweenNew(); List infoList = info.stream().sorted(Comparator.comparing(ScadaUkHourData:: getRecordTime)).collect(Collectors.toList()); infoList.forEach(x->{ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java index 7ae01af..73fb0f5 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ImosPrPlanMapper.java @@ -6,6 +6,7 @@ import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.system.domain.ImosPrPlan_MyBatis; import com.ruoyi.system.domain.scada.OrderInfo; +import com.ruoyi.system.domain.scada.ScadaUkHourData; import org.apache.ibatis.annotations.Mapper; import org.springframework.core.annotation.Order; @@ -229,4 +230,7 @@ public interface ImosPrPlanMapper * @return java.util.List */ List getAluminumClassPlanInfo(int in_id); + + List findByRecordTimeBetweenNew(int in_id); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IImosPrPlanService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IImosPrPlanService.java index bdf6588..aa06645 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IImosPrPlanService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IImosPrPlanService.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.ImosPrPlan_MyBatis; import com.ruoyi.system.domain.scada.OrderInfo; +import com.ruoyi.system.domain.scada.ScadaUkHourData; /** * 工单Service接口 @@ -289,4 +290,10 @@ public interface IImosPrPlanService * @return java.util.List */ List getLinerInventoryInfo(); + + /** + * 箱壳自动成型线统计(按小时产量统计) + * @return + */ + List findByRecordTimeBetweenNew(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java index 23bbbe1..a0bf65f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ImosPrPlanServiceImpl.java @@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONArray; import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.system.domain.scada.OrderInfo; +import com.ruoyi.system.domain.scada.ScadaUkHourData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -766,6 +767,11 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService return imosPrPlanMapper.getLinerInventoryInfo(in_id); } + @Override + public List findByRecordTimeBetweenNew() { + return imosPrPlanMapper.findByRecordTimeBetweenNew(in_id); + } + @Override @DataSource(value = DataSourceType.MASTER) public List getAbsorbHourOutPutByDevice() { diff --git a/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml index 5af11d5..6076aed 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ImosPrPlanMapper.xml @@ -485,4 +485,7 @@ SELECT * FROM TABLE( SCADA_ABSORB_PLAN_QUERY_NEW(#{in_id}) ) + \ No newline at end of file