| | |
| | | import com.zy.entity.*; |
| | | import com.zy.mapper.*; |
| | | import com.zy.service.*; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import com.zy.utils.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | News.infoNoLog(""+mark+" - 1"+" - 0"+" - 堆垛机入出库作业下发 : 入库执行完毕"); |
| | | } |
| | | |
| | | @Resource |
| | | private ConfigService configService; |
| | | /** |
| | | * 出库 ===>> 库位到堆垛机站 |
| | | * 2022-06-09 TQS修改,查询工作档LIST,遍历下发,防止第一个任务堵塞出库 |
| | | */ |
| | | public synchronized void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { |
| | | News.warnNoLog(""+mark+" - 2"+" - 0"+" - 堆垛机入出库作业下发:执行出库"); |
| | | |
| | | // 控制是否允许连续出库,不判断出库站点状态(根据状态启用) |
| | | boolean crnAvailableOut = false; |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","removeCrnAvailableOut")); |
| | | if (config != null && config.getStatus() == 1) { |
| | | crnAvailableOut = true; |
| | | } |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | List<WrkMast> wrkMasts = wrkMastMapper.selectPakOutStep11(slave.getId(), crnStn.getStaNo()); |
| | |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && (crnAvailableOut || !staProtocol.isLoading() && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable())) { |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | // continue; |