| 
					
				 | 
			
			
				@@ -2844,7 +2844,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         DISTINCT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             c.f_name corpName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            #{fMblno} fMblno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            w.f_mblno fMblno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             w.f_product_name goodsName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             w.f_emblno fEmblno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             d.dict_label fBusinessType, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2852,33 +2852,33 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ware.f_warehouse_information fWName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             dict.dict_label AS fBusinessTypes, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             w.f_marks AS fMarks, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' AND w.f_tocorpid = #{fCorpid} || item.f_billtype = 'CKDB', date_format( item.f_bsdate, '%Y-%m-%d' ), NULL) inBsdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' AND w.f_tocorpid = #{fCorpid} || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_qty, 0) inQty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid} || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_grossweight, 0.00) inGrossweight, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF(item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid}, date_format( item.f_bsdate, '%Y-%m-%d' ), NULL ) outBsdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid}, item.f_qty, 0 ) outQty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid}, item.f_grossweight, 0.00 ) outGrossweight, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' || item.f_billtype = 'CKDB', date_format( item.f_bsdate, '%Y-%m-%d' ), NULL) inBsdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_qty, 0) inQty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_grossweight, 0.00) inGrossweight, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF(item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY', date_format( item.f_bsdate, '%Y-%m-%d' ), NULL ) outBsdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY', item.f_qty, 0 ) outQty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY', item.f_grossweight, 0.00 ) outGrossweight, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             CASE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                WHEN item.f_billtype = 'SJRK' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                '入库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                WHEN item.f_billtype = 'SJCK' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                '出库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                WHEN item.f_billtype = 'CKDB' and ware.f_charg = 1 THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                '调拨' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                WHEN item.f_billtype = 'HQZY' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                '货权转移' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                WHEN item.f_billtype = 'HWTG' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                '货物通关' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            WHEN item.f_billtype = 'SJRK' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            '入库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            WHEN item.f_billtype = 'SJCK' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            '出库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            WHEN item.f_billtype = 'CKDB' and ware.f_charg = 1 THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            '调拨' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            WHEN item.f_billtype = 'HQZY' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            '货权转移' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            WHEN item.f_billtype = 'HWTG' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            '货物通关' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             END AS fBilltype, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' AND w.f_tocorpid = #{fCorpid} || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_qty, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_qty, 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             - 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid}, item.f_qty, 0 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY', item.f_qty, 0 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ) AS fQtyblc, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid} || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_grossweight, 0.00) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF(item.f_billtype = 'SJRK' || item.f_billtype = 'HQZY' || item.f_billtype = 'CKDB' AND ware.f_id = item.f_transfer_warehouselocid, item.f_grossweight, 0.00) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             - 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY' AND w.f_corpid = #{fCorpid}, item.f_grossweight, 0.00 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            IF( item.f_billtype = 'SJCK' || item.f_billtype = 'HQZY', item.f_grossweight, 0.00 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ) AS fGrossweightblc, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             item.f_truckno fTruckno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tf.f_billing_days fBillingDays, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -3216,14 +3216,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selecStorageFeeList" resultType="Map"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT DISTINCT w.f_id AS fId, w.f_billno AS fBillno, corp.f_name AS fCorpid, w.f_billing_deadline AS fBillingDeadline, w.remark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        w.f_billstatus AS fBillstatus, w.create_by AS createBy, w.create_time AS createTime, w.f_fee_status fFeeStatus 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        w.f_billstatus AS fBillstatus, w.create_by AS createBy, w.create_time AS createTime, w.f_fee_status fFeeStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        w.f_trademodeid AS fTrademodeid,dict.dict_label AS fTrademodeName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM t_warehousebills w LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             LEFT JOIN t_corps corp ON corp.f_id = w.f_corpid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             left join sys_user u on w.create_by = u.user_name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             left join sys_user u1 on w.f_storekeeper = u1.user_name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             left join sys_dept d on w.f_bsdeptid = d.dept_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            LEFT JOIN sys_dict_data dict ON dict.dict_value = w.f_trademodeid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             w.f_billtype = 'JSCCF' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            and dict.dict_type = 'data_trademodes' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fFeeStatus != null and fFeeStatus != ''">and w.f_fee_status = #{fFeeStatus}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fBillstatus != null and fBillstatus != ''">and w.f_billstatus = #{fBillstatus}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fMarks != null and fMarks != ''">and w.f_marks = #{fMarks}</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -3234,6 +3237,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fBillno != null and fBillno != ''">and w.f_billno like concat('%', #{fBillno}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fMblno != null and fMblno != ''">and w.f_mblno like concat('%', #{fMblno}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fCorpid != null and fCorpid != ''">and w.f_corpid = #{fCorpid}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fTrademodeid != null and fTrademodeid != ''">and w.f_trademodeid = #{fTrademodeid}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ${params.dataScope} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ORDER BY w.f_bsdate DESC, w.f_bstime DESC,w.f_id DESC,w.f_billstatus 
			 |