| | |
| | | package com.zy.core.operation.handler; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Job; |
| | | import com.zy.asrs.service.CtuMainService; |
| | |
| | | import com.zy.core.operation.OperationHandler; |
| | | import com.zy.core.properties.CtuOperationConfig; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return; |
| | | } |
| | | if (staProtocol.getWorkNo() > 0 && staProtocol.isAutoing()) { |
| | | //StaProtocol targetStaProtocol = devpThread.getStation().get(inSta.getTargetSta()); |
| | | //if (targetStaProtocol.getWorkNo() == 0 && targetStaProtocol.isAutoing() && !targetStaProtocol.isLoading()) { |
| | | Job job = jobService.getJobByJobNoAndJobSts(staProtocol.getWorkNo(), 4); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, devp.getId()); |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if (Cools.isEmpty(barcode)){ |
| | | return; |
| | | } |
| | | Job job = jobService.getJobByBarcode(barcode); |
| | | if (job != null) { |
| | | Integer workNo = staProtocol.getWorkNo(); |
| | | Integer targetSta = inSta.getTargetSta(); |
| | | staProtocol.setWorkNo(workNo); |
| | | staProtocol.setWorkNo(job.getJobNo()); |
| | | staProtocol.setStaNo(targetSta); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | if (result) { |