Преглед изворни кода

feature:线下筛选医院

wuyongyi пре 1 година
родитељ
комит
449293d22e
1 измењених фајлова са 5 додато и 6 уклоњено
  1. 5 6
      src/main/java/com/ywt/mg/services/OfflineNewService.java

+ 5 - 6
src/main/java/com/ywt/mg/services/OfflineNewService.java

@@ -167,13 +167,12 @@ public class OfflineNewService {
             }
             String source = request.getSource();
             int searchHospitalId = request.getHospitalId();
-            if (searchHospitalId > -1 && StringHelper.isNullOrWhiteSpace(source)) {
-                List<Integer> filteredSources = convertHospitalId2OfflineSources(searchHospitalId);
-                if (!Checker.isNone(filteredSources)) {
-                    whereSql += String.format(" and ( source in (%s)  )", filteredSources.stream().map(String::valueOf).collect(Collectors.joining(",")));
-                }
+            if (searchHospitalId > 0) {
+                whereSql += " and ( hospital_id = ?  )";
+                paramList.add(searchHospitalId);
             }
 
+
             String hisClinicCode = request.getHisClinicCode();
             if (!Checker.isNull(hisClinicCode)) {
                 whereSql += " and ( his_clinic_code like ?  )";
@@ -606,7 +605,7 @@ public class OfflineNewService {
     }
 
     public List<OfflineConsultation> queryNewDownloadOfflineList(DownloadOfflineListNewRequest request) {
-        Map map = queryOfflineListCommon(request);
+        Map map = queryNewOfflineListCommon(request);
         String whereSql = (String) map.get(ConstantDef.KEY_WHERE_SQL);
         List paramList = (List) map.get(ConstantDef.KEY_PARAM_LIST);
         String sqlBuilder = "select * from offline_consultation where " + whereSql + "order by create_time desc";