| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.param.*; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.entity.LocMast; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | return R.error("生成出库任务失败"); |
| | | } |
| | | |
| | | //批量出库任务 |
| | | @PostMapping("/createOutTaskBatch") |
| | | @OpenApiLog(memo = "批量出库任务") |
| | | @Transactional |
| | | public R createOutTaskBatch(@RequestBody CreateOutTaskBatchParam param) { |
| | | if (param == null) { |
| | | return R.error("参数不能为空"); |
| | | } |
| | | |
| | | List<CreateOutTaskParam> taskList = param.getTaskList(); |
| | | if (taskList == null || taskList.size() == 0) { |
| | | return R.error("任务列表不能为空"); |
| | | } |
| | | |
| | | for (CreateOutTaskParam createOutTaskParam : taskList) { |
| | | if (createOutTaskParam == null) { |
| | | throw new CoolException("任务参数不能为空"); |
| | | } |
| | | commonService.createOutTask(createOutTaskParam); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/completeTask") |
| | | @OpenApiLog(memo = "任务完成") |
| | | public R completeTask(@RequestBody CompleteTaskParam param) { |