From ebf0db91e09be33fcbfe97ed5b91965dc2e61dfd Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期四, 01 八月 2024 10:54:26 +0800
Subject: [PATCH] 1. 托盘管理 2. 入库通知档导入功能 3. 工作档明细 新增来源单据类型及单据编号 4. 库存明细统计表 增加一栏ERP数量(需跟ERP确认接口实现方式)。 5. 存货档案、单据管理、库存管理可以支持模糊搜索(各个单据界面)。
---
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java | 66 +++++++++++++++++++--------------
1 files changed, 38 insertions(+), 28 deletions(-)
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java
index fe051e7..858b673 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/MobileServiceImpl.java
@@ -99,6 +99,8 @@
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
waitPakin.setModiTime(now);
+ waitPakin.setFullPlt(param.getFullPlt());
+ waitPakin.setOwner(param.getOwner());
if (!waitPakinService.save(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
@@ -124,6 +126,9 @@
}
DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ detlDto.setWarehouse(orderDetl.getThreeCode());//鏉ユ簮浠撳簱
+ detlDto.setOrigin(orderDetl.getSupp());//鏉ユ簮鍗曞彿
+ detlDto.setOriginNo(orderDetl.getSuppCode());//鏉ユ簮搴忓彿
if (DetlDto.has(detlDtos, detlDto)) {
DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
assert one != null;
@@ -144,11 +149,15 @@
waitPakin.setZpallet(param.getBarcode()); // 鎵樼洏鐮�
waitPakin.setIoStatus("N"); // 鍏ュ嚭鐘舵��
waitPakin.setAnfme(detlDto.getAnfme()); // 鏁伴噺
+ waitPakin.setThreeCode(detlDto.getWarehouse()); // 浠撳簱
+ waitPakin.setSupp(detlDto.getOrigin()); // 鏉ユ簮鍗曞彿
+ waitPakin.setSuppCode(detlDto.getOriginNo()); // 鏉ユ簮搴忓彿
waitPakin.setStatus("Y"); // 鐘舵��
waitPakin.setAppeUser(userId);
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
waitPakin.setModiTime(now);
+ waitPakin.setOwner(param.getOwner());
if (!waitPakinService.save(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
@@ -239,7 +248,7 @@
@Transactional
public R WarehouseIn(String locNo, String barcode,Long hostId) {
//鍒ゆ柇搴撲綅鐘舵��
- LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, locNo).eq(LocMast::getHostId,hostId));
+ LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, locNo).eq(LocMast::getHostId,hostId).eq(LocMast::getWhsType,1L));
if (Cools.isEmpty(locMast)){
return R.error("璇ュ簱浣嶄笉瀛樺湪");
}
@@ -305,9 +314,10 @@
}
@Override
+ @Transactional
public R WarehouseOut(CombParam combParam, Long hostId) {
//鍒ゆ柇搴撲綅鐘舵��
- LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, combParam.getLocno()).eq(LocMast::getHostId,hostId));
+ LocMast locMast = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, combParam.getLocno()).eq(LocMast::getHostId,hostId).eq(LocMast::getWhsType,1L));
if (Cools.isEmpty(locMast)){
return R.error("璇ュ簱浣嶄笉瀛樺湪");
}
@@ -329,6 +339,32 @@
if (combMat.getAnfme() > locDetl.getAnfme()){
return R.error("涓嬫灦鏁伴噺閿欒锛岃秴鍑哄簱瀛樻暟閲�");
}
+ if (!Cools.isEmpty(combParam.getOrderNo())){
+ Order order = orderService.selectByNo(combParam.getOrderNo(), hostId);
+ if (Cools.isEmpty(order)){
+ continue;
+ }
+ if (order.getSettle() == 1){
+ orderService.updateSettle(order.getId(), 2L, 9527L, hostId);
+ }
+ OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), combMat.getMatnr(), combMat.getBatch(),hostId);
+ if (Cools.isEmpty(orderDetl)){
+ continue;
+ }
+ if (orderDetl.getAnfme() < orderDetl.getWorkQty()+combMat.getAnfme()){
+ throw new CoolException("涓嬫灦鏁伴噺鍑洪敊");
+ }
+ // 淇敼璁㈠崟鏄庣粏浣滀笟鏁伴噺
+ if (!orderDetlService.increaseWorkQtyByOrderNo(combParam.getOrderNo(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), hostId)) {
+ throw new CoolException("淇敼鍗曟嵁鏄庣粏宸ヤ綔鏁伴噺澶辫触");
+ }
+ // 淇敼璁㈠崟鏄庣粏瀹屾垚鏁伴噺
+ if (!orderDetlService.increase(order.getId(), hostId, combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme())) {
+ throw new CoolException("淇敼鍗曟嵁鏄庣粏瀹屾垚鏁伴噺澶辫触");
+ }
+ // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴�
+ orderService.checkComplete(combParam.getOrderNo(), hostId);
+ }
try {
//澶勭悊搴撳瓨淇℃伅
if (combMat.getAnfme().equals(locDetl.getAnfme())){
@@ -348,32 +384,6 @@
}catch (Exception e){
throw new CoolException("鏇存柊搴撳瓨鏁版嵁鍑洪敊"+e.getMessage());
}
-
- if (!Cools.isEmpty(combParam.getOrderNo())){
- Order order = orderService.selectByNo(combParam.getOrderNo(), hostId);
- if (Cools.isEmpty(order)){
- continue;
- }
- OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), combMat.getMatnr(), combMat.getBatch(),hostId);
- if (Cools.isEmpty(orderDetl)){
- continue;
- }
- if (orderDetl.getWorkQty() < orderDetl.getWorkQty()+combMat.getAnfme()){
- throw new CoolException("涓嬫灦鏁伴噺鍑洪敊");
- }
- // 淇敼璁㈠崟鏄庣粏浣滀笟鏁伴噺
- if (!orderDetlService.increaseWorkQtyByOrderNo(combParam.getOrderNo(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), hostId)) {
- throw new CoolException("淇敼鍗曟嵁鏄庣粏宸ヤ綔鏁伴噺澶辫触");
- }
- // 淇敼璁㈠崟鏄庣粏瀹屾垚鏁伴噺
- if (!orderDetlService.increase(order.getId(), hostId, combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme())) {
- throw new CoolException("淇敼鍗曟嵁鏄庣粏瀹屾垚鏁伴噺澶辫触");
- }
- // 淇敼璁㈠崟鐘舵�� 浣滀笟涓� ===>> 宸插畬鎴�
- orderService.checkComplete(combParam.getOrderNo(), hostId);
- }
-
-
}
--
Gitblit v1.9.1