#
ytfl
2025-08-11 33050f2e886fb8e4f84313388cc0450550b0b848
#
3个文件已修改
50 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OpenController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/MainProcess.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -19,6 +19,7 @@
    @RequestMapping("/open/toOutSta")
    public R toOutSta(@RequestBody ToOutStaParam param) {
        log.info("toOutSta:{}",param);
        Integer sourceStaNo = param.getSourceStaNo();
        SiemensDevpThread siemensDevpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1);
        if(siemensDevpThread == null) {
@@ -41,6 +42,7 @@
        staProtocol.setWorkNo(param.getWrkNo().shortValue());
        staProtocol.setStaNo(param.getStaNo().shortValue());
        boolean result = MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol));
        log.info("发生成功:{}",result);
        return R.ok().add(result);
    }
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -139,7 +139,7 @@
                        && staProtocol.isInEnable()
                        && !staProtocol.isEmptyMk()
                        && staProtocol.getWorkNo() == 9999
                        && staProtocol.isPakMk()) {
                        && staProtocol.isPakMk() && (staProtocol.getEmptyInType() != 1 && staProtocol.getEmptyInType() != 2)) {
                    News.warnNoLog(""+mark+" - 0"+" - 开始执行");
                    String barcode = barcodeThread.getBarcode();
@@ -697,7 +697,6 @@
                        if (!MessageQueue.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(2, staProtocol))) {
                            continue;
                        }
                        News.info(""+mark+" - 1"+" - 出库任务写入输送线数据成功!!! [工作号:{}]", wrkMast.getWrkNo());
                        // 更新工作档状态为14失败
                        wrkMast.setWrkSts(14L);
@@ -994,9 +993,9 @@
                if (Utils.getLaneByLocNo(wrkMast.getLocNo()) != crnProtocol.getCrnLane()) {
                    //判断堆垛机所在巷道是否存在其他任务,如存在则优先执行
                    List<WrkMast> currentWrkMasts = wrkMastService.selectLaneWrkMast(crnProtocol.getCrnLane(), false);
                    if (!currentWrkMasts.isEmpty()) {
                        continue;//当前堆垛机所在巷道存在任务
                    }
//                    if (!currentWrkMasts.isEmpty()) {
//                        continue;//当前堆垛机所在巷道存在任务
//                    }
                }
            }
@@ -1111,6 +1110,13 @@
        if(config != null) {
            devpTaskStackOver = Integer.parseInt(config.getValue());
        }
        int devpCheckTaskStackOver = 2;
        Config config2 = configService.selectOne(new EntityWrapper<Config>()
                .eq("code", "devpCheckTaskStackOver"));
        if (config2 != null) {
            devpCheckTaskStackOver = Integer.parseInt(config2.getValue());
        }
        Integer devpWorkingCount = commonService.queryDevpWorkingCount();
        if (devpWorkingCount > devpTaskStackOver) {
@@ -1157,6 +1163,29 @@
                    if (!inWrkMasts.isEmpty()) {
                        News.error("" + mark + " - 2" + " - 检测存在入库任务,等待入库任务执行完成再出库,工作号={}" + wrkMast.getWrkNo());
                        continue;
                    }
                }
                //zhangc
                if (wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107) {
                    if (wrkMast.getStaNo() == 1058) {
                        List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                                .in("wrk_sts", 12, 14)
                                .eq("sta_no", 1058)
                        );
                        if (!Cools.isEmpty(inWrkMasts) && inWrkMasts.size() >= devpCheckTaskStackOver) {
                            News.error("" + mark + " - 2" + " - 检测存在1058站点,存在两笔工作中的任务,工作号={}" + wrkMast.getWrkNo());
                            continue;
                        }
                    } else if (wrkMast.getStaNo() == 1062) {
                        List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                                .in("wrk_sts", 12, 14)
                                .eq("sta_no", 1062)
                        );
                        if (!Cools.isEmpty(inWrkMasts) && inWrkMasts.size() >= devpCheckTaskStackOver) {
                            News.error("" + mark + " - 2" + " - 检测存在1062站点,存在两笔工作中的任务,工作号={}" + wrkMast.getWrkNo());
                            continue;
                        }
                    }
                }
@@ -1617,7 +1646,7 @@
                    // 修改成功后复位堆垛机
                    if (wrkMastMapper.updateById(wrkMast) > 0) {
                        // 堆垛机复位
                        News.info(""+mark+" - 2"+" - 上位机确认堆垛机成功 : 堆垛机号={}",crnThread.getCrnProtocol().getCrnNo());
                        News.warnNoLog("" + mark + " - 2" + " - 修改成功后复位堆垛机 : 堆垛机号={}", crnThread.getCrnProtocol().getCrnNo());
                        crnThread.setResetFlag(true);
                    }
                }
@@ -2558,7 +2587,10 @@
    // RGV  ===>> 执行对RGV操作
    public synchronized void rgvExecute(Integer mark) {
        ArrayList<Integer> list = new ArrayList<Integer>(){{add(2003);add(2002);}};
        ArrayList<Integer> list = new ArrayList<Integer>() {{
            add(2003);
            add(2002);
        }};
        for (Integer staNo : list) {
            Integer devpId = null;
            Integer rgvStaNoDevpId = null;
src/main/java/com/zy/core/MainProcess.java
@@ -83,7 +83,7 @@
                    mainService.rgvFinished2(14);
                    //堆垛机无任务两分钟,回入库口待机
                    mainService.crnMove();
                    //mainService.crnMove();
                    //堆垛机有入库任务时,回入库口待机
                    mainService.crnMoveByInTask();