Selaa lähdekoodia

挂号页面添加科室简介

lighter 2 vuotta sitten
vanhempi
commit
af64c74572

+ 1 - 1
src/main/java/thyyxxk/wxservice_server/controller/AppointmentController.java

@@ -45,7 +45,7 @@ public class AppointmentController {
     }
 
     @PostMapping("/getSourcesByDate")
-    public ResultVo<Integer[]> getSourcesByDate(@RequestBody GetSourcesByDateParam param) {
+    public ResultVo<Map<String, Object>> getSourcesByDate(@RequestBody GetSourcesByDateParam param) {
         return service.getSourcesByDate(param);
     }
 

+ 3 - 0
src/main/java/thyyxxk/wxservice_server/dao/AppointmentDao.java

@@ -59,4 +59,7 @@ public interface AppointmentDao {
     @Select("select count(1) from mzy_reqrec where patient_id=#{patNo} and cancel_mark=0 " +
             "and datediff(hour,request_day,getdate())<=24 ")
     int selectValidRegForCovidExam(String patNo);
+
+    @Select("select dept_describe from zd_unit_code where code=#{code} ")
+    String selectDeptDescription(String code);
 }

+ 5 - 2
src/main/java/thyyxxk/wxservice_server/service/AppointmentService.java

@@ -143,7 +143,7 @@ public class AppointmentService {
         return ResultVoUtil.success("夜间门诊科室缓存已重置。");
     }
 
-    public ResultVo<Integer[]> getSourcesByDate(GetSourcesByDateParam param) {
+    public ResultVo<Map<String, Object>> getSourcesByDate(GetSourcesByDateParam param) {
         Integer[] sourceArray = new Integer[7];
         RestTemplate template = new RestTemplate();
         Calendar calendar = Calendar.getInstance();
@@ -171,7 +171,10 @@ public class AppointmentService {
                 }
             }
         }
-        return ResultVoUtil.success(sourceArray);
+        Map<String, Object> resultMap = new HashMap<>();
+        resultMap.put("description", dao.selectDeptDescription(param.getDept()));
+        resultMap.put("sources", sourceArray);
+        return ResultVoUtil.success(resultMap);
     }
 
     public ResultVo<Object> getDoctorSources(GetDoctorSourcesParam param) {