|
|
@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
<result property="userId" column="user_id" />
|
|
|
<result property="bwDjbh" column="bw_djbh" />
|
|
|
<result property="bwDzfpPdfUrl" column="bw_dzfp_pdf_url" />
|
|
|
@@ -29,18 +30,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectRptFinancialMonthSummaryList" parameterType="com.ruoyi.logistics.domain.RptFinancialMonthSummary" resultMap="RptFinancialMonthSummaryResult">
|
|
|
- <include refid="selectRptFinancialMonthSummaryVo"/>
|
|
|
+ select a.summary_id, a.summary_month, a.payable_amount, a.transaction_count, a.status, a.create_time,
|
|
|
+ a.update_time, a.remark, a.del_flag, a.create_by, a.update_by, a.dept_id, a.user_id, a.bw_djbh,
|
|
|
+ a.bw_dzfp_pdf_url, a.bw_dzfp_ofd_url, a.bw_dzfp_xml_url,b.dept_name from rpt_financial_month_summary a
|
|
|
+ left join sys_dept b on a.dept_id=b.dept_id
|
|
|
<where>
|
|
|
- <if test="summaryMonth != null and summaryMonth != ''"> and summary_month = #{summaryMonth}</if>
|
|
|
- <if test="payableAmount != null and payableAmount != ''"> and payable_amount = #{payableAmount}</if>
|
|
|
- <if test="transactionCount != null and transactionCount != ''"> and transaction_count = #{transactionCount}</if>
|
|
|
- <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
- <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
- <if test="bwDjbh != null and bwDjbh != ''"> and bw_djbh = #{bwDjbh}</if>
|
|
|
- <if test="bwDzfpPdfUrl != null and bwDzfpPdfUrl != ''"> and bw_dzfp_pdf_url = #{bwDzfpPdfUrl}</if>
|
|
|
- <if test="bwDzfpOfdUrl != null and bwDzfpOfdUrl != ''"> and bw_dzfp_ofd_url = #{bwDzfpOfdUrl}</if>
|
|
|
- <if test="bwDzfpXmlUrl != null and bwDzfpXmlUrl != ''"> and bw_dzfp_xml_url = #{bwDzfpXmlUrl}</if>
|
|
|
+ <if test="summaryMonth != null and summaryMonth != ''"> and a.summary_month = #{summaryMonth}</if>
|
|
|
+ <if test="payableAmount != null and payableAmount != ''"> and a.payable_amount = #{payableAmount}</if>
|
|
|
+ <if test="transactionCount != null and transactionCount != ''"> a.and transaction_count = #{transactionCount}</if>
|
|
|
+ <if test="status != null and status != ''"> and a.status = #{status}</if>
|
|
|
+ <if test="deptId != null "> and a.dept_id = #{deptId}</if>
|
|
|
+ <if test="deptName != null "> and b.dept_name = #{deptName}</if>
|
|
|
+ <if test="userId != null "> and a.user_id = #{userId}</if>
|
|
|
+ <if test="bwDjbh != null and bwDjbh != ''"> and a.bw_djbh = #{bwDjbh}</if>
|
|
|
+ <if test="bwDzfpPdfUrl != null and bwDzfpPdfUrl != ''"> and a.bw_dzfp_pdf_url = #{bwDzfpPdfUrl}</if>
|
|
|
+ <if test="bwDzfpOfdUrl != null and bwDzfpOfdUrl != ''"> and a.bw_dzfp_ofd_url = #{bwDzfpOfdUrl}</if>
|
|
|
+ <if test="bwDzfpXmlUrl != null and bwDzfpXmlUrl != ''"> and a.bw_dzfp_xml_url = #{bwDzfpXmlUrl}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -132,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
a.dept_id,
|
|
|
count( DISTINCT a.external_waybill_no ) transaction_count,
|
|
|
sum(
|
|
|
- ifnull( rate_amount, adjust_amount )) payable_amount
|
|
|
+ ifnull(adjust_amount, rate_amount )) payable_amount
|
|
|
FROM
|
|
|
( SELECT * FROM biz_waybill_order WHERE order_status = 6 AND DATE_FORMAT( sign_time, '%Y.%m' )= #{monthCode} ) a
|
|
|
INNER JOIN biz_waybill_cost_details b ON a.external_waybill_no = b.external_waybill_no
|