From 6537852996b96fe731bea1d3c5d4788d43897335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E9=9B=AA=E4=BC=9F?= Date: Thu, 21 Nov 2024 10:18:09 +0800 Subject: [PATCH] =?UTF-8?q?2,3,5=E6=A5=BC=E4=BB=93=E5=82=A8=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FifthWmsBorderController.java | 34 ++++++++ .../controller/SecondWmsBorderController.java | 64 +++++++++++++++ .../controller/ThirdWmsBorderController.java | 41 ++++++++++ .../wms/board/domain/RecordIotenvInstant.java | 24 ++++++ .../board/service/FifthWmsBorderService.java | 18 +++++ .../board/service/SecondWmsBorderService.java | 26 ++++++ .../board/service/ThirdWmsBorderService.java | 15 ++++ .../impl/FifthWmsBoardServiceImpl.java | 71 +++++++++++++++++ .../impl/SecondWmsBoardServiceImpl.java | 79 +++++++++++++++++++ .../impl/ThirdWmsBorderServiceImpl.java | 46 +++++++++++ .../com/hw/wms/domain/WmsProductInstock.java | 8 ++ .../hw/wms/mapper/WmsBaseLocationMapper.java | 5 ++ .../wms/mapper/WmsProductInstockMapper.java | 1 + .../wms/mapper/WmsProductOutstockMapper.java | 2 + .../hw/wms/mapper/WmsProductStockMapper.java | 29 ++++++- .../hw/wms/mapper/WmsRawInstockMapper.java | 8 ++ .../hw/wms/mapper/WmsRawOutstockMapper.java | 7 ++ .../com/hw/wms/mapper/WmsRawStockMapper.java | 1 + .../mapper/wms/WmsBaseLocationMapper.xml | 19 +++++ .../mapper/wms/WmsProductInstockMapper.xml | 10 +++ .../mapper/wms/WmsProductOutstockMapper.xml | 10 +++ .../mapper/wms/WmsProductStockMapper.xml | 62 +++++++++++++++ .../mapper/wms/WmsRawInstockMapper.xml | 19 +++++ .../mapper/wms/WmsRawOutstockMapper.xml | 21 +++++ .../mapper/wms/WmsRawStockMapper.xml | 11 +++ 25 files changed, 629 insertions(+), 2 deletions(-) create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/FifthWmsBorderController.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/SecondWmsBorderController.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/domain/RecordIotenvInstant.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/FifthWmsBorderService.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/SecondWmsBorderService.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/ThirdWmsBorderService.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/SecondWmsBoardServiceImpl.java create mode 100644 hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/FifthWmsBorderController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/FifthWmsBorderController.java new file mode 100644 index 0000000..13606d5 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/FifthWmsBorderController.java @@ -0,0 +1,34 @@ +package com.hw.wms.board.controller; + + +import com.hw.common.core.web.domain.AjaxResult; +import com.hw.wms.board.service.FifthWmsBorderService; +import com.hw.wms.board.service.SecondWmsBorderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/FifthWmsBorder") +public class FifthWmsBorderController { + @Autowired + private FifthWmsBorderService fifthWmsBorderService; + + /** + * 五楼库存数量 + */ + @GetMapping("/locationCount") + public AjaxResult locationCount(){ + return AjaxResult.success(fifthWmsBorderService.locationCount()); + } + /** + * 库存饼状图 + */ + @GetMapping("fifthPanake") + public AjaxResult fifthPanake(){ + return AjaxResult.success(fifthWmsBorderService.fifthPanake()); + } + + +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/SecondWmsBorderController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/SecondWmsBorderController.java new file mode 100644 index 0000000..f3df0b6 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/SecondWmsBorderController.java @@ -0,0 +1,64 @@ +package com.hw.wms.board.controller; + + +import com.hw.common.core.web.domain.AjaxResult; +import com.hw.wms.board.service.SecondWmsBorderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/SecondWmsBorder") +public class SecondWmsBorderController { + @Autowired + private SecondWmsBorderService secondWmsBorderService; + + /** + * 库存总量统计 + * @return + */ + @GetMapping("/totalStock") + public AjaxResult totalStock(){ + return AjaxResult.success(secondWmsBorderService.totalStock()); + } + /** + * 库位原理统计 + */ + @GetMapping("/locationCount") + public AjaxResult locationCount(){ + return AjaxResult.success(secondWmsBorderService.locationCount()); + } + /** + * 任务编号 + */ + @GetMapping("/tableInfo") + public AjaxResult tableInfo(){ + return AjaxResult.success(secondWmsBorderService.tableInfo()); + } + /** + * 库存变化折线图 + */ + @GetMapping("/inAndOutStockInfo") + public AjaxResult inAndOutStockInfo(){ + return AjaxResult.success(secondWmsBorderService.inAndOutStockInfo()); + } + + /** + * 入库时段统计 + * @return + */ + @GetMapping("/instockTimeCount") + public AjaxResult instockTimeCount(){ + return AjaxResult.success(secondWmsBorderService.instockTimeCount()); + } + + /** + * 当日入库量 + * @return + */ + @GetMapping("/todayInstockAmount") + public AjaxResult todayInstockAmount(){ + return AjaxResult.success(secondWmsBorderService.todayInstockAmount()); + } +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java new file mode 100644 index 0000000..d1ad3de --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java @@ -0,0 +1,41 @@ +package com.hw.wms.board.controller; + + +import com.hw.common.core.web.domain.AjaxResult; +import com.hw.wms.board.service.SecondWmsBorderService; +import com.hw.wms.board.service.ThirdWmsBorderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/ThirdWmsBorder") +public class ThirdWmsBorderController { + + @Autowired + private ThirdWmsBorderService thirdWmsBorderService; + + /** + * 单月原材料出入库统计 + */ + @GetMapping("/monthRawAmount") + public AjaxResult monthRawAmount(){ + return AjaxResult.success(thirdWmsBorderService.monthRawAmount()); + } + /** + * 三楼仓库库位状态 + */ + @GetMapping("/locationStatus") + public AjaxResult locationStatus(){ + return AjaxResult.success(thirdWmsBorderService.locationStatus()); + } + /** + * 生产计划 + */ + @GetMapping("/productPlan") + public AjaxResult productPlan(){ + return AjaxResult.success(thirdWmsBorderService.productPlan()); + } + +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/domain/RecordIotenvInstant.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/domain/RecordIotenvInstant.java new file mode 100644 index 0000000..6e12d2d --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/domain/RecordIotenvInstant.java @@ -0,0 +1,24 @@ +package com.hw.wms.board.domain; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class RecordIotenvInstant { + private Long objId; + private String monitorId; + private BigDecimal tempreture; + private BigDecimal humidity; + private BigDecimal illuminance; + private BigDecimal noise; + private BigDecimal concentration; + private BigDecimal pm1; + private BigDecimal pm2; + private BigDecimal pm10; + private BigDecimal standBy; + private Date collectTime; + private Date recodeTime; + +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/FifthWmsBorderService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/FifthWmsBorderService.java new file mode 100644 index 0000000..9320815 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/FifthWmsBorderService.java @@ -0,0 +1,18 @@ +package com.hw.wms.board.service; + + +import com.hw.wms.domain.WmsProductInstock; +import com.hw.wms.domain.WmsProductOutstockDetail; +import com.hw.wms.domain.WmsProductStock; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +public interface FifthWmsBorderService { + + + Map locationCount(); + + Map fifthPanake(); +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/SecondWmsBorderService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/SecondWmsBorderService.java new file mode 100644 index 0000000..36f8e47 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/SecondWmsBorderService.java @@ -0,0 +1,26 @@ +package com.hw.wms.board.service; + + +import com.hw.wms.domain.WmsProductInstock; +import com.hw.wms.domain.WmsProductOutstock; +import com.hw.wms.domain.WmsProductOutstockDetail; +import com.hw.wms.domain.WmsProductStock; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +public interface SecondWmsBorderService { + + List totalStock(); + + Map locationCount(); + + List tableInfo(); + + List inAndOutStockInfo(); + + Map instockTimeCount(); + + BigDecimal todayInstockAmount(); +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/ThirdWmsBorderService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/ThirdWmsBorderService.java new file mode 100644 index 0000000..712e5d5 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/ThirdWmsBorderService.java @@ -0,0 +1,15 @@ +package com.hw.wms.board.service; + +import com.hw.wms.domain.WmsBaseLocation; +import com.hw.wms.domain.WmsRawOutstock; + +import java.util.List; +import java.util.Map; + +public interface ThirdWmsBorderService { + Map monthRawAmount(); + + List locationStatus(); + + List productPlan(); +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java new file mode 100644 index 0000000..cec2f26 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java @@ -0,0 +1,71 @@ +package com.hw.wms.board.service.impl; + +import com.hw.wms.board.service.FifthWmsBorderService; +import com.hw.wms.board.service.SecondWmsBorderService; +import com.hw.wms.domain.*; +import com.hw.wms.mapper.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class FifthWmsBoardServiceImpl implements FifthWmsBorderService { + @Autowired + private WmsProductStockMapper wmsProductStockMapper; + @Autowired + private WmsRawInstockMapper wmsRawInstockMapper; + @Autowired + private WmsRawOutstockMapper wmsRawOutstockMapper; + @Autowired + private WmsProductInstockMapper wmsProductInstockMapper; + @Autowired + private WmsProductOutstockMapper wmsProductOutstockMapper; + @Autowired + private WmsRawStockMapper wmsRawStockMapper; + @Autowired + private WmsBaseLocationMapper wmsBaseLocationMapper; + + + @Override + public Map locationCount() { + HashMap map = new HashMap<>(); + List list = wmsRawInstockMapper.locationCount(); + List list1 = wmsRawOutstockMapper.locationCount(); + List list2 = wmsProductInstockMapper.locationCount(); + List list3 = wmsProductOutstockMapper.locationCount(); + for (WmsProductInstock wmsProductInstock : list) { + if (wmsProductInstock.getWarehouseId()==511){ + map.put("rawInStock",wmsProductInstock.getInstockAmount()); + } + if (wmsProductInstock.getWarehouseId()==512){ + map.put("furawInStock",wmsProductInstock.getInstockAmount()); + } + } + map.put("rawOutStock",list1.get(0).getOutstockAmount()); + map.put("productInStock",list2.get(0).getInstockAmount()); + map.put("productOutStock",list3.get(0).getOutstockQty()); + return map; + } + + @Override + public Map fifthPanake() { + List wmsRawStocks = wmsRawStockMapper.selectRawLocationPercentage(); + List productStocks = wmsProductStockMapper.selectProductStockPercentage(); + Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation(); + Integer allLocation = wmsBaseLocationMapper.selectAllLocation(); + BigDecimal emptyLocationPercentage = new BigDecimal(emptyLocationCount).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP); + Integer oppylLocation = allLocation - emptyLocationCount; + BigDecimal opplyLocationPercentage = new BigDecimal(oppylLocation).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP); + HashMap map = new HashMap<>(); + map.put("wmsRawStocks",wmsRawStocks); + map.put("productStocks",productStocks); + map.put("emptyLocationPercentage",emptyLocationPercentage); + map.put("opplyLocationPercentage",opplyLocationPercentage); + return map; + } +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/SecondWmsBoardServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/SecondWmsBoardServiceImpl.java new file mode 100644 index 0000000..d801a8e --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/SecondWmsBoardServiceImpl.java @@ -0,0 +1,79 @@ +package com.hw.wms.board.service.impl; + +import com.hw.wms.board.service.SecondWmsBorderService; +import com.hw.wms.domain.WmsProductInstock; +import com.hw.wms.domain.WmsProductOutstock; +import com.hw.wms.domain.WmsProductOutstockDetail; +import com.hw.wms.domain.WmsProductStock; +import com.hw.wms.mapper.WmsProductStockMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class SecondWmsBoardServiceImpl implements SecondWmsBorderService { + @Autowired + private WmsProductStockMapper wmsProductStockMapper; + + @Override + public List totalStock() { + return wmsProductStockMapper.totalStock(); + } + + @Override + public BigDecimal todayInstockAmount() { + BigDecimal result = wmsProductStockMapper.todayInstockAmount(); + return result; + } + + @Override + public Map instockTimeCount() { + HashMap result = new HashMap<>(); + int oneWeekCount = wmsProductStockMapper.selectOneWeek(); + int twoWeekCount = wmsProductStockMapper.selectTwoWeek(); + int oneMonthCount = wmsProductStockMapper.selectOneMonth(); + int halfYearCount = wmsProductStockMapper.selectHalfYear(); + result.put("oneWeekCount",oneWeekCount); + result.put("twoWeekCount",twoWeekCount); + result.put("oneMonthCount",oneMonthCount); + result.put("halfYearCount",halfYearCount); + return result; + } + + @Override + public List inAndOutStockInfo() { + List instocks = wmsProductStockMapper.selectInStock(); + List outstocks = wmsProductStockMapper.selectOutStock(); + Map> map = outstocks.stream().collect(Collectors.groupingBy(WmsProductOutstock::getProductId)); + for (WmsProductInstock instock : instocks) { + WmsProductOutstock wmsProductOutstock = map.get(instock.getProductId()).get(0); + instock.setOutStockAmount(wmsProductOutstock.getOutstockQty()); + } + return instocks; + } + + @Override + public List tableInfo() { + return wmsProductStockMapper.tableInfo(); + } + + @Override + public Map locationCount() { + int availibleLocation = wmsProductStockMapper.selectAvailibleLocation(); + int toatlLocation = wmsProductStockMapper.selectTotalLocation(); + int opplyLocation = wmsProductStockMapper.selectOpplyLocation(); + HashMap result = new HashMap<>(); + BigDecimal bigDecimal = new BigDecimal(toatlLocation); + BigDecimal availibleRate = new BigDecimal(availibleLocation).divide(bigDecimal, 2, BigDecimal.ROUND_HALF_UP); + BigDecimal opplyRate = new BigDecimal(opplyLocation).divide(bigDecimal, 2, BigDecimal.ROUND_HALF_UP); + result.put("availibleRate",availibleRate); + result.put("opplyRate",opplyRate); + return result; + } +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java new file mode 100644 index 0000000..70f1762 --- /dev/null +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java @@ -0,0 +1,46 @@ +package com.hw.wms.board.service.impl; + +import com.hw.wms.board.service.ThirdWmsBorderService; +import com.hw.wms.domain.WmsBaseLocation; +import com.hw.wms.domain.WmsRawOutstock; +import com.hw.wms.mapper.WmsBaseLocationMapper; +import com.hw.wms.mapper.WmsRawInstockMapper; +import com.hw.wms.mapper.WmsRawOutstockMapper; +import org.springframework.beans.factory.annotation.Autowired; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ThirdWmsBorderServiceImpl implements ThirdWmsBorderService { + @Autowired + private WmsRawInstockMapper wmsRawInstockMapper; + @Autowired + private WmsRawOutstockMapper wmsRawOutstockMapper; + @Autowired + private WmsBaseLocationMapper wmsBaseLocationMapper; + + @Override + public Map monthRawAmount() { + BigDecimal monthRawInAmount = wmsRawInstockMapper.monthRawInAmount(); + BigDecimal monthRawOutAmount = wmsRawOutstockMapper.monthRawOutAmount(); + HashMap hashMap = new HashMap(); + hashMap.put("monthRawInAmount",monthRawInAmount); + hashMap.put("monthRawOutAmount",monthRawOutAmount); + return hashMap; + } + + @Override + public List productPlan() { + return wmsRawOutstockMapper.productPlan(); + + } + + @Override + public List locationStatus() { + List list = wmsBaseLocationMapper.locationStatus(); + return list; + } + +} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductInstock.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductInstock.java index e713c56..ab3c54f 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductInstock.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductInstock.java @@ -172,6 +172,8 @@ public class WmsProductInstock extends BaseEntity { @Excel(name = "同步给ERP的数量") private BigDecimal erpAmount; + private BigDecimal outStockAmount; + /** * 成品入库记录明细信息 */ @@ -189,7 +191,13 @@ public class WmsProductInstock extends BaseEntity { private String materialSpec; + public BigDecimal getOutStockAmount() { + return outStockAmount; + } + public void setOutStockAmount(BigDecimal outStockAmount) { + this.outStockAmount = outStockAmount; + } public BigDecimal getPrice() { return price; } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsBaseLocationMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsBaseLocationMapper.java index cdf2ef8..15feba8 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsBaseLocationMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsBaseLocationMapper.java @@ -92,4 +92,9 @@ public interface WmsBaseLocationMapper */ public int selectCountOfWmsBaseLocation(WmsBaseLocation wmsBaseLocation); + int selectEmptyLocation(); + + int selectAllLocation(); + + List locationStatus(); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductInstockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductInstockMapper.java index dfd1392..e898821 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductInstockMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductInstockMapper.java @@ -99,4 +99,5 @@ public interface WmsProductInstockMapper */ List selectWmsProductInstockJoinList(WmsProductInstock wmsProductInstock); + List locationCount(); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductOutstockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductOutstockMapper.java index 7a8ecaa..af4356d 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductOutstockMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductOutstockMapper.java @@ -141,4 +141,6 @@ public interface WmsProductOutstockMapper * @return */ WmsProductOutstock selectGetProductOutstockAuditByProductOutstockId(Long productOutstockId); + + List locationCount(); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java index 8fad0d3..64e8d50 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java @@ -2,8 +2,8 @@ package com.hw.wms.mapper; import java.math.BigDecimal; import java.util.List; -import com.hw.wms.domain.WmsProductStock; -import com.hw.wms.domain.WmsRawStock; + +import com.hw.wms.domain.*; import org.apache.ibatis.annotations.Param; /** @@ -132,4 +132,29 @@ public interface WmsProductStockMapper public List selectWmsProductStocks4Transfer(WmsProductStock wmsProductStock); + List selectProductStockPercentage(); + + List totalStock(); + + BigDecimal todayInstockAmount(); + + int selectOneWeek(); + + int selectTwoWeek(); + + int selectOneMonth(); + + int selectHalfYear(); + + List selectInStock(); + + List selectOutStock(); + + List tableInfo(); + + int selectAvailibleLocation(); + + int selectTotalLocation(); + + int selectOpplyLocation(); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawInstockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawInstockMapper.java index d7e1f54..63e0d08 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawInstockMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawInstockMapper.java @@ -1,6 +1,9 @@ package com.hw.wms.mapper; +import java.math.BigDecimal; import java.util.List; + +import com.hw.wms.domain.WmsProductInstock; import com.hw.wms.domain.WmsRawInstock; /** @@ -84,4 +87,9 @@ public interface WmsRawInstockMapper * @return */ public List selectWmsRawInstockERPNotSynchronized(WmsRawInstock wmsRawInstock); + + List locationCount(); + + + BigDecimal monthRawInAmount(); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawOutstockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawOutstockMapper.java index 57c3386..4c171af 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawOutstockMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawOutstockMapper.java @@ -1,5 +1,6 @@ package com.hw.wms.mapper; +import java.math.BigDecimal; import java.util.List; import com.hw.wms.domain.WmsRawOutstock; import com.hw.wms.domain.WmsRawOutstockDetail; @@ -153,4 +154,10 @@ public interface WmsRawOutstockMapper * @return */ List selectWmsRawOutstockERPNotSynchronized(WmsRawOutstock rawOutstock); + + List locationCount(); + + BigDecimal monthRawOutAmount(); + + List productPlan(); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawStockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawStockMapper.java index 585c634..77cff8b 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawStockMapper.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsRawStockMapper.java @@ -127,4 +127,5 @@ public interface WmsRawStockMapper { */ public List selectAutoOutstockRawStockList(@Param("materialId") Long materialId, @Param("poNo") String poNo); + List selectRawLocationPercentage(); } diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml index b5d1f1f..492469a 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml @@ -299,6 +299,25 @@ order by location_code + + + diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductInstockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductInstockMapper.xml index 6022709..03367eb 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductInstockMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductInstockMapper.xml @@ -296,4 +296,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by wpi.apply_date desc + diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml index 7a82777..565238e 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductOutstockMapper.xml @@ -398,6 +398,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join mes_base_material_info mbmi on wro.product_id = mbmi.material_id where wro.product_outstock_id = #{productOutstockId} + update wms_product_outstock diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml index bfa9bd0..0b54963 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml @@ -340,6 +340,68 @@ order by wbl.loc_column asc, wbl.loc_deep desc limit #{params.limit} + + + + + + + + + + + + +