|
@@ -52,9 +52,11 @@ public class ProWorkLogicServiceImpl extends ServiceImpl<ProWorkLogicMapper, Pro
|
|
proWorkLogic.setBillcode(nextSerial.getContent());
|
|
proWorkLogic.setBillcode(nextSerial.getContent());
|
|
save(proWorkLogic);
|
|
save(proWorkLogic);
|
|
//添加子表
|
|
//添加子表
|
|
|
|
+ int sort = 1;
|
|
for(ProWorkLogicContentAddReqDTO detail : reqDTO.getDetailList()){
|
|
for(ProWorkLogicContentAddReqDTO detail : reqDTO.getDetailList()){
|
|
detail.setLogicId(proWorkLogic.getId());
|
|
detail.setLogicId(proWorkLogic.getId());
|
|
ProWorkLogicContent proWorkLogicContent = new ProWorkLogicContent(detail);
|
|
ProWorkLogicContent proWorkLogicContent = new ProWorkLogicContent(detail);
|
|
|
|
+ proWorkLogicContent.setSort(sort++);
|
|
proWorkLogicContentService.save(proWorkLogicContent);
|
|
proWorkLogicContentService.save(proWorkLogicContent);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -69,9 +71,11 @@ public class ProWorkLogicServiceImpl extends ServiceImpl<ProWorkLogicMapper, Pro
|
|
//删除子表
|
|
//删除子表
|
|
deletChildren(reqDTO.getId());
|
|
deletChildren(reqDTO.getId());
|
|
//添加子表
|
|
//添加子表
|
|
|
|
+ int sort = 1;
|
|
for(ProWorkLogicContentAddReqDTO detail : reqDTO.getDetailList()){
|
|
for(ProWorkLogicContentAddReqDTO detail : reqDTO.getDetailList()){
|
|
detail.setLogicId(proWorkLogic.getId());
|
|
detail.setLogicId(proWorkLogic.getId());
|
|
ProWorkLogicContent proWorkLogicContent = new ProWorkLogicContent(detail);
|
|
ProWorkLogicContent proWorkLogicContent = new ProWorkLogicContent(detail);
|
|
|
|
+ proWorkLogicContent.setSort(sort++);
|
|
proWorkLogicContentService.save(proWorkLogicContent);
|
|
proWorkLogicContentService.save(proWorkLogicContent);
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
@@ -100,7 +104,7 @@ public class ProWorkLogicServiceImpl extends ServiceImpl<ProWorkLogicMapper, Pro
|
|
QueryWrapper<ProWorkLogicContent> queryWrapper = new QueryWrapper();
|
|
QueryWrapper<ProWorkLogicContent> queryWrapper = new QueryWrapper();
|
|
queryWrapper.eq("del_flag", "0");
|
|
queryWrapper.eq("del_flag", "0");
|
|
queryWrapper.eq("logic_id", id);
|
|
queryWrapper.eq("logic_id", id);
|
|
- queryWrapper.orderByAsc("create_time");
|
|
|
|
|
|
+ queryWrapper.orderByAsc("sort");
|
|
List<ProWorkLogicContent> list = proWorkLogicContentService.list(queryWrapper);
|
|
List<ProWorkLogicContent> list = proWorkLogicContentService.list(queryWrapper);
|
|
List<ProWorkLogicContentListRespDTO> contentListRespDTOS = Lists.newArrayList();
|
|
List<ProWorkLogicContentListRespDTO> contentListRespDTOS = Lists.newArrayList();
|
|
for(ProWorkLogicContent proWorkLogicContent : list){
|
|
for(ProWorkLogicContent proWorkLogicContent : list){
|