|
|
|
@ -598,23 +598,23 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
|
|
|
|
|
String questNum = this.getQuestNum(myCurrentWarehouse.getWarehouseCode()); |
|
|
|
|
taskQuest.setQuestNum(questNum); |
|
|
|
|
|
|
|
|
|
if (taskQuest.getList().size() == 0) { |
|
|
|
|
if (taskQuest.getList().isEmpty()) { |
|
|
|
|
taskQuest.setQuestType("2"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
boolean save = this.save(taskQuest); |
|
|
|
|
//存入子表
|
|
|
|
|
if (taskQuest.getList().size() > 0) { |
|
|
|
|
List<TaskQuestChildEntity> list = taskQuest.getList(); |
|
|
|
|
for (TaskQuestChildEntity taskQuestChildEntity : list) { |
|
|
|
|
taskQuestChildEntity.setWarehouseId(id); |
|
|
|
|
taskQuestChildEntity.setQuestId(taskQuest.getId()); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
taskQuestChildService.saveBatch(list); |
|
|
|
|
//添加包件信息
|
|
|
|
|
List<Long> collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList()); |
|
|
|
|
addQuestDetail(myCurrentWarehouse.getId(), collect, questNum, taskQuest.getId()); |
|
|
|
|
if (!taskQuest.getList().isEmpty()) { |
|
|
|
|
// List<TaskQuestChildEntity> list = taskQuest.getList();
|
|
|
|
|
// for (TaskQuestChildEntity taskQuestChildEntity : list) {
|
|
|
|
|
// taskQuestChildEntity.setWarehouseId(id);
|
|
|
|
|
// taskQuestChildEntity.setQuestId(taskQuest.getId());
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// taskQuestChildService.saveBatch(list);
|
|
|
|
|
// //添加包件信息
|
|
|
|
|
// List<Long> collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList());
|
|
|
|
|
// addQuestDetail(myCurrentWarehouse.getId(), collect, questNum, taskQuest.getId());
|
|
|
|
|
} else { |
|
|
|
|
addQuestDetail(myCurrentWarehouse.getId(), null, questNum, taskQuest.getId()); |
|
|
|
|
} |
|
|
|
|