ytfl
2025-08-19 b7951bdbb8925131cbc76be4902fcef0e88d0506
src/main/java/com/zy/common/service/CommonService.java
@@ -13,6 +13,7 @@
import com.zy.common.model.LocTypeDto;
import com.zy.common.model.Shelves;
import com.zy.common.model.StartupDto;
import com.zy.common.utils.News;
import com.zy.core.properties.SlaveProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -240,7 +241,7 @@
                .eq("crn_no", crnNo);
        StaDesc staDesc = staDescService.selectOne(wrapper);
        if (Cools.isEmpty(staDesc)) {
            log.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo);
            News.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo);
            throw new CoolException("入库路径不存在");
        }
        BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn());
@@ -301,7 +302,7 @@
                locTypeDto.setLocType1((short) 2);
                return getLocNo(null, staDescId, sourceStaNo, matNos, locTypeDto, times);
            }
            log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times);
            News.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times);
            throw new CoolException("没有空库位");
        }
        String locNo = locMast.getLocNo();
@@ -315,6 +316,19 @@
        return startupDto;
    }
    public Integer queryDevpWorkingCount() {
        List<WrkMast> wrkMastsIn = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                .in("wrk_sts", 2, 3, 4, 5));
        List<WrkMast> wrkMastsOut = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                .in("wrk_sts", 12, 14, 15));
        int count = 0;
        count += wrkMastsIn.size();
        count += wrkMastsOut.size();
        return count;
    }
    public static void main(String[] args) {
        System.out.println(Arith.remainder(1, 4));
        System.out.println("0200201".substring(0, 2));