|
@@ -109,6 +109,10 @@
|
|
<result property="fBstime" column="f_bstime"/>
|
|
<result property="fBstime" column="f_bstime"/>
|
|
<result property="fAccamount" column="f_accamount"/>
|
|
<result property="fAccamount" column="f_accamount"/>
|
|
<result property="fInvamount" column="f_invamount"/>
|
|
<result property="fInvamount" column="f_invamount"/>
|
|
|
|
+ <result property="price" column="f_unitprice"/>
|
|
|
|
+ <result property="fBillingDays" column="f_inventory_days"/>
|
|
|
|
+ <result property="fQty" column="f_qty"/>
|
|
|
|
+ <result property="name" column="f_name"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTFeeVo">
|
|
<sql id="selectTFeeVo">
|
|
@@ -783,6 +787,8 @@
|
|
w.f_inventory_days AS fInventoryDays,
|
|
w.f_inventory_days AS fInventoryDays,
|
|
w.f_originalbilldate AS fOriginalbilldate,
|
|
w.f_originalbilldate AS fOriginalbilldate,
|
|
f.f_name AS fFeeName,
|
|
f.f_name AS fFeeName,
|
|
|
|
+ w.f_qty AS fQty,
|
|
|
|
+ w.f_unitprice AS fUnitprice,
|
|
w.f_dc AS fSrcdc,
|
|
w.f_dc AS fSrcdc,
|
|
CASE
|
|
CASE
|
|
WHEN w.f_dc = 'D' THEN
|
|
WHEN w.f_dc = 'D' THEN
|
|
@@ -815,7 +821,9 @@
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="map.tWareHouseFees.fProductName != null and map.tWareHouseFees.fProductName != ''">
|
|
|
|
+ and w.f_product_name like concat('%', #{map.tWareHouseFees.fProductName}, '%')
|
|
|
|
+ </if>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
and w.f_accamount_date IS NOT NULL
|
|
and w.f_accamount_date IS NOT NULL
|
|
</if>
|
|
</if>
|
|
@@ -1009,7 +1017,9 @@
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="map.tWareHouseFees.fProductName != null and map.tWareHouseFees.fProductName != ''">
|
|
|
|
+ and w.f_product_name like concat('%', #{map.tWareHouseFees.fProductName}, '%')
|
|
|
|
+ </if>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
and w.f_accamount_date IS NOT NULL
|
|
and w.f_accamount_date IS NOT NULL
|
|
</if>
|
|
</if>
|
|
@@ -1203,7 +1213,9 @@
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="map.tWareHouseFees.fProductName != null and map.tWareHouseFees.fProductName != ''">
|
|
|
|
+ and w.f_product_name like concat('%', #{map.tWareHouseFees.fProductName}, '%')
|
|
|
|
+ </if>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
and w.f_accamount_date IS NOT NULL
|
|
and w.f_accamount_date IS NOT NULL
|
|
</if>
|
|
</if>
|
|
@@ -1356,7 +1368,9 @@
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="map.tWareHouseFees.fProductName != null and map.tWareHouseFees.fProductName != ''">
|
|
|
|
+ and w.f_product_name like concat('%', #{map.tWareHouseFees.fProductName}, '%')
|
|
|
|
+ </if>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
and w.f_accamount_date IS NOT NULL
|
|
and w.f_accamount_date IS NOT NULL
|
|
</if>
|
|
</if>
|
|
@@ -2754,7 +2768,9 @@
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
<if test="map.tWareHouseFees.fStatementNo != null and map.tWareHouseFees.fStatementNo != ''">and
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
w.f_statement_no like concat('%', #{map.tWareHouseFees.fStatementNo}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="map.tWareHouseFees.fProductName != null and map.tWareHouseFees.fProductName != ''">
|
|
|
|
+ and w.f_product_name like concat('%', #{map.tWareHouseFees.fProductName}, '%')
|
|
|
|
+ </if>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
<if test='map.tWareHouseFees.fReconciliation != null and map.tWareHouseFees.fReconciliation != "" and map.tWareHouseFees.fReconciliation == "1" '>
|
|
and w.f_accamount_date IS NOT NULL
|
|
and w.f_accamount_date IS NOT NULL
|
|
</if>
|
|
</if>
|
|
@@ -2884,6 +2900,13 @@
|
|
<select id="selectFinancialLedgerDetails" resultMap="feeVOResult">
|
|
<select id="selectFinancialLedgerDetails" resultMap="feeVOResult">
|
|
SELECT t.f_id AS f_srcpid, c.f_name AS f_fees_name, w.f_mblno AS f_mblno,
|
|
SELECT t.f_id AS f_srcpid, c.f_name AS f_fees_name, w.f_mblno AS f_mblno,
|
|
w.f_product_name, w.f_marks, t.f_billtype,
|
|
w.f_product_name, w.f_marks, t.f_billtype,
|
|
|
|
+ CASE
|
|
|
|
+ WHEN t.f_billtype = 'SJRK' THEN '实际入库'
|
|
|
|
+ WHEN t.f_billtype = 'SJCK' THEN '实际出库'
|
|
|
|
+ WHEN t.f_billtype = 'JSCCF' THEN '仓储费'
|
|
|
|
+ WHEN t.f_billtype = 'KCZZ' THEN '库存总账'
|
|
|
|
+ END
|
|
|
|
+ AS fBillTypeName,
|
|
w.f_review_date,w.f_accamount,w.f_invamount,
|
|
w.f_review_date,w.f_accamount,w.f_invamount,
|
|
IF ( w.f_feeid = #{feesId}, w.f_amount, 0.00 ) storage_fee,
|
|
IF ( w.f_feeid = #{feesId}, w.f_amount, 0.00 ) storage_fee,
|
|
IF ( w.f_feeid != #{feesId}, w.f_amount, 0.00 ) other_fee,
|
|
IF ( w.f_feeid != #{feesId}, w.f_amount, 0.00 ) other_fee,
|
|
@@ -2891,14 +2914,15 @@
|
|
ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS nnfinished,
|
|
ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS nnfinished,
|
|
w.f_bsdate AS fBstime,
|
|
w.f_bsdate AS fBstime,
|
|
w.f_dc,
|
|
w.f_dc,
|
|
- w.f_unitprice AS price,
|
|
|
|
- w.f_qty AS fQty,
|
|
|
|
- w.f_billing_days AS fBillingDays
|
|
|
|
|
|
+ w.f_unitprice,
|
|
|
|
+ w.f_qty,
|
|
|
|
+ w.f_inventory_days,
|
|
|
|
+ f.f_name
|
|
FROM t_warehousebills t
|
|
FROM t_warehousebills t
|
|
LEFT JOIN t_warehousebillsfees w ON w.f_pid = t.f_id
|
|
LEFT JOIN t_warehousebillsfees w ON w.f_pid = t.f_id
|
|
LEFT JOIN sys_user u ON t.create_by = u.user_name
|
|
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 sys_dept d ON t.f_bsdeptid = d.dept_id
|
|
- LEFT JOIN t_corps c ON c.f_id = w.f_corpid
|
|
|
|
|
|
+ LEFT JOIN t_corps c ON c.f_id = t.f_corpid
|
|
LEFT JOIN t_fees f ON w.f_feeid = f.f_id
|
|
LEFT JOIN t_fees f ON w.f_feeid = f.f_id
|
|
where
|
|
where
|
|
t.del_flag = '0'
|
|
t.del_flag = '0'
|