瀏覽代碼

fix: 业务提交财务校验getDeptAmountMonitor sql问题

lixuesong 1 年之前
父節點
當前提交
c85d733abc
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/SysDeptSubMapper.xml

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

@@ -49,9 +49,11 @@
         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', '0')
-        OR (t.settle_note_status = '3' AND (t.sub_to_gig_time BETWEEN #{query.startTime,jdbcType=TIMESTAMP} AND #{query.endTime,jdbcType=TIMESTAMP}))
-        OR (t.settle_note_status = '1' AND (t.sub_to_gig_time BETWEEN #{query.startTime,jdbcType=TIMESTAMP} AND #{query.endTime,jdbcType=TIMESTAMP} ))
+        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}))
+			OR (t.settle_note_status = '1' AND (t.sub_to_gig_time BETWEEN #{query.startTime,jdbcType=TIMESTAMP} AND #{query.endTime,jdbcType=TIMESTAMP} ))
+        )
         AND t.user_id IN
         <foreach item="item" index="index" collection="query.userIds" open="(" separator="," close=")">
             #{item}