Selaa lähdekoodia

fixbug: 审核端审核详情卡顿问题,异常多收,少收金额改用数据库字段直接获取

Scott 1 vuosi sitten
vanhempi
säilyke
593977f627

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

@@ -187,10 +187,10 @@
         WHERE ad.id = #{id,jdbcType=INTEGER};
     </select>
 
-    <select id="loadAuditInfoList" resultType="org.jeecg.modules.medical.common.bo.AuditInfoListResponse">
+    <!--<select id="loadAuditInfoList" resultType="org.jeecg.modules.medical.common.bo.AuditInfoListResponse">
         SELECT
             tdetail.*,
-            (tdetail.amount - (tdetail.quantity * tdetail.price)) as errorDetailAmt -- 异常金额
+            (tdetail.amount - (tdetail.quantity * tdetail.price)) as errorDetailAmt &#45;&#45; 异常金额
         FROM (
             SELECT
              case t.project_type
@@ -202,13 +202,13 @@
                  WHEN 'medicine' THEN m.max_sale_limit
                  WHEN 'consumable' THEN c.price
                  WHEN 'diagnoses' THEN d.price
-                 else 0 end as price, -- 单价
-             t.quantity as quantity, -- 数量
+                 else 0 end as price, &#45;&#45; 单价
+             t.quantity as quantity, &#45;&#45; 数量
              t.amount,
-             t.patient_id as patientId, -- 患者编号
-             t.medical_project_code as medicalProjectCode, -- "医保项目编码",
-             t.medical_project_name as medicalProjectName, -- "医保项目名称",
-             t.medical_ins_rule_info_name as medicalInsRuleInfoName, -- "项目类型|违规类型"
+             t.patient_id as patientId, &#45;&#45; 患者编号
+             t.medical_project_code as medicalProjectCode, &#45;&#45; "医保项目编码",
+             t.medical_project_name as medicalProjectName, &#45;&#45; "医保项目名称",
+             t.medical_ins_rule_info_name as medicalInsRuleInfoName, &#45;&#45; "项目类型|违规类型"
              t.proejct_code,
              t.proejct_name,
              t.id
@@ -218,6 +218,25 @@
                   left JOIN diagnosis_treatment as d on t.proejct_code = d.project_code AND t.project_type = 'diagnoses'
             WHERE t.afterwards_audit_id = #{id,jdbcType=INTEGER})
         as tdetail
+    </select>-->
+
+    <select id="loadAuditInfoList" resultType="org.jeecg.modules.medical.common.bo.AuditInfoListResponse">
+        SELECT
+            t.project_type,
+            t.proejct_code,
+            t.error_relatively_many_amt,
+            t.error_relatively_few_amt,
+            t.quantity as quantity, -- 数量
+            t.amount,
+            t.patient_id as patientId, -- 患者编号
+            t.medical_project_code as medicalProjectCode, -- "医保项目编码",
+            t.medical_project_name as medicalProjectName, -- "医保项目名称",
+            t.medical_ins_rule_info_name as medicalInsRuleInfoName, -- "项目类型|违规类型"
+            t.proejct_code,
+            t.proejct_name,
+            t.id
+        FROM afterwards_audit_detail as t
+        WHERE t.afterwards_audit_id = #{id,jdbcType=INTEGER}
     </select>
     <select id="loadDiagnosticInfo" resultType="org.jeecg.modules.medical.common.bo.DiagnosticInfoResponse">
         SELECT

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

@@ -400,14 +400,14 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         if (!CollectionUtils.isEmpty(auditInfoListResponseList)) {
             for (AuditInfoListResponse auditInfoListResponse : auditInfoListResponseList) {
                 // 计算异常多收-少收
-                BigDecimal detailTotalAmt = auditInfoListResponse.getErrorDetailAmt();
+/*                BigDecimal detailTotalAmt = auditInfoListResponse.getErrorDetailAmt();
                 if (null != detailTotalAmt) {
                     if (detailTotalAmt.compareTo(BigDecimal.ZERO) > 0) { // 异常金额大于0,就是多收
                         auditInfoListResponse.setErrorRelativelyManyAmt(detailTotalAmt);
                     } else if (detailTotalAmt.compareTo(BigDecimal.ZERO) < 0) {
                         auditInfoListResponse.setErrorRelativelyFewAmt(detailTotalAmt);
                     }
-                }
+                }*/
                 auditInfoListResponse.setVisitTime(result.getVisitTime());
                 auditInfoListResponse.setMedicalInsurance(result.getMedicalInsurance());
             }