Parcourir la source

积木报表优化

xiaochan il y a 3 ans
Parent
commit
a14df5e0cc

+ 1 - 1
pom.xml

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

+ 4 - 4
src/main/java/thyyxxk/webserver/controller/jimubaobiao/jiMuBaoBiaoController.java → src/main/java/thyyxxk/webserver/controller/jimubaobiao/JiMuBaoBiaoController.java

@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.querydata.BaoBiaoChaXun;
-import thyyxxk.webserver.service.jimubaobiao.jiMuBaoBiaoService;
+import thyyxxk.webserver.service.jimubaobiao.JiMuBaoBiaoService;
 
 import java.util.List;
 import java.util.Map;
@@ -21,11 +21,11 @@ import java.util.Map;
  */
 @RequestMapping("/jiMuBaoBiao")
 @RestController
-public class jiMuBaoBiaoController {
+public class JiMuBaoBiaoController {
 
-    private final jiMuBaoBiaoService service;
+    private final JiMuBaoBiaoService service;
 
-    public jiMuBaoBiaoController(jiMuBaoBiaoService service) {
+    public JiMuBaoBiaoController(JiMuBaoBiaoService service) {
         this.service = service;
     }
 

+ 22 - 1
src/main/java/thyyxxk/webserver/dao/his/jimubaobiao/jiMuBaoBiaoDao.java → src/main/java/thyyxxk/webserver/dao/his/jimubaobiao/JiMuBaoBiaoDao.java

@@ -18,9 +18,16 @@ import java.util.List;
  * @date 2021-09-02 10:22
  */
 @Mapper
-public interface jiMuBaoBiaoDao {
+public interface JiMuBaoBiaoDao {
 
 
+    /**
+     * 查询患者住院 是否超 30 天
+     *
+     * @param startTime 开始时间
+     * @param endTime   结束时间
+     * @return list
+     */
     @Select("select '超30天' name,count(*) value,'天' unit " +
             "from zy_inactpatient where admiss_date >= #{startTime} and admiss_date <= #{endTime} " +
             "and date_part('day',  cast(dis_date as TIMESTAMP) - cast(admiss_date as TIMESTAMP)) > 30 " +
@@ -30,11 +37,25 @@ public interface jiMuBaoBiaoDao {
     List<BaoBiaoChaXun> huanZheZhuYuanChao(@Param("startTime") Timestamp startTime,
                                            @Param("endTime") Timestamp endTime);
 
+    /**
+     * 查询患者入院间隔
+     *
+     * @param startTime 开始时间
+     * @param endTime   结束时间
+     * @return list
+     */
     @Select("select date_part('day',cast(dis_date as TIMESTAMP) - cast(admiss_date as TIMESTAMP)) tian_shu from zy_inactpatient " +
             "where admiss_date >= #{startTime} and admiss_date <= #{endTime}")
     List<BigDecimal> huanZheRuYuanJianGe(@Param("startTime") Timestamp startTime,
                                          @Param("endTime") Timestamp endTime);
 
+    /**
+     * 获取患者人数
+     *
+     * @param startTime 时间时间
+     * @param endTime   结束时间
+     * @return list
+     */
     @Select("select count(*) count from zy_inactpatient where admiss_date >= #{startTime} and admiss_date <= #{endTime}")
     BigDecimal huanZheRenShu(@Param("startTime") Timestamp startTime,
                              @Param("endTime") Timestamp endTime);