瀏覽代碼

fix:sql error

shc 1 年之前
父節點
當前提交
41185aba63

+ 3 - 3
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/MonitoringIndicatorServiceImpl.java

@@ -126,14 +126,14 @@ public class MonitoringIndicatorServiceImpl extends ServiceImpl<MonitoringIndica
             }
 
             if (null != deptLimit && deptMonitorAmount.compareTo(deptLimit) > 0) {
-                throw new RuntimeException(note.getRealName() + ":超过当月限额");
+                throw new RuntimeException("企业限额:[" + deptLimit + "]," + note.getRealName() + "存在:[" + deptAmountMonitor + "], 超过企业限额");
             }
 
             if (null != monitoringLimit && monitorAmount.compareTo(monitoringLimit) > 0) {
-                throw new RuntimeException(note.getRealName() + ":超过结算渠道限额");
+                throw new RuntimeException("渠道限额:[" + monitoringLimit + "]," + note.getRealName() + "存在:[" + monitorAmount + "], 超过结算渠道限额");
             }
             if (null != yaoyiLimitAmount && yaoyiMonitorAmount.compareTo(yaoyiLimitAmount) > 0) {
-                throw new RuntimeException(note.getRealName() + ":可用于结算(结算失败、待结算)和当月在途结算的记录总额超过平台限额");
+                throw new RuntimeException("渠道限额:[" + yaoyiLimitAmount + "]," + note.getRealName() + "存在:[" + yaoyiMonitorAmount + "],可用于结算(结算失败、待结算)和当月在途结算的记录总额超过平台限额");
             }
         }
 

+ 3 - 3
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/SysDeptSubMapper.xml

@@ -27,7 +27,7 @@
         sum(t.settle_amount) AS totalAmount
         FROM wm_score_package_settle_note t
         WHERE t.subject_location = #{query.location, jdbcType=VARCHAR}
-        AND (t.settle_note_status IN ('2', '9')
+        AND (t.settle_note_status IN ('2', '9', '0')
         OR (t.settle_note_status = '3' AND (t.sub_to_gig_time BETWEEN #{query.startTime,jdbcType=TIMESTAMP} AND
         #{query.endTime,jdbcType=TIMESTAMP})))
         AND t.id_card_number IN
@@ -49,7 +49,7 @@
         sum(t.settle_amount) AS totalAmount
         FROM wm_score_package_settle_note t
         WHERE t.subject_location = #{query.location, jdbcType=VARCHAR}
-        AND (t.settle_note_status IN ('2', '9')
+        AND (t.settle_note_status IN ('2', '9', '0')
         OR (t.settle_note_status = '3' AND (t.sub_to_gig_time BETWEEN #{query.startTime,jdbcType=TIMESTAMP} AND
         #{query.endTime,jdbcType=TIMESTAMP})))
         AND t.user_id IN
@@ -78,7 +78,7 @@
         sum(t.settle_amount) AS totalAmount
         FROM wm_score_package_settle_note t
         WHERE
-        (t.settle_note_status IN ('2', '9')
+        (t.settle_note_status IN ('2', '9', '0')
         OR (t.settle_note_status = '3' AND (t.sub_to_gig_time BETWEEN #{query.startTime,jdbcType=TIMESTAMP} AND
         #{query.endTime,jdbcType=TIMESTAMP})))
         AND t.id_card_number IN