diff --git a/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java b/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java index 19b2728..bc6cc2c 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AdsorptionTankController.java @@ -1,10 +1,20 @@ package com.productionboard.controller; +import com.alibaba.fastjson.JSONArray; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.service.IMesProductionDataService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.ArrayList; +import java.util.List; + /** * 吸附内胆看板 * @author WenJY @@ -14,6 +24,9 @@ import org.springframework.web.bind.annotation.ResponseBody; @RequestMapping("/adsorptionTank") public class AdsorptionTankController { + @Autowired + private IMesProductionDataService iMesProductionDataService; + private String prefix = "adsorptionTank/index"; @GetMapping() @@ -22,6 +35,64 @@ public class AdsorptionTankController { return prefix; } + /** + * 班组统计 + * @author WenJY + * @date 2022-06-09 16:38 + * @return java.lang.String + */ + @GetMapping("/getTeamStatisticsJson") + @ResponseBody + public String getTeamStatisticsJson(){ + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + if(mesTeamStatisticsList.size()>0){ + return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); + } + return JSONArray.toJSONString(new MesTeamStatistics()); + } + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:54 + * @return java.lang.String + */ + @GetMapping("/getHourProdutionJson") + @ResponseBody + public String getHourProdutionStatisticsJson(){ + List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + + return JSONArray.toJSONString(mesHourProdutionStatisticsList); + } + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:06 + * @return java.lang.String + */ + @GetMapping("/getMaterialProdutionJson") + @ResponseBody + public String getMaterialProdutionStatisticsJson(){ + + List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + + return JSONArray.toJSONString(mesMaterialProductionStatisticsList); + } + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:18 + * @return java.lang.String + */ + @GetMapping("/getMaterialStoreJson") + @ResponseBody + public String getMesMaterialStoreStatisticsJson(){ + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + 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 359b6fc..37e523c 100644 --- a/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java @@ -1,10 +1,20 @@ package com.productionboard.controller; +import com.alibaba.fastjson.JSONArray; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.service.IMesProductionDataService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.ArrayList; +import java.util.List; + /** * 铝内胆可视化看板 * @author WenJY @@ -14,6 +24,9 @@ import org.springframework.web.bind.annotation.ResponseBody; @RequestMapping("/aluminumTank") public class AluminumTtankController { + @Autowired + private IMesProductionDataService iMesProductionDataService; + private String prefix = "aluminumTank/index"; @GetMapping() @@ -22,6 +35,66 @@ public class AluminumTtankController { return prefix; } + /** + * 班组统计 + * @author WenJY + * @date 2022-06-09 16:38 + * @return java.lang.String + */ + @GetMapping("/getTeamStatisticsJson") + @ResponseBody + public String getTeamStatisticsJson(){ + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + if(mesTeamStatisticsList.size()>0){ + return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); + } + return JSONArray.toJSONString(new MesTeamStatistics()); + } + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:54 + * @return java.lang.String + */ + @GetMapping("/getHourProdutionJson") + @ResponseBody + public String getHourProdutionStatisticsJson(){ + List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + if(mesHourProdutionStatisticsList.size()>0){ + return JSONArray.toJSONString(mesHourProdutionStatisticsList); + } + return JSONArray.toJSONString(new ArrayList()); + } + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:06 + * @return java.lang.String + */ + @GetMapping("/getMaterialProdutionJson") + @ResponseBody + public String getMaterialProdutionStatisticsJson(){ + + List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + + return JSONArray.toJSONString(mesMaterialProductionStatisticsList); + } + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:18 + * @return java.lang.String + */ + @GetMapping("/getMaterialStoreJson") + @ResponseBody + public String getMesMaterialStoreStatisticsJson(){ + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + 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 2505158..0f477fd 100644 --- a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java +++ b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java @@ -1,10 +1,20 @@ package com.productionboard.controller; +import com.alibaba.fastjson.JSONArray; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.service.IMesProductionDataService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.ArrayList; +import java.util.List; + /** * 箱体发泡 * @author WenJY @@ -14,6 +24,9 @@ import org.springframework.web.bind.annotation.ResponseBody; @RequestMapping("/foamBox") public class FoamBoxController { + @Autowired + private IMesProductionDataService iMesProductionDataService; + private String prefix = "foamBox/index"; @GetMapping() @@ -22,6 +35,66 @@ public class FoamBoxController { return prefix; } + /** + * 班组统计 + * @author WenJY + * @date 2022-06-09 16:38 + * @return java.lang.String + */ + @GetMapping("/getTeamStatisticsJson") + @ResponseBody + public String getTeamStatisticsJson(){ + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + if(mesTeamStatisticsList.size()>0){ + return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); + } + return JSONArray.toJSONString(new MesTeamStatistics()); + } + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:54 + * @return java.lang.String + */ + @GetMapping("/getHourProdutionJson") + @ResponseBody + public String getHourProdutionStatisticsJson(){ + List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + if(mesHourProdutionStatisticsList.size()>0){ + return JSONArray.toJSONString(mesHourProdutionStatisticsList); + } + return JSONArray.toJSONString(new ArrayList()); + } + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:06 + * @return java.lang.String + */ + @GetMapping("/getMaterialProdutionJson") + @ResponseBody + public String getMaterialProdutionStatisticsJson(){ + + List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + + return JSONArray.toJSONString(mesMaterialProductionStatisticsList); + } + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:18 + * @return java.lang.String + */ + @GetMapping("/getMaterialStoreJson") + @ResponseBody + public String getMesMaterialStoreStatisticsJson(){ + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + return JSONArray.toJSONString(mesMaterialStoreStatisticsList); + } + /** * 根据型号统计产量 * diff --git a/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java b/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java index f3cb63d..5c00eeb 100644 --- a/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java +++ b/productionboard/src/main/java/com/productionboard/controller/PreassembleController.java @@ -1,10 +1,20 @@ package com.productionboard.controller; +import com.alibaba.fastjson.JSONArray; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.service.IMesProductionDataService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.ArrayList; +import java.util.List; + /** * 吸附内胆预装看板 * @author WenJY @@ -14,6 +24,9 @@ import org.springframework.web.bind.annotation.ResponseBody; @RequestMapping("/preassemble") public class PreassembleController { + @Autowired + private IMesProductionDataService iMesProductionDataService; + private String prefix = "preassemble/index"; @GetMapping() @@ -22,6 +35,66 @@ public class PreassembleController { return prefix; } + /** + * 班组统计 + * @author WenJY + * @date 2022-06-09 16:38 + * @return java.lang.String + */ + @GetMapping("/getTeamStatisticsJson") + @ResponseBody + public String getTeamStatisticsJson(){ + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + if(mesTeamStatisticsList.size()>0){ + return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); + } + return JSONArray.toJSONString(new MesTeamStatistics()); + } + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:54 + * @return java.lang.String + */ + @GetMapping("/getHourProdutionJson") + @ResponseBody + public String getHourProdutionStatisticsJson(){ + List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + if(mesHourProdutionStatisticsList.size()>0){ + return JSONArray.toJSONString(mesHourProdutionStatisticsList); + } + return JSONArray.toJSONString(new ArrayList()); + } + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:06 + * @return java.lang.String + */ + @GetMapping("/getMaterialProdutionJson") + @ResponseBody + public String getMaterialProdutionStatisticsJson(){ + + List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + + return JSONArray.toJSONString(mesMaterialProductionStatisticsList); + } + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:18 + * @return java.lang.String + */ + @GetMapping("/getMaterialStoreJson") + @ResponseBody + public String getMesMaterialStoreStatisticsJson(){ + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + 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 32c84d8..2d5e9bb 100644 --- a/productionboard/src/main/java/com/productionboard/controller/TankShellController.java +++ b/productionboard/src/main/java/com/productionboard/controller/TankShellController.java @@ -2,11 +2,18 @@ package com.productionboard.controller; import com.alibaba.fastjson.JSONArray; import com.productionboard.entity.BasicScadaDeviceinfo; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.service.IMesProductionDataService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import java.util.ArrayList; import java.util.List; /** @@ -19,6 +26,9 @@ import java.util.List; @RequestMapping("/tankShell") public class TankShellController { + @Autowired + private IMesProductionDataService iMesProductionDataService; + private String prefix = "tankShell/index"; @GetMapping() @@ -26,6 +36,66 @@ public class TankShellController { return prefix; } + /** + * 班组统计 + * @author WenJY + * @date 2022-06-09 16:38 + * @return java.lang.String + */ + @GetMapping("/getTeamStatisticsJson") + @ResponseBody + public String getTeamStatisticsJson(){ + List mesTeamStatisticsList = iMesProductionDataService.getMesTeamStatisticsList("1002"); + if(mesTeamStatisticsList.size()>0){ + return JSONArray.toJSONString(mesTeamStatisticsList.get(0)); + } + return JSONArray.toJSONString(new MesTeamStatistics()); + } + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:54 + * @return java.lang.String + */ + @GetMapping("/getHourProdutionJson") + @ResponseBody + public String getHourProdutionStatisticsJson(){ + List mesHourProdutionStatisticsList = iMesProductionDataService.getMesHourProdutionStatisticsList("1002"); + if(mesHourProdutionStatisticsList.size()>0){ + return JSONArray.toJSONString(mesHourProdutionStatisticsList); + } + return JSONArray.toJSONString(new ArrayList()); + } + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:06 + * @return java.lang.String + */ + @GetMapping("/getMaterialProdutionJson") + @ResponseBody + public String getMaterialProdutionStatisticsJson(){ + + List mesMaterialProductionStatisticsList = iMesProductionDataService.getMesMaterialProductionStatisticsList("1002"); + + return JSONArray.toJSONString(mesMaterialProductionStatisticsList); + } + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:18 + * @return java.lang.String + */ + @GetMapping("/getMaterialStoreJson") + @ResponseBody + public String getMesMaterialStoreStatisticsJson(){ + List mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1002"); + return JSONArray.toJSONString(mesMaterialStoreStatisticsList); + } + /** * 根据型号统计产量 * diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesHourProdutionStatistics.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesHourProdutionStatistics.java new file mode 100644 index 0000000..6052049 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesHourProdutionStatistics.java @@ -0,0 +1,33 @@ +package com.productionboard.entity.MesProduction; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 小时产量 + * @author WenJY + * @date 2022年06月09日 16:43 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_PRODUCTION_B") +public class MesHourProdutionStatistics implements Serializable { + + /** 小时数 */ + @TableField("hournumber") + private String xValue; + + /** 产量数 */ + @TableField("productionamount") + private String yValue; + + /** 工位编号 */ + @TableField("POSIONID") + private String locationNumber; +} diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java new file mode 100644 index 0000000..d423f46 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialProductionStatistics.java @@ -0,0 +1,33 @@ +package com.productionboard.entity.MesProduction; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * MES物料产量统计 + * @author WenJY + * @date 2022年06月09日 17:01 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_PRODUCTION_C") +public class MesMaterialProductionStatistics implements Serializable { + + /** 物料名称 */ + @TableField("materialname") + private String xValue; + + /** 产量数 */ + @TableField("productionamount") + private String yValue; + + /** 工位编号 */ + @TableField("POSIONID") + private String locationNumber; +} diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java new file mode 100644 index 0000000..b75fa8d --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesMaterialStoreStatistics.java @@ -0,0 +1,38 @@ +package com.productionboard.entity.MesProduction; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 库存统计 + * @author WenJY + * @date 2022年06月09日 17:10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_PRODUCTION_E") +public class MesMaterialStoreStatistics implements Serializable { + + /** 物料名称 */ + @TableField("MATERIALNAME") + private String materialName; + + /** 内胆库库存 */ + @TableField("LINERSTOREAMOUNT") + private String lineStoreAmount; + + /** 箱壳库库存 */ + @TableField("HULLSTOREAMOUNT") + private String hullStoreAmount; + + /** 工位编号 */ + @TableField("POSIONID") + private String locationNumber; + +} diff --git a/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesTeamStatistics.java b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesTeamStatistics.java new file mode 100644 index 0000000..d8f2d00 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/MesProduction/MesTeamStatistics.java @@ -0,0 +1,40 @@ +package com.productionboard.entity.MesProduction; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * @author WenJY + * @date 2022年06月09日 16:24 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("SCADA_PRODUCTION_A") +public class MesTeamStatistics implements Serializable { + + /** 班组名称 */ + @TableField("CLASSNAME") + private String className; + + /** 计划数量 */ + @TableField("PLANAMOUNT") + private String planAmount; + + /** 实际数量 */ + @TableField("ACTUALAMOUNT") + private String actualAmount; + + /** 差异值 */ + @TableField("DIFFERENCEAMOUNT") + private String differenceAmount; + + /** 工位编号 */ + @TableField("POSIONID") + private String locationNumber; +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java new file mode 100644 index 0000000..4ffc4e3 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/MesHourProdutionStatisticsMapper.java @@ -0,0 +1,13 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author WenJY + * @date 2022年06月09日 16:45 + */ +@Mapper +public interface MesHourProdutionStatisticsMapper extends BaseMapper { +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java new file mode 100644 index 0000000..7699b9d --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialProductionStatisticsMapper.java @@ -0,0 +1,13 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author WenJY + * @date 2022年06月09日 17:02 + */ +@Mapper +public interface MesMaterialProductionStatisticsMapper extends BaseMapper { +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java new file mode 100644 index 0000000..801d9fa --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/MesMaterialStoreStatisticsMapper.java @@ -0,0 +1,14 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import org.apache.ibatis.annotations.Mapper; + +/** + * MES物料库存统计 + * @author WenJY + * @date 2022年06月09日 17:14 + */ +@Mapper +public interface MesMaterialStoreStatisticsMapper extends BaseMapper{ +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java b/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java new file mode 100644 index 0000000..f91f26c --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/MesTeamStatisticsMapper.java @@ -0,0 +1,14 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import org.apache.ibatis.annotations.Mapper; + +/** + * Mes班组生产统计 + * @author WenJY + * @date 2022年06月09日 16:26 + */ +@Mapper +public interface MesTeamStatisticsMapper extends BaseMapper { +} diff --git a/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java b/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java new file mode 100644 index 0000000..cec6210 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/service/IMesProductionDataService.java @@ -0,0 +1,53 @@ +package com.productionboard.service; + +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.mapper.MesHourProdutionStatisticsMapper; + +import java.util.List; + +/** + * Mes生产数据接口 + * @author WenJY + * @date 2022年06月09日 16:27 + */ +public interface IMesProductionDataService { + + /** + * 通过工位号获取班组计划信息 + * @author WenJY + * @date 2022-06-09 16:33 + * @param locationNumber + * @return java.util.List + */ + List getMesTeamStatisticsList(String locationNumber); + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:46 + * @param locationNumber + * @return java.util.List + */ + List getMesHourProdutionStatisticsList(String locationNumber); + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:03 + * @param locationNumber + * @return java.util.List + */ + List getMesMaterialProductionStatisticsList(String locationNumber); + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:15 + * @param locationNumber + * @return java.util.List + */ + List getMesMaterialStoreStatisticsList(String locationNumber); +} diff --git a/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java new file mode 100644 index 0000000..165cb77 --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/service/impl/MesProductionDataServiceImpl.java @@ -0,0 +1,95 @@ +package com.productionboard.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.productionboard.entity.MesProduction.MesHourProdutionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; +import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; +import com.productionboard.entity.MesProduction.MesTeamStatistics; +import com.productionboard.mapper.MesHourProdutionStatisticsMapper; +import com.productionboard.mapper.MesMaterialProductionStatisticsMapper; +import com.productionboard.mapper.MesMaterialStoreStatisticsMapper; +import com.productionboard.mapper.MesTeamStatisticsMapper; +import com.productionboard.service.IMesProductionDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author WenJY + * @date 2022年06月09日 16:28 + */ +@Service +public class MesProductionDataServiceImpl implements IMesProductionDataService { + + @Autowired + private MesTeamStatisticsMapper teamStatisticsMapper; + + @Autowired + private MesHourProdutionStatisticsMapper hourProdutionStatisticsMapper; + + @Autowired + private MesMaterialProductionStatisticsMapper materialProductionStatisticsMapper; + + @Autowired + private MesMaterialStoreStatisticsMapper materialStoreStatisticsMapper; + /** + * 通过工位号获取工位信息 + * @author WenJY + * @date 2022-06-09 16:33 + * @param locationNumber + * @return java.util.List + */ + @Override + public List getMesTeamStatisticsList(String locationNumber) { + QueryWrapper wrapper = new QueryWrapper(); + wrapper.eq("POSIONID",locationNumber); + List mesTeamStatistics = teamStatisticsMapper.selectList(wrapper); + return mesTeamStatistics; + } + + /** + * 通过工位号获取MES小时产量 + * @author WenJY + * @date 2022-06-09 16:47 + * @param locationNumber + * @return java.util.List + */ + @Override + public List getMesHourProdutionStatisticsList(String locationNumber) { + QueryWrapper wrapper = new QueryWrapper(); + wrapper.eq("POSIONID",locationNumber); + List mesHourProdutionStatistics = hourProdutionStatisticsMapper.selectList(wrapper); + return mesHourProdutionStatistics; + } + + /** + * 通过工位号获取MES物料产量 + * @author WenJY + * @date 2022-06-09 17:03 + * @param locationNumber + * @return java.util.List + */ + @Override + public List getMesMaterialProductionStatisticsList(String locationNumber) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("POSIONID",locationNumber); + List mesMaterialProductionStatistics = materialProductionStatisticsMapper.selectList(wrapper); + return mesMaterialProductionStatistics; + } + + /** + * 获取MES物料库存 + * @author WenJY + * @date 2022-06-09 17:16 + * @param locationNumber + * @return java.util.List + */ + @Override + public List getMesMaterialStoreStatisticsList(String locationNumber) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("POSIONID",locationNumber); + List mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper); + return mesMaterialStoreStatistics; + } +} diff --git a/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class b/productionboard/target/classes/com/productionboard/controller/AdsorptionTankController.class index ed2c5a8..a14f7f6 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/controller/AluminumTtankController.class b/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class index dcb2778..85f4c74 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class and b/productionboard/target/classes/com/productionboard/controller/AluminumTtankController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/FoamBoxController.class b/productionboard/target/classes/com/productionboard/controller/FoamBoxController.class index 02d576c..5ce13a4 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/FoamBoxController.class and b/productionboard/target/classes/com/productionboard/controller/FoamBoxController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/PreassembleController.class b/productionboard/target/classes/com/productionboard/controller/PreassembleController.class index 2b4b644..cd4196e 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/PreassembleController.class and b/productionboard/target/classes/com/productionboard/controller/PreassembleController.class differ diff --git a/productionboard/target/classes/com/productionboard/controller/TankShellController.class b/productionboard/target/classes/com/productionboard/controller/TankShellController.class index 7829198..b237e27 100644 Binary files a/productionboard/target/classes/com/productionboard/controller/TankShellController.class and b/productionboard/target/classes/com/productionboard/controller/TankShellController.class differ