|  | @@ -36,6 +36,7 @@
 | 
	
		
			
				|  |  |          <result property="fFeetunit"    column="f_feetunit"    />
 | 
	
		
			
				|  |  |          <result property="fMblno"    column="f_mblno"    />
 | 
	
		
			
				|  |  |          <result property="fEmblno"    column="f_emblno"    />
 | 
	
		
			
				|  |  | +        <result property="fCompany"    column="f_company"    />
 | 
	
		
			
				|  |  |          <result property="fVslvoy"    column="f_vslvoy"    />
 | 
	
		
			
				|  |  |          <result property="fEta"    column="f_eta"    />
 | 
	
		
			
				|  |  |          <result property="fMarks"    column="f_marks"    />
 | 
	
	
		
			
				|  | @@ -137,7 +138,7 @@
 | 
	
		
			
				|  |  |      <sql id="selectTWarehousebillsVo">
 | 
	
		
			
				|  |  |          select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_shipper, f_tocorpid, f_stltypeid, f_bscorpno,
 | 
	
		
			
				|  |  |          f_warehouseid, f_storekeeper, f_chargedate, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight,
 | 
	
		
			
				|  |  | -        f_volumn, f_billingway, f_trademodeid, f_sbu, f_feetunit, f_mblno, f_emblno, f_marks, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid,
 | 
	
		
			
				|  |  | +        f_volumn, f_billingway, f_trademodeid, f_sbu, f_feetunit, f_mblno, f_emblno, f_company, f_marks, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid,
 | 
	
		
			
				|  |  |          f_billtype, f_billstatus, f_items_status, del_flag, create_by, create_time, update_by, update_time, remark, f_billing_deadline, f_product_name, f_review_date,
 | 
	
		
			
				|  |  |          f_truckno, f_driver_name, f_driver_tel, f_driver_id_car, f_business_type, f_labour, f_fleet, f_inwarehouseid, f_bstime, f_cartype, f_goodsid, f_new_trademodeid,
 | 
	
		
			
				|  |  |          f_loadportid, f_destportid, f_serviceitems, f_invoceobj, f_sign, f_detentioncargo, f_booksmarks, f_shippername, f_shipperattn, f_shippertel, f_consigneername,
 | 
	
	
		
			
				|  | @@ -224,6 +225,7 @@
 | 
	
		
			
				|  |  |              bill.f_shipper AS fShipper,
 | 
	
		
			
				|  |  |              bill.f_mblno AS fMblno,
 | 
	
		
			
				|  |  |              bill.f_emblno AS fEmblno,
 | 
	
		
			
				|  |  | +            bill.f_company AS fCompany,
 | 
	
		
			
				|  |  |              corpSub.f_name AS fSbu,
 | 
	
		
			
				|  |  |              bill.f_marks AS fMarks,
 | 
	
		
			
				|  |  |              bill.remark AS remark,
 | 
	
	
		
			
				|  | @@ -433,6 +435,7 @@
 | 
	
		
			
				|  |  |              bill.f_shipper AS fShipper,
 | 
	
		
			
				|  |  |              bill.f_mblno AS fMblno,
 | 
	
		
			
				|  |  |              bill.f_emblno AS fEmblno,
 | 
	
		
			
				|  |  | +            bill.f_company AS fCompany,
 | 
	
		
			
				|  |  |              corpSub.f_name AS fSbu,
 | 
	
		
			
				|  |  |              bill.f_marks AS fMarks,
 | 
	
		
			
				|  |  |              bill.remark AS remark,
 | 
	
	
		
			
				|  | @@ -652,11 +655,35 @@
 | 
	
		
			
				|  |  |          LEFT JOIN t_goods tg ON wi.f_goodsid = tg.f_id
 | 
	
		
			
				|  |  |          LEFT JOIN sys_dict_data dict ON wi.f_business_type = dict.dict_value
 | 
	
		
			
				|  |  |          WHERE
 | 
	
		
			
				|  |  | -        wi.f_billtype = 'SJRK'
 | 
	
		
			
				|  |  | -        AND dict.dict_type = 'st_in_type'
 | 
	
		
			
				|  |  | -        AND dict.status = 0
 | 
	
		
			
				|  |  | -        AND wi.f_billstatus = 40
 | 
	
		
			
				|  |  | -        <if test="fId != null and fId!= ''">AND wi.f_mblno = (select f_mblno from t_warehousebills where f_id = #{fId})</if>
 | 
	
		
			
				|  |  | +            wi.f_billstatus = 40
 | 
	
		
			
				|  |  | +            AND dict.status = 0
 | 
	
		
			
				|  |  | +            <if test="billType != null and billType!= '' and billType== 'SJRK'">
 | 
	
		
			
				|  |  | +                AND wi.f_billtype = 'SJRK'
 | 
	
		
			
				|  |  | +                AND dict.dict_type = 'st_in_type'
 | 
	
		
			
				|  |  | +                <if test="fId != null and fId!= ''">
 | 
	
		
			
				|  |  | +                    AND wi.f_mblno = (select distinct f_mblno from t_warehousebills where f_id = #{fId})
 | 
	
		
			
				|  |  | +                    AND wi.f_warehouselocid in (
 | 
	
		
			
				|  |  | +                        select distinct wi.f_warehouselocid
 | 
	
		
			
				|  |  | +                        from t_warehousebillsitems wi left join t_warehousebillsfees wf on wf.src_id = wi.f_id
 | 
	
		
			
				|  |  | +                        where wf.f_pid = #{fId}
 | 
	
		
			
				|  |  | +                    )
 | 
	
		
			
				|  |  | +                </if>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="billType != null and billType!= '' and billType== 'CKDB'">
 | 
	
		
			
				|  |  | +                AND wi.f_billtype = 'CKDB'
 | 
	
		
			
				|  |  | +                AND dict.dict_type = 'st_trans_type'
 | 
	
		
			
				|  |  | +                <if test="fId != null and fId!= ''">
 | 
	
		
			
				|  |  | +                    AND wi.f_mblno = (select distinct f_mblno from t_warehousebills where f_id = #{fId})
 | 
	
		
			
				|  |  | +                    AND wi.f_transfer_warehouselocid in (
 | 
	
		
			
				|  |  | +                        select distinct wi.f_warehouselocid
 | 
	
		
			
				|  |  | +                        from t_warehousebillsitems wi left join t_warehousebillsfees wf on wf.src_id = wi.f_id
 | 
	
		
			
				|  |  | +                        where wf.f_pid = #{fId}
 | 
	
		
			
				|  |  | +                    )
 | 
	
		
			
				|  |  | +                </if>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="fId != null and fId!= ''">
 | 
	
		
			
				|  |  | +                AND wi.f_bsdate >= (select min(f_chargedate) from t_warehousebillsfees where f_pid = #{fId})
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectNotInStockDetail" resultType="com.ruoyi.warehouseBusiness.excel.StorageDetail">
 | 
	
	
		
			
				|  | @@ -668,27 +695,30 @@
 | 
	
		
			
				|  |  |          wf.f_chargedate       AS inStockDate,
 | 
	
		
			
				|  |  |          wf.f_billing_deadline AS outStockDate,
 | 
	
		
			
				|  |  |          wi.f_truckno          AS fTruckno,
 | 
	
		
			
				|  |  | -        wf.f_billing_qty      AS fQtyC,
 | 
	
		
			
				|  |  | +        wi.f_qty              AS fQtyC,
 | 
	
		
			
				|  |  |          wi.f_grossweight      AS fGrossweightC,
 | 
	
		
			
				|  |  | +        dictF.dict_label      AS fBillingway,
 | 
	
		
			
				|  |  | +        wf.f_billing_qty      AS fBillingQty,
 | 
	
		
			
				|  |  |          wf.f_billing_days     AS fBillingDays,
 | 
	
		
			
				|  |  |          wf.f_amount           AS fAmount
 | 
	
		
			
				|  |  |          FROM t_warehousebillsfees wf
 | 
	
		
			
				|  |  |          LEFT JOIN t_warehousebillsitems wi ON wi.f_id = wf.src_id
 | 
	
		
			
				|  |  |          LEFT JOIN t_warehousebills w ON w.f_id = wi.f_pid
 | 
	
		
			
				|  |  |          LEFT JOIN sys_dict_data dict ON w.f_business_type = dict.dict_value
 | 
	
		
			
				|  |  | +        LEFT JOIN sys_dict_data dictF ON wf.f_billingway = dictF.dict_value
 | 
	
		
			
				|  |  |          WHERE w.f_typeid IS NULL
 | 
	
		
			
				|  |  | -        <if test="fId != null and fId!= ''">
 | 
	
		
			
				|  |  | -          AND w.f_mblno = (select f_mblno from t_warehousebills where f_id = #{fId})
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        AND dict.status = '0'
 | 
	
		
			
				|  |  | -        <if test="billType != null and billType!= '' and billType== 'SJCK'">
 | 
	
		
			
				|  |  | -          AND wf.f_billtype = 'SJCK'
 | 
	
		
			
				|  |  | -          AND dict.dict_type = 'st_out_type'
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        <if test="billType != null and billType!= '' and billType== 'HQZY'">
 | 
	
		
			
				|  |  | -            AND wf.f_billtype = 'HQZY'
 | 
	
		
			
				|  |  | -            AND dict.dict_type = 'st_goodstf_type'
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | +            AND dict.status = '0'
 | 
	
		
			
				|  |  | +            AND dictF.status = '0'
 | 
	
		
			
				|  |  | +            AND dictF.dict_type = 'data_unitfees'
 | 
	
		
			
				|  |  | +            <if test="fId != null and fId!= ''">AND wf.f_pid = #{fId}</if>
 | 
	
		
			
				|  |  | +            <if test="billType != null and billType!= '' and billType== 'SJCK'">
 | 
	
		
			
				|  |  | +                AND wf.f_billtype = 'SJCK'
 | 
	
		
			
				|  |  | +                AND dict.dict_type = 'st_out_type'
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="billType != null and billType!= '' and billType== 'HQZY'">
 | 
	
		
			
				|  |  | +                AND wf.f_billtype = 'HQZY'
 | 
	
		
			
				|  |  | +                AND dict.dict_type = 'st_goodstf_type'
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectInventoryDetail" resultType="com.ruoyi.warehouseBusiness.excel.StorageDetail">
 | 
	
	
		
			
				|  | @@ -698,14 +728,19 @@
 | 
	
		
			
				|  |  |          wi.f_packagespecs     AS fPackagespecs,
 | 
	
		
			
				|  |  |          '在库'                 AS fBusinessType,
 | 
	
		
			
				|  |  |          wf.f_bsdate           AS inStockDate,
 | 
	
		
			
				|  |  | -        wf.f_amount           AS fAmount,
 | 
	
		
			
				|  |  | -        wf.f_billing_qty      AS surplus
 | 
	
		
			
				|  |  | -        FROM t_warehousebills w
 | 
	
		
			
				|  |  | -        LEFT JOIN t_warehousebillsfees wf ON w.f_id = wf.f_pid
 | 
	
		
			
				|  |  | +        dictF.dict_label      AS fBillingway,
 | 
	
		
			
				|  |  | +        wf.f_billing_qty      AS fBillingQty,
 | 
	
		
			
				|  |  | +        wf.f_billing_days     AS fBillingDays,
 | 
	
		
			
				|  |  | +        wf.f_amount           AS fAmount
 | 
	
		
			
				|  |  | +        FROM t_warehousebillsfees wf
 | 
	
		
			
				|  |  |          LEFT JOIN t_warehousebillsitems wi ON wi.f_id = wf.src_id
 | 
	
		
			
				|  |  | -        WHERE w.f_id = #{fId}
 | 
	
		
			
				|  |  | -        AND w.f_typeid IS NULL
 | 
	
		
			
				|  |  | -        AND wf.f_billtype = 'KCZZ'
 | 
	
		
			
				|  |  | +        LEFT JOIN t_warehousebills w ON w.f_id = wi.f_pid
 | 
	
		
			
				|  |  | +        LEFT JOIN sys_dict_data dictF ON wf.f_billingway = dictF.dict_value
 | 
	
		
			
				|  |  | +        WHERE w.f_typeid IS NULL
 | 
	
		
			
				|  |  | +            AND dictF.status = '0'
 | 
	
		
			
				|  |  | +            AND dictF.dict_type = 'data_unitfees'
 | 
	
		
			
				|  |  | +            AND wf.f_billtype = 'KCZZ'
 | 
	
		
			
				|  |  | +            <if test="fId != null and fId!= ''">AND wf.f_pid = #{fId}</if>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectInventorySJRKList" parameterType="TWarehousebills" resultType="java.util.Map">
 | 
	
	
		
			
				|  | @@ -949,6 +984,7 @@
 | 
	
		
			
				|  |  |              <if test="fFeetunit != null">f_feetunit,</if>
 | 
	
		
			
				|  |  |              <if test="fMblno != null">f_mblno,</if>
 | 
	
		
			
				|  |  |              <if test="fEmblno != null">f_emblno,</if>
 | 
	
		
			
				|  |  | +            <if test="fCompany != null">f_company,</if>
 | 
	
		
			
				|  |  |              <if test="fVslvoy != null">f_vslvoy,</if>
 | 
	
		
			
				|  |  |              <if test="fEta != null">f_eta,</if>
 | 
	
		
			
				|  |  |              <if test="fMarks != null">f_marks,</if>
 | 
	
	
		
			
				|  | @@ -1066,6 +1102,7 @@
 | 
	
		
			
				|  |  |              <if test="fFeetunit != null">#{fFeetunit},</if>
 | 
	
		
			
				|  |  |              <if test="fMblno != null">#{fMblno},</if>
 | 
	
		
			
				|  |  |              <if test="fEmblno != null">#{fEmblno},</if>
 | 
	
		
			
				|  |  | +            <if test="fCompany != null">#{fCompany},</if>
 | 
	
		
			
				|  |  |              <if test="fVslvoy != null">#{fVslvoy},</if>
 | 
	
		
			
				|  |  |              <if test="fEta != null">#{fEta},</if>
 | 
	
		
			
				|  |  |              <if test="fMarks != null">#{fMarks},</if>
 | 
	
	
		
			
				|  | @@ -1187,6 +1224,7 @@
 | 
	
		
			
				|  |  |              <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
 | 
	
		
			
				|  |  |              <if test="fMblno != null">f_mblno = #{fMblno},</if>
 | 
	
		
			
				|  |  |              <if test="fEmblno != null">f_emblno = #{fEmblno},</if>
 | 
	
		
			
				|  |  | +            <if test="fCompany != null">f_company = #{fCompany},</if>
 | 
	
		
			
				|  |  |              <if test="fVslvoy != null">f_vslvoy = #{fVslvoy},</if>
 | 
	
		
			
				|  |  |              <if test="fEta != null">f_eta = #{fEta},</if>
 | 
	
		
			
				|  |  |              <if test="fMarks != null">f_marks = #{fMarks},</if>
 | 
	
	
		
			
				|  | @@ -1309,6 +1347,7 @@
 | 
	
		
			
				|  |  |              <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
 | 
	
		
			
				|  |  |              <if test="fMblno != null">f_mblno = #{fMblno},</if>
 | 
	
		
			
				|  |  |              <if test="fEmblno != null">f_emblno = #{fEmblno},</if>
 | 
	
		
			
				|  |  | +            <if test="fCompany != null">f_company = #{fCompany},</if>
 | 
	
		
			
				|  |  |              <if test="fVslvoy != null">f_vslvoy = #{fVslvoy},</if>
 | 
	
		
			
				|  |  |              <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
 | 
	
		
			
				|  |  |              <if test="fEta != null">f_eta = #{fEta},</if>
 | 
	
	
		
			
				|  | @@ -2583,6 +2622,7 @@
 | 
	
		
			
				|  |  |              g.f_name goodsName,
 | 
	
		
			
				|  |  |              t.f_mblno fMblno,
 | 
	
		
			
				|  |  |              t.f_warehouse_information fWarehouseInformation,
 | 
	
		
			
				|  |  | +            t.f_forkliftman fForkliftman,
 | 
	
		
			
				|  |  |              t.f_truckno fTruckno,
 | 
	
		
			
				|  |  |              t.f_cntrno fCntrno,
 | 
	
		
			
				|  |  |              cntr.f_name cntrtypes,
 |