自动化立体仓库 - WMS系统
#
zjj
2024-06-14 415c752af6d792e78a95a535bf079edbbeb6561c
src/main/java/com/zy/common/service/CommonService.java
@@ -119,7 +119,12 @@
     */
    @Transactional
    public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, String matnr, String batch, String grade, LocTypeDto locTypeDto) {
        whsType = Utils.GetWhsType(sourceStaNo);
        try{
            whsType = Utils.GetWhsType(sourceStaNo);
        }catch (Exception e){
            log.error("站点={} 未查询到对应的规则",sourceStaNo);
            return null;
        }
        return getLocNoRun(whsType,staDescId,sourceStaNo,matnr,batch,grade,0,locTypeDto,0);
    }
@@ -137,7 +142,7 @@
        if (Cools.isEmpty(matnr)) {  //物料号
            matnr = "";
        }
        if (Cools.isEmpty(batch)) {  //箱号
        if (Cools.isEmpty(batch)) {  //批次
            batch = "";
        }
        if (Cools.isEmpty(grade)) {  //备用
@@ -199,7 +204,7 @@
        boolean signRule2 = false;
        if (Utils.BooleanWhsTypeStaIoType(whsType)){
        if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
            // 靠近摆放规则 --- 同天同规格物料 //分离版
            if (!Cools.isEmpty(matnr) &&  staDescId == 1){
                signRule1 = true;
@@ -270,9 +275,9 @@
//        }
        // 靠近摆放规则 --- 空托 //互通版
        if (staDescId == 10  && Utils.BooleanWhsTypeStaIoType(whsType)) {
        if (staDescId == 10  && Utils.BooleanWhsTypeStaIoType(rowLastno)) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
            if (locMasts.size() > 0) {
            if (!locMasts.isEmpty()) {
                for (LocMast loc : locMasts) {
                    if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
                        continue;
@@ -297,7 +302,7 @@
        StaDesc staDesc = null;
        BasDevp staNo = null;
        if (Utils.BooleanWhsTypeSta(whsType, staDescId)) {
        if (Utils.BooleanWhsTypeSta(rowLastno, staDescId)) {
            // 获取目标站
            wrapper = new EntityWrapper<StaDesc>()
                    .eq("type_no", staDescId)
@@ -317,12 +322,11 @@
                }
                startupDto.setStaNo(staNo.getDevNo());
            }
        }
        // 更新库位排号
        if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) {
            rowLastno.setCurrentRow(curRow);
            rowLastnoService.updateById(rowLastno);
            // 更新库位排号
            if (Cools.isEmpty(locMast)){
                rowLastno.setCurrentRow(curRow);
                rowLastnoService.updateById(rowLastno);
            }
        }
        // 开始查找库位 ==============================>>
@@ -337,7 +341,7 @@
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
                }
                if (Utils.BooleanWhsTypeStaIoType(whsType)){
                if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
                    String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                            .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
@@ -353,12 +357,12 @@
                }
            }
            if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(whsType)){
            if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)){
                for (LocMast locMast1 : locMasts) {
                    if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                        continue;
                    }
                    if (Utils.BooleanWhsTypeStaIoType(whsType)){
                    if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
                        String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                        LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                .eq("loc_no", shallowLoc).eq("loc_sts", "O"));