| | |
| | | package com.zy.core.operation.handler; |
| | | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.controller.vo.ApplyInDto; |
| | | import com.zy.asrs.controller.vo.ApplyInRepsonseDto; |
| | | import com.zy.asrs.entity.Job; |
| | | import com.zy.asrs.service.CtuMainService; |
| | | import com.zy.asrs.service.JobService; |
| | | import com.zy.asrs.service.WmsMainService; |
| | | import com.zy.asrs.service.WrkLastnoService; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.ConveyorStateType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.DevpSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.operation.OperationHandler; |
| | | import com.zy.core.properties.CtuOperationConfig; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Date; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public synchronized void execute(CtuOperationConfig config) { |
| | | try { |
| | | // 根据输送线plc遍历 |
| | |
| | | applyInDto.setStaNo(inSta.getStaNo()+""); |
| | | applyInDto.setBarcode(barcodeThread.getBarcode()); |
| | | //TODO |
| | | ApplyInRepsonseDto locOfWms =new ApplyInRepsonseDto(); |
| | | locOfWms.setTaskNo(System.currentTimeMillis()+""); |
| | | locOfWms.setBatchNo(System.currentTimeMillis()+""); |
| | | //ApplyInRepsonseDto locOfWms = wmsMainService.getLocOfWms(applyInDto); |
| | | // ApplyInRepsonseDto locOfWms =new ApplyInRepsonseDto(); |
| | | // locOfWms.setTaskNo(System.currentTimeMillis()+""); |
| | | // locOfWms.setBatchNo(System.currentTimeMillis()+""); |
| | | ApplyInRepsonseDto locOfWms = wmsMainService.getLocOfWms(applyInDto); |
| | | if (locOfWms != null) { |
| | | job.setLoc(locOfWms.getLoc()); |
| | | job.setTaskNo(locOfWms.getTaskNo()); |
| | | job.setLoc(locOfWms.getLocNo()); |
| | | job.setInTaskNo(locOfWms.getTaskNo()); |
| | | job.setBatchNo(locOfWms.getBatchNo()); |
| | | job.setStaNo(inSta.getTargetSta()+""); |
| | | job.setJobSts(4); |