| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | /** |
| | | * 堆垛机站出库到出库站 |
| | | */ |
| | | @Async |
| | | public void crnStnToOutStn() { |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | // 遍历堆垛机出库站 |
| | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | @Async |
| | | @Transactional |
| | | public void storeFinished() { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | |
| | | /** |
| | | * 空栈板初始化入库,叉车入库站放货 |
| | | */ |
| | | @Async |
| | | public void storeEmptyPlt(){ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历空板入库口 |
| | |
| | | /** |
| | | * 出库 ===>> 工作档信息写入led显示器 |
| | | */ |
| | | @Async |
| | | public void ledExecute() { |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | // 获取输送线plc线程 |
| | |
| | | /** |
| | | * 其他 ===>> LED显示器复位,显示默认信息 |
| | | */ |
| | | @Async |
| | | public void ledReset() { |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | // 获取输送线plc线程 |
| | |
| | | // 22.小车待搬 |
| | | if (wrkCharge.getWrkSts() == 22) { |
| | | |
| | | // 入出库任务优先 |
| | | if (null != wrkMastMapper.selectWorkingByCrn(wrkCharge.getCrnNo())) { |
| | | return; |
| | | } |
| | | |
| | | // 搬小车至小车走向通道 |
| | | List<String> channel = slaveProperties.getChannel(); |
| | | for (String channelLocNo : channel) { |
| | |
| | | } else if (wrkCharge.getWrkSts() == 26) { |
| | | // 固定堆垛机 |
| | | int crnNo = 1; |
| | | // 入出库任务优先 |
| | | if (null != wrkMastMapper.selectWorkingByCrn(crnNo)) { |
| | | return; |
| | | } |
| | | |
| | | // 充电位 |
| | | LocMast chargeLoc = locMastService.selectById(wrkCharge.getLocNo()); |
| | | |
| | |
| | | } else { |
| | | // 固定堆垛机 |
| | | int crnNo = 1; |
| | | if (null != wrkMastMapper.selectWorkingByCrn(crnNo)) { |
| | | return; |
| | | } |
| | | |
| | | LocMast channelLoc = locMastService.selectById(channelLocNo); |
| | | |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crnNo); |
| | |
| | | } |
| | | } |
| | | } else if (wrkCharge.getWrkSts() == 45L) { |
| | | if (null != wrkMastMapper.selectWorkingByCrn(wrkCharge.getCrnNo())) { |
| | | return; |
| | | } |
| | | |
| | | LocMast idleLoc = locMastService.selectById(basSte.getIdleLoc()); |
| | | |
| | | Integer otherSte = existOtherSte(idleLoc.getLocNo(), wrkCharge.getSteNo()); |