package com.huaheng.api.wcs.controller; import com.huaheng.api.wcs.service.taskByWcs.TaskByWcs; import com.huaheng.framework.aspectj.lang.annotation.ApiLogger; import com.huaheng.framework.aspectj.lang.annotation.Log; import com.huaheng.framework.aspectj.lang.constant.BusinessType; import com.huaheng.framework.web.controller.BaseController; import com.huaheng.framework.web.domain.AjaxResult; import com.huaheng.pc.task.taskHeader.domain.TaskHeader; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller @RequestMapping("/API/WMS/v2") public class TaskByWcsController extends BaseController { @Autowired private TaskByWcs taskByWcs; private static final Logger logger = LoggerFactory.getLogger(TaskByWcs.class); @Log(title = "wcs任务生成", action = BusinessType.INSERT) @PostMapping("/TaskByWcs") @ApiOperation("wcs任务生成") @ResponseBody public AjaxResult TaskByWcs(@RequestBody TaskHeader task) { logger.info("创建任务:{}", task); final AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { @Override public AjaxResult doProcess() { return taskByWcs.taskByWcs(task.getContainerCode()); } }); return ajaxResult; } }