| | |
| | | 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() { |
| | | public synchronized void crnStnToOutStn() { |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | // 遍历堆垛机出库站 |
| | | for (CrnSlave.CrnStn crnStn : crnSlave.getCrnOutStn()) { |
| | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | @Async |
| | | public void storeFinished() { |
| | | public synchronized void storeFinished() { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | |
| | | /** |
| | | * 堆垛机异常信息记录 |
| | | */ |
| | | @Async |
| | | public void recCrnErr(){ |
| | | public synchronized void recCrnErr(){ |
| | | Date now = new Date(); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | |
| | | /** |
| | | * 空栈板初始化入库,叉车入库站放货 |
| | | */ |
| | | @Async |
| | | public void storeEmptyPlt(){ |
| | | public synchronized void storeEmptyPlt(){ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历空板入库口 |
| | | for (DevpSlave.Sta emptyInSta : devp.getEmptyInSta()) { |
| | |
| | | /** |
| | | * 出库 ===>> 工作档信息写入led显示器 |
| | | */ |
| | | @Async |
| | | public void ledExecute() { |
| | | public synchronized void ledExecute() { |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | // 获取输送线plc线程 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); |
| | |
| | | /** |
| | | * 其他 ===>> LED显示器复位,显示默认信息 |
| | | */ |
| | | @Async |
| | | public void ledReset() { |
| | | public synchronized void ledReset() { |
| | | // for (LedSlave led : slaveProperties.getLed()) { |
| | | // // 获取输送线plc线程 |
| | | // DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); |