lty
2025-07-05 a9434e170b17a930a712509f8a76ffba72d3f7e6
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -97,6 +97,8 @@
    @Value("${wms.url}")
    private String wmsUrl;
    @Value("${inventory.number}")
    private Integer inventoryNumber;
    public Integer wrkNo = 10000;
@@ -737,7 +739,7 @@
                } else {
                    staProtocol = staProtocol.clone();
                }
                if (staProtocol.isAutoing() ) {
                if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) {
                    // 查询工作档
                    WrkMast wrkMast = wrkMastMapper.selectPakOutStep2(staProtocol.getSiteId());
                    if (wrkMast == null) {
@@ -1076,6 +1078,12 @@
                if (wrkMast == null) {
                    continue;
                }
                if (wrkMast.getIoType() == 107){
                    int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", wrkMast.getIoType()).eq("wrk_sts", 14));
                    if (count >= inventoryNumber) {
                        continue;
                    }
                }
                // 工作档状态判断
                if (wrkMast.getIoType() < 100 || wrkMast.getSourceStaNo() == null) {
                    News.error(""+mark+" - 2"+" - 1"+" - 查询工作档数据不符合条件--入出类型/站点, 工作号={},源库位={},入出类型={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), wrkMast.getIoType());
@@ -1113,8 +1121,16 @@
//                    continue;
                }
                // 判断堆垛机出库站状态
                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                        && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
//                if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
//                        && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                        ) {
                    if (slave.getId() == 1 || slave.getId() == 2){
                        if (staProtocol.isLoading() || staProtocol.getWorkNo() != 0 || !staProtocol.isOutEnable()){
                            continue;
                        }
                    }
                    // 命令下发区 --------------------------------------------------------------------------
                    // 堆垛机控制过滤
@@ -1983,7 +1999,7 @@
            wrkMast.setCrnNo(crn.getId());
            wrkMast.setSourceLocNo(shallowLoc.getLocNo()); // 源库位
            wrkMast.setLocNo(loc.getLocNo()); // 目标库位
            wrkMast.setFullPlt(shallowLoc.getFullPlt()); // 满板
            wrkMast.setFullPlt(shallowLoc.getLocSts().equals("F") ? "Y" : "N"); // 满板
            wrkMast.setPicking("N"); // 拣料
            wrkMast.setExitMk("N"); // 退出
            wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 空板