#
Junjie
3 天以前 f45ec8943f3d2de4d17e3b533d4b6469d84331b4
#
3个文件已修改
28 ■■■■■ 已修改文件
src/main/java/com/zy/core/enums/RedisKeyType.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/plugin/FakeProcess.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/docs/WCS外部HTTP API接口V1.0.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/enums/RedisKeyType.java
@@ -22,6 +22,8 @@
    DEVICE_LOG_KEY("device_log_key_"),
    GENERATE_IN_TASK_LIMIT("generate_in_task_limit_"),
    GENERATE_FAKE_IN_TASK_LIMIT("generate_fake_in_task_limit_"),
    GENERATE_FAKE_OUT_TASK_LIMIT("generate_fake_out_task_limit_"),
    GENERATE_FAKE_IN_STATION_DATA_LIMIT("generate_fake_in_station_data_limit_"),
src/main/java/com/zy/core/plugin/FakeProcess.java
@@ -46,6 +46,7 @@
    private static Map<Integer,Long> stationStayTimeMap = new HashMap<>();
    private static String enableFake = "N";
    private static String fakeRealTaskRequestWms = "N";
    @Autowired
    private WrkMastService wrkMastService;
@@ -71,6 +72,11 @@
        Config enableFakeConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "enableFake"));
        if (enableFakeConfig != null) {
            enableFake = enableFakeConfig.getValue();
        }
        Config fakeRealTaskRequestWmsConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "fakeRealTaskRequestWms"));
        if (fakeRealTaskRequestWmsConfig != null) {
            fakeRealTaskRequestWms = fakeRealTaskRequestWmsConfig.getValue();
        }
        //检测入库站是否有任务生成,并仿真生成模拟入库站点数据
@@ -151,6 +157,10 @@
            return;
        }
        if (fakeRealTaskRequestWms.equals("Y")) {
            return;
        }
        List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>());
        for (BasDevp basDevp : basDevps) {
            StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo());
@@ -226,6 +236,10 @@
            return;
        }
        if (fakeRealTaskRequestWms.equals("Y")) {
            return;
        }
        List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>());
        for (BasDevp basDevp : basDevps) {
            StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo());
@@ -285,6 +299,10 @@
     * å…¥åº“站,根据条码扫描生成入库工作档
     */
    public synchronized void generateStoreWrkFile() {
        if (fakeRealTaskRequestWms.equals("N")) {
            return;
        }
        List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>());
        for (BasDevp basDevp : basDevps) {
            StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo());
@@ -339,6 +357,11 @@
                        return;
                    }
                    Object lock = redisUtil.get(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId);
                    if (lock != null) {
                        continue;
                    }
                    try {
                        HashMap<String, Object> param = new HashMap<>();
                        param.put("barcode", stationProtocol.getBarcode());
@@ -360,10 +383,13 @@
                            taskParam.setTaskNo(String.valueOf(dto.getTaskNo()));
                            taskParam.setLocNo(dto.getLocNo());
                            taskParam.setTaskPri(dto.getTaskPri());
                            taskParam.setBarcode(stationProtocol.getBarcode());
                            boolean result = commonService.createInTask(taskParam);
                        } else {
                            News.error("请求WMS接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                        }
                        redisUtil.set(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId, "lock", 10);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
src/main/resources/docs/WCSÍⲿHTTP API½Ó¿ÚV1.0.docx
Binary files differ