Kaynağa Gözat

add: 修复分页接口没有返回page的问题

Scott 1 yıl önce
ebeveyn
işleme
e4cd53bfaa

+ 3 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/common/bo/AuditInfoResponse.java

@@ -78,6 +78,9 @@ public class AuditInfoResponse implements Serializable {
     @ApiModelProperty(value = "违规药品明细")
     private List<AuditInfoListResponse> detailList;
 
+    @ApiModelProperty("总数")
+    protected Long total;
+
     @ApiModelProperty(value = "审核状态: wait=待分配; process=处理中; finish=已完成")
     private java.lang.String checkState;
 

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/common/bo/InpatientSettlementDetailResponse.java

@@ -26,4 +26,9 @@ public class InpatientSettlementDetailResponse implements Serializable {
     @ApiModelProperty("医保项目明细")
     private List<MedicalInsuranceProjectDetailsResponse> hospitalizationSettleDetailResponse;
 
+    @ApiModelProperty("总数")
+    protected Long total;
+
+
+
 }

+ 6 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/AfterwardsAuditController.java

@@ -101,8 +101,12 @@ public class AfterwardsAuditController extends JeecgController<AfterwardsAudit,
 
 	@ApiOperation(value = "审核端-患者住院结算主单")
 	@GetMapping(value = "/audit/settlement/master")
-	public Result<List<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("id") Integer id) {
-		List<InpatientSettlementMasterResponse> result = afterwardsAuditService.loadInpatientSettlementMaster(id);
+	public Result<IPage<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("id") Integer id,
+																						  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+																						  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize
+																						  ) {
+		Page<MedicalInsuranceProjectDetailsResponse> page = new Page<>(pageNo, pageSize);
+		IPage<InpatientSettlementMasterResponse> result = afterwardsAuditService.loadInpatientSettlementMaster(page, id);
 		return Result.OK("获取成功", result);
 	}
 

+ 5 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/ViolationAnalysisController.java

@@ -392,10 +392,12 @@ public class ViolationAnalysisController {
 
     @ApiOperation(value = "违规分析-患者住院结算主单")
     @GetMapping(value = "/audit/settlement/master")
-    public Result<List<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("detailId") Integer detailId) {
+    public Result<IPage<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("detailId") Integer detailId,
+                                                                                         @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                                                         @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
         AfterwardsAuditDetail byId = afterwardsAuditDetailService.getById(detailId);
-
-        List<InpatientSettlementMasterResponse> result = afterwardsAuditService.loadInpatientSettlementMaster(byId.getAfterwardsAuditId());
+        Page<MedicalInsuranceProjectDetailsResponse> page = new Page<>(pageNo, pageSize);
+        IPage<InpatientSettlementMasterResponse> result = afterwardsAuditService.loadInpatientSettlementMaster(page, byId.getAfterwardsAuditId());
         return Result.OK("获取成功", result);
     }
 

+ 7 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/ViolationAuditAfterController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.medical.controller;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -57,8 +58,12 @@ public class ViolationAuditAfterController {
 
     @ApiOperation(value = "违规分析-患者住院结算主单")
     @GetMapping(value = "/audit/settlement/master")
-    public Result<List<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("id") Integer id) {
-        List<InpatientSettlementMasterResponse> result = violationAuditAfterService.loadInpatientSettlementMaster(id);
+    public Result<IPage<InpatientSettlementMasterResponse>> loadInpatientSettlementMaster(HttpServletRequest request, @RequestParam("id") Integer id,
+                                                                                         @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                                                         @RequestParam(name="pageSize", defaultValue="10") Integer pageSize
+                                                                                         ) {
+        Page<MedicalInsuranceProjectDetailsResponse> page = new Page<>(pageNo, pageSize);
+        IPage<InpatientSettlementMasterResponse> result = violationAuditAfterService.loadInpatientSettlementMaster(page, id);
         return Result.OK("获取成功", result);
     }
 

+ 3 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/AfterwardsAuditMapper.java

@@ -68,7 +68,7 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
      * @param id
      * @return
      */
-    List<AuditInfoListResponse> loadAuditInfoList(Page<AuditInfoListResponse> page, @Param("id") Integer id);
+    IPage<AuditInfoListResponse> loadAuditInfoList(Page<AuditInfoListResponse> page, @Param("id") Integer id);
 
     List<DiagnosticInfoResponse> loadDiagnosticInfo(@Param("id") Integer id);
 //    prescription_order
@@ -86,9 +86,9 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
      * @param id
      * @return
      */
-    List<MedicalInsuranceProjectDetailsResponse> loadMedicalInsuranceProjectDetails(Page<MedicalInsuranceProjectDetailsResponse> page, @Param("hisid") String hisid);
+    IPage<MedicalInsuranceProjectDetailsResponse> loadMedicalInsuranceProjectDetails(Page<MedicalInsuranceProjectDetailsResponse> page, @Param("hisid") String hisid);
 
-    List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(@Param("id") Integer id);
+    IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, @Param("id") Integer id);
 
     BigDecimal statisticsAfterAuditTotal(@Param("ew") AfterDeptDetailRequest afterwardsAuditDetail);
 }

+ 1 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IAfterwardsAuditService.java

@@ -113,7 +113,7 @@ public interface IAfterwardsAuditService extends IService<AfterwardsAudit> {
      * @param id 事后审核工单id
      * @return
      */
-    List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Integer id);
+    IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id);
 
     BigDecimal statisticsAfterAuditTotal(AfterDeptDetailRequest afterwardsAuditDetail);
 

+ 2 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IViolationAuditAfterService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.medical.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.modules.medical.common.bo.DiagnosticInfoResponse;
 import org.jeecg.modules.medical.common.bo.InpatientSettlementDetailResponse;
@@ -20,7 +21,7 @@ public interface IViolationAuditAfterService {
 
     InpatientSettlementDetailResponse loadInpatientSettlementDetail(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id);
 
-    List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Integer id);
+    IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id);
 
     List<DiagnosticInfoResponse> loadDiagnosticInfo(Integer id);
 }

+ 21 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AfterwardsAuditServiceImpl.java

@@ -388,8 +388,15 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         }
         result.setAuditNumber(appealNumber);
 
+
+        Long total = 0L;
+        List<AuditInfoListResponse> auditInfoListResponseList =  new ArrayList<>();
         //获取违规的detail数据
-        List<AuditInfoListResponse> auditInfoListResponseList = baseMapper.loadAuditInfoList(page, id);
+        IPage<AuditInfoListResponse> resultPages = baseMapper.loadAuditInfoList(page, id);
+        if (resultPages != null) {
+            auditInfoListResponseList = resultPages.getRecords();
+            total = resultPages.getTotal();
+        }
         if (!CollectionUtils.isEmpty(auditInfoListResponseList)) {
             for (AuditInfoListResponse auditInfoListResponse : auditInfoListResponseList) {
                 // 计算异常多收-少收
@@ -406,6 +413,7 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
             }
             result.setDetailList(auditInfoListResponseList);
         }
+        result.setTotal(total);
         return result;
     }
 
@@ -493,10 +501,18 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         PatientInfoResponse patientInfo = baseMapper.loadInpatientSettlementInfo(id);
         String hisid = patientInfo.getSettlementBillNumber();
         // 获取医保项目明细
-        List<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = baseMapper.loadMedicalInsuranceProjectDetails(page, hisid);
+        IPage<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = baseMapper.loadMedicalInsuranceProjectDetails(page, hisid);
         InpatientSettlementDetailResponse r = new InpatientSettlementDetailResponse();
         r.setPatientInfo(patientInfo);
-        r.setHospitalizationSettleDetailResponse(medicalInsuranceProjects);
+
+        List<MedicalInsuranceProjectDetailsResponse> records = new ArrayList<>();
+        Long total = 0L;
+        if (medicalInsuranceProjects != null) {
+            records = medicalInsuranceProjects.getRecords();
+            total = medicalInsuranceProjects.getTotal();
+        }
+        r.setHospitalizationSettleDetailResponse(records);
+        r.setTotal(total);
         return r;
     }
 
@@ -520,8 +536,8 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
      * @return
      */
     @Override
-    public List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Integer id) {
-        return baseMapper.loadInpatientSettlementMaster(id);
+    public IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id) {
+        return baseMapper.loadInpatientSettlementMaster(page, id);
     }
 
     @Override

+ 14 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/ViolationAuditAfterServiceImpl.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.medical.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
@@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -58,16 +60,24 @@ public class ViolationAuditAfterServiceImpl implements IViolationAuditAfterServi
         PatientInfoResponse patientInfo = afterwardsAuditMapper.loadInpatientSettlementInfo(id);
         String hisid = patientInfo.getSettlementBillNumber();
         // 获取医保项目明细
-        List<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = afterwardsAuditMapper.loadMedicalInsuranceProjectDetails(page, hisid);
+        IPage<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = afterwardsAuditMapper.loadMedicalInsuranceProjectDetails(page, hisid);
+        List<MedicalInsuranceProjectDetailsResponse> resultList = new ArrayList<>();
+        Long total = 0L;
+        if (medicalInsuranceProjects != null) {
+            resultList = medicalInsuranceProjects.getRecords();
+            total = medicalInsuranceProjects.getTotal();
+        }
+
         InpatientSettlementDetailResponse r = new InpatientSettlementDetailResponse();
         r.setPatientInfo(patientInfo);
-        r.setHospitalizationSettleDetailResponse(medicalInsuranceProjects);
+        r.setHospitalizationSettleDetailResponse(resultList);
+        r.setTotal(total);
         return r;
     }
 
     @Override
-    public List<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Integer id) {
-        return afterwardsAuditMapper.loadInpatientSettlementMaster(id);
+    public IPage<InpatientSettlementMasterResponse> loadInpatientSettlementMaster(Page<MedicalInsuranceProjectDetailsResponse> page, Integer id) {
+        return afterwardsAuditMapper.loadInpatientSettlementMaster(page, id);
     }
 
     @Override