|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.client.NeoServiceClient;
|
|
|
+import com.diagbot.config.CryptConfiguer;
|
|
|
import com.diagbot.dto.ConceptBaseDTO;
|
|
|
import com.diagbot.dto.DiagnoseDetailSaveDTO;
|
|
|
import com.diagbot.dto.DiagnosePageDTO;
|
|
@@ -84,6 +85,8 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
NeoServiceClient neoServiceClient;
|
|
|
@Autowired
|
|
|
LisMappingFacade lisMappingFacade;
|
|
|
+ @Autowired
|
|
|
+ CryptConfiguer cryptConfiguer;
|
|
|
|
|
|
/**
|
|
|
* 诊断依据分页
|
|
@@ -152,7 +155,11 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
diseaseIndexVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
|
|
|
List<Diagnose> diagnoseList = this.list(
|
|
|
new QueryWrapper<Diagnose>().eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
|
- diseaseIndexVO.setDisNamList(diagnoseList.stream().map(r -> r.getDisName()).distinct().collect(Collectors.toList()));
|
|
|
+ List<String> disNameList = diagnoseList.stream().map(r -> r.getDisName()).distinct().collect(Collectors.toList());
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
+ CryptUtil.encryptList(disNameList);
|
|
|
+ }
|
|
|
+ diseaseIndexVO.setDisNamList(disNameList);
|
|
|
return this.index(diseaseIndexVO);
|
|
|
}
|
|
|
|
|
@@ -537,12 +544,22 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
if (DiagnoseFeatureTypeEnum.Lis.getKey() == bean.getType()) {
|
|
|
String oldVerifyUnique = bean.getVerifyUnique();
|
|
|
if (StringUtil.isNotEmpty(bean.getUniqueName())) { // 公表项数据不为空
|
|
|
- if (!lisMappingSet.contains(CryptUtil.encrypt_char(bean.getStandard()) + "__" + CryptUtil.encrypt_char(bean.getRelation())
|
|
|
- + "__" + CryptUtil.encrypt_char(bean.getUniqueName()))) {
|
|
|
- bean.setVerifyUnique("无公表项");
|
|
|
- diagnoseName.add(bean.getDisName());
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
+ if (!lisMappingSet.contains(CryptUtil.encrypt_char(bean.getStandard()) + "__" + CryptUtil.encrypt_char(bean.getRelation())
|
|
|
+ + "__" + CryptUtil.encrypt_char(bean.getUniqueName()))) {
|
|
|
+ bean.setVerifyUnique("无公表项");
|
|
|
+ diagnoseName.add(bean.getDisName());
|
|
|
+ } else {
|
|
|
+ bean.setVerifyUnique(""); // 将原值清空
|
|
|
+ }
|
|
|
} else {
|
|
|
- bean.setVerifyUnique(""); // 将原值清空
|
|
|
+ if (!lisMappingSet.contains(bean.getStandard() + "__" + bean.getRelation()
|
|
|
+ + "__" + bean.getUniqueName())) {
|
|
|
+ bean.setVerifyUnique("无公表项");
|
|
|
+ diagnoseName.add(bean.getDisName());
|
|
|
+ } else {
|
|
|
+ bean.setVerifyUnique(""); // 将原值清空
|
|
|
+ }
|
|
|
}
|
|
|
} else { // 公表项数据为空
|
|
|
bean.setVerifyUnique("无公表项");
|
|
@@ -727,7 +744,11 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
int count = conceptFacade.count(new QueryWrapper<Concept>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("lib_type", LexiconTypeEnum.DIAGNOSIS.getKey())
|
|
|
- .eq("lib_name", CryptUtil.encrypt_char(diagnoseWrapper.getDisName()))
|
|
|
+ .eq("lib_name",
|
|
|
+ cryptConfiguer.cryptFlag ?
|
|
|
+ CryptUtil.encrypt_char(diagnoseWrapper.getDisName()) :
|
|
|
+ diagnoseWrapper.getDisName()
|
|
|
+ )
|
|
|
);
|
|
|
if (count == 0) {
|
|
|
flag = false;
|
|
@@ -976,8 +997,14 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
*/
|
|
|
public boolean verifyExist(Set<String> set, String name, List<Integer> type) {
|
|
|
for (Integer integer : type) {
|
|
|
- if (set.contains(CryptUtil.encrypt_char(name) + "_" + integer)) {
|
|
|
- return true;
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
+ if (set.contains(CryptUtil.encrypt_char(name) + "_" + integer)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (set.contains(name + "_" + integer)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return false;
|