| | |
| | | import com.zy.acs.conveyor.core.properties.SlaveProperties; |
| | | import com.zy.acs.conveyor.core.service.StationService; |
| | | import com.zy.acs.conveyor.entity.Job; |
| | | import com.zy.acs.conveyor.service.CtuMainService; |
| | | import com.zy.acs.conveyor.service.JobService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private StationService stationService; |
| | | |
| | | @Autowired |
| | | private CtuMainService ctuMainService; |
| | | |
| | | |
| | | private final RedisSupport redis = RedisSupport.defaultRedisSupport; |
| | | |
| | |
| | | continue; |
| | | } |
| | | if (!staProtocol.isAutoing()) { |
| | | News.error("{}:站点:{},非自动", config.getMark(), staProtocol.getSiteId()); |
| | | //News.error("{}:站点:{},非自动", config.getMark(), staProtocol.getSiteId()); |
| | | continue; |
| | | } |
| | | if (staProtocol.getWorkNo() > 0 && !staProtocol.isLoading()) { |
| | |
| | | News.error("{}:站点:{},任务状态不对,{}", config.getMark(), staProtocol.getSiteId(), JSON.toJSON(job)); |
| | | continue; |
| | | } |
| | | //String s = ctuMainService.checkStationStatus(takeSta.getStaNo()); |
| | | if (ctuMainService.checkComplete(job.getTaskNo())) { |
| | | staProtocol.setSafeSignal(new SafeSignal( devp.getPutSta().indexOf(takeSta) ,(short)1,false)); |
| | | |
| | | redis.push(RedisConveyorConstant.CONVEYOR_SAFE_FLAG, staProtocol); |
| | | |
| | | job.setJobSts(ConveyorStateType.CLEARSIGNAL.getStatus()); |
| | | if (!jobService.updateById(job)){ |
| | |
| | | }else { |
| | | News.info("" + config.getMark() + "站点清空:{},{}", takeSta.getStaNo(), staProtocol.getWorkNo()); |
| | | } |
| | | } else { |
| | | log.info("" + config.getMark() + "站点:{},{}", takeSta.getStaNo(), staProtocol.getWorkNo()); |
| | | } |
| | | } |
| | | } |
| | | } |