From 5c96a5ffc8790fbaf45ff0d971ba2905ae55fe20 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期日, 15 六月 2025 16:22:19 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/controller/MobileController.java | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java index 36d8afe..8cfc49f 100644 --- a/src/main/java/com/zy/asrs/controller/MobileController.java +++ b/src/main/java/com/zy/asrs/controller/MobileController.java @@ -22,7 +22,6 @@ import com.zy.nc.entity.NccXsckmxTkWms; import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService; import com.zy.nc.service.NccXsckmxTkWmsService; -import org.mybatis.spring.annotation.MapperScannerRegistrar; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; @@ -78,8 +77,6 @@ @Autowired private NccXsckmxTkWmsService nccXsckmxTkWmsService; - @Autowired - private MapperScannerRegistrar mapperScannerRegistrar; @RequestMapping("/pda/WarehouseOut/v1") @ManagerAuth(memo = "骞舵澘閫斾腑鎷f枡-鍙傝�冨康鍒�") @@ -292,21 +289,33 @@ @RequestMapping(value = "/mat/back") @ManagerAuth - public R pdaSearchBack(@RequestParam String matnr) { - EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); - wrapper.like("VBATCHCODE", matnr); - NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper); - if (null == nccXsckmxTkWms) { - return R.error("鏈壘鍒版鏉$爜"); + public R pdaSearchBack(@RequestParam String barcode) { + List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectList(new EntityWrapper<WrkDetlLog>() + .eq("zpallet", barcode) + .orderBy("io_time", false) + ); + if (wrkDetlLogs.isEmpty()) { + return R.error("鏈壘鍒版鎵樼洏鐮佸嚭搴撹褰�"); } - Mat mat = matService.selectByMatnr(nccXsckmxTkWms.getWlbm()); + + WrkDetlLog wrkDetlLog = wrkDetlLogs.get(0); + String batch = wrkDetlLog.getBatch(); + + HashMap<String, Object> map = new HashMap<>(); + Mat mat = matService.selectByMatnr(wrkDetlLog.getMatnr()); + if (mat == null) { + return R.error("鏈壘鍒扮墿鏂欐槑缁�"); + } MatParam matParam = new MatParam(); Synchro.Copy(mat, matParam); - matParam.setBatch(nccXsckmxTkWms.getVbatchcode()); + matParam.setBatch(batch); matParam.setAnfme(0.0D); matParam.setAnfme2(0.0D); - matParam.setTiaoma(matnr); - return R.ok().add(matParam); + matParam.setTiaoma(batch); + + map.put("orderNo", wrkDetlLog.getOrderNo()); + map.put("matData", matParam); + return R.ok().add(map); } @RequestMapping("/comb/auth") -- Gitblit v1.9.1