| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.entity.enums.TaskStsType; |
| | | import com.vincent.rsf.server.api.entity.enums.TaskType; |
| | | import com.vincent.rsf.server.manager.enums.TaskStsType; |
| | | import com.vincent.rsf.server.manager.enums.TaskType; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.AsnExceStatus; |
| | | import com.vincent.rsf.server.manager.enums.WaveExceStatus; |
| | |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("库位不存在!!"); |
| | | } |
| | | |
| | | List<TaskItem> items = taskItemService.list(new LambdaQueryWrapper<TaskItem>().in(TaskItem::getSourceId, wave.getId())); |
| | | if (items.isEmpty()) { |
| | | throw new CoolException("波次任务已生成,不能重复生成!!"); |
| | | } |
| | | |
| | | task.setTaskCode(ruleCode) |
| | | .setTaskType(TaskType.TASK_TYPE_OUT.type) |
| | | .setTaskStatus(TaskStsType.GENERATE_OUT.id) |
| | |
| | | taskItem.setTaskId(task.getId()) |
| | | .setAnfme(waveItem.getAnfme()) |
| | | .setId(null) |
| | | .setSourceCode(wave.getCode()) |
| | | .setSourceId(wave.getId()) |
| | | .setSource(item.getWaveItemId()); |
| | | taskItems.add(taskItem); |
| | | } |