| 
					
				 | 
			
			
				@@ -371,4 +371,88 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <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.fId AS fId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            w.fName AS fFeesName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t.f_mblno AS fMblno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t.f_product_name AS fProductName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t.f_marks AS fMarks, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t.f_billtype AS fBilltype, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t.f_review_date AS fReviewDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            w.f_dc AS fSrcdc, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            w.f_amount AS fAmount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            w.f_stlamount AS fStlamount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t_warehousebills t 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LEFT JOIN t_corps c ON c.f_id = t.f_corpid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LEFT JOIN ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_id AS f_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_pid AS f_pid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_lineno AS f_lineno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_corpid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_feeid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_feeUnitid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_qty, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_unitprice, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_amount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_currency, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_exrate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_taxrate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_dc, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_billstatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_statement_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_accamount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_accamount_date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_stlamount_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_stlamount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_stlamount_date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_invnos, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_invamount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_askamount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.f_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    f.remark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    c.f_id AS fId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    c.f_name AS fName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    t_warehousebillsfees AS f 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ) w ON w.f_pid = t.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> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fMblno != null  and fMblno != ''">and t.f_mblno  like concat('%', #{fMblno}, '%') </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fMarks != null and fMarks != ''">and t.f_marks  like concat('%', #{fMarks}, '%') </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fProductName != null and fProductName != ''">and t.f_product_name  like concat('%', #{fProductName}, '%') </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test='fBillstatus != null and fBillstatus != "" and fBillstatus == "1" '> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and w.f_billstatus != 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test='fBillstatus!= null and fBillstatus != "" and fBillstatus == "0" '> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and w.f_billstatus = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test='fDc != null and fDc != "" and fDc == "D" '> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and w.f_dc = #{fDc} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test='fDc != null and fDc != "" and fDc == "C" '> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and w.f_dc = #{fDc} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test='timeExamine != null and timeExamine[0] != null and timeExamine[0]!= ""'> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and t.f_review_date >= #{timeExamine[0]} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test='timeExamine != null and timeExamine[1] != null and timeExamine[1]!= ""'> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and t.f_review_date <= #{timeExamine[1]} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |