From 9db6b4c55b96998676c46d7f787d97b8637cd865 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期三, 26 十一月 2025 14:10:35 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/MobileController.java | 280 ++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 214 insertions(+), 66 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java
index cd6085b..e10b4c3 100644
--- a/src/main/java/com/zy/asrs/controller/MobileController.java
+++ b/src/main/java/com/zy/asrs/controller/MobileController.java
@@ -9,20 +9,19 @@
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
-import com.zy.asrs.entity.param.CombParam;
-import com.zy.asrs.entity.param.MobileAdjustParam;
-import com.zy.asrs.entity.param.OffSaleParam;
+import com.zy.asrs.entity.param.*;
import com.zy.asrs.entity.result.MobileAdjustResult;
import com.zy.asrs.mapper.ManLocDetlMapper;
import com.zy.asrs.service.*;
+import com.zy.asrs.utils.OrderInAndOutUtil;
import com.zy.common.model.WrkDto;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
import java.util.*;
-import java.util.List;
/**
* 绉诲姩绔帴鍙f帶鍒跺櫒
@@ -39,10 +38,6 @@
@Autowired
private LocDetlService locDetlService;
@Autowired
- private OrderService orderService;
- @Autowired
- private OrderDetlService orderDetlService;
- @Autowired
private DocTypeService docTypeService;
@Autowired
private WrkMastService wrkMastService;
@@ -54,7 +49,74 @@
private PackService packService;
@Autowired
private ManLocDetlMapper manLocDetlMapper;
+ @Autowired
+ private WrkDetlLogService wrkDetlLogService;
+ @Resource
+ private StaDescService staDescService;
+
+ @RequestMapping("/pda/WarehouseOut/v1")
+ @ManagerAuth(memo = "骞舵澘閫斾腑鎷f枡-鍙傝�冨康鍒�")
+ public R WarehouseOutV1(@RequestBody CombParam combParam) {
+ return mobileService.WarehouseOutV1(combParam, getHostId(), getUserId());
+ }
+
+ @RequestMapping("/pda/WarehouseOutPickMerge/v1")
+ @ManagerAuth(memo = "鎷f枡閫斾腑骞舵澘")
+ public R WarehouseOutPickMergeV1(@RequestBody WarehouseOutPickMergeParam param) {
+ if (Cools.isEmpty(param,param.getLocNo(),param.getBarcode(),param.getCombMats())) {
+ return R.parse("鍙傛暟涓嶈兘涓虹┖锛�");
+ }
+ return mobileService.WarehouseOutPickMergeV1(param, getHostId(), getUserId());
+ }
+
+ @RequestMapping("/pick/in")
+ @ManagerAuth(memo = "骞舵澘鍏ュ簱")
+ public R pickConfirm(@RequestBody PickConfirmParam param) {
+
+ if(Cools.isEmpty(param,param.getList(),param.getLocNo(),param.getStaNo())) {
+ return R.parse("鍙傛暟涓嶅畬鏁�");
+ }
+ return mobileService.pickConfirm(param, getUserId());
+ }
+
+ @RequestMapping("/barcode/list/all")
+ @ManagerAuth(memo = "骞舵澘鍏ュ簱閫斾腑鎷f枡鍑哄簱鑾峰彇浠诲姟淇℃伅")
+ public R orderOutListOrder(@RequestParam(required = false) String barcode) {
+ return mobileService.orderOutListOrder(barcode, getUserId());
+ }
+
+ @RequestMapping("/barcode/list/pick")
+ @ManagerAuth(memo = "鎷f枡鍏ュ簱閫斾腑骞舵澘鑾峰彇浠诲姟淇℃伅")
+ public R orderOutListOrderPick(@RequestParam(required = false) String barcode) {
+ return mobileService.orderOutListOrderPick(barcode, getUserId());
+ }
+
+ @RequestMapping("/loc/f/list")
+ @ManagerAuth(memo = "鑾峰彇鍦ㄥ簱搴撲綅")
+ public R locNoF(@RequestParam(required = false) String locNo) {
+ Wrapper<LocMast> wrapper = new EntityWrapper<LocMast>()
+ .eq("loc_sts", "F");
+ if (!Cools.isEmpty(locNo)) {
+ wrapper.like("loc_no", locNo);
+ }
+ List<LocMast> list = locMastService.selectList(wrapper);
+ return R.ok().add(list);
+ }
+
+ @RequestMapping("/pick/sta/list")
+ @ManagerAuth(memo = "鑾峰彇骞舵澘绔�")
+ public R pickSta() {
+ List<StaDesc> list = staDescService.selectList(new EntityWrapper<StaDesc>()
+ .eq("type_no", 104));
+ return R.ok().add(list);
+ }
+
+ @RequestMapping("/pick/mat/list")
+ @ManagerAuth(memo = "鑾峰彇骞舵澘鐗╂枡")
+ public R pickMats(@RequestParam(required = false) String matnr, @RequestParam(required = false) String orderNo) {
+ return mobileService.pickMats(matnr, orderNo);
+ }
// 鍟嗗搧涓婃灦
@RequestMapping("/mat/onSale/auth")
@@ -71,82 +133,133 @@
return R.ok("涓嬫灦鎴愬姛");
}
-
-
- // 缁勬墭 ----------------------------------------------------------------------------------------------------
-
- /**
- * 鏍规嵁鍗曞彿妫�绱㈠崟鎹暟鎹�
- * http://localhost:8081/jkwms/mobile/order/serach/orderNo/auth?orderNo=123123
- */
-// @RequestMapping("/order/search/orderNo/auth")
-// @ManagerAuth
-// public R orderSearchByBarcode(@RequestParam String orderNo){
-// Order order = orderService.selectByNo(orderNo);
-// if (order == null) {
-// return R.ok();
-// }
-// DocType docType = docTypeService.selectById(order.getDocType());
-// if (docType.getPakin() == null || docType.getPakin() != 1) {
-// return R.ok();
-// }
-// if (order.getSettle() > 2) {
-// return R.ok();
-// }
-// List<OrderDetl> orderDetls = orderService.selectWorkingDetls(order.getId());
-// if (Cools.isEmpty(orderDetls)) {
-// return R.ok();
-// }
-// return R.ok().add(orderDetls);
-// }
@RequestMapping("/order/search/orderNo/auth")
@ManagerAuth
public R orderSearchByBarcode(@RequestParam String orderNo){
if (Cools.isEmpty(orderNo)){
- orderNo=null;
+ orderNo = null;
}
- List<Order> orders = orderService.selectorderNoL(orderNo);
+
+ List<Order> orders = OrderInAndOutUtil.selectOrderNoL(null, orderNo);
if (Cools.isEmpty(orders)){
- return R.ok();
+ return R.ok().add(new LinkedList<>());
}
+
LinkedList<CombParam> combParams = new LinkedList<>();
- if (!Cools.isEmpty(orders)){
- for (Order order:orders){
- CombParam combParam=new CombParam();
- if (order == null) {
- continue;
- }
- DocType docType = docTypeService.selectById(order.getDocType());
- if (docType.getPakin() == null || docType.getPakin() != 1) {
- return R.ok();
- }
- if (order.getSettle() > 2) {
- return R.ok();
- }
- List<OrderDetl> orderDetls = orderService.selectWorkingDetls(order.getId());
- if (!Cools.isEmpty(orderDetls)) {
- LinkedList<CombParam.CombMat> combMats = new LinkedList<>();
- for (OrderDetl orderDetl:orderDetls){
- CombParam.CombMat combMat = new CombParam.CombMat();
- combMat.setMatnr(orderDetl.getMatnr());
- combMat.setBatch(orderDetl.getBatch());
- combMat.setAnfme(orderDetl.getAnfme());
- combMats.add(combMat);
- }
- combParam.setCombMats(combMats);
- }
- combParam.setOrderNo(order.getOrderNo());
- combParams.add(combParam);
+
+ for (Order order : orders) {
+ if (order == null) {
+ continue;
}
+
+ DocType docType = docTypeService.selectById(order.getDocType());
+ if (docType.getPakin() == null || docType.getPakin() != 1) {
+ continue;
+ }
+ if (order.getSettle() > 2) {
+ continue;
+ }
+
+ List<OrderDetl> orderDetls =
+ OrderInAndOutUtil.selectWorkingDetls(order.getPakinPakoutStatus$(), order.getId());
+
+ CombParam combParam = new CombParam();
+
+ if (!Cools.isEmpty(orderDetls)) {
+ LinkedList<CombParam.CombMat> combMats = new LinkedList<>();
+
+ for (OrderDetl od : orderDetls) {
+ CombParam.CombMat mat = new CombParam.CombMat();
+ mat.setMatnr(od.getMatnr());
+ mat.setBatch(od.getBatch());
+ mat.setAnfme(od.getAnfme() - od.getWorkQty());
+ mat.setMaktx(od.getMaktx());
+ mat.setSpecs(od.getSpecs());
+ mat.setBrand(od.getBrand());
+ mat.setSku(od.getSku());
+ mat.setMemo(od.getMemo());
+ mat.setSupp(od.getSupp());
+ mat.setBoxType1(od.getBoxType1());
+ mat.setBoxType2(od.getBoxType2());
+ mat.setBoxType3(od.getBoxType3());
+ mat.setStandby1(od.getStandby1());
+ mat.setStandby2(od.getStandby2());
+ mat.setStandby3(od.getStandby3());
+ combMats.add(mat);
+ }
+ combParam.setCombMats(combMats);
+ }
+
+ combParam.setOrderNo(order.getOrderNo());
+ combParams.add(combParam);
}
+
return R.ok().add(combParams);
}
+
@RequestMapping("/comb/auth")
@ManagerAuth(memo = "缁勬墭")
public R comb(@RequestBody CombParam combParam){
+// mobileService.comb(combParam, getUserId());
mobileService.comb(combParam, getUserId());
return R.ok("缁勬墭鎴愬姛");
+ }
+
+ @RequestMapping("/combAuto/auth")
+ @ManagerAuth(memo = "缁勬墭")
+ public R combAuto(@RequestBody CombParam combParam){
+// mobileService.comb(combParam, getUserId());
+ mobileService.comb(combParam, getUserId());
+ return R.ok("缁勬墭鎴愬姛");
+ }
+
+ @RequestMapping("/combAuto/wcs/auth")
+// @ManagerAuth(memo = "缁勬墭")
+ public R combAutoWcs(@RequestBody CombParam combParam){
+// mobileService.comb(combParam, getUserId());
+ mobileService.combAuto(combParam, 7777L);
+ return R.ok("缁勬墭鎴愬姛");
+ }
+
+ @RequestMapping("/kitting/query/auth")
+ @ManagerAuth(memo = "榻愬鍏ュ簱鏌ヨ")
+ public R kittingQuery(@RequestBody CombParam combParam){
+ try {
+ return mobileService.kittingQuery(combParam, getUserId());
+ } catch (Exception e){
+
+ }
+// return R.ok("榻愬鍏ュ簱鏌ヨ鎴愬姛");
+ return R.error("榻愬鍏ュ簱鏌ヨ澶辫触");
+ }
+
+ @RequestMapping("/kitting/call/auth")
+ @ManagerAuth(memo = "榻愬鍏ュ簱鍛煎彨")
+ public R kittingCall(@RequestParam("locNo") String locNo){
+ mobileService.kittingCall(locNo, getUserId());
+ return R.ok("榻愬鍏ュ簱鍛煎彨鎴愬姛");
+ }
+
+ @RequestMapping("/kitting/call/all/auth")//瀵� 鍓嶇鏀逛笉浜嗕竴鐐�
+ @ManagerAuth(memo = "榻愬鍏ュ簱鍛煎彨")
+ public R kittingCall(@RequestBody CombParam combParam){
+ List<CombParam.CombMat> combMats = combParam.getCombMats();
+ for (CombParam.CombMat locDetl : combMats) {
+ mobileService.kittingCall(locDetl.getMemo(), getUserId());
+ }
+ return R.ok("榻愬鍏ュ簱鍛煎彨鎴愬姛");
+ }
+ @RequestMapping("/loc/origin/query/auth")
+ @ManagerAuth(memo = "搴撳瓨鏌ヨ")
+ public R locOriginQuery(@RequestParam("barcode") String barcode){
+ List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("zpallet", barcode));
+ return R.ok("鍦ㄥ簱鏍囪淇敼鎴愬姛").add(locDetlList);
+ }
+ @RequestMapping("/loc/origin/in/out/auth")
+ @ManagerAuth(memo = "鍦ㄥ簱鏍囪淇敼")
+ public R locOriginInOut(@RequestBody LocDetl locDetl){
+ return mobileService.locOriginInOut(locDetl, getUserId());
}
@RequestMapping("/pack/get/auth")
@@ -215,6 +328,41 @@
return R.ok();
}
+ /**
+ * 鍑哄簱纭 - 鎵揣鐗� 骞垮痉瀹滅鐗�
+ * 1.鍏ㄦ澘 杩斿洖 101
+ * 2.鎷f枡 杩斿洖 103
+ */
+ @RequestMapping("/pakout/confirm/goods/auth") //寰呭畬鍠� 鍘熷洜锛堝鎴锋湭缁欏嚭璇︾粏淇℃伅锛�
+ @ManagerAuth
+ public R pakoutQueryByGoods(@RequestBody GDYKConfirmGoodsParam combParam){
+ if (Cools.isEmpty(combParam)) {
+ return R.ok();
+ }
+// List<Order> orders = orderService.selectorderNoL(batch);
+// OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("matnr", combParam.getMatnr()).eq("batch", combParam.getBatch()).eq("order_no",combParam.getOrderNo()));
+ Order order = OrderInAndOutUtil.selectByNo(Boolean.FALSE, combParam.getOrderNo());
+ List<OrderDetl> orderDetlList = OrderInAndOutUtil.selectByOrderId(Boolean.FALSE, order.getId());
+ OrderDetl orderDetl = null;
+ for (OrderDetl orderDetl1 : orderDetlList){
+ if (combParam.getMatnr().equals(orderDetl1.getMatnr()) && combParam.getBatch().equals(orderDetl1.getBatch())){
+ orderDetl = orderDetl1;
+ break;
+ }
+ }
+ if (Cools.isEmpty(orderDetl)){
+ return R.error("鏈煡鍒版暟鎹�");
+ }
+ if (!orderDetl.getQty$().equals("宸插畬鎴�")){
+ return R.error("浠诲姟鏈畬鎴�");
+ }
+ //澶嶆牳鏁�
+ orderDetl.setSource(1);
+// orderDetlService.updateById(orderDetl);
+ OrderInAndOutUtil.updateOrderDetl(Boolean.FALSE,order,orderDetl);
+ return R.ok();
+ }
+
// 鏍规嵁搴撲綅鐮佸拰鍟嗗搧鐮佹悳绱㈠晢鍝�
@RequestMapping("/mat/find/auth")
public R find(@RequestParam(required = false) String locNo
--
Gitblit v1.9.1