自动化立体仓库 - WMS系统
#
18516761980
2021-12-06 01341cecbdc90e1bd283117035fff4346773640f
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -24,6 +24,7 @@
import com.zy.ints.service.IoCompleteService;
import com.zy.ints.service.WaitMatchkLogService;
import com.zy.ints.service.WaitMatchkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -36,6 +37,7 @@
/**
 * Created by vincent on 2020/6/11
 */
@Slf4j
@Service
public class WorkServiceImpl implements WorkService {
    static int i =1;
@@ -221,18 +223,20 @@
            }
            int workNo = commonService.getWorkNo(rok);
            // 当深库位出库时,查找对应的浅库位是否也有出库任务,如果有,就增加其优先级
            boolean reduce = false;
            if (Utils.isDeepLoc(slaveProperties, dto.getLocNo())) {
                String shallowLoc = Utils.getShallowLoc(slaveProperties, dto.getLocNo());
                if (locNos.contains(shallowLoc)) {
                    reduce = true;
            if(locMast.getCrnNo().equals(1) && dto.getLocNo().substring(0,2).equals("01")) {//1号货架才判断
                // 当深库位出库时,查找对应的浅库位是否也有出库任务,如果有,就增加其优先级
                boolean reduce = false;
                if (Utils.isDeepLoc(slaveProperties, dto.getLocNo())) {
                    String shallowLoc = Utils.getShallowLoc(slaveProperties, dto.getLocNo());
                    if (locNos.contains(shallowLoc)) {
                        reduce = true;
                    }
                }
            }
            // 深库位移库
            if (!reduce) {
                moveLocForDeepLoc(locMast.getCrnNo(), dto.getLocNo());
                // 深库位移库
                if (!reduce) {
                    moveLocForDeepLoc(locMast.getCrnNo(), dto.getLocNo());
                }
            }
            // 生成工作档
@@ -858,14 +862,14 @@
                LocMast loc = null;
                for (Integer row : rows) {
                    if (Utils.isDeepLoc(slaveProperties, row)) {
                        loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1());
                        loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(),shallowLoc.getLocType2(),shallowLoc.getLocType3());
                        if (null != loc) { break; }
                    }
                }
                if (null == loc) {
                    for (Integer row : rows) {
                        if (Utils.isShallowLoc(slaveProperties, row)) {
                            loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1());
                            loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(),shallowLoc.getLocType2(),shallowLoc.getLocType3());
                            if (null != loc) { break; }
                        }
                    }