|
@@ -204,7 +204,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("id", ques.getId()), false);
|
|
|
if (ques == null) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "标签被修改,请刷新后重新保存");
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "标签被修改,请刷新后重新保存");
|
|
|
}
|
|
|
} else {
|
|
|
String name = "组合项_" + DateUtil.format(now, DateUtil.FORMAT_FULL);
|
|
@@ -266,7 +267,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
* @param now
|
|
|
* @param id
|
|
|
*/
|
|
|
- public void saveMapping(List<QuestionMappingWrapper> questionMappings, Map<String, Long> map, String person, Date now, Long id) {
|
|
|
+ public void saveMapping(List<QuestionMappingWrapper> questionMappings, Map<String, Long> map, String person,
|
|
|
+ Date now, Long id) {
|
|
|
List<QuestionMapping> saveMapping = new ArrayList<>();
|
|
|
int i = 1;
|
|
|
for (QuestionMappingWrapper mapping : questionMappings) {
|
|
@@ -298,15 +300,18 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
* @param type
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, Long> getNameMap(List<QuestionMappingWrapper> questionMappings, Date now, String person, Integer type) {
|
|
|
- List<String> nameList = questionMappings.stream().filter(row -> StringUtil.isNotEmpty(row.getText())).map(row -> row.getText()).collect(Collectors.toList());
|
|
|
+ public Map<String, Long> getNameMap(List<QuestionMappingWrapper> questionMappings, Date now,
|
|
|
+ String person, Integer type) {
|
|
|
+ List<String> nameList = questionMappings.stream().filter(row -> StringUtil.isNotEmpty(row.getText()))
|
|
|
+ .map(row -> row.getText()).collect(Collectors.toList());
|
|
|
List<QuestionInfo> questionInfos = this.list(new QueryWrapper<QuestionInfo>()
|
|
|
.eq("type", type)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("tag_type", TagTypeEnum.T8.getKey())
|
|
|
.in("name", nameList)
|
|
|
);
|
|
|
- Map<String, Long> map = questionInfos.stream().collect(Collectors.toMap(row -> row.getName(), row -> row.getId(), (k1, k2) -> k1));
|
|
|
+ Map<String, Long> map = questionInfos.stream()
|
|
|
+ .collect(Collectors.toMap(row -> row.getName(), row -> row.getId(), (k1, k2) -> k1));
|
|
|
List<QuestionInfo> addBatch = new ArrayList<>();
|
|
|
List<String> nameExist = new ArrayList<>();
|
|
|
for (String s : nameList) {
|
|
@@ -436,7 +441,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
List<String> nameList = new ArrayList<>();
|
|
|
ConceptExistVO conceptExistVO = new ConceptExistVO();
|
|
|
for (QuestionPageDTO bean : res.getRecords()) {
|
|
|
- if (QuestionTypeEnum.Lis.getKey() == bean.getType() && TagTypeEnum.T7.getKey() != bean.getTagType().intValue()) {
|
|
|
+ if (QuestionTypeEnum.Lis.getKey() == bean.getType()
|
|
|
+ && TagTypeEnum.T7.getKey() != bean.getTagType().intValue()) {
|
|
|
nameList.add(bean.getName());
|
|
|
} else {
|
|
|
nameList.add(bean.getTagName());
|
|
@@ -450,7 +456,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
for (QuestionPageDTO bean : res.getRecords()) {
|
|
|
List<Integer> list = new ArrayList<>();
|
|
|
Boolean isLisDetail = false;
|
|
|
- if (QuestionTypeEnum.Lis.getKey() == bean.getType() && TagTypeEnum.T7.getKey() != bean.getTagType().intValue()) {
|
|
|
+ if (QuestionTypeEnum.Lis.getKey() == bean.getType()
|
|
|
+ && TagTypeEnum.T7.getKey() != bean.getTagType().intValue()) {
|
|
|
isLisDetail = true;
|
|
|
}
|
|
|
if (isLisDetail) {
|
|
@@ -460,7 +467,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
}
|
|
|
// 化验明细需要特殊处理,类型转换为明细
|
|
|
if (ListUtil.isNotEmpty(list)) {
|
|
|
- if (list.contains(bean.getType()) || (isLisDetail && list.contains(QuestionTypeEnum.LisDetail.getKey()))) {
|
|
|
+ if (list.contains(bean.getType()) ||
|
|
|
+ (isLisDetail && list.contains(QuestionTypeEnum.LisDetail.getKey()))) {
|
|
|
bean.setExist(true);
|
|
|
}
|
|
|
}
|
|
@@ -523,8 +531,10 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
//模板关联
|
|
|
GetQuestiongAndModuleRelationsVO getQuestiongAndModuleRelationsVO = new GetQuestiongAndModuleRelationsVO();
|
|
|
getQuestiongAndModuleRelationsVO.setQuestionId(Long.parseLong(id));
|
|
|
- GetQuestiongAndModuleRelationsDTO getQuestiongAndModuleRelationsDTO = moduleInfoFacade.getQuestiongAndModuleRelations(getQuestiongAndModuleRelationsVO);
|
|
|
- if (null != getQuestiongAndModuleRelationsDTO && StringUtil.isNotBlank(getQuestiongAndModuleRelationsDTO.getRelationInfos().toString())) {
|
|
|
+ GetQuestiongAndModuleRelationsDTO getQuestiongAndModuleRelationsDTO =
|
|
|
+ moduleInfoFacade.getQuestiongAndModuleRelations(getQuestiongAndModuleRelationsVO);
|
|
|
+ if (null != getQuestiongAndModuleRelationsDTO &&
|
|
|
+ StringUtil.isNotBlank(getQuestiongAndModuleRelationsDTO.getRelationInfos().toString())) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
getQuestiongAndModuleRelationsDTO.getRelationInfos().toString());
|
|
|
}
|
|
@@ -535,7 +545,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
List<DeptVital> deptVitals = deptVitalFacade.list(deptVitalQueryWrapper);
|
|
|
if (ListUtil.isNotEmpty(deptVitals)) {
|
|
|
//科室信息
|
|
|
- List<Long> deptIds = deptVitals.stream().map(deptVitalDTO -> deptVitalDTO.getDeptId()).collect(Collectors.toList());
|
|
|
+ List<Long> deptIds = deptVitals.stream().map(deptVitalDTO -> deptVitalDTO.getDeptId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
ConceptSearchVO conceptSearchVO = new ConceptSearchVO();
|
|
|
conceptSearchVO.setConceptIds(deptIds);
|
|
|
RespDTO<Map<Long, String>> deptMap = klmServiceClient.getConceptMap(conceptSearchVO);
|
|
@@ -544,7 +555,7 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
sb.append("请先删除科室查体模板关联中的对应标签:");
|
|
|
for (DeptVital deptVital : deptVitals) {
|
|
|
- if(StringUtil.isNotBlank(depts.get(deptVital.getDeptId()))){
|
|
|
+ if (StringUtil.isNotBlank(depts.get(deptVital.getDeptId()))) {
|
|
|
sb.append("【" + depts.get(deptVital.getDeptId()) + "】").append("<br/>");
|
|
|
}
|
|
|
}
|
|
@@ -633,10 +644,12 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
paramMap.put("notControlType", questionIndexSubVO.getNotControlType());
|
|
|
|
|
|
QueryWrapper<QuestionMapping> questionMappingQueryWrapper = new QueryWrapper<>();
|
|
|
- questionMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("parent_question", questionIndexSubVO.getParentId());
|
|
|
+ questionMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("parent_question", questionIndexSubVO.getParentId());
|
|
|
List<QuestionMapping> questionMappingList = questionMappingFacade.list(questionMappingQueryWrapper);
|
|
|
if (ListUtil.isNotEmpty(questionMappingList)) {
|
|
|
- List<Long> sonIds = questionMappingList.stream().map(questionMapping -> questionMapping.getSonQuestion()).collect(Collectors.toList());
|
|
|
+ List<Long> sonIds = questionMappingList.stream().map(questionMapping -> questionMapping.getSonQuestion())
|
|
|
+ .collect(Collectors.toList());
|
|
|
paramMap.put("ids", sonIds);
|
|
|
}
|
|
|
List<QuestionInfo> res = this.index(paramMap);
|
|
@@ -676,7 +689,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("type", getQuestionIdsByTypeVO.getQuestionType());
|
|
|
List<QuestionInfo> questionInfoList = this.list(queryWrapper);
|
|
|
- List<Long> questionIds = questionInfoList.stream().map(questionInfo -> questionInfo.getId()).collect(Collectors.toList());
|
|
|
+ List<Long> questionIds = questionInfoList.stream().map(questionInfo -> questionInfo.getId())
|
|
|
+ .collect(Collectors.toList());
|
|
|
return questionIds;
|
|
|
}
|
|
|
|
|
@@ -718,7 +732,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
paramMap1.put("ids", sonQuestionIds);
|
|
|
//获取第二级子标签
|
|
|
List<QuestionInfoWrapper> questionMapping1 = this.getByQuestionMapping(paramMap1);
|
|
|
- Map<Long, List<QuestionInfoWrapper>> qm1 = EntityUtil.makeEntityListMap(questionMapping1, "parentQuestion");
|
|
|
+ Map<Long, List<QuestionInfoWrapper>> qm1 =
|
|
|
+ EntityUtil.makeEntityListMap(questionMapping1, "parentQuestion");
|
|
|
for (QuestionDTO bean : sonQuestionList) {
|
|
|
List<QuestionDetail> questionDetailList1 = sonQuestionMap.get(bean.getId());
|
|
|
if (ListUtil.isEmpty(questionDetailList1)) {
|