From e1b7c96f30f10804c290211303569f3c5318106b Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Thu, 13 Oct 2022 23:00:05 +0800 Subject: [PATCH] 8012 AbsorbDeviceKB v1 --- .../java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java | 2 +- .../ruoyi/system/mapper/ScadaAdsorbDeviceinfoMapper.java | 2 +- .../service/impl/KBAdsorbDeviceinfoServiceImpl.java | 2 +- .../service/impl/ScadaAdsorbDeviceinfoServiceImpl.java | 2 +- .../main/resources/mapper/system/ScadaAbsorbMapper.xml | 9 ++++++--- .../mapper/system/ScadaAdsorbDeviceinfoMapper.xml | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java index 5821cf8..ac79be2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java @@ -20,7 +20,7 @@ public interface ScadaAbsorbMapper { public List selectScadaAdsorbFault(int in_id); - public String selectScadaAdsorbDeviceOEE(); + public String selectScadaAdsorbDeviceOEE(int in_id); public String selectScadaAdsorbDeviceAlarmCount(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAdsorbDeviceinfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAdsorbDeviceinfoMapper.java index af88ab2..a91db01 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAdsorbDeviceinfoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAdsorbDeviceinfoMapper.java @@ -74,7 +74,7 @@ public interface ScadaAdsorbDeviceinfoMapper ScadaAdsorbDeviceinfo getEnergyProductionThisMonth(); - List getEnergyProduction(); + List getEnergyProduction(int in_id); @DataSource(value = DataSourceType.MASTER) List getUtilOee(int in_id); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java index 43bda5f..9a1cead 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java @@ -45,7 +45,7 @@ public class KBAdsorbDeviceinfoServiceImpl implements IKBAdsorbDeviceinfoService @Override public String getAdsorbDeviceOEE(){ - return ScadaAbsorbMapper.selectScadaAdsorbDeviceOEE(); + return ScadaAbsorbMapper.selectScadaAdsorbDeviceOEE(this.in_id); } @Override diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ScadaAdsorbDeviceinfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ScadaAdsorbDeviceinfoServiceImpl.java index 5eb759e..19fd371 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ScadaAdsorbDeviceinfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ScadaAdsorbDeviceinfoServiceImpl.java @@ -126,7 +126,7 @@ public class ScadaAdsorbDeviceinfoServiceImpl implements IScadaAdsorbDeviceinfoS @Override @DataSource(value = DataSourceType.MASTER) public List getEnergyProduction() { - return scadaAdsorbDeviceinfoMapper.getEnergyProduction(); + return scadaAdsorbDeviceinfoMapper.getEnergyProduction(this.in_id); } @Override diff --git a/ruoyi-system/src/main/resources/mapper/system/ScadaAbsorbMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ScadaAbsorbMapper.xml index baeb6ba..789ef61 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ScadaAbsorbMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ScadaAbsorbMapper.xml @@ -23,16 +23,19 @@ select * from table ( scada_adsorb_fault(#{in_id}) ) - /*select to_char(round(OEE,2),'fm99999999999990.00') as oee from SCADA_HOUR_OEE where DEVICEID = '1#' and CREATETIME = (select max (CREATETIME) from SCADA_HOUR_OEE where DEVICEID = DEVICEID) order by CREATETIME desc */ - select OEE + + /* select OEE from (select * from SCADA_XF_DEVICEINFO_1 order by CREATETIME desc) - where rownum = 1 + where rownum = 1*/ + select * + from table ( scada_adsorb_device_oee_new(#{in_id}) ) - + SELECT * FROM TABLE( scada_absorb_device_ep_q2(#{in_id}) )