| | |
| | | import com.zy.asrs.domain.param.*; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.utils.NotifyUtils; |
| | | import com.zy.common.annotations.OpenApiLog; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.dispatcher.ShuttleDispatchUtils; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.enums.WrkIoType; |
| | | import com.zy.core.model.ForkLiftSlave; |
| | | import com.zy.core.model.ShuttleSlave; |
| | | import com.zy.core.model.protocol.ForkLiftProtocol; |
| | |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @PostMapping("/createMoveTask") |
| | | @OpenApiLog(memo = "å°è½¦ç§»å¨ä»»å¡") |
| | |
| | | |
| | | apiLogService.insert(new ApiLog( |
| | | null |
| | | , "è·åæå®åºä½ä¿¡æ¯" |
| | | , "/getLocInformation" |
| | | , "è·åå
¨é¨åºä½ä¿¡æ¯" |
| | | , "/getAllLocInformation" |
| | | , null |
| | | , null |
| | | , null |
| | |
| | | |
| | | apiLogService.insert(new ApiLog( |
| | | null |
| | | , "è·åæå®åºä½ä¿¡æ¯" |
| | | , "/getLocInformation" |
| | | , "å°è½¦éå" |
| | | , "/shuttleGather" |
| | | , null |
| | | , null |
| | | , null |
| | |
| | | return R.ok().add(shuttleGather); |
| | | } |
| | | |
| | | @PostMapping("/queryTask") |
| | | @OpenApiLog(memo = "æ¥è¯¢ä»»å¡") |
| | | public R queryTask(@RequestBody QueryTaskParam param) { |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | | if(param.getTaskNo() != null) { |
| | | wrapper.eq("wms_wrk_no", param.getTaskNo()); |
| | | } |
| | | |
| | | if(param.getTaskType() != null) { |
| | | WrkIoType ioType = WrkIoType.get(param.getTaskType()); |
| | | if(ioType == null) { |
| | | return R.error("ä»»å¡ç±»åä¸åå¨"); |
| | | } |
| | | wrapper.eq("io_type", ioType.id); |
| | | } |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(wrapper); |
| | | apiLogService.insert(new ApiLog( |
| | | null |
| | | , "æ¥è¯¢ä»»å¡" |
| | | , "/queryTask" |
| | | , null |
| | | , null |
| | | , null |
| | | , null |
| | | , JSON.toJSONString(wrkMasts) |
| | | , null |
| | | , null |
| | | , 1 |
| | | , new Date() |
| | | , null |
| | | , null |
| | | )); |
| | | |
| | | return R.ok().add(wrkMasts); |
| | | } |
| | | |
| | | @GetMapping("/test") |
| | | public R test() { |
| | | notifyUtils.notify("task", 1, "9999", "W9999", NotifyMsgType.SHUTTLE_MOVING, "data"); |