|
@@ -1680,29 +1680,29 @@
|
|
|
|
|
|
<select id="warehouseBillsFeesList1" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
- w.f_id AS fSrcid,
|
|
|
- t.f_id AS fSrcpid,
|
|
|
- t.f_corpid AS fCorpid,
|
|
|
- c.f_name AS fName,
|
|
|
- w.f_corpid AS fCorpids,
|
|
|
- c1.f_name AS fFeesName,
|
|
|
- w.f_mblno AS fMblno,
|
|
|
- w.f_product_name AS fProductName,
|
|
|
- w.f_marks AS fMarks,
|
|
|
- t.f_billtype AS fBilltype,
|
|
|
- t.f_review_date AS fReviewDate,
|
|
|
- w.f_dc AS fSrcdc,
|
|
|
- SUM(w.f_amount) AS fAmount,
|
|
|
- SUM(w.f_stlamount) AS fStlamount,
|
|
|
- ifnull(SUM( w.f_amount ) , 0 ) - ifnull( SUM( w.f_stlamount ) , 0 ) AS nnfinished
|
|
|
+ w.f_id AS fSrcid,
|
|
|
+ t.f_id AS fSrcpid,
|
|
|
+ t.f_corpid AS fCorpid,
|
|
|
+ c.f_name AS fName,
|
|
|
+ w.f_corpid AS fCorpids,
|
|
|
+ c1.f_name AS fFeesName,
|
|
|
+ w.f_mblno AS fMblno,
|
|
|
+ w.f_product_name AS fProductName,
|
|
|
+ w.f_marks AS fMarks,
|
|
|
+ t.f_billtype AS fBilltype,
|
|
|
+ t.f_review_date AS fReviewDate,
|
|
|
+ w.f_dc AS fSrcdc,
|
|
|
+ SUM(w.f_amount) AS fAmount,
|
|
|
+ SUM(w.f_stlamount) AS fStlamount,
|
|
|
+ ifnull(SUM( w.f_amount ) , 0 ) - ifnull( SUM( w.f_stlamount ) , 0 ) AS nnfinished
|
|
|
FROM
|
|
|
- t_warehousebills t
|
|
|
- left join sys_user u on t.create_by = u.user_name
|
|
|
- left join sys_dept d on t.f_bsdeptid = d.dept_id
|
|
|
- LEFT JOIN t_corps c ON c.f_id = t.f_corpid
|
|
|
- LEFT JOIN t_warehousebillsfees w ON w.f_pid = t.f_id
|
|
|
- LEFT JOIN t_corps c1 ON w.f_corpid = c1.f_id
|
|
|
- LEFT JOIN t_fees f ON w.f_feeid = f.f_id
|
|
|
+ t_warehousebills t
|
|
|
+ left join sys_user u on t.create_by = u.user_name
|
|
|
+ left join sys_dept d on t.f_bsdeptid = d.dept_id
|
|
|
+ LEFT JOIN t_corps c ON c.f_id = t.f_corpid
|
|
|
+ LEFT JOIN t_warehousebillsfees w ON w.f_pid = t.f_id
|
|
|
+ LEFT JOIN t_corps c1 ON w.f_corpid = c1.f_id
|
|
|
+ LEFT JOIN t_fees f ON w.f_feeid = f.f_id
|
|
|
<where>
|
|
|
<if test="fCorpid != null and fCorpid != ''">and t.f_corpid = #{fCorpid}</if>
|
|
|
<if test="fToCorpid != null and fToCorpid != ''">and w.f_corpid = #{fToCorpid}</if>
|
|
@@ -1732,7 +1732,7 @@
|
|
|
<if test='fReconciliation!= null and fReconciliation != "" and fReconciliation == "0" '>
|
|
|
and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) != 0
|
|
|
</if>
|
|
|
- and t.f_review_date IS NOT NULL
|
|
|
+ and w.f_review_date IS NOT NULL
|
|
|
${params.dataScope}
|
|
|
GROUP BY
|
|
|
w.f_pid,
|