| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WrkLastno; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.WrkLastnoService; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.News; |
| | |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | | private WrkLastnoService wrkLastnoService; |
| | | @Autowired |
| | | private StoreInTaskGenerationService storeInTaskGenerationService; |
| | | @Autowired |
| | |
| | | && stationProtocol.getTaskNo() == 0 |
| | | && stationProtocol.isEnableIn() |
| | | ) { |
| | | if (stationProtocol.getIoMode() != 1) { |
| | | continue;//不属于入库模式 |
| | | } |
| | | |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, entity.getBarcodeStation().getStationId(), 0); |
| | | stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "enable-in"); |
| | | if (entity.getBarcodeStation() != null && entity.getBarcodeStation().getStationId() != null) { |
| | |
| | | return true;//站点无异常 |
| | | } |
| | | |
| | | WrkLastno stationBackTaskRange = wrkLastnoService.getById(WrkIoType.STATION_BACK.id); |
| | | Integer currentTaskNo = stationProtocol.getTaskNo(); |
| | | if (currentTaskNo != null |
| | | && currentTaskNo > 0 |
| | | && stationBackTaskRange != null |
| | | && stationBackTaskRange.getsNo() != null |
| | | && stationBackTaskRange.geteNo() != null |
| | | && currentTaskNo >= stationBackTaskRange.getsNo() |
| | | && currentTaskNo <= stationBackTaskRange.geteNo()) { |
| | | News.info("条码站已处于退回工作号范围,跳过重复生成退回命令。stationId={},taskNo={},range=[{}, {}]", |
| | | stationProtocol.getStationId(), |
| | | currentTaskNo, |
| | | stationBackTaskRange.getsNo(), |
| | | stationBackTaskRange.geteNo()); |
| | | return false; |
| | | } |
| | | |
| | | StationObjModel backStation = stationObjModel.getBackStation(); |
| | | if (backStation == null || backStation.getStationId() == null) { |
| | | News.warn("条码站退回失败,退回站未配置。deviceNo={},stationId={}", |