|
@@ -7,7 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="com.ruoyi.logistics.domain.RptFinancialMonthSummary" id="RptFinancialMonthSummaryResult">
|
|
<resultMap type="com.ruoyi.logistics.domain.RptFinancialMonthSummary" id="RptFinancialMonthSummaryResult">
|
|
|
<result property="summaryId" column="summary_id" />
|
|
<result property="summaryId" column="summary_id" />
|
|
|
<result property="summaryMonth" column="summary_month" />
|
|
<result property="summaryMonth" column="summary_month" />
|
|
|
|
|
+ <result property="amount" column="amount" />
|
|
|
<result property="payableAmount" column="payable_amount" />
|
|
<result property="payableAmount" column="payable_amount" />
|
|
|
|
|
+ <result property="purchaseAmount" column="purchase_amount" />
|
|
|
<result property="transactionCount" column="transaction_count" />
|
|
<result property="transactionCount" column="transaction_count" />
|
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
@@ -186,7 +188,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
a.dept_id,
|
|
a.dept_id,
|
|
|
count( DISTINCT a.external_waybill_no ) transaction_count,
|
|
count( DISTINCT a.external_waybill_no ) transaction_count,
|
|
|
sum(
|
|
sum(
|
|
|
- ifnull(adjust_amount, rate_amount )) payable_amount
|
|
|
|
|
|
|
+ ifnull(adjust_amount, rate_amount )) payable_amount,
|
|
|
|
|
+ sum(amount) amount,
|
|
|
|
|
+ sum(purchase_amount) purchase_amount
|
|
|
FROM
|
|
FROM
|
|
|
( SELECT * FROM biz_waybill_order WHERE order_status = 5 AND DATE_FORMAT( sign_time, '%Y.%m' )= #{monthCode}
|
|
( SELECT * FROM biz_waybill_order WHERE order_status = 5 AND DATE_FORMAT( sign_time, '%Y.%m' )= #{monthCode}
|
|
|
<if test="deptId != null and deptId !='' "> and dept_id = #{deptId}</if>
|
|
<if test="deptId != null and deptId !='' "> and dept_id = #{deptId}</if>
|
|
@@ -224,12 +228,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertBachRptFinancialMonthSummary" parameterType="java.util.List" >
|
|
<insert id="insertBachRptFinancialMonthSummary" parameterType="java.util.List" >
|
|
|
- INSERT INTO rpt_financial_month_summary (summary_month, payable_amount, transaction_count,dept_id,status,create_time) VALUES
|
|
|
|
|
|
|
+ INSERT INTO rpt_financial_month_summary (summary_month,amount, payable_amount,purchase_amount ,transaction_count,dept_id,status,create_time) VALUES
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
- (#{item.summary_month}, #{item.payable_amount}, #{item.transaction_count}, #{item.dept_id},'1',now())
|
|
|
|
|
|
|
+ (#{item.summary_month}, #{item.amount},#{item.payable_amount},#{item.purchase_amount}, #{item.transaction_count}, #{item.dept_id},'1',now())
|
|
|
</foreach>
|
|
</foreach>
|
|
|
ON DUPLICATE KEY UPDATE
|
|
ON DUPLICATE KEY UPDATE
|
|
|
|
|
+ amount = VALUES(amount),
|
|
|
payable_amount = VALUES(payable_amount),
|
|
payable_amount = VALUES(payable_amount),
|
|
|
|
|
+ purchase_amount = VALUES(purchase_amount),
|
|
|
transaction_count = VALUES(transaction_count),
|
|
transaction_count = VALUES(transaction_count),
|
|
|
dept_id = VALUES(dept_id),
|
|
dept_id = VALUES(dept_id),
|
|
|
update_time = NOW()
|
|
update_time = NOW()
|