|
@@ -68,13 +68,13 @@ public class NationalMatchService {
|
|
|
if (type == NationalMatchType.MEDICINE) {
|
|
|
String approve = param.getApprovalNumber();
|
|
|
approve = StringUtil.isBlank(approve) ? "%%" : "%" + approve.replace("国药准字", "") + "%";
|
|
|
- List<SiCentralMedicine> list = dao.selectNationalMedicines(param.getName(), approve);
|
|
|
+ List<SiCentralMedicine> list = dao.selectNationalMedicines(param.getFuzzyName(), approve);
|
|
|
if (null == list || list.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有符合条件的国家目录。");
|
|
|
}
|
|
|
return ResultVoUtil.success(list);
|
|
|
} else if (type == NationalMatchType.HERBAL){
|
|
|
- String[] splits = param.getName().split("(");
|
|
|
+ String[] splits = param.getFuzzyName().split("(");
|
|
|
splits = splits[0].split("\\(");
|
|
|
String name = splits[0].replaceAll("颗粒", "");
|
|
|
List<SiCentralHerbal> list = dao.selectNationalHerbals(name.trim());
|
|
@@ -83,20 +83,21 @@ public class NationalMatchService {
|
|
|
}
|
|
|
return ResultVoUtil.success(list);
|
|
|
} else if (type == NationalMatchType.SERVICE) {
|
|
|
- String[] splits = param.getName().split("外送");
|
|
|
+ String[] splits = param.getFuzzyName().split("外送");
|
|
|
String name;
|
|
|
if (splits.length == 1) {
|
|
|
name = splits[0];
|
|
|
} else {
|
|
|
name = splits[0].substring(0, splits[0].length() - 1);
|
|
|
}
|
|
|
+ name = "%" + name + "%";
|
|
|
List<SiCentralServices> list = dao.selectNationalServices(name);
|
|
|
if (null == list || list.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有符合条件的国家目录。");
|
|
|
}
|
|
|
return ResultVoUtil.success(list);
|
|
|
} else {
|
|
|
- String name = "%" + param.getSearchNameForSupply() + "%";
|
|
|
+ String name = "%" + param.getFuzzyName() + "%";
|
|
|
List<SiCentralSuppliesMini> list = dao.selectNationalSupplies(name);
|
|
|
if (null == list || list.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有符合条件的国家目录。");
|