|
|
|
@ -62,14 +62,13 @@ public class AskPrimaryServiceImpl implements AskPrimaryService {
|
|
|
|
|
diagnosisPrimary.setCreateUserId(UserUtil.getUser().getId());
|
|
|
|
|
diagnosisPrimaryService.save(diagnosisPrimary);
|
|
|
|
|
// 然后开始保存初步诊断关键的诊断
|
|
|
|
|
RecordForPrimaryChooseVO choose = reqVO.getChoose();
|
|
|
|
|
if (CollUtil.isNotEmpty(choose.getAskList())){
|
|
|
|
|
List<DiagnosisPrimaryRelation> askRelationList = choose.getAskList().stream().map(e -> {
|
|
|
|
|
if (CollUtil.isNotEmpty(reqVO.getAskIdList())){
|
|
|
|
|
List<DiagnosisPrimaryRelation> askRelationList = reqVO.getAskIdList().stream().map(e -> {
|
|
|
|
|
DiagnosisPrimaryRelation relation = new DiagnosisPrimaryRelation();
|
|
|
|
|
relation.setProcessId(diagnosisPrimary.getProcessId());
|
|
|
|
|
relation.setPrimaryId(diagnosisPrimary.getId());
|
|
|
|
|
relation.setType(1);
|
|
|
|
|
relation.setRelationId(e.getNodeId());
|
|
|
|
|
relation.setRelationId(e);
|
|
|
|
|
relation.setCreateUserId(UserUtil.getUser().getId());
|
|
|
|
|
return relation;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
@ -77,13 +76,13 @@ public class AskPrimaryServiceImpl implements AskPrimaryService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(choose.getPhysicalList())){
|
|
|
|
|
List<DiagnosisPrimaryRelation> physicalRelationList = choose.getPhysicalList().stream().map(e -> {
|
|
|
|
|
if (CollUtil.isNotEmpty(reqVO.getPhysicalIdList())){
|
|
|
|
|
List<DiagnosisPrimaryRelation> physicalRelationList = reqVO.getPhysicalIdList().stream().map(e -> {
|
|
|
|
|
DiagnosisPrimaryRelation relation = new DiagnosisPrimaryRelation();
|
|
|
|
|
relation.setProcessId(diagnosisPrimary.getProcessId());
|
|
|
|
|
relation.setPrimaryId(diagnosisPrimary.getId());
|
|
|
|
|
relation.setType(2);
|
|
|
|
|
relation.setRelationId(e.getNodeId());
|
|
|
|
|
relation.setRelationId(e);
|
|
|
|
|
relation.setCreateUserId(UserUtil.getUser().getId());
|
|
|
|
|
return relation;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
@ -91,13 +90,13 @@ public class AskPrimaryServiceImpl implements AskPrimaryService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(choose.getAncillaryList())){
|
|
|
|
|
List<DiagnosisPrimaryRelation> ancillaryRelationList = choose.getAncillaryList().stream().map(e -> {
|
|
|
|
|
if (CollUtil.isNotEmpty(reqVO.getAncillaryIdList())){
|
|
|
|
|
List<DiagnosisPrimaryRelation> ancillaryRelationList = reqVO.getAncillaryIdList().stream().map(e -> {
|
|
|
|
|
DiagnosisPrimaryRelation relation = new DiagnosisPrimaryRelation();
|
|
|
|
|
relation.setProcessId(diagnosisPrimary.getProcessId());
|
|
|
|
|
relation.setPrimaryId(diagnosisPrimary.getId());
|
|
|
|
|
relation.setType(3);
|
|
|
|
|
relation.setRelationId(e.getNodeId());
|
|
|
|
|
relation.setRelationId(e);
|
|
|
|
|
relation.setCreateUserId(UserUtil.getUser().getId());
|
|
|
|
|
return relation;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|