| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.domain.param.CreateInTaskParam; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.entity.BasDevp; |
| | |
| | | StationCommand command = stationThread.getCommand(StationCommandType.WRITE_INFO, |
| | | 9991, 1015, 1013, 0); |
| | | MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command)); |
| | | wmsOperateUtils.clearAsyncInTaskCache(barcode, stationIdVal); |
| | | // 接口返回非200,重新发起请求 |
| | | News.error("WMS入库接口返回非200,重新发起请求,barcode={},stationId={},response={}", barcode, |
| | | stationIdVal, response); |
| | |
| | | } |
| | | } |
| | | |
| | | try { |
| | | WmsOperateUtils wmsOperateUtils = SpringUtils.getBean(WmsOperateUtils.class); |
| | | if (wmsOperateUtils != null) { |
| | | wmsOperateUtils.reportCrnDb110Status(crnProtocol.getCrnNo(), currentIndices); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("Report Crn Db110 Status Fail", e); |
| | | if (currentIndices.isEmpty()) { |
| | | continue; |
| | | } |
| | | |
| | | String reportLockKey = RedisKeyType.REPORT_CRN_DB110_STATUS_LIMIT.key + crnProtocol.getCrnNo(); |
| | | if (redisUtil.get(reportLockKey) != null) { |
| | | continue; |
| | | } |
| | | |
| | | long reportLockSeconds = Math.max(60L, currentIndices.size() * 35L); |
| | | redisUtil.set(reportLockKey, "lock", reportLockSeconds); |
| | | wmsOperateUtils.reportCrnDb110StatusAsync(crnProtocol.getCrnNo(), new ArrayList<>(currentIndices)); |
| | | } |
| | | } |
| | | |
| | |
| | | Integer stationId = data.getInteger("stationId"); |
| | | Integer deviceNo = data.getInteger("deviceNo"); |
| | | |
| | | Object lock = redisUtil.get(RedisKeyType.RECEIVE_IN_TASK_CHANGE_STATION_TASK_SEND_LIMIT.key + stationId); |
| | | Object lock = redisUtil.get(RedisKeyType.SEND_LIMIT_RECEIVE_IN_TASK_CHANGE_STATION_TASK.key + stationId); |
| | | if(lock != null){ |
| | | continue; |
| | | } |
| | |
| | | |
| | | //缓存命令相同,下发命令改变入库任务号信息 |
| | | MessageQueue.offer(SlaveType.Devp, deviceNo, new Task(2, command)); |
| | | redisUtil.set(RedisKeyType.RECEIVE_IN_TASK_CHANGE_STATION_TASK_SEND_LIMIT.key + stationId, "lock", 5); |
| | | redisUtil.set(RedisKeyType.SEND_LIMIT_RECEIVE_IN_TASK_CHANGE_STATION_TASK.key + stationId, "lock", 5); |
| | | } |
| | | |
| | | } |