|  |  | 
 |  |  | import com.vincent.rsf.framework.common.R; | 
 |  |  | import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; | 
 |  |  | import com.vincent.rsf.server.api.controller.params.TaskInParam; | 
 |  |  | import com.vincent.rsf.server.api.entity.enums.TaskType; | 
 |  |  | import com.vincent.rsf.server.manager.enums.TaskType; | 
 |  |  | import com.vincent.rsf.server.api.service.WcsService; | 
 |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
 |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private WcsService wcsService; | 
 |  |  |  | 
 |  |  | //    @ApiOperation(value = "wcs生成入库任务接口") | 
 |  |  |     @ApiOperation(value = "wcs生成入库任务接口") | 
 |  |  |     @PostMapping("/create/in/task") | 
 |  |  |     public R createInTask(@RequestBody TaskInParam param) { | 
 |  |  |         if (Cools.isEmpty(param.getIoType())) { | 
 |  |  | 
 |  |  |         if (Cools.isEmpty(param.getLocType1())){ | 
 |  |  |             return R.error("高低检测信号不能为空"); | 
 |  |  |         } | 
 |  |  |         InTaskMsgDto msgDto = wcsService.createInTask(param,getLoginUserId()); | 
 |  |  |         InTaskMsgDto msgDto = wcsService.createInTask(param); | 
 |  |  |         return R.ok(msgDto); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "agv取货完成接口") | 
 |  |  |     @PostMapping("/agv/pickUp/complete") | 
 |  |  |     public R AgvTaskPickUpComplete(@RequestBody TaskInParam param) { | 
 |  |  |         if (Cools.isEmpty(param.getIoType())) { | 
 |  |  |             return R.error("入出库类型不能为空"); | 
 |  |  |         } | 
 |  |  |         if (Cools.isEmpty(param.getSourceStaNo())) { | 
 |  |  |             return R.error("源站编号不能为空"); | 
 |  |  |         } | 
 |  |  |         if (Cools.isEmpty(param.getBarcode())) { | 
 |  |  |             return R.error("条码不能为空"); | 
 |  |  |         } | 
 |  |  |         if (!param.getIoType().equals(TaskType.TASK_TYPE_IN.type)) { | 
 |  |  |             return R.error("入库类型有误"); | 
 |  |  |         } | 
 |  |  |         wcsService.agvTaskPickUpComplete(param); | 
 |  |  |  | 
 |  |  |         return R.ok(); | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 接收WCS调度,回传执行状态 | 
 |  |  |      *  //TODO 1. 拣料出库,再入库执行,修改状态为199.任务完成  并记录入库站点(源站点),添加任务号参数 | 
 |  |  |      * | 
 |  |  |      * @param param | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @ApiOperation("接收WCS调度,回传执行状态") | 
 |  |  |     @PostMapping("/exce/status") | 
 |  |  |     public R receiveTask(@RequestBody TaskInParam param) { | 
 |  |  |         if (Cools.isEmpty(param)) { | 
 |  |  |             return R.error("参数不能为空!!"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  | } |