From b6a5504ce64f508391a460dc81f8fd288d9f3722 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 06 七月 2024 17:09:27 +0800
Subject: [PATCH] # 换板绑定
---
src/main/java/com/zy/asrs/controller/MobileController.java | 65 ++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java
index c771051..0360fb2 100644
--- a/src/main/java/com/zy/asrs/controller/MobileController.java
+++ b/src/main/java/com/zy/asrs/controller/MobileController.java
@@ -51,6 +51,8 @@
private WaitMatchkService waitMatchkService;
@Autowired
private MatCodeService matCodeService;
+ @Autowired
+ private WrkMastService wrkMastService;
/**
* 缁勬墭
@@ -130,6 +132,20 @@
return R.parse(BaseRes.PARAM);
}
+ // 鎷f枡妫�绱㈡墭鐩樹俊鎭�
+ @RequestMapping("/piking/auth")
+ @ManagerAuth
+ public R pikingAuth(String barcode) {
+ WrkMast wrkMast = wrkMastService.selectByBarcode(barcode);
+ if (Cools.isEmpty(wrkMast)) {
+ throw new CoolException(barcode + "鏆傛棤宸ヤ綔妗�");
+ }
+ if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 107){
+ throw new CoolException(barcode + "涓嶄负鎷f枡/鐩樼偣鍑哄簱");
+ }
+ List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo());
+ return R.ok().add(wrkDetls);
+ }
/**
* 鏍规嵁搴撲綅鍙锋煡鎵惧簱瀛樻槑缁�
*/
@@ -273,4 +289,53 @@
}
return R.ok().add(flag);
}
+
+ // 鎷f枡杞叏鏉�
+ // sBarcode 鍘熸墭鐩樼爜 tBarcode 杞崲鎵樼洏鐮�
+ @RequestMapping("/piking/to/full")
+ @ManagerAuth
+ @Transactional
+ public R pikingToFull(String sBarcode,String tBarcode) {
+ // 妫�鏌ヨ浆鎹㈡墭鐩樼爜鏄惁鍦ㄥ簱
+ List<LocDetl> locDetls = locDetlService.selectByZpallet(tBarcode);
+ if (!Cools.isEmpty(locDetls)) {
+ throw new CoolException("闇�瑕佽浆鎹㈢殑鎵樼洏宸茶浣跨敤,璇锋洿鎹㈡墭鐩橈紒");
+ }
+ WrkMast twrkMast = wrkMastService.selectByBarcode(tBarcode);
+ if (!Cools.isEmpty(twrkMast)) {
+ throw new CoolException("闇�瑕佽浆鎹㈢殑鎵樼洏宸茶浣跨敤,璇锋洿鎹㈡墭鐩橈紒");
+ }
+ LocMast tlocMast = locMastService.selectByBarcode(tBarcode);
+ if (!Cools.isEmpty(tlocMast)) {
+ throw new CoolException("闇�瑕佽浆鎹㈢殑鎵樼洏宸茶浣跨敤,璇锋洿鎹㈡墭鐩橈紒");
+ }
+ WrkDetl twrkDetl = wrkDetlService.selectByZpallet0(tBarcode);
+ if (!Cools.isEmpty(twrkDetl)) {
+ throw new CoolException("闇�瑕佽浆鎹㈢殑鎵樼洏宸茶浣跨敤,璇锋洿鎹㈡墭鐩橈紒");
+ }
+// 淇敼宸ヤ綔妗f墭鐩樼爜
+ WrkMast wrkMast = wrkMastService.selectByBarcode(sBarcode);
+ List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo());
+ for (WrkDetl wrkDetl : wrkDetls) {
+ //++++
+ wrkDetlService.updateBarcode(sBarcode,tBarcode,wrkDetl.getSupplier());
+ }
+
+ if (Cools.isEmpty(wrkMast)) {
+ throw new CoolException("璇风‘璁ゆ墭鐩樼爜锛�");
+ }
+// 淇敼搴撳瓨鏄庣粏妗f墭鐩樼爜
+ List<LocDetl> locDetls1 = locDetlService.selectByZpallet(sBarcode);
+ for (LocDetl locDetl : locDetls1) {
+ //++++
+ locDetlService.updateZpallet(sBarcode,tBarcode,locDetl.getSupplier());
+ }
+// 淇敼宸ヤ綔涓绘。鏉$爜
+ wrkMast.setBarcode(tBarcode);
+ wrkMastService.updateById(wrkMast);
+ LocMast locMast = locMastService.selectByBarcode(sBarcode);
+ locMast.setBarcode(tBarcode);
+ locMastService.updateById(locMast);
+ return R.ok("杞崲鎴愬姛");
+ }
}
--
Gitblit v1.9.1