Переглянути джерело

药房使用时不受时间限制

hsh 1 місяць тому
батько
коміт
cc732355d8

+ 23 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/YpZdGroupNameController.java

@@ -228,6 +228,29 @@ public class YpZdGroupNameController {
         }
     }
 
+    /**
+     * @Description 查询所有药房
+     * @Author hsh
+     * @Date 2025/8/18 0018 10:18
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/selectYfAll", method = {RequestMethod.GET})
+    public Map<String, Object> selectYfAll() {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            List<YpZdGroupNameVo> list = ypZdGroupNameService.selectYfAll();
+            resultMap.put("code", 0);
+            resultMap.put("data", list);
+            resultMap.put("message", "查询药房成功");
+            return resultMap;
+        } catch (Exception e) {
+            log.error("查询药房失败,错误信息{}", e.getMessage());
+            resultMap.put("code", -1);
+            resultMap.put("message", "查询药房失败: " + e.getMessage());
+            return resultMap;
+        }
+    }
+
     /**
      * @Description 根据有效时间查询所有药房
      * @Author hsh

+ 5 - 0
src/main/java/cn/hnthyy/thmz/service/his/yp/YpZdGroupNameService.java

@@ -56,6 +56,11 @@ public interface YpZdGroupNameService {
      * @return
      */
     List<YpZdGroupNameVo> selectYfAllByTime();
+    /**
+     * 查询所有药房
+     * @return
+     */
+    List<YpZdGroupNameVo> selectYfAll();
     /**
      * @description: 获取可用的药房
      * @author: lihong  71 查询西药房 91 查询医材药房 83 查询颗粒药房 81 查询中草药房 73 查询住院药房

+ 5 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpZdGroupNameServiceImpl.java

@@ -64,6 +64,11 @@ public class YpZdGroupNameServiceImpl implements YpZdGroupNameService {
         return 0;
     }
 
+    @Override
+    public List<YpZdGroupNameVo> selectYfAll() {
+        return ypZdGroupNameMapper.selectYfAllByTime();
+    }
+
     @Override
     public List<YpZdGroupNameVo> selectYfAllByTime() {
         List<YpZdGroupNameVo> resultList = new ArrayList<>();

+ 1 - 1
src/main/resources/static/js/fy_config.js

@@ -8,7 +8,7 @@ $(function (){
     });
 
     // 查询药房信息
-    initDynamicSelect("selectYfAllByTime", "groupNo", "groupNo", "groupName");
+    initDynamicSelect("selectYfAll", "groupNo", "groupNo", "groupName");
     // 查询药库信息
     initDynamicSelect("selectYkAll", "groupYk", "groupNo", "groupName");