|
@@ -10,8 +10,6 @@ import com.diagbot.entity.KlConcept;
|
|
|
import com.diagbot.entity.KlRelation;
|
|
|
import com.diagbot.entity.KlRelationOrder;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
-import com.diagbot.exception.CommonErrorCode;
|
|
|
-import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.KlRelationService;
|
|
|
import com.diagbot.service.impl.KlRelationOrderServiceImpl;
|
|
|
import com.diagbot.service.impl.KlRelationServiceImpl;
|
|
@@ -60,7 +58,6 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
KlDiseaseFacade klDiseaseFacade;
|
|
|
|
|
|
|
|
|
-
|
|
|
@DS("med")
|
|
|
@DSTransactional
|
|
|
public Boolean addRelation(List<KlRelationSaveVO> klRelationSaveVOs) {
|
|
@@ -119,7 +116,7 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
relationOrder.settRelationId(j.getId());
|
|
|
relationOrder.setGmtCreate(now);
|
|
|
relationOrder.setGmtModified(now);
|
|
|
-// relationOrder.setCreator(currentUser);
|
|
|
+ // relationOrder.setCreator(currentUser);
|
|
|
relationOrder.setModifier(UserUtils.getCurrentPrincipleID());
|
|
|
relationOrderList.add(relationOrder);
|
|
|
}
|
|
@@ -135,7 +132,7 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
@DS("med")
|
|
|
@DSTransactional
|
|
|
public Boolean saveRelation(List<KlRelationSaveVO> klRelationSaveVOs) {
|
|
|
- boolean res= false;
|
|
|
+ boolean res = false;
|
|
|
if (ListUtil.isNotEmpty(klRelationSaveVOs)) {
|
|
|
List<List<KlRelation>> relationGroupList = Lists.newArrayList();
|
|
|
KlRelationSaveVO klRelationSaveVO = klRelationSaveVOs.get(0);
|
|
@@ -164,8 +161,6 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
return klRelation;
|
|
|
}).collect(Collectors.toList());
|
|
|
relationGroupList.add(collect);
|
|
|
- }else {
|
|
|
- throw new CommonException(CommonErrorCode.FAIL, "第三层的概念id不能为空!");
|
|
|
}
|
|
|
}
|
|
|
Date now = DateUtil.now();
|
|
@@ -194,7 +189,7 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
relationOrderList.add(relationOrder);
|
|
|
}
|
|
|
});
|
|
|
- res = klRelationOrderServiceImpl.saveBatch(relationOrderList);
|
|
|
+ res = klRelationOrderServiceImpl.saveBatch(relationOrderList);
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
@@ -253,9 +248,9 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 删除某个诊断依据
|
|
|
+ *
|
|
|
* @param diseaseDeleteVO
|
|
|
* @return
|
|
|
*/
|
|
@@ -263,7 +258,7 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
@DSTransactional
|
|
|
public Boolean deleteRelation(DiseaseDeleteVO diseaseDeleteVO) {
|
|
|
String disName = diseaseDeleteVO.getDisName();
|
|
|
- if(StringUtils.isNotBlank(disName)){
|
|
|
+ if (StringUtils.isNotBlank(disName)) {
|
|
|
List<KlConcept> klConcepts = klConceptFacade.list(new QueryWrapper<KlConcept>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("lib_name", disName.trim())
|
|
@@ -272,12 +267,12 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
List<Integer> relations = Lists.newArrayList(501, 502, 503, 504, 505, 506, 507, 508);
|
|
|
List<KlRelation> klRelations = this.list(new QueryWrapper<KlRelation>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in(ListUtil.isNotEmpty(ids),"start_id", ids)
|
|
|
- .in(ListUtil.isNotEmpty(relations),"relation_id", relations));
|
|
|
+ .in(ListUtil.isNotEmpty(ids), "start_id", ids)
|
|
|
+ .in(ListUtil.isNotEmpty(relations), "relation_id", relations));
|
|
|
List<Long> kids = klRelations.stream().map(x -> x.getId()).collect(Collectors.toList());
|
|
|
this.removeByIds(kids);
|
|
|
QueryWrapper<KlRelationOrder> relationOrderQe = new QueryWrapper<>();
|
|
|
- relationOrderQe.in(ListUtil.isNotEmpty(kids),"t_relation_id", kids);
|
|
|
+ relationOrderQe.in(ListUtil.isNotEmpty(kids), "t_relation_id", kids);
|
|
|
klRelationOrderFacade.remove(relationOrderQe);
|
|
|
}
|
|
|
|
|
@@ -286,6 +281,7 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
|
|
|
/**
|
|
|
* 新增诊断依据
|
|
|
+ *
|
|
|
* @param diseaseDeleteVO
|
|
|
* @return
|
|
|
*/
|
|
@@ -309,6 +305,6 @@ public class RelationContactFacade extends KlRelationServiceImpl {
|
|
|
}
|
|
|
|
|
|
public List<GetAllForRelationDTO> findDisNameAlls(DisNameFindVO disNameFindVO) {
|
|
|
- return findDisNameAll(disNameFindVO);
|
|
|
+ return findDisNameAll(disNameFindVO);
|
|
|
}
|
|
|
}
|