From 98ee91df1c7ea5b5fc6943d34c4190ecf5e20bce Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Sun, 2 Oct 2022 22:11:40 +0800 Subject: [PATCH] =?UTF-8?q?6069=20ALL=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AluminumLinerkController.java | 2 +- .../controller/AluminumTtankController.java | 10 ++-- .../controller/FoamBoxController.java | 9 ++-- .../controller/TankShellController.java | 3 +- .../AluminumDeviceDataInformationMapper.java | 11 +++++ .../mapper/AluminumLossStatisticsMapper.java | 12 +++++ .../mapper/AluminumOeeStatisticsMapper.java | 11 +++++ .../mapper/AluminumThisMonthEnergyMapper.java | 11 +++++ .../mapper/AluminumYesterdayEnergyMapper.java | 11 +++++ .../mapper/FoamBoxLineRunStatusMapper.java | 13 +++++ .../mapper/FoamBoxMachineRunStatusMapper.java | 14 +++++- .../mapper/FoamBoxMouldTemperatureMapper.java | 12 +++++ .../mapper/FoamBoxParamTemperatureMapper.java | 11 +++++ .../MesHourProdutionStatisticsMapper.java | 19 ++++++++ ...MesMaterialProductionStatisticsMapper.java | 18 ++++++- .../MesMaterialStoreStatisticsMapper.java | 40 ++++++++++++++++ .../mapper/MesTeamStatisticsMapper.java | 16 +++++++ .../TankShellDeviceDataInformationMapper.java | 20 ++++++++ .../TankShellDevicePrameterValueMapper.java | 8 +++- .../TankShellEnergyConsumptionMapper.java | 20 ++++++++ .../mapper/TankShellLossStatisticsMapper.java | 11 +++++ .../mapper/TankShellOeeStatisticsMapper.java | 11 +++++ .../TankShellThisMonthEnergyMapper.java | 11 +++++ .../service/IMesProductionDataService.java | 4 ++ .../impl/AluminumDeviceInfoServiceImpl.java | 25 ++++++---- .../impl/FoamBoxDeviceInfoServiceImpl.java | 26 ++++++++-- .../impl/MesProductionDataServiceImpl.java | 48 +++++++++++++++++-- .../impl/TankShellDeviceInfoServiceImpl.java | 28 +++++++---- 28 files changed, 397 insertions(+), 38 deletions(-) diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java index c8df716..cbcf824 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumLinerkController.java @@ -146,7 +146,7 @@ public class AluminumLinerkController { @ResponseBody public String getInventoryStatistics() { List mesMaterialStoreStatisticsList = - iMesProductionDataService.getMesMaterialStoreStatisticsList("1001"); + iMesProductionDataService.getMesMaterialStoreStatisticsList("1005"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java index bcbca7c..9e747c7 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java @@ -44,7 +44,7 @@ public class AluminumTtankController { @GetMapping("/getTeamStatisticsJson") @ResponseBody public String getTeamStatisticsJson(){ - List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1006"); + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1001"); if(mesTeamStatisticsList.size()>0){ return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); } @@ -61,7 +61,7 @@ public class AluminumTtankController { @ResponseBody public String getHourProdutionStatisticsJson(){ List mesHourProdutionStatisticsList = - iMesProductionDataService.getMesHourProdutionStatisticsList("1006"); + iMesProductionDataService.getMesHourProdutionStatisticsList("1001"); if(mesHourProdutionStatisticsList.size()>0){ return JSONArray.toJSONString(mesHourProdutionStatisticsList); } @@ -79,7 +79,7 @@ public class AluminumTtankController { public String getMaterialProdutionStatisticsJson(){ List mesMaterialProductionStatisticsList = - iMesProductionDataService.getMesMaterialProductionStatisticsList("1006"); + iMesProductionDataService.getMesMaterialProductionStatisticsList("1001"); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } @@ -100,8 +100,8 @@ public class AluminumTtankController { list.add("U001"); List mesMaterialStoreStatisticsList =new ArrayList<>(); - mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("L001")); - mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("U001")); + mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("1006")); +// mesMaterialStoreStatisticsList.addAll( iMesProductionDataService.getMesMaterialStoreStatisticsList("U001")); // = iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java index c96b4c3..2285227 100644 --- a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java +++ b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java @@ -69,7 +69,8 @@ public class FoamBoxController { @ResponseBody public String getTeamStatisticsJson(String ids){ String type=(ids.equals("0"))?"1029":"1012"; - List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList(type); +// List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList(type); + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1010"); if(mesTeamStatisticsList.size()>0){ return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); } @@ -144,7 +145,7 @@ public class FoamBoxController { System.out.println("通过工位号获取MES小时产量:"+ids); String type=(ids.equals("0"))?"1029":"1012"; List mesHourProdutionStatisticsList = - iMesProductionDataService.getMesHourProdutionStatisticsList(type); + iMesProductionDataService.getMesHourProdutionStatisticsListType("1010",type); if(mesHourProdutionStatisticsList.size()>0){ return JSONArray.toJSONString(mesHourProdutionStatisticsList); } @@ -162,7 +163,7 @@ public class FoamBoxController { public String getMaterialProdutionStatisticsJson(String ids){ String type=(ids.equals("0"))?"1029":"1012"; List mesMaterialProductionStatisticsList = - iMesProductionDataService.getMesMaterialProductionStatisticsList(type); + iMesProductionDataService.getMesMaterialProductionStatisticsListType("1010",type); return JSONArray.toJSONString(mesMaterialProductionStatisticsList); } @@ -178,7 +179,7 @@ public class FoamBoxController { public String getMesMaterialStoreStatisticsJson(){ List mesMaterialStoreStatisticsList = - iMesProductionDataService.getMesMaterialStoreStatisticsList("B001"); + iMesProductionDataService.getMesMaterialStoreStatisticsList("1010"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java index f8ab1a8..d653b32 100644 --- a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java +++ b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java @@ -93,7 +93,8 @@ public class TankShellController { List list=new ArrayList(2); list.add("L001"); list.add("U001"); - List mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list); +// List mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsListByList(list); + List mesMaterialStoreStatisticsList= iMesProductionDataService.getMesMaterialStoreStatisticsList("1009"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/AluminumDeviceDataInformationMapper.java b/productionboard/src/main/java/com/productionboard/mapper/AluminumDeviceDataInformationMapper.java index 8da6212..d0c3a4a 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/AluminumDeviceDataInformationMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/AluminumDeviceDataInformationMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.AluminumDevice.AluminumDeviceDataInformation; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AluminumDeviceDataInformationMapper extends BaseMapper { + /** + * 铝内胆数据监控平台数据信息 + * @param in_id + * @return + */ + @Select("select * from table ( scada_aluminum_device_t_new(#{in_id}) )") + List getAluminumDeviceDataInformations(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/AluminumLossStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/AluminumLossStatisticsMapper.java index 701d2b5..7bb6471 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/AluminumLossStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/AluminumLossStatisticsMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.AluminumDevice.AluminumLossStatistics; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AluminumLossStatisticsMapper extends BaseMapper { + + /** + * 铝内胆数据监控平台Loss统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_aluminum_loss_status_new(#{in_id}) )") + List getAluminumLossStatistics(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/AluminumOeeStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/AluminumOeeStatisticsMapper.java index d39aac5..8d6b1a5 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/AluminumOeeStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/AluminumOeeStatisticsMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.AluminumDevice.AluminumOeeStatistics; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AluminumOeeStatisticsMapper extends BaseMapper { + /** + * 铝内胆数据监控平台设备OEE统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_aluminum_oee_stat_new(#{in_id}) )") + List getAluminumOeeStatistics(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/AluminumThisMonthEnergyMapper.java b/productionboard/src/main/java/com/productionboard/mapper/AluminumThisMonthEnergyMapper.java index b1ddf8e..2c89ef4 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/AluminumThisMonthEnergyMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/AluminumThisMonthEnergyMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.AluminumDevice.AluminumThisMonthEnergy; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AluminumThisMonthEnergyMapper extends BaseMapper { + /** + * 运行、标准节拍参数 + * @param in_id + * @return + */ + @Select("select * from table ( scada_aluminum_month_energy_n(#{in_id}) )") + List getAluminumThisMonthEnergies(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/AluminumYesterdayEnergyMapper.java b/productionboard/src/main/java/com/productionboard/mapper/AluminumYesterdayEnergyMapper.java index 85b3371..cef612f 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/AluminumYesterdayEnergyMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/AluminumYesterdayEnergyMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.AluminumDevice.AluminumYesterdayEnergy; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AluminumYesterdayEnergyMapper extends BaseMapper { + /** + * 运行、标准节拍参数 + * @param in_id + * @return + */ + @Select("select * from table ( scada_aluminum_yesterday_n(#{in_id}) )") + List getAluminumYesterdayEnergies(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxLineRunStatusMapper.java b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxLineRunStatusMapper.java index d3301ef..7335a75 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxLineRunStatusMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxLineRunStatusMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.FoamBoxDevice.FoamBoxLineRunStatus; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface FoamBoxLineRunStatusMapper extends BaseMapper { + + + /** + * 发泡和发泡线数据展示平台设备运行状态 1 + * @param in_id + * @return + */ + @Select("select * from table ( scada_box_line_run_status_new(#{in_id}) )") + List getFoamBoxLineRunStatuses(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMachineRunStatusMapper.java b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMachineRunStatusMapper.java index 8af64ab..ad05fef 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMachineRunStatusMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMachineRunStatusMapper.java @@ -1,9 +1,12 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.productionboard.entity.FoamBoxDevice.FoamBoxLineRunStatus; import com.productionboard.entity.FoamBoxDevice.FoamBoxMachineRunStatus; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -11,4 +14,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface FoamBoxMachineRunStatusMapper extends BaseMapper { + + /** + * 发泡和发泡线数据展示平台设备运行状态 + * @param in_id + * @param DEVICEID + * @return + */ + @Select("select * from table ( scada_foambox_status_object_n(#{in_id},#{DEVICEID}) )") + List getRunStatus(@Param("in_id") Integer in_id, String DEVICEID); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMouldTemperatureMapper.java b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMouldTemperatureMapper.java index 8d51e29..0c6e437 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMouldTemperatureMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxMouldTemperatureMapper.java @@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.FoamBoxDevice.FoamBoxMouldTemperature; import com.productionboard.entity.FoamBoxDevice.FoamBoxParamTemperature; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -12,4 +16,12 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface FoamBoxMouldTemperatureMapper extends BaseMapper { + /** + * 发泡和发泡线数据展示平台 获取模具温度 1 + * @param in_id + * @param deviceId + * @return + */ + @Select("select * from table ( scada_foam_box_mould_table_new(#{in_id},#{deviceId}) )") + List getFoamBoxMouldTemperatures(@Param("in_id") Integer in_id,@Param("deviceId") String deviceId); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxParamTemperatureMapper.java b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxParamTemperatureMapper.java index e2ee507..4fcf1f9 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/FoamBoxParamTemperatureMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/FoamBoxParamTemperatureMapper.java @@ -3,6 +3,8 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.FoamBoxDevice.FoamBoxParamTemperature; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import java.util.List; @@ -13,4 +15,13 @@ import java.util.List; @Mapper public interface FoamBoxParamTemperatureMapper extends BaseMapper { + + /** + * 发泡和发泡线数据展示平台发泡参数 + * @param in_id + * @param DEVICEID + * @return + */ + @Select("select * from table ( scada_scada_foam_temperature_n(#{in_id},#{DEVICEID}) )") + List getFoamBoxParamTemperatures(@Param("in_id") Integer in_id,@Param("DEVICEID") String DEVICEID); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java index bc6f8c2..689de14 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java @@ -17,6 +17,22 @@ import java.util.List; @Repository public interface MesHourProdutionStatisticsMapper extends BaseMapper { + /** + * 吸附内胆预装数据监控平台小时产量 + * @param in_id + * @return + */ + @Select("select * from table ( scada_type_hourly_output_new4(#{in_id}) )") + List getMesHourProdutionStatisticsList4(int in_id); + + /** + * 吸附内胆数据监控平台小时产量 + * @param in_id + * @return + */ + @Select("select * from table ( scada_type_hourly_output_new2(#{in_id}) )") + List getMesHourProdutionStatisticsList1(int in_id); + /** * 铝内胆数据监控平台小时产量 * @param in_id @@ -32,4 +48,7 @@ public interface MesHourProdutionStatisticsMapper extends BaseMapper getMesHourProdutionStatisticsList9(@Param("in_id") Integer in_id); + + @Select("select * from table ( scada_type_hourly_output_new10(#{in_id},#{type}) )") + List getMesHourProdutionStatisticsList10(@Param("in_id") int in_id, @Param("type") String type); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java index c9da1c9..ee28c1e 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java @@ -21,6 +21,14 @@ public interface MesMaterialProductionStatisticsMapper extends BaseMapper getMesMaterialProductionStatisticsList(@Param("in_id") Integer in_id); + /** + * 吸附内胆预装数据监控平台物料产量 + * @param in_id + * @return + */ + @Select("select * from table ( absorb_xfnd_xhcl4(#{in_id}) )") + List getMesMaterialProductionStatisticsList4(@Param("in_id") Integer in_id); + /** * 铝内胆可视化看板物料产量 * @param in_id @@ -35,5 +43,13 @@ public interface MesMaterialProductionStatisticsMapper extends BaseMapper getMesMaterialProductionStatisticsList9(int in_id); + List getMesMaterialProductionStatisticsList9(@Param("in_id") Integer in_id); + + /** + * 发泡和发泡线数据展示平台物料产量 + * @param in_id + * @return + */ + @Select("select * from table ( absorb_xfnd_xhcl10(#{in_id},#{type}) )") + List getMesMaterialProductionStatisticsList10(int in_id, String type); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java index 3e748a2..1ef86d8 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java @@ -28,4 +28,44 @@ public interface MesMaterialStoreStatisticsMapper extends BaseMapper getAdsorptionTankStoreStatistics(@Param("in_id") Integer in_id); + + /** + * 铝内胆数据监控平台库存统计 + * @param in_id + * @return + */ + @Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj4(#{in_id}) )") + List getAdsorptionTankStoreStatistics5(@Param("in_id") Integer in_id); + + /** + * 铝内胆数据监控平台库存统计 新版生产看板 + * @param in_id + * @return + */ + @Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj6(#{in_id}) )") + List getAdsorptionTankStoreStatistics6(@Param("in_id") Integer in_id); + + /** + * 箱壳成型数据监控平台库存统计 + * @param in_id + * @return + */ + @Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj9(#{in_id}) )") + List getAdsorptionTankStoreStatistics9(@Param("in_id") Integer in_id); + + /** + * 发泡和发泡线数据展示平台库存统计 + * @param in_id + * @return + */ + @Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj10(#{in_id}) )") + List getAdsorptionTankStoreStatistics10(@Param("in_id") Integer in_id); + + /** + * + * @param in_id + * @return + */ + @Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj2(#{in_id}) )") + List getAdsorptionTankStoreStatistics4(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java index d194a38..f460d4b 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java @@ -29,6 +29,14 @@ public interface MesTeamStatisticsMapper extends BaseMapper { @Select("select * from table ( scada_xfnd_bztj(#{in_id}) )") List getAdsorptionTankTeamStatistics(@Param("in_id") Integer in_id); + /** + * 吸附内胆预装数据监控平台班组统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_xfnd_bztj4(#{in_id}) )") + List getAdsorptionTankTeamStatistics4(@Param("in_id") Integer in_id); + /** * 铝内胆可视化看板班组统计 * @author WenJY @@ -46,4 +54,12 @@ public interface MesTeamStatisticsMapper extends BaseMapper { */ @Select("select * from table ( scada_xfnd_bztj9(#{in_id}) )") List getAdsorptionTankTeamStatistics9(@Param("in_id") Integer in_id); + + /** + * 发泡和发泡线数据展示平台班组统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_xfnd_bztj10(#{in_id}) )") + List getAdsorptionTankTeamStatistics10(int in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellDeviceDataInformationMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellDeviceDataInformationMapper.java index c69cda8..8d8738f 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellDeviceDataInformationMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellDeviceDataInformationMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.TankShellDevice.TankShellDeviceDataInformation; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,20 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface TankShellDeviceDataInformationMapper extends BaseMapper { + + /** + * 箱壳成型数据监控平台设备 数据信息 + * @param in_id + * @return + */ + @Select("select * from table ( scada_tank_shell_device_new(#{in_id}) )") + List getTankShellDeviceDataInformations(@Param("in_id") Integer in_id); + + /** + * 箱壳成型数据监控平台设备 数据信息 + * @param in_id + * @return + */ + @Select("select * from table ( scada_device_data_info_new(#{in_id}) )") + List getDeviceDataInformations(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellDevicePrameterValueMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellDevicePrameterValueMapper.java index 4536d29..5e97e76 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellDevicePrameterValueMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellDevicePrameterValueMapper.java @@ -3,6 +3,7 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.TankShellDevice.TankShellDevicePrameterValue; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; @@ -14,9 +15,12 @@ import java.util.List; @Mapper public interface TankShellDevicePrameterValueMapper extends BaseMapper { - @Select("select t2.DEVICEID,t2.PRAMETERNAME, to_char(t2.VALUE,'fm9999990.00') as PRAMETERVALUE, t2.CREATETIME\n" + /*@Select("select t2.DEVICEID,t2.PRAMETERNAME, to_char(t2.VALUE,'fm9999990.00') as PRAMETERVALUE, t2.CREATETIME\n" + "from (select * from BASIC_SCADA_DEVICEPARAMETER@SCADA_DBLINK where Device_id = 'XKCX001' and PARAMETER_ID = '2') t1\n" + " left join SCADA_PRAMERTER_VALUE t2 on t1.PARAMETER_NAME = t2.PRAMETERNAME\n" + "where CREATETIME = (select max(CREATETIME) from SCADA_PRAMERTER_VALUE where DEVICEID = T2.DEVICEID)") - List SelectDevicePrameterValues(); + List SelectDevicePrameterValues();*/ + + @Select("select * from table ( sscada_device_pra_val_new(#{in_id}) )") + List SelectDevicePrameterValues(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java index 12f9d4e..c50a4f6 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellEnergyConsumptionMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.TankShellDevice.TankShellEnergyConsumption; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,20 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface TankShellEnergyConsumptionMapper extends BaseMapper { + + /** + * 箱壳成型数据监控平台设备产量能耗对比 + * @param in_id + * @return + */ + @Select("select * from table ( scada_tank_shell_energy_new(#{in_id}) )") + List getTankShellEnergyConsumptions(@Param("in_id") Integer in_id); + + /** + * 箱壳成型数据监控平台设备产量能耗对比 + * @param in_id + * @return + */ + @Select("select * from table ( scada_tank_yesterday_energies(#{in_id}) )") + List getTankShellYesterdayEnergies(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java index ef17c8e..1477585 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellLossStatisticsMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.TankShellDevice.TankShellLossStatistics; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface TankShellLossStatisticsMapper extends BaseMapper { + /** + * 铝内胆数据监控平台Loss统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_tank_shell_loss_new(#{in_id}) )") + List getTankShellLossStatistics(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellOeeStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellOeeStatisticsMapper.java index 7c2f7a0..70d3ef2 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellOeeStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellOeeStatisticsMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.TankShellDevice.TankShellOeeStatistics; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface TankShellOeeStatisticsMapper extends BaseMapper { + /** + * 箱壳成型数据监控平台设备OEE统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_tank_shell_oee_new(#{in_id}) )") + List getTankShellOeeStatistics(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/TankShellThisMonthEnergyMapper.java b/productionboard/src/main/java/com/productionboard/mapper/TankShellThisMonthEnergyMapper.java index febfc5b..7cd396c 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/TankShellThisMonthEnergyMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/TankShellThisMonthEnergyMapper.java @@ -3,6 +3,10 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.TankShellDevice.TankShellThisMonthEnergy; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author WenJY @@ -10,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface TankShellThisMonthEnergyMapper extends BaseMapper { + /** + * 箱壳成型数据监控平台设备OEE统计 + * @param in_id + * @return + */ + @Select("select * from table ( scada_tank_shell_month_e_new(#{in_id}) )") + List getTankShellThisMonthEnergies(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java b/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java index 4dd5a41..4367b14 100644 --- a/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java +++ b/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java @@ -30,6 +30,8 @@ public interface IMesProductionDataService { */ List getMesHourProdutionStatisticsList(String locationNumber); + List getMesHourProdutionStatisticsListType(String locationNumber, String type); + /** * 通过工位号获取MES物料产量 * @author WenJY @@ -39,6 +41,8 @@ public interface IMesProductionDataService { */ List getMesMaterialProductionStatisticsList(String locationNumber); + List getMesMaterialProductionStatisticsListType(String locationNumber, String type); + /** * 获取MES物料库存 * @author WenJY diff --git a/productionboard/src/main/java/com/productionboard/service/impl/AluminumDeviceInfoServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/AluminumDeviceInfoServiceImpl.java index 5059b2f..0be9e43 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/AluminumDeviceInfoServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/AluminumDeviceInfoServiceImpl.java @@ -6,6 +6,7 @@ import com.productionboard.entity.AluminumDevice.*; import com.productionboard.mapper.*; import com.productionboard.service.IAluminumDeviceInfoService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.List; @@ -32,6 +33,8 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService @Autowired private AluminumOeeStatisticsMapper aluminumOeeStatisticsMapper; + @Value("${in_id}") + private int in_id; /** * 获取数据信息 * @author WenJY @@ -40,8 +43,8 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService */ @Override public List getDataInformationList() { - - return dataInformationMapper.selectList(null); + List aluminumDeviceDataInformations = dataInformationMapper.getAluminumDeviceDataInformations(in_id); + return aluminumDeviceDataInformations; } /** @@ -54,15 +57,17 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService public String getRunParameters() { String[] result = new String[10]; try{ - List aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.selectList(null); - List aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.selectList(null); +// List aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.selectList(null); +// List aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.selectList(null); + List aluminumThisMonthEnergies = aluminumThisMonthEnergyMapper.getAluminumThisMonthEnergies(in_id); + List aluminumYesterdayEnergies = aluminumYesterdayEnergyMapper.getAluminumYesterdayEnergies(in_id); result[0] = aluminumYesterdayEnergies.size() > 0 ? aluminumYesterdayEnergies.get(0).getProduction():"0"; result[1] = aluminumYesterdayEnergies.size() > 0 ? aluminumYesterdayEnergies.get(0).getEnergy():"0"; result[2] = aluminumThisMonthEnergies.size() > 0 ? aluminumThisMonthEnergies.get(0).getProduction():"0"; result[3] = aluminumThisMonthEnergies.size() > 0 ? aluminumThisMonthEnergies.get(0).getEnergy():"0"; - - List aluminumDeviceDataInformations = dataInformationMapper.selectList(null); + List aluminumDeviceDataInformations = dataInformationMapper.getAluminumDeviceDataInformations(in_id); +// List aluminumDeviceDataInformations = dataInformationMapper.selectList(null); if(aluminumDeviceDataInformations.size() > 0){ AluminumDeviceDataInformation aluminumDeviceDataInformation = aluminumDeviceDataInformations.get(0); if(aluminumDeviceDataInformation != null){ @@ -98,11 +103,15 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService */ @Override public List getLossStatisticsList() { - return aluminumLossStatisticsMapper.selectList(null); +// List aluminumLossStatistics = aluminumLossStatisticsMapper.selectList(null); + List aluminumLossStatistics = aluminumLossStatisticsMapper.getAluminumLossStatistics(in_id); + return aluminumLossStatistics; } @Override public List getOeeStatisticsList() { - return aluminumOeeStatisticsMapper.selectList(null); +// List aluminumOeeStatistics = aluminumOeeStatisticsMapper.selectList(null); + List aluminumOeeStatistics = aluminumOeeStatisticsMapper.getAluminumOeeStatistics(in_id); + return aluminumOeeStatistics; } } diff --git a/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java index 36ba09f..9df923f 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/FoamBoxDeviceInfoServiceImpl.java @@ -14,6 +14,7 @@ import com.productionboard.mapper.FoamBoxMouldTemperatureMapper; import com.productionboard.mapper.FoamBoxParamTemperatureMapper; import com.productionboard.service.IFoamBoxDeviceInfoService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.lang.reflect.Array; @@ -41,6 +42,9 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss"); + @Value("${in_id}") + private int in_id; + /** * 获取发泡线、发泡机运行参数 * @author WenJY @@ -53,7 +57,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { String[] result = new String[6]; - List foamBoxLineRunStatuses = foamBoxLineRunStatusMapper.selectList(null); + List foamBoxLineRunStatuses = foamBoxLineRunStatusMapper.getFoamBoxLineRunStatuses(in_id); QueryWrapper wrapper = new QueryWrapper<>(); switch (ids) { @@ -65,7 +69,12 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { break; } - List foamBoxMachineRunStatuses = foamBoxMachineRunStatusMapper.selectList(wrapper); + String DEVICEID = "HF202009858"; + if ("1".equals(ids)){ + DEVICEID = "HF202009857"; + } +// List foamBoxMachineRunStatuses = foamBoxMachineRunStatusMapper.selectList(wrapper); + List foamBoxMachineRunStatuses = foamBoxMachineRunStatusMapper.getRunStatus(in_id,DEVICEID); try{ if(foamBoxLineRunStatuses.size() > 0){ @@ -115,7 +124,12 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { break; } - List foamBoxParamTemperatures = foamBoxParamTemperatureMapper.selectList(wrapper); +// List foamBoxParamTemperatures = foamBoxParamTemperatureMapper.selectList(wrapper); + String DEVICEID = "HF202009858"; + if ("1".equals(ids)){ + DEVICEID = "HF202009857"; + } + List foamBoxParamTemperatures = foamBoxParamTemperatureMapper.getFoamBoxParamTemperatures(in_id,DEVICEID); String[] legendArray = new String[]{"1#pol","2#pol","1#piol","2#pol"}; result.put("legendArray",legendArray); @@ -176,6 +190,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { QueryWrapper wrapper = new QueryWrapper<>(); + String deviceIdNew = "FPX003"; switch (ids) { case "0": List deviceId = new ArrayList(){ @@ -188,6 +203,7 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { } }; wrapper.in("DEVICEID", deviceId); + deviceIdNew = deviceId.get(0); break; case "1": List deviceId2 = new ArrayList(){ @@ -200,9 +216,11 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService { } }; wrapper.in("DEVICEID", deviceId2); + deviceIdNew = deviceId2.get(0); break; } - List foamBoxMouldTemperatures = foamBoxMouldTemperatureMapper.selectList(wrapper); +// List foamBoxMouldTemperatures = foamBoxMouldTemperatureMapper.selectList(wrapper); + List foamBoxMouldTemperatures = foamBoxMouldTemperatureMapper.getFoamBoxMouldTemperatures(in_id,deviceIdNew); if(foamBoxMouldTemperatures.size() > 0){ List interior = foamBoxMouldTemperatures.stream().filter(x -> x.getPameterName().contains("内膜")).collect(Collectors.toList()); diff --git a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java index e6011ce..9286e42 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java @@ -53,7 +53,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id); break; case "1004": - adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id); + adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics4(this.in_id); break; case "1006": adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics6(this.in_id); @@ -61,6 +61,9 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { case "1009": adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics9(this.in_id); break; + case "1010": + adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics10(this.in_id); + break; default: break; } @@ -80,8 +83,10 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { List mesHourProdutionStatistics = new ArrayList<>(); switch (locationNumber) { case "1001": + mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList1(this.in_id); break; case "1004": + mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList4(this.in_id); break; case "1006": mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList6(this.in_id); @@ -95,6 +100,19 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { return mesHourProdutionStatistics; } + @Override + public List getMesHourProdutionStatisticsListType(String locationNumber, String type) { + List mesHourProdutionStatistics = new ArrayList<>(); + switch (locationNumber) { + case "1010": + mesHourProdutionStatistics = hourProdutionStatisticsMapper.getMesHourProdutionStatisticsList10(this.in_id , type); + break; + default: + break; + } + return mesHourProdutionStatistics; + } + /** * 通过工位号获取MES物料产量 * @author WenJY @@ -110,7 +128,7 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList(this.in_id); break; case "1004": - mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList(this.in_id); + mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList4(this.in_id); break; case "1006": mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList6(this.in_id); @@ -118,12 +136,24 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { case "1009": mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList9(this.in_id); break; + default: break; } return mesMaterialProductionStatistics; } + @Override + public List getMesMaterialProductionStatisticsListType(String locationNumber ,String type) { + List mesMaterialProductionStatistics = new ArrayList<>(); + switch (locationNumber) { + case "1010": + mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList10(this.in_id,type); + break; + } + return mesMaterialProductionStatistics; + } + /** * 获取MES物料库存 * @author WenJY @@ -141,7 +171,19 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics(this.in_id); break; case "1004": - mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics(this.in_id); + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics4(this.in_id); + break; + case "1005": + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics5(this.in_id); + break; + case "1006": + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics6(this.in_id); + break; + case "1009": + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics9(this.in_id); + break; + case "1010": + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics10(this.in_id); break; default: break; diff --git a/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java index 7ac66a3..f8d1f83 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/TankShellDeviceInfoServiceImpl.java @@ -8,6 +8,7 @@ import com.productionboard.entity.TankShellDevice.*; import com.productionboard.mapper.*; import com.productionboard.service.ITankShellDeviceInfoService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.thymeleaf.util.StringUtils; @@ -48,9 +49,13 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + @Value("${in_id}") + private int in_id; + @Override public String getDataInformationJson() { - List tankShellDeviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null); +// List tankShellDeviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null); + List tankShellDeviceDataInformations = tankShellDeviceDataInformationMapper.getTankShellDeviceDataInformations(in_id); if(tankShellDeviceDataInformations.size() > 0 && tankShellDeviceDataInformations.get(0) == null){ tankShellDeviceDataInformations.remove(0); @@ -68,7 +73,8 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi public String getRunParameters() { String[] result = new String[10]; try{ - List tankShellThisMonthEnergies = tankShellThisMonthEnergyMapper.selectList(null); +// List tankShellThisMonthEnergies = tankShellThisMonthEnergyMapper.selectList(null); + List tankShellThisMonthEnergies = tankShellThisMonthEnergyMapper.getTankShellThisMonthEnergies(in_id); Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); @@ -77,14 +83,16 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi //昨日产量、能耗 QueryWrapper wrapper = new QueryWrapper(); wrapper.eq("createTime",simpleDateFormat.parse(lastDate)); - List tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.selectList(wrapper); +// List tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.selectList(wrapper); + List tankShellYesterdayEnergies = tankShellEnergyConsumptionMapper.getTankShellYesterdayEnergies(in_id); result[0] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getProduction():"0"; result[1] = tankShellYesterdayEnergies.size() > 0 ? tankShellYesterdayEnergies.get(0).getEnergy():"0"; result[2] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getProduction():"0"; result[3] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getEnergy():"0"; - List deviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null); +// List deviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null); + List deviceDataInformations = tankShellDeviceDataInformationMapper.getDeviceDataInformations(in_id); if(deviceDataInformations.size() > 0){ TankShellDeviceDataInformation tankShellDeviceDataInformation = deviceDataInformations.get(0); if(tankShellDeviceDataInformation != null){ @@ -121,7 +129,8 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi */ @Override public List getLossStatisticsList() { - List tankShellLossStatistics = tankShellLossStatisticsMapper.selectList(null); +// List tankShellLossStatistics = tankShellLossStatisticsMapper.selectList(null); + List tankShellLossStatistics = tankShellLossStatisticsMapper.getTankShellLossStatistics(in_id); return tankShellLossStatistics; } @@ -137,13 +146,14 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi x.like("prameterName","伺服").or().like("prameterName","伺服") ); List tankShellDevicePrameterValues = tankShellDevicePrameterValueMapper.selectList(wrapper);*/ - List tankShellDevicePrameterValues = tankShellDevicePrameterValueMapper.SelectDevicePrameterValues(); + List tankShellDevicePrameterValues = tankShellDevicePrameterValueMapper.SelectDevicePrameterValues(in_id); return JSONArray.toJSONString(tankShellDevicePrameterValues); } @Override public String getEnergyConsumptionJson() { - List tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.selectList(null); +// List tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.selectList(null); + List tankShellEnergyConsumptions = tankShellEnergyConsumptionMapper.getTankShellEnergyConsumptions(in_id); JSONObject jsonObject = new JSONObject(); if(tankShellEnergyConsumptions.size() > 0){ String[] productionArray = new String[tankShellEnergyConsumptions.size()]; @@ -164,7 +174,9 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi @Override public String getOeeStatisticsJson() { - List tankShellOeeStatistics = tankShellOeeStatisticsMapper.selectList(null); +// List tankShellOeeStatistics = tankShellOeeStatisticsMapper.selectList(null); + List tankShellOeeStatistics = tankShellOeeStatisticsMapper.getTankShellOeeStatistics(in_id); + if(tankShellOeeStatistics.size()>0){ tankShellOeeStatistics.forEach(x->{ x.setXValue(hourFormat.format(x.getCreateTime()));