ソースを参照

优化门特备案病种查询

lighter 3 年 前
コミット
91ed491031

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>10.9.8</version>
+    <version>10.9.9</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 2 - 3
src/main/java/thyyxxk/webserver/dao/his/yibao/DictionaryDao.java

@@ -29,8 +29,8 @@ public interface DictionaryDao {
     @Select("select diagnosis_code as code, diagnosis_name as name from t_si_dl_dss_dns where diagnosis_name LIKE #{content}")
     List<PureCodeName> searchDiagnoseByName(String content);
 
-    @Select("select code,disease_name as name from t_si_dl_slw_spc_chr where disease_name like #{content}")
-    List<PureCodeName> selectSlwSpcDiag(String content);
+    @Select("select distinct new_code as code,new_name as name from ${tableName} where new_name like #{content}")
+    List<PureCodeName> selectSlwSpcDiag(@Param("content") String content, @Param("tableName") String tableName);
 
     @Select("select * from ${table}")
     List<SpecialDiag> selectAllSpecialDiags(@Param("table") String table);
@@ -56,7 +56,6 @@ public interface DictionaryDao {
             "si_icd_employees_maternity_hospitalization where new_name like #{content}")
     List<PureCodeName> selectMatnDiagForFrontSheetByName(@Param("content") String content);
 
-
     @Select("select rtrim(new_code) as code, rtrim(new_name) as name " +
             "from si_icd_single_diseases where py_code like #{content} ")
     List<PureCodeName> selectSpcDssDiagForFrontSheetByPyCode(@Param("content") String content);

+ 2 - 0
src/main/java/thyyxxk/webserver/entity/dictionary/SearchDataParam.java

@@ -13,6 +13,8 @@ public class SearchDataParam {
     @NotBlank(message = "查询内容不能为空")
     private String content;
     private String medType;
+    // 人员类别:1-职工,2-居民
+    private Integer perstype;
     private Integer page;
     private boolean accurateSearch = false;
 }

+ 12 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiQueryService.java

@@ -172,7 +172,18 @@ public class SiQueryService {
                     }
                 }
                 if (null != info.getInsuplcAdmdvs()) {
-                    info.setInsuplcAdmdvsName(dao.selectRegionName(info.getInsuplcAdmdvs()));
+                    String admdvsName = dao.selectRegionName(info.getInsuplcAdmdvs());
+                    if (null == admdvsName) {
+                        PureCodeName region = dao.selectAdmdvsNameAndParentName(info.getInsuplcAdmdvs());
+                        if (null == region) {
+                            region = dao.selectAdmdvsName(info.getInsuplcAdmdvs());
+                            if (null == region) {
+                                region = dao.selectAdmdvsNameAndParentName(info.getInsuplcAdmdvs().substring(0, 4) + "00");
+                            }
+                        }
+                        admdvsName = region.getName();
+                    }
+                    info.setInsuplcAdmdvsName(admdvsName);
                 }
                 list.add(info);
             }

+ 8 - 3
src/main/java/thyyxxk/webserver/service/yibao/DictionaryService.java

@@ -35,7 +35,7 @@ public class DictionaryService {
             case "diag":
                 return ResultVoUtil.success(deepinDiag(param.getMethod(), param.getContent(), param.isAccurateSearch()));
             case "slwspcdiag":
-                return ResultVoUtil.success(deepinSlwSpcDiag(param.getContent()));
+                return ResultVoUtil.success(deepinSlwSpcDiag(param.getContent(), param.getPerstype()));
             case "injurydiag":
                 return ResultVoUtil.success(deepinInjuryDiag(param.getMethod(), param.getContent()));
         }
@@ -83,9 +83,14 @@ public class DictionaryService {
         }
     }
 
-    private List<PureCodeName> deepinSlwSpcDiag(String content) {
+    private List<PureCodeName> deepinSlwSpcDiag(String content, Integer perstype) {
         content = "%" + content + "%";
-        return dao.selectSlwSpcDiag(content);
+        if (null == perstype) {
+            perstype = 1;
+        }
+        String tableName = perstype == 1 ? "si_icd_employees_outpatient_chronic_idiopathic_disease"
+                : "si_icd_residents_outpatient_chronic_idiopathic_disease";
+        return dao.selectSlwSpcDiag(content, tableName);
     }
 
     public ResultVo<List<SpecialDiag>> getAllSpecialDiags(String medType) {