diff --git a/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java b/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java index 6aeb525..5911402 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java @@ -98,7 +98,7 @@ public class AdsorptionTankController { @GetMapping("/getMaterialStoreJson") @ResponseBody public String getMesMaterialStoreStatisticsJson(){ - List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001"); + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1001"); return JSONArray.toJSONString(mesMaterialStoreStatisticsList); } diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java index d423f46..d26c3bb 100644 --- a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java @@ -20,11 +20,11 @@ import java.io.Serializable; public class MesMaterialProductionStatistics implements Serializable { /** 物料名称 */ - @TableField("materialname") + @TableField("name") private String xValue; /** 产量数 */ - @TableField("productionamount") + @TableField("value") private String yValue; /** 工位编号 */ diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java index b75fa8d..c395692 100644 --- a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java @@ -20,15 +20,15 @@ import java.io.Serializable; public class MesMaterialStoreStatistics implements Serializable { /** 物料名称 */ - @TableField("MATERIALNAME") + @TableField("materialName") private String materialName; /** 内胆库库存 */ - @TableField("LINERSTOREAMOUNT") + @TableField("lineStoreAmount") private String lineStoreAmount; /** 箱壳库库存 */ - @TableField("HULLSTOREAMOUNT") + @TableField("hullStoreAmount") private String hullStoreAmount; /** 工位编号 */ diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java index 7f95d62..db0f598 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java @@ -2,9 +2,14 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; +import java.util.List; + /** * @author WenJY * @date 2022年06月09日 17:02 @@ -12,4 +17,7 @@ import org.springframework.stereotype.Repository; @Mapper @Repository public interface MesMaterialProductionStatisticsMapper extends BaseMapper { + + @Select("select * from table ( absorb_xfnd_xhcl(#{in_id}) )") + List getMesMaterialProductionStatisticsList(@Param("in_id") Integer in_id); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java index c821cfc..3e748a2 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java @@ -2,9 +2,14 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; +import java.util.List; + /** * MES物料库存统计 * @author WenJY @@ -13,4 +18,14 @@ import org.springframework.stereotype.Repository; @Mapper @Repository public interface MesMaterialStoreStatisticsMapper extends BaseMapper{ + + /** + * 吸附内胆库存统计 + * @author WenJY + * @date 2022-10-01 17:27 + * @param in_id + * @return java.util.List + */ + @Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj(#{in_id}) )") + List getAdsorptionTankStoreStatistics(@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 e3b1177..56a63cb 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java @@ -19,6 +19,13 @@ import java.util.List; @Repository public interface MesTeamStatisticsMapper extends BaseMapper { + /** + * 吸附内胆班组统计 + * @author WenJY + * @date 2022-10-01 17:27 + * @param in_id + * @return java.util.List + */ @Select("select * from table ( scada_xfnd_bztj(#{in_id}) )") List getAdsorptionTankTeamStatistics(@Param("in_id") Integer in_id); } 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 fad93b6..8e2df12 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java @@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -46,7 +47,16 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { */ @Override public List getMesTeamStatisticsList(String locationNumber) { - List adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id); + List adsorptionTankTeamStatistics = new ArrayList<>(); + switch (locationNumber) { + case "1001": + adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id); + break; + case "1003": + break; + default: + break; + } return adsorptionTankTeamStatistics; } @@ -75,9 +85,16 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { */ @Override public List getMesMaterialProductionStatisticsList(String locationNumber) { - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("POSIONID",locationNumber); - List mesMaterialProductionStatistics = materialProductionStatisticsMapper.selectList(wrapper); + List mesMaterialProductionStatistics = new ArrayList<>(); + switch (locationNumber) { + case "1001": + mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList(this.in_id); + break; + case "1003": + break; + default: + break; + } return mesMaterialProductionStatistics; } @@ -90,9 +107,19 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService { */ @Override public List getMesMaterialStoreStatisticsList(String locationNumber) { - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("POSIONID",locationNumber); - List mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper); + + List mesMaterialStoreStatistics = new ArrayList<>(); + + switch (locationNumber) { + case "1001": + mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics(this.in_id); + break; + case "1003": + break; + default: + break; + } + return mesMaterialStoreStatistics; } diff --git a/productionboard/target/classes/application.yml b/productionboard/target/classes/application.yml index 3b70347..bea2bcb 100644 --- a/productionboard/target/classes/application.yml +++ b/productionboard/target/classes/application.yml @@ -13,3 +13,5 @@ mybatis-plus: server: port: 6069 + +in_id: 1 \ No newline at end of file diff --git a/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class b/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class index 86d3f28..6c73e62 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class and b/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class differ diff --git a/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class b/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class index f482f63..88930f7 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class and b/productionboard/target/classes/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.class differ diff --git a/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class b/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class index a3f5db5..4a95c83 100644 Binary files a/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class and b/productionboard/target/classes/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.class differ diff --git a/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class b/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class index 401565c..f7e970b 100644 Binary files a/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class and b/productionboard/target/classes/com/productionboard/service/impl/MesProductionDataServiceImpl.class differ