选入模糊查询问题

v3
qiuyt 3 months ago
parent c9c0eb5e9c
commit 9e592f44cf

@ -96,16 +96,46 @@ public class ThirdAliDrugController {
} }
}); });
// 判断中文括号和英文括号的就今昔新的结果进行剔除 // 判断中文括号和英文括号的就今昔新的结果进行剔除
if(thirdAliDrug.getCpmctymc().contains("(") || thirdAliDrug.getCpmctymc().contains("")){
if(thirdAliDrug.getCpmctymc().contains("(") || thirdAliDrug.getCpmctymc().contains("")
|| !(
StrUtil.isEmpty(thirdAliDrug.getApprovalNum()) && StrUtil.isEmpty(thirdAliDrug.getNameCode()) &&
StrUtil.isEmpty(thirdAliDrug.getManufacturer())&&
StrUtil.isEmpty(thirdAliDrug.getFormSpec())&&
StrUtil.isEmpty(thirdAliDrug.getBzgg())
)
){
List<ThirdAliDrug> listResult = new ArrayList<>(); List<ThirdAliDrug> listResult = new ArrayList<>();
if (CollUtil.isNotEmpty(list)) { if (CollUtil.isNotEmpty(list)) {
for (ThirdAliDrug aliDrug : list) { for (ThirdAliDrug aliDrug : list) {
if(!nameCodeIn.contains(aliDrug.getNameCode())){ // String cpmctymc = StringUtils.isEmpty(aliDrug.getCpmctymc()) ? "":aliDrug.getCpmctymc();
String nameCode = thirdAliDrug.getNameCode();
String approvalNum = thirdAliDrug.getApprovalNum();
String manufacturer = thirdAliDrug.getManufacturer();
String formSpec = thirdAliDrug.getFormSpec();
String bzgg = thirdAliDrug.getBzgg();
if (StringUtils.isNotEmpty(nameCode) && !nameCode.contains(aliDrug.getNameCode())) {
continue;
}
if (StringUtils.isNotEmpty(approvalNum) && !nameCode.contains(aliDrug.getApprovalNum())) {
continue;
}
if (StringUtils.isNotEmpty(manufacturer) && !nameCode.contains(aliDrug.getManufacturer())) {
continue;
}
if (StringUtils.isNotEmpty(formSpec) && !nameCode.contains(aliDrug.getFormSpec())) {
continue;
}
if (StringUtils.isNotEmpty(bzgg) && !nameCode.contains(aliDrug.getBzgg())) {
continue;
}
if (nameCodeIn.contains(aliDrug.getNameCode())) {
continue;
}
listResult.add(aliDrug); listResult.add(aliDrug);
} }
}
list = listResult; list = listResult;
} }
} }

Loading…
Cancel
Save