| | |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.StationObjModel; |
| | | import com.zy.core.model.protocol.StationProtocol; |
| | | import com.zy.core.task.MainProcessLane; |
| | | import com.zy.core.task.MainProcessTaskSubmitter; |
| | | import com.zy.core.thread.StationThread; |
| | | import com.zy.core.utils.StationOperateProcessUtils; |
| | | import com.zy.core.utils.WmsOperateUtils; |
| | |
| | | private WmsOperateUtils wmsOperateUtils; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private MainProcessTaskSubmitter mainProcessTaskSubmitter; |
| | | |
| | | /** |
| | | * 保留当前按站点 lane 并发的能力,同时用一个简单计数避免并发生成把站点任务数顶穿上限。 |
| | |
| | | } |
| | | } |
| | | |
| | | public void submitGenerateStoreTask(StoreInTaskPolicy policy, |
| | | BasDevp basDevp, |
| | | StationObjModel stationObjModel, |
| | | long minIntervalMs, |
| | | Runnable task) { |
| | | submitGenerateStoreTask(policy, basDevp, stationObjModel, MainProcessLane.GENERATE_STORE, minIntervalMs, task); |
| | | } |
| | | |
| | | public void submitGenerateStoreTask(StoreInTaskPolicy policy, |
| | | BasDevp basDevp, |
| | | StationObjModel stationObjModel, |
| | | MainProcessLane lane, |
| | | long minIntervalMs, |
| | | Runnable task) { |
| | | Integer stationId = stationObjModel == null ? null : stationObjModel.getStationId(); |
| | | mainProcessTaskSubmitter.submitKeyedSerialTask( |
| | | lane, |
| | | stationId, |
| | | "generateStoreWrkFile", |
| | | minIntervalMs, |
| | | task |
| | | ); |
| | | } |
| | | |
| | | private void generateByStation(StoreInTaskPolicy policy, BasDevp basDevp, StationObjModel stationObjModel, |
| | | HashMap<String, String> systemConfigMap) { |
| | | StoreInTaskContext context = buildContext(basDevp, stationObjModel); |