| | |
| | | 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; |
| | |
| | | |
| | | @Resource |
| | | private LocMastMapper locMastMapper; |
| | | |
| | | @Resource |
| | | private ConfigService configService; |
| | | |
| | | /** |
| | | * 生成工作号 |
| | |
| | | |
| | | // 入空桶库 |
| | | 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) { |