#
zwl
2026-02-09 ad79ba405b2d1ac96423f88f4e8a76c584b9d38a
src/main/java/com/zy/core/plugin/FakeProcess.java
@@ -327,8 +327,8 @@
                    CreateInTaskParam taskParam = new CreateInTaskParam();
                    taskParam.setTaskNo(String.valueOf(commonService.getWorkNo(WrkIoType.IN.id)));
                    taskParam.setSourceStaNo(stationId);
                    taskParam.setStaNo(targetStationId);
                    taskParam.setSourceStaNo(String.valueOf(stationId));
                    taskParam.setStaNo(String.valueOf(targetStationId));
                    taskParam.setLocNo(locMast.getLocNo());
                    taskParam.setBarcode(stationProtocol.getBarcode());
                    WrkMast wrkMast = commonService.createInTask(taskParam);
@@ -476,6 +476,7 @@
                        if (lock != null) {
                            continue;
                        }
                        redisUtil.set(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId, "lock", 10);
                        String barcode = stationProtocol.getBarcode();
                        Integer stationIdVal = stationProtocol.getStationId();
@@ -490,7 +491,7 @@
                                News.error("WMS入库请求失败,重新发起请求,barcode={},stationId={},response={}", barcode,
                                        stationIdVal, response);
                                wmsOperateUtils.applyInTaskAsync(barcode, stationIdVal,
                                        stationProtocol.getPalletHeight());
                                        stationProtocol.getPalletHeight(),stationProtocol.getWeight());
                                redisUtil.set(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId, "lock", 2);
                                continue;
                            }
@@ -501,7 +502,7 @@
                                StartupDto dto = jsonObject.getObject("data", StartupDto.class);
                                CreateInTaskParam taskParam = new CreateInTaskParam();
                                taskParam.setTaskNo(dto.getTaskNo());
                                taskParam.setTaskNo(String.valueOf(dto.getTaskNo()));
                                taskParam.setLocNo(dto.getLocNo());
                                taskParam.setTaskPri(dto.getTaskPri());
                                taskParam.setBarcode(barcode);
@@ -519,7 +520,7 @@
                                News.error("WMS入库接口返回非200,重新发起请求,barcode={},stationId={},response={}", barcode,
                                        stationIdVal, response);
                                wmsOperateUtils.applyInTaskAsync(barcode, stationIdVal,
                                        stationProtocol.getPalletHeight());
                                        stationProtocol.getPalletHeight(),stationProtocol.getWeight());
                                redisUtil.set(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId, "lock", 2);
                            }
                        } else {
@@ -528,10 +529,9 @@
                                // 没有请求进行中,发起新的异步请求
                                News.info("发起异步WMS入库请求,barcode={},stationId={}", barcode, stationIdVal);
                                wmsOperateUtils.applyInTaskAsync(barcode, stationIdVal,
                                        stationProtocol.getPalletHeight());
                                        stationProtocol.getPalletHeight(),stationProtocol.getWeight());
                                redisUtil.set(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId, "lock", 2);
                            }
                            // 如果有请求进行中,等待下次循环再检查
                        }
                    }
                }
@@ -789,6 +789,7 @@
                wrkMast.setWrkSts(updateWrkSts);
                wrkMast.setSystemMsg("");
                wrkMast.setWeight(Cools.isEmpty(crnProtocol.getWeight()) ? 11.11 : crnProtocol.getWeight());
                wrkMast.setIoTime(new Date());
                if (wrkMastService.updateById(wrkMast)) {
                    CrnCommand resetCommand = crnThread.getResetCommand(crnProtocol.getCrnNo());