lenovodn 1 éve
szülő
commit
4b79c04279

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

@@ -3,6 +3,7 @@ package org.jeecg.modules.medical.common.bo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.jeecg.common.aspect.annotation.Dict;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -36,6 +37,11 @@ public class MedicalInsuranceProjectDetailsResponse implements Serializable {
 
     @ApiModelProperty(value = "医保项目名称")
     private String itemName;
+    @ApiModelProperty(value = "项目编码")
+    private String itemIdHosp;
+
+    @ApiModelProperty(value = "项目名称")
+    private String itemNameHosp;
 
     @ApiModelProperty(value = "规格")
     private String drugSpec;
@@ -50,5 +56,6 @@ public class MedicalInsuranceProjectDetailsResponse implements Serializable {
     private BigDecimal cost;
 
     @ApiModelProperty(value = "支付列表")
+    @Dict(dicCode = "pType")
     private String pType;
 }

+ 8 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/MedicalInsRuleInfoController.java

@@ -230,6 +230,8 @@ public class MedicalInsRuleInfoController extends JeecgController<MedicalInsRule
     public Result<?> projectPage(@RequestParam(name = "id") Integer id,
                                  @RequestParam(name = "projectName", required = false) String projectName,
                                  @RequestParam(name = "projectCode", required = false) String projectCode,
+                                 @RequestParam(name = "correlationProjectCode", required = false) String correlationProjectCode,
+                                 @RequestParam(name = "correlationProjectName", required = false) String correlationProjectName,
                                  @RequestParam(name = "state", required = false) String state,
                                  @RequestParam(name = "gender", required = false) String gender,
                                  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@@ -252,6 +254,12 @@ public class MedicalInsRuleInfoController extends JeecgController<MedicalInsRule
         if (StringUtils.hasText(projectCode)) {
             medicalInsRuleProject.setProjectCode(projectCode.trim());
         }
+        if (StringUtils.hasText(correlationProjectCode)) {
+            medicalInsRuleProject.setCorrelationProjectCode(correlationProjectCode.trim());
+        }
+        if (StringUtils.hasText(correlationProjectName)) {
+            medicalInsRuleProject.setCorrelationProjectName(correlationProjectName.trim());
+        }
         if (StringUtils.hasText(gender)) {
             medicalInsRuleProject.setGender(gender);
         }

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

@@ -36,6 +36,8 @@ import org.springframework.web.servlet.ModelAndView;
 import javax.servlet.http.HttpServletRequest;
 import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
 import java.util.*;
 import java.util.List;
 
@@ -323,9 +325,9 @@ public class ViolationAnalysisController {
                                                               @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                                               HttpServletRequest req) {
         QueryWrapper<AfterwardsAuditDetail> queryWrapper = QueryGenerator.initQueryWrapper(afterwardsAuditDetail, req.getParameterMap());
-        if (StringUtils.hasText(afterwardsAuditDetail.getProjectSearch())) {
+        if (StringUtils.hasText(afterwardsAuditDetail.getSearchContent())) {
             queryWrapper.and(q1 ->
-                    q1.eq("medical_project_code", afterwardsAuditDetail.getProjectSearch()).or().eq("medical_project_code", afterwardsAuditDetail.getProjectSearch())
+                    q1.eq("medical_project_code", afterwardsAuditDetail.getSearchContent().trim()).or().eq("medical_project_name", afterwardsAuditDetail.getSearchContent().trim())
             );
         }
         Page<AfterwardsAuditDetail> page = new Page<AfterwardsAuditDetail>(pageNo, pageSize);
@@ -339,9 +341,9 @@ public class ViolationAnalysisController {
     public ModelAndView afterAllAuditExportXls(HttpServletRequest req, AfterwardsAuditDetail afterwardsAuditDetail) {
         try {
             QueryWrapper<AfterwardsAuditDetail> queryWrapper = QueryGenerator.initQueryWrapper(afterwardsAuditDetail, req.getParameterMap());
-            if (StringUtils.hasText(afterwardsAuditDetail.getProjectSearch())) {
+            if (StringUtils.hasText(afterwardsAuditDetail.getSearchContent())) {
                 queryWrapper.and(q1 ->
-                        q1.eq("medical_project_code", afterwardsAuditDetail.getProjectSearch()).or().eq("medical_project_code", afterwardsAuditDetail.getProjectSearch())
+                        q1.eq("medical_project_code", afterwardsAuditDetail.getSearchContent().trim()).or().eq("medical_project_name", afterwardsAuditDetail.getSearchContent().trim())
                 );
             }
             List<AfterwardsAuditDetail> exportList = afterwardsAuditDetailService.list(queryWrapper);

+ 1 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterwardsAuditDetail.java

@@ -1,8 +1,6 @@
 package org.jeecg.modules.medical.entity;
 
 import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
-import java.util.Date;
 import java.math.BigDecimal;
 
 import com.baomidou.mybatisplus.annotation.*;
@@ -171,5 +169,5 @@ public class AfterwardsAuditDetail implements Serializable {
     @TableField(exist = false)
     private String endTime;
     @TableField(exist = false) // 项目编码,名称
-    private String projectSearch;
+    private String searchContent;
 }

+ 2 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/HospitalizatioSettleDetail.java

@@ -55,10 +55,12 @@ public class HospitalizatioSettleDetail implements Serializable {
 	/**费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费、中成药费、一般诊疗费、挂号费、其他费;如果目前费用类别与此统计口径有差异,按照目前费用类别提取*/
 	@Excel(name = "费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费、中成药费、一般诊疗费、挂号费、其他费;如果目前费用类别与此统计口径有差异,按照目前费用类别提取", width = 15)
     @ApiModelProperty(value = "费用类别;床位费、诊查费、检查费、化验费、治疗费、手术费、护理费、卫生材料费、西药费、中药饮片费、中成药费、一般诊疗费、挂号费、其他费;如果目前费用类别与此统计口径有差异,按照目前费用类别提取")
+    @Dict(dicCode = "medical_fee_item_category")
     private java.lang.String pCategory;
     /**医疗收费项目类别*/
     @Excel(name = "医疗收费项目类别", width = 15)
     @ApiModelProperty(value = "医疗收费项目类别")
+    @Dict(dicCode = "categories_items")
     private java.lang.String categoriesItems;
 	/**项目使用时间;MMDDYYYY hh24:mi:ss 字段。项目收费时间指每个项目使用的日期,该时间范围为住院日期到出院日期之间。与结算日期不同。如明细中无具体某个项目的使用日期,可以结算日期代替。*/
 	@Excel(name = "项目使用时间;MMDDYYYY hh24:mi:ss 字段。项目收费时间指每个项目使用的日期,该时间范围为住院日期到出院日期之间。与结算日期不同。如明细中无具体某个项目的使用日期,可以结算日期代替。", width = 15)

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

@@ -225,6 +225,7 @@
             t.error_relatively_few_amt,
             t.quantity as quantity, -- 数量
             t.amount,
+            t.price,
             t.patient_id as patientId, -- 患者编号
             t.medical_project_code as medicalProjectCode, -- "医保项目编码",
             t.medical_project_name as medicalProjectName, -- "医保项目名称",
@@ -287,16 +288,26 @@
 
     <!-- loadInpatientSettlementInfo 查询方法 -->
     <select id="loadInpatientSettlementInfo" resultType="org.jeecg.modules.medical.common.bo.PatientInfoResponse">
-
-        select d.afterwards_audit_id as id,d.patient_id,d.patient_name,d.outpatient_number, sum(d.amount) as totalAmount,mab.hisid AS settlementBillNumber  from afterwards_audit_detail d
-        LEFT JOIN master_admission_bill AS mab ON mab.zyh = d.outpatient_number
-        where d.afterwards_audit_id = #{id, jdbcType=INTEGER}  group by d.afterwards_audit_id
+        SELECT
+            a.id,
+            a.outpatient_number AS admissionNumber, -- 住院号
+            a.patient_name AS patientName, -- 患者姓名
+            a.patient_id AS personalCode, -- 个人编码
+            mab.hisid AS settlementBillNumber, -- 结算单据号
+            mab.medfee_sumamt AS totalAmount -- 总发生金额
+        FROM
+            afterwards_audit AS a
+                LEFT JOIN master_admission_bill AS mab ON mab.zyh = a.outpatient_number
+        WHERE
+            a.id = #{id, jdbcType=INTEGER}
 
     </select>
     <select id="loadMedicalInsuranceProjectDetails"
             resultType="org.jeecg.modules.medical.common.bo.MedicalInsuranceProjectDetailsResponse">
         SELECT
             id,
+            item_id_hosp,
+            item_name_hosp,
             usage_date AS usageDate, -- "项目使用时间"
             discharge_dept_name AS dischargeDeptName, -- "科室名称"
             p_category AS pCategory, -- "费用类别"

+ 5 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/MidIncidentAuditDetailMapper.xml

@@ -217,11 +217,11 @@
             resultType="org.jeecg.modules.medical.common.bo.mid.response.MidAuditDetailResponse">
         SELECT
         id,
-        medical_ins_rule_info_name
-        ,medical_ins_rule_info_code
-        ,project_type
-        ,(select IFNULL(count(amount), 0) from mid_incident_audit_detail WHERE medical_ins_rule_info_code = m.medical_ins_rule_info_code ) as violationTotal  -- 违规总数
-        ,sum(amount) as errorAmountTotal -- 异常金额总和
+        medical_ins_rule_info_name,
+        medical_ins_rule_info_code,
+        project_type,
+        COALESCE(count(amount), 0) as violationTotal,
+        sum(amount) as errorAmountTotal
         FROM afterwards_audit_detail as m
         <where> 1=1
             <if test="medicalInsRuleInfoName != null and medicalInsRuleInfoName != ''">

+ 27 - 2
jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/AfterwardsAuditDataTest.java

@@ -22,6 +22,10 @@ import org.jeecg.modules.medical.ruleengine.SPELUtil;
 import org.jeecg.modules.medical.service.IAfterIncidentDetailLogService;
 import org.jeecg.modules.medical.service.IAfterwardsAuditDetailService;
 import org.jeecg.modules.medical.service.IAfterwardsAuditService;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.entity.SysUserDepart;
+import org.jeecg.modules.system.mapper.SysUserDepartMapper;
+import org.jeecg.modules.system.service.ISysDepartService;
 import org.jeecg.modules.medical.service.IAfterwardsIncidentAuditDiagnoseService;
 import org.jeecg.modules.medical.service.IMedicalInsRuleInfoService;
 import org.jeecg.modules.medical.service.IMedicalInsRuleProjectDiagnoseService;
@@ -90,6 +94,12 @@ public class AfterwardsAuditDataTest {
     private IAfterwardsAuditService afterwardsAuditService;
     @Autowired
     private IAfterwardsAuditDetailService afterwardsAuditDetailService;
+    @Autowired
+    private ISysDepartService sysDepartService;
+    @Autowired
+    private SysUserDepartMapper sysUserDepartMapper;
+
+
     @Autowired
     private IAfterwardsIncidentAuditDiagnoseService afterwardsIncidentAuditDiagnoseService;
     @Autowired
@@ -97,8 +107,6 @@ public class AfterwardsAuditDataTest {
     @Autowired
     ISysUserService sysUserService;
     @Autowired
-    ISysDepartService sysDepartService;
-    @Autowired
     ISttlMasterBillService sttlMasterBillService;
     @Autowired
     ISttlMasterDetailBillService sttlMasterDetailBillService;
@@ -508,4 +516,21 @@ public class AfterwardsAuditDataTest {
         System.out.println(i + v);
         return i + v;
     }
+
+    @Test
+    public void depart() {
+String a="1711012523714580481\n" +
+        "1711012523949461506\n" +
+        "1711012524184342529";
+
+
+
+
+        String[] lines = a.split("\n");
+        for (String id:lines) {
+            SysUserDepart userDepart = new SysUserDepart(id, "1711037900931567617");
+            sysUserDepartMapper.insert(userDepart);
+        }
+
+    }
 }