自动化立体仓库 - WMS系统
pjb
4 天以前 ec92a309b68b1e7029196d9d0ea0ac7e2badb5a7
设置入空桶库输送线缓存任务数
1个文件已修改
16 ■■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -16,6 +16,8 @@
import com.zy.common.model.StartupDto;
import com.zy.common.properties.SlaveProperties;
import com.zy.common.web.param.SearchLocParam;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -62,6 +64,9 @@
    @Resource
    private LocMastMapper locMastMapper;
    @Resource
    private ConfigService configService;
    /**
     * 生成工作号
@@ -169,6 +174,17 @@
        // 入空桶库
        if (staDescId == 1 && locArea == 2) {
            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "emptyBucketInCacheCount").eq("status", 1));
            if (config != null && !Cools.isEmpty(config.getValue())) { // 限制入空桶库输送线缓存任务数,避免堵塞
                int value = Integer.parseInt(config.getValue());
                List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>().in("dev_no", 1044, 1045, 1046, 1047, 1048, 1049, 1050).ne("wrk_no", 0));
                long count = basDevps.stream().map(BasDevp::getWrkNo).distinct().count();
                log.info("入空桶库输送线缓存任务数:{}",count);
                if(count >= value) {
                    log.error("-----入空桶库输送线缓存任务数:{},超配置缓存数:{}----",count,value);
                    throw new CoolException("入空桶库输送线缓存任务数:"+count+",超配置缓存数:" + value);
                }
            }
            List<WrkMast> wrkMastList = wrkMastMapper.selectLastInEmptyLoc(); // 前面入空桶库的任务(未执行堆垛机入库)
            if (wrkMastList.size() == 0) {