Quellcode durchsuchen

添加病种报表的三个分页接口

JammeyJiang vor 3 Wochen
Ursprung
Commit
234cc301bc

+ 28 - 1
src/main/java/com/kcim/service/StandardReportService.java

@@ -94,6 +94,15 @@ public interface StandardReportService {
      */
     List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate);
 
+    /**
+     * 分页获取病种成本明细表数据
+     * @param current 当前页码
+     * @param pageSize 每页大小
+     * @param computeDate 核算年月
+     * @return 分页数据
+     */
+    Object getDiseaseCostDetailByPage(Integer current, Integer pageSize, String computeDate);
+
     /**
      * 获取病种成本构成明细表数据
      * @param computeDate
@@ -101,12 +110,30 @@ public interface StandardReportService {
      */
     List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate);
 
+    /**
+     * 分页获取病种成本构成明细表数据
+     * @param current 当前页码
+     * @param pageSize 每页大小
+     * @param computeDate 核算年月
+     * @return 分页数据
+     */
+    Object getDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate);
+
     /**
      * 获取服务单元病种成本构成明细表数据
      * @param computeDate
      * @return
      */
     StandardDeptCostCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate);
+    
+    /**
+     * 分页获取服务单元病种成本构成明细表数据
+     * @param current 当前页码
+     * @param pageSize 每页大小
+     * @param computeDate 核算年月
+     * @return 分页数据
+     */
+    Object getDeptDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate);
 
     /**
      * 获取DRG成本明细表数据
@@ -128,4 +155,4 @@ public interface StandardReportService {
      * @return
      */
     StandardDeptCostCollectResponse getDeptDrgCostCompositionDetail(String computeDate);
-}
+}

+ 64 - 0
src/main/java/com/kcim/service/impl/StandardReportServiceImpl.java

@@ -7,6 +7,7 @@ import com.kcim.common.constants.SplitConstant;
 import com.kcim.common.exception.CostException;
 import com.kcim.common.util.BeanUtil;
 import com.kcim.common.util.ComputeDateUtils;
+import com.kcim.common.util.PageUtils;
 import com.kcim.common.util.UserContext;
 import com.kcim.dao.model.*;
 import com.kcim.dao.repository.*;
@@ -2356,5 +2357,68 @@ public class StandardReportServiceImpl implements StandardReportService {
         return costItemMap;
     }
 
+    @Override
+    public Object getDiseaseCostDetailByPage(Integer current, Integer pageSize, String computeDate) {
+        // 获取完整数据列表
+        List<DiseaseCostDetailVO> fullList = getDiseaseCostDetail(computeDate);
+        
+        // 手动分页
+        int total = fullList.size();
+        int startIndex = (current - 1) * pageSize;
+        int endIndex = Math.min(startIndex + pageSize, total);
+        
+        // 获取当前页数据
+        List<DiseaseCostDetailVO> pageList = new ArrayList<>();
+        if (startIndex < total) {
+            pageList = fullList.subList(startIndex, endIndex);
+        }
+        
+        return new PageUtils(pageList, total, pageSize, current);
+    }
+
+    @Override
+    public Object getDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate) {
+        // 获取完整数据列表
+        List<DiseaseCostDetailVO> fullList = getDiseaseCostCompositionDetail(computeDate);
+        
+        // 手动分页
+        int total = fullList.size();
+        int startIndex = (current - 1) * pageSize;
+        int endIndex = Math.min(startIndex + pageSize, total);
+        
+        // 获取当前页数据
+        List<DiseaseCostDetailVO> pageList = new ArrayList<>();
+        if (startIndex < total) {
+            pageList = fullList.subList(startIndex, endIndex);
+        }
+        
+        return new PageUtils(pageList, total, pageSize, current);
+    }
+
+    @Override
+    public Object getDeptDiseaseCostCompositionDetailByPage(Integer current, Integer pageSize, String computeDate) {
+        // 获取完整数据
+        StandardDeptCostCollectResponse fullData = getDeptDiseaseCostCompositionDetail(computeDate);
+        
+        // 对数据进行分页
+        List<StandardReportFormCustomVo> fullList = fullData.getData();
+        int total = fullList.size();
+        int startIndex = (current - 1) * pageSize;
+        int endIndex = Math.min(startIndex + pageSize, total);
+        
+        // 获取当前页数据
+        List<StandardReportFormCustomVo> pageList = new ArrayList<>();
+        if (startIndex < total) {
+            pageList = fullList.subList(startIndex, endIndex);
+        }
+        
+        // 构造分页结果
+        StandardDeptCostCollectResponse pageData = new StandardDeptCostCollectResponse();
+        pageData.setTitle(fullData.getTitle());
+        pageData.setData(pageList);
+        
+        return new PageUtils(pageList, total, pageSize, current);
+    }
+
 
 }

+ 24 - 0
src/main/java/com/kcim/web/StandardReportController.java

@@ -101,18 +101,42 @@ public class StandardReportController extends AbstractController {
         return Result.ok(standardReportService.getDiseaseCostDetail(computeDate));
     }
 
+    @ApiOperation("医院病种成本明细表(分页)")
+    @GetMapping("/getDiseaseCostDetailByPage")
+    public Result getDiseaseCostDetailByPage(@RequestParam(defaultValue = "1") Integer current,
+                                             @RequestParam(defaultValue = "10") Integer pageSize,
+                                             @RequestParam String computeDate) {
+        return Result.ok(standardReportService.getDiseaseCostDetailByPage(current, pageSize, computeDate));
+    }
+
     @ApiOperation("医院病种成本构成明细表")
     @GetMapping("/getDiseaseCostCompositionDetail")
     public Result getDiseaseCostCompositionDetail(@RequestParam String computeDate) {
         return Result.ok(standardReportService.getDiseaseCostCompositionDetail(computeDate));
     }
 
+    @ApiOperation("医院病种成本构成明细表(分页)")
+    @GetMapping("/getDiseaseCostCompositionDetailByPage")
+    public Result getDiseaseCostCompositionDetailByPage(@RequestParam(defaultValue = "1") Integer current,
+                                                        @RequestParam(defaultValue = "10") Integer pageSize,
+                                                        @RequestParam String computeDate) {
+        return Result.ok(standardReportService.getDiseaseCostCompositionDetailByPage(current, pageSize, computeDate));
+    }
+
     @ApiOperation("医院服务单元病种成本构成明细表")
     @GetMapping("/getDeptDiseaseCostCompositionDetail")
     public Result getDeptDiseaseCostCompositionDetail(@RequestParam String computeDate) {
         return Result.ok(standardReportService.getDeptDiseaseCostCompositionDetail(computeDate));
     }
 
+    @ApiOperation("医院服务单元病种成本构成明细表(分页)")
+    @GetMapping("/getDeptDiseaseCostCompositionDetailByPage")
+    public Result getDeptDiseaseCostCompositionDetailByPage(@RequestParam(defaultValue = "1") Integer current,
+                                                            @RequestParam(defaultValue = "10") Integer pageSize,
+                                                            @RequestParam String computeDate) {
+        return Result.ok(standardReportService.getDeptDiseaseCostCompositionDetailByPage(current, pageSize, computeDate));
+    }
+
     @ApiOperation("医院DRG成本明细表")
     @GetMapping("/getDrgCostDetail")
     public Result getDrgCostDetail(@RequestParam String computeDate) {