|
|
@@ -63,6 +63,10 @@
|
|
|
<result property="fStoreEnv" column="f_store_env"/>
|
|
|
<result property="fIsfilles" column="f_isfilles"/>
|
|
|
<result property="fAllotWarehouseid" column="f_allot_warehouseid"/>
|
|
|
+ <result property="fCorpName" column="f_corp_name"/>
|
|
|
+ <result property="fFeeName" column="f_fee_name"/>
|
|
|
+ <result property="fFeeUnitName" column="f_fee_unit_name"/>
|
|
|
+ <result property="fWarehouseName" column="f_warehouse_name"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTWarehousebillsfeesVo">
|
|
|
@@ -123,7 +127,11 @@
|
|
|
f_units,
|
|
|
f_store_env,
|
|
|
f_isfilles,
|
|
|
- f_allot_warehouseid
|
|
|
+ f_allot_warehouseid,
|
|
|
+ f_corp_name,
|
|
|
+ f_fee_name,
|
|
|
+ f_fee_unit_name,
|
|
|
+ f_warehouse_name
|
|
|
from t_warehousebillsfees
|
|
|
</sql>
|
|
|
|
|
|
@@ -345,6 +353,10 @@
|
|
|
<if test="fStoreEnv != null">f_store_env,</if>
|
|
|
<if test="fIsfilles != null">f_isfilles,</if>
|
|
|
<if test="fAllotWarehouseid != null">f_allot_warehouseid,</if>
|
|
|
+ <if test="fCorpName != null">f_corp_name,</if>
|
|
|
+ <if test="fFeeName != null">f_fee_name,</if>
|
|
|
+ <if test="fFeeUnitName != null">f_fee_unit_name,</if>
|
|
|
+ <if test="fWarehouseName != null">f_warehouse_name,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fPid != null">#{fPid},</if>
|
|
|
@@ -404,6 +416,10 @@
|
|
|
<if test="fStoreEnv != null">#{fStoreEnv},</if>
|
|
|
<if test="fIsfilles != null">#{fIsfilles},</if>
|
|
|
<if test="fAllotWarehouseid != null">#{fAllotWarehouseid},</if>
|
|
|
+ <if test="fCorpName != null">#{fCorpName},</if>
|
|
|
+ <if test="fFeeName != null">#{fFeeName},</if>
|
|
|
+ <if test="fFeeUnitName != null">#{fFeeUnitName},</if>
|
|
|
+ <if test="fWarehouseName != null">#{fWarehouseName},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -466,6 +482,10 @@
|
|
|
<if test="fStoreEnv != null">f_store_env = #{fStoreEnv},</if>
|
|
|
<if test="fIsfilles != null">f_isfilles = #{fIsfilles},</if>
|
|
|
<if test="fAllotWarehouseid != null">f_allot_warehouseid = #{fAllotWarehouseid},</if>
|
|
|
+ <if test="fCorpName != null">f_corp_name = #{fCorpName},</if>
|
|
|
+ <if test="fFeeName != null">f_fee_name = #{fFeeName},</if>
|
|
|
+ <if test="fFeeUnitName != null">f_fee_unit_name = #{fFeeUnitName},</if>
|
|
|
+ <if test="fWarehouseName != null">f_warehouse_name = #{fWarehouseName},</if>
|
|
|
</trim>
|
|
|
where f_id = #{fId}
|
|
|
</update>
|
|
|
@@ -1037,7 +1057,8 @@
|
|
|
std.dict_label AS fFeetype,/*物资类别*/
|
|
|
sr.user_name AS purchaseName,/*采购人*/
|
|
|
tp.f_name AS projectName,/*项目名称*/
|
|
|
- tw.remark,
|
|
|
+ ti.remark AS remark,
|
|
|
+ tw.remark AS remarks,
|
|
|
CASE
|
|
|
|
|
|
WHEN tw.f_billtype = 'CK' THEN
|
|
|
@@ -1106,6 +1127,9 @@
|
|
|
td.fqty AS fqty,/*数量*/
|
|
|
td.famount AS famount,/*金额*/
|
|
|
tr.f_name AS fsbuName,/*开票公司*/
|
|
|
+ td.fWarehouseName AS fWarehouseName,
|
|
|
+ td.remarks AS remarks,
|
|
|
+ td.remarksItems AS remarksItems,
|
|
|
round(td.price,2) AS price/*单价*/
|
|
|
<if test="groupDate != null and groupDate == 0">
|
|
|
,td.fBsdate AS fBsdate/*入库日期*/
|
|
|
@@ -1120,6 +1144,9 @@
|
|
|
tc.ffeeunitid,
|
|
|
tc.fBsdate,
|
|
|
tc.fSbu,
|
|
|
+ tc.fWarehouseName,
|
|
|
+ tc.remarks,
|
|
|
+ tc.remarksItems,
|
|
|
IFNULL( SUM( tc.fqty ), 0 ) fqty,
|
|
|
IFNULL( SUM( tc.famount ), 0 ) famount,
|
|
|
IFNULL( SUM( tc.famount )/ SUM( tc.fqty ), 0 ) price
|
|
|
@@ -1140,16 +1167,23 @@
|
|
|
/*实际数量*/
|
|
|
tw.f_amount famount, /*金额*/
|
|
|
tb.f_sbu fSbu,/*开票公司*/
|
|
|
- tw.f_bsdate fBsdate/*出库日期*/
|
|
|
+ tw.f_bsdate fBsdate,/*出库日期*/
|
|
|
+ wa.f_name fWarehouseName, /*仓库*/
|
|
|
+ tb.remark remarks, /*仓库*/
|
|
|
+ tw.remark remarksItems, /*仓库*/
|
|
|
+ tw.f_id itemId
|
|
|
FROM
|
|
|
t_warehousebillsfees tw
|
|
|
LEFT JOIN t_warehousebills tb ON tw.f_pid = tb.f_id
|
|
|
+ LEFT JOIN t_warehouse wa ON wa.f_id = tb.f_warehouseid
|
|
|
LEFT JOIN t_fees tf ON tw.f_feeid = tf.f_id
|
|
|
WHERE
|
|
|
tw.del_flag = '0'
|
|
|
AND tb.del_flag = '0'
|
|
|
AND tw.f_billtype = 'XS'
|
|
|
<if test="fBillstatus != null">and tw.f_billstatus = #{fBillstatus}</if>
|
|
|
+ <if test="fWarehouseid != null">and tb.f_warehouseid = #{fWarehouseid}</if>
|
|
|
+ <if test="fBillstatus != null">and tw.f_billstatus = #{fBillstatus}</if>
|
|
|
<if test="fFeeid != null ">and tw.f_feeid = #{fFeeid}</if>
|
|
|
<if test="fGoodsid != null and fGoodsid != ''">and tb.f_goodsid = #{fGoodsid}</if>
|
|
|
<if test="fFeeTypeList != null and fFeeTypeList != '[]'">and tf.f_feetype in
|
|
|
@@ -1171,7 +1205,8 @@
|
|
|
tc.fname,
|
|
|
tc.fcurrency,
|
|
|
tc.ffeeunitid,
|
|
|
- tc.fSbu
|
|
|
+ tc.fSbu,
|
|
|
+ tc.itemId
|
|
|
<if test="groupDate != null and groupDate == 0">
|
|
|
,tc.fBsdate
|
|
|
</if>
|
|
|
@@ -1932,6 +1967,9 @@
|
|
|
si.dict_label AS fUnitsName,
|
|
|
st.dict_label AS fStoreEnvName,
|
|
|
sti.dict_label AS fIsfillesName,
|
|
|
+ tw.f_fee_name ,
|
|
|
+ tw.f_corp_name ,
|
|
|
+ tw.f_fee_unit_name ,
|
|
|
tw.f_allot_warehouseid,
|
|
|
te.f_warehouse_information AS fAllotWarehouseName,
|
|
|
IFNULL(tl.f_grossweightblc,0) AS fGrossweightblc,
|
|
|
@@ -2024,7 +2062,8 @@
|
|
|
std.dict_label AS fFeetype,/*物资类别*/
|
|
|
sr.user_name AS purchaseName,/*采购人*/
|
|
|
tp.f_name AS projectName,/*项目名称*/
|
|
|
- tw.remark,
|
|
|
+ ti.remark AS remark,
|
|
|
+ tw.remark AS remarks,
|
|
|
CASE
|
|
|
|
|
|
WHEN tw.f_billtype = 'CK' THEN
|
|
|
@@ -2099,7 +2138,8 @@
|
|
|
std.dict_label AS fFeetype,/*物资类别*/
|
|
|
sr.user_name AS purchaseName,/*采购人*/
|
|
|
tp.f_name AS projectName,/*项目名称*/
|
|
|
- tw.remark,
|
|
|
+ ti.remark AS remark,
|
|
|
+ tw.remark AS remarks,
|
|
|
CASE
|
|
|
|
|
|
WHEN tw.f_billtype = 'CK' THEN
|