自动化立体仓库 - WMS系统
#
Administrator
2 天以前 19cbe75e901c3fcf005b8ceafe50f3ad51f67e82
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
@@ -76,23 +76,25 @@
                if (wrkMast.getIoType() == 1) {
                    // 入库通知单
                    if (!Cools.isEmpty(wrkMast.getBarcode())) {
                        String request = "{\"barcode\":\"" + wrkMast.getBarcode() + "\"}";
                        log.info("ERP入库上报请求: workNo={}, request={}", wrkMast.getWrkNo(), request);
                        JSONObject res = erpTokenService.stockIn(wrkMast.getBarcode());
                        log.info("ERP入库上报响应: workNo={}, response={}", wrkMast.getWrkNo(), res == null ? null : res.toJSONString());
                        apiLogService.save("erp.stockIn", "erpTokenService.stockIn", null, null, request,
                                res == null ? null : res.toJSONString(),
                                res != null && Boolean.TRUE.equals(res.getBoolean("success")));
                        if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) {
                            JSONObject data = res.getJSONObject("data");
                            String tlocation = data == null ? null : data.getString("tlocation");
                            if (!Cools.isEmpty(tlocation) && !Cools.isEmpty(wrkMast.getLocNo())) {
                                List<LocDetl> detls = locDetlService.selectList(new EntityWrapper<LocDetl>()
                                        .eq("loc_no", wrkMast.getLocNo()));
                                if (!Cools.isEmpty(detls)) {
                                    for (LocDetl detl : detls) {
                                        detl.setStandby1(tlocation);
                                        locDetlService.updateById(detl);
                        if(wrkMast.getSourceStaNo().equals("1015")){
                            String request = "{\"barcode\":\"" + wrkMast.getBarcode() + "\"}";
                            log.info("ERP入库上报请求: workNo={}, request={}", wrkMast.getWrkNo(), request);
                            JSONObject res = erpTokenService.stockIn(wrkMast.getBarcode());
                            log.info("ERP入库上报响应: workNo={}, response={}", wrkMast.getWrkNo(), res == null ? null : res.toJSONString());
                            apiLogService.save("erp.stockIn", "erpTokenService.stockIn", null, null, request,
                                    res == null ? null : res.toJSONString(),
                                    res != null && Boolean.TRUE.equals(res.getBoolean("success")));
                            if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) {
                                JSONObject data = res.getJSONObject("data");
                                String tlocation = data == null ? null : data.getString("tlocation");
                                if (!Cools.isEmpty(tlocation) && !Cools.isEmpty(wrkMast.getLocNo())) {
                                    List<LocDetl> detls = locDetlService.selectList(new EntityWrapper<LocDetl>()
                                            .eq("loc_no", wrkMast.getLocNo()));
                                    if (!Cools.isEmpty(detls)) {
                                        for (LocDetl detl : detls) {
                                            detl.setStandby1(tlocation);
                                            locDetlService.updateById(detl);
                                        }
                                    }
                                }
                            }