Browse Source

添加 仓库主表、明细表、库存总账字段

阿伏兔 4 years ago
parent
commit
fc46ab549e

+ 32 - 20
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -51,10 +51,11 @@
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="remark" column="remark"/>
+        <result property="fBillingDeadline" column="f_billing_deadline"/>
     </resultMap>
 
     <sql id="selectTWarehousebillsVo">
-        select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_marks, f_tel, f_chargedate, f_corpid, f_tocorpid, f_stltypeid, f_items_status,f_bscorpno, f_warehouseid, f_storekeeper, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, f_billingway, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark from t_warehousebills
+        select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_bsdate, f_chargedate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, f_billingway, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_marks, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, update_by, f_items_status, update_time, remark, f_billing_deadline from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -71,7 +72,7 @@
             <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
             <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
             <if test="fTocorpid != null ">and f_tocorpid = #{fTocorpid}</if>
-            <if test="fChargedate != null "> and f_chargedate = #{fChargedate}</if>
+            <if test="fChargedate != null ">and f_chargedate = #{fChargedate}</if>
             <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
                 and f_bsdate &gt;= #{timeInterval[0]}
             </if>
@@ -104,6 +105,7 @@
             <if test="fIfpledge != null  and fIfpledge != ''">and f_ifpledge = #{fIfpledge}</if>
             <if test="fIfdamage != null  and fIfdamage != ''">and f_ifdamage = #{fIfdamage}</if>
             <if test="fBankcorpid != null ">and f_bankcorpid = #{fBankcorpid}</if>
+            <if test="fBillingDeadline != null "> and f_billing_deadline = #{fBillingDeadline}</if>
             <if test="fBilltype != null  and fBilltype != ''">and f_billtype = #{fBilltype}</if>
             <if test="fBillstatus != null  and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
         </where>
@@ -113,7 +115,7 @@
 
     <select id="selectWarehouseBusinessList" parameterType="TWarehousebills" resultType="Map">
         SELECT
-        DISTINCT
+            DISTINCT
             bill.f_id AS fId,
             corp.f_name AS fCorpid,
             corpTo.f_name AS fTocorpid,
@@ -139,8 +141,12 @@
             LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
         <where>
             <if test="fBillno != null  and fBillno != ''">and bill.f_billno like concat('%', #{fBillno}, '%')</if>
-            <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and bill.f_customsdeclartion = #{fCustomsdeclartion}</if>
-            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and bill.f_originalbillno = #{fOriginalbillno}</if>
+            <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and bill.f_customsdeclartion =
+                #{fCustomsdeclartion}
+            </if>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and bill.f_originalbillno =
+                #{fOriginalbillno}
+            </if>
             <if test="fDeptid != null ">and bill.f_deptid = #{fDeptid}</if>
             <if test="fBsdeptid != null ">and bill.f_bsdeptid = #{fBsdeptid}</if>
             <if test="fChargedate != null ">and bill.f_chargedate = #{fChargedate}</if>
@@ -154,8 +160,9 @@
             <if test="fContacts != null  and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
             <if test="fTel != null  and fTel != ''">and bill.f_tel = #{fTel}</if>
             <if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
+            <if test="fBillingDeadline != null ">and bill.f_billing_deadline = #{fBillingDeadline}</if>
             <if test="fTocorpid != null ">and bill.f_tocorpid = #{fTocorpid}</if>
-            <if test="fMarks != null  and fMarks != ''">and bill.f_marks like concat('%', #{fMarks}, '%') </if>
+            <if test="fMarks != null  and fMarks != ''">and bill.f_marks like concat('%', #{fMarks}, '%')</if>
             <if test="fStltypeid != null ">and bill.f_stltypeid = #{fStltypeid}</if>
             <if test="fBscorpno != null  and fBscorpno != ''">and bill.f_bscorpno = #{fBscorpno}</if>
             <if test="fWarehouseid != null ">and bill.f_warehouseid = #{fWarehouseid}</if>
@@ -173,7 +180,7 @@
             <if test="fBillingway != null ">and bill.f_billingway = #{fBillingway}</if>
             <if test="fSbu != null ">and bill.f_sbu = #{fSbu}</if>
             <if test="fFeetunit != null  and fFeetunit != ''">and bill.f_feetunit = #{fFeetunit}</if>
-            <if test="fMblno != null  and fMblno != ''">and bill.f_mblno like concat('%', #{fMblno}, '%') </if>
+            <if test="fMblno != null  and fMblno != ''">and bill.f_mblno like concat('%', #{fMblno}, '%')</if>
             <if test="fVslvoy != null  and fVslvoy != ''">and bill.f_vslvoy = #{fVslvoy}</if>
             <if test="fEta != null ">and bill.f_eta = #{fEta}</if>
             <if test="fCustomno != null  and fCustomno != ''">and bill.f_customno = #{fCustomno}</if>
@@ -221,8 +228,8 @@
             <if test="fGrossweight != null">f_grossweight,</if>
             <if test="fNetweight != null">f_netweight,</if>
             <if test="fVolumn != null">f_volumn,</if>
-            <if test="fBillingway != null">f_billingway,</if>
             <if test="fTrademodeid != null">f_trademodeid,</if>
+            <if test="fBillingway != null">f_billingway,</if>
             <if test="fSbu != null">f_sbu,</if>
             <if test="fFeetunit != null">f_feetunit,</if>
             <if test="fMblno != null">f_mblno,</if>
@@ -240,8 +247,10 @@
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
+            <if test="fItemsStatus != null">f_items_status,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="fBillingDeadline != null">f_billing_deadline,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fBillno != null">#{fBillno},</if>
@@ -267,8 +276,8 @@
             <if test="fGrossweight != null">#{fGrossweight},</if>
             <if test="fNetweight != null">#{fNetweight},</if>
             <if test="fVolumn != null">#{fVolumn},</if>
-            <if test="fBillingway != null">#{fBillingway},</if>
             <if test="fTrademodeid != null">#{fTrademodeid},</if>
+            <if test="fBillingway != null">#{fBillingway},</if>
             <if test="fSbu != null">#{fSbu},</if>
             <if test="fFeetunit != null">#{fFeetunit},</if>
             <if test="fMblno != null">#{fMblno},</if>
@@ -286,8 +295,10 @@
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
+            <if test="fItemsStatus != null">#{fItemsStatus},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="fBillingDeadline != null">#{fBillingDeadline},</if>
         </trim>
     </insert>
 
@@ -317,8 +328,8 @@
             <if test="fGrossweight != null">f_grossweight = #{fGrossweight},</if>
             <if test="fNetweight != null">f_netweight = #{fNetweight},</if>
             <if test="fVolumn != null">f_volumn = #{fVolumn},</if>
-            <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
             <if test="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</if>
+            <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
             <if test="fSbu != null">f_sbu = #{fSbu},</if>
             <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
@@ -332,13 +343,14 @@
             <if test="fBankcorpid != null">f_bankcorpid = #{fBankcorpid},</if>
             <if test="fBilltype != null">f_billtype = #{fBilltype},</if>
             <if test="fBillstatus != null">f_billstatus = #{fBillstatus},</if>
-            <if test="fItemsStatus != null">f_items_status = #{fItemsStatus},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="fItemsStatus != null">f_items_status = #{fItemsStatus},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="fBillingDeadline != null">f_billing_deadline = #{fBillingDeadline},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -349,17 +361,17 @@
 
     <delete id="deleteTWarehousebillsByIds" parameterType="String">
         delete
-            item.*,
-            bill.*,
-            fess.*,
-            enclosure.*
+        item.*,
+        bill.*,
+        fess.*,
+        enclosure.*
         from
-            t_warehousebills bill
-            LEFT JOIN t_warehousebillsfees fess ON fess.f_pid = bill.f_id
-            LEFT JOIN t_enclosure enclosure ON enclosure.f_pid = bill.f_id
-            LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
+        t_warehousebills bill
+        LEFT JOIN t_warehousebillsfees fess ON fess.f_pid = bill.f_id
+        LEFT JOIN t_enclosure enclosure ON enclosure.f_pid = bill.f_id
+        LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
         where
-            bill.f_id in
+        bill.f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>

+ 46 - 31
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -8,23 +8,23 @@
         <result property="fId" column="f_id"/>
         <result property="fPid" column="f_pid"/>
         <result property="fLineno" column="f_lineno"/>
-        <result property="fBillno" column="f_billno"/>
         <result property="fGoodsid" column="f_goodsid"/>
+        <result property="fBillno" column="f_billno"/>
         <result property="fMblno" column="f_mblno"/>
         <result property="fWarehouselocid" column="f_warehouselocid"/>
-        <result property="fBsdate" column="f_bsdate"/>
         <result property="fOriginalbillno" column="f_originalbillno"/>
-        <result property="fOriginalbilldate" column="f_originalbilldate"/>
+        <result property="fBsdate" column="f_bsdate"/>
         <result property="fBoxno" column="f_boxno"/>
         <result property="fCntqty" column="f_cntqty"/>
         <result property="fGoodsval" column="f_goodsval"/>
         <result property="fCntrtype" column="f_cntrtype"/>
-        <result property="fChargedate" column="f_chargedate"/>
-        <result property="fBillingway" column="f_billingway"/>
         <result property="fPlanqty" column="f_planqty"/>
+        <result property="fBillingway" column="f_billingway"/>
         <result property="fPlanvolumn" column="f_planvolumn"/>
+        <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="fPackagespecs" column="f_packagespecs"/>
         <result property="fPlangrossweight" column="f_plangrossweight"/>
+        <result property="fChargedate" column="f_chargedate"/>
         <result property="fPlannetweight" column="f_plannetweight"/>
         <result property="fQty" column="f_qty"/>
         <result property="fVolumn" column="f_volumn"/>
@@ -49,10 +49,13 @@
         <result property="fDriverIdCar" column="f_driver_id_car"/>
         <result property="fSerialNumber" column="f_serial_number"/>
         <result property="fIsPass" column="f_is_pass"/>
+        <result property="fBilltype" column="f_billtype"/>
+        <result property="fBillingQty" column="f_billing_qty"/>
+        <result property="fBillingDeadline" column="f_billing_deadline"/>
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
-        select f_id, f_pid, f_lineno, f_billno, f_goodsid, f_mblno, f_warehouselocid, f_bsdate, f_originalbillno, f_boxno, f_originalbilldate, f_cntqty, f_goodsval, f_cntrtype, f_chargedate, f_billingway, f_planqty, f_planvolumn, f_packagespecs, f_plangrossweight, f_plannetweight, f_qty, f_volumn, f_grossweight, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark, f_marks,f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days, f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass from t_warehousebillsitems
+        select f_id, f_pid, f_lineno, f_goodsid, f_billno, f_mblno, f_warehouselocid, f_originalbillno, f_bsdate, f_boxno, f_cntqty, f_goodsval, f_cntrtype, f_planqty, f_billingway, f_planvolumn, f_originalbilldate, f_packagespecs, f_plangrossweight, f_chargedate, f_plannetweight, f_qty, f_volumn, f_grossweight, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark, f_marks, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days, f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass, f_billtype, f_billing_qty, f_billing_deadline from t_warehousebillsitems
     </sql>
 
     <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
@@ -90,7 +93,9 @@
             <if test="fStorageFeeDeadline != null ">and f_storage_fee_deadline = #{fStorageFeeDeadline}</if>
             <if test="fAmt != null ">and f_amt = #{fAmt}</if>
             <if test="fBillingDays != null ">and f_billing_days = #{fBillingDays}</if>
-            <if test="fDriverName != null  and fDriverName != ''">and f_driver_name like concat('%', #{fDriverName},'%')</if>
+            <if test="fDriverName != null  and fDriverName != ''">and f_driver_name like concat('%',
+                #{fDriverName},'%')
+            </if>
             <if test="fDriverTel != null  and fDriverTel != ''">and f_driver_tel = #{fDriverTel}</if>
             <if test="fDriverIdCar != null  and fDriverIdCar != ''">and f_driver_id_car = #{fDriverIdCar}</if>
             <if test="fSerialNumber != null  and fSerialNumber != ''">and f_serial_number = #{fSerialNumber}</if>
@@ -153,25 +158,25 @@
             <if test="fLineno != null">f_lineno,</if>
             <if test="fGoodsid != null">f_goodsid,</if>
             <if test="fBillno != null">f_billno,</if>
-            <if test="fWarehouselocid != null">f_warehouselocid,</if>
             <if test="fMblno != null">f_mblno,</if>
-            <if test="fBsdate != null">f_bsdate,</if>
+            <if test="fWarehouselocid != null">f_warehouselocid,</if>
             <if test="fOriginalbillno != null">f_originalbillno,</if>
+            <if test="fBsdate != null">f_bsdate,</if>
             <if test="fBoxno != null">f_boxno,</if>
             <if test="fCntqty != null">f_cntqty,</if>
             <if test="fGoodsval != null">f_goodsval,</if>
             <if test="fCntrtype != null">f_cntrtype,</if>
+            <if test="fPlanqty != null">f_planqty,</if>
             <if test="fBillingway != null">f_billingway,</if>
-            <if test="fOriginalbilldate != null">f_originalbilldate,</if>
             <if test="fPlanvolumn != null">f_planvolumn,</if>
-            <if test="fPlanqty != null">f_planqty,</if>
-            <if test="fChargedate != null">f_chargedate,</if>
-            <if test="fPlangrossweight != null">f_plangrossweight,</if>
+            <if test="fOriginalbilldate != null">f_originalbilldate,</if>
             <if test="fPackagespecs != null">f_packagespecs,</if>
+            <if test="fPlangrossweight != null">f_plangrossweight,</if>
+            <if test="fChargedate != null">f_chargedate,</if>
             <if test="fPlannetweight != null">f_plannetweight,</if>
             <if test="fQty != null">f_qty,</if>
-            <if test="fGrossweight != null">f_grossweight,</if>
             <if test="fVolumn != null">f_volumn,</if>
+            <if test="fGrossweight != null">f_grossweight,</if>
             <if test="fNetweight != null">f_netweight,</if>
             <if test="fCntrno != null">f_cntrno,</if>
             <if test="fTruckno != null">f_truckno,</if>
@@ -192,31 +197,34 @@
             <if test="fDriverIdCar != null">f_driver_id_car,</if>
             <if test="fSerialNumber != null">f_serial_number,</if>
             <if test="fIsPass != null">f_is_pass,</if>
+            <if test="fBilltype != null">f_billtype,</if>
+            <if test="fBillingQty != null">f_billing_qty,</if>
+            <if test="fBillingDeadline != null">f_billing_deadline,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null">#{fPid},</if>
             <if test="fLineno != null">#{fLineno},</if>
             <if test="fGoodsid != null">#{fGoodsid},</if>
             <if test="fBillno != null">#{fBillno},</if>
-            <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
             <if test="fMblno != null">#{fMblno},</if>
-            <if test="fBsdate != null">#{fBsdate},</if>
+            <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
             <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
+            <if test="fBsdate != null">#{fBsdate},</if>
             <if test="fBoxno != null">#{fBoxno},</if>
             <if test="fCntqty != null">#{fCntqty},</if>
             <if test="fGoodsval != null">#{fGoodsval},</if>
             <if test="fCntrtype != null">#{fCntrtype},</if>
+            <if test="fPlanqty != null">#{fPlanqty},</if>
             <if test="fBillingway != null">#{fBillingway},</if>
-            <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
             <if test="fPlanvolumn != null">#{fPlanvolumn},</if>
-            <if test="fPlanqty != null">#{fPlanqty},</if>
-            <if test="fChargedate != null">#{fChargedate},</if>
-            <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
+            <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
             <if test="fPackagespecs != null">#{fPackagespecs},</if>
+            <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
+            <if test="fChargedate != null">#{fChargedate},</if>
             <if test="fPlannetweight != null">#{fPlannetweight},</if>
             <if test="fQty != null">#{fQty},</if>
-            <if test="fGrossweight != null">#{fGrossweight},</if>
             <if test="fVolumn != null">#{fVolumn},</if>
+            <if test="fGrossweight != null">#{fGrossweight},</if>
             <if test="fNetweight != null">#{fNetweight},</if>
             <if test="fCntrno != null">#{fCntrno},</if>
             <if test="fTruckno != null">#{fTruckno},</if>
@@ -237,6 +245,9 @@
             <if test="fDriverIdCar != null">#{fDriverIdCar},</if>
             <if test="fSerialNumber != null">#{fSerialNumber},</if>
             <if test="fIsPass != null">#{fIsPass},</if>
+            <if test="fBilltype != null">#{fBilltype},</if>
+            <if test="fBillingQty != null">#{fBillingQty},</if>
+            <if test="fBillingDeadline != null">#{fBillingDeadline},</if>
         </trim>
     </insert>
 
@@ -247,25 +258,25 @@
             <if test="fLineno != null">f_lineno = #{fLineno},</if>
             <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
             <if test="fBillno != null">f_billno = #{fBillno},</if>
-            <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
-            <if test="fBsdate != null">f_bsdate = #{fBsdate},</if>
+            <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</if>
             <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
+            <if test="fBsdate != null">f_bsdate = #{fBsdate},</if>
             <if test="fBoxno != null">f_boxno = #{fBoxno},</if>
             <if test="fCntqty != null">f_cntqty = #{fCntqty},</if>
             <if test="fGoodsval != null">f_goodsval = #{fGoodsval},</if>
             <if test="fCntrtype != null">f_cntrtype = #{fCntrtype},</if>
+            <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
             <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
-            <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
             <if test="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
-            <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
-            <if test="fChargedate != null">f_chargedate = #{fChargedate},</if>
-            <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
+            <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
             <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</if>
+            <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
+            <if test="fChargedate != null">f_chargedate = #{fChargedate},</if>
             <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>
-            <if test="fGrossweight != null">f_grossweight = #{fGrossweight},</if>
             <if test="fVolumn != null">f_volumn = #{fVolumn},</if>
+            <if test="fGrossweight != null">f_grossweight = #{fGrossweight},</if>
             <if test="fNetweight != null">f_netweight = #{fNetweight},</if>
             <if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
             <if test="fTruckno != null">f_truckno = #{fTruckno},</if>
@@ -286,6 +297,9 @@
             <if test="fDriverIdCar != null">f_driver_id_car = #{fDriverIdCar},</if>
             <if test="fSerialNumber != null">f_serial_number = #{fSerialNumber},</if>
             <if test="fIsPass != null">f_is_pass = #{fIsPass},</if>
+            <if test="fBilltype != null">f_billtype = #{fBilltype},</if>
+            <if test="fBillingQty != null">f_billing_qty = #{fBillingQty},</if>
+            <if test="fBillingDeadline != null">f_billing_deadline = #{fBillingDeadline},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -313,10 +327,11 @@
         t_warehousebills ware
         LEFT JOIN t_warehousebillsitems item ON item.f_pid = ware.f_id
         <where>
-            ware.f_corpid = #{fCorpid}
+            ware.f_corpid = #{warehouse.fCorpid}
             and ware.f_billtype in ("HQZY", "SJCK")
-            <if test="fBillno != null">and ware.f_billno = #{fBillno}</if>
-            <if test="fMblno != null">and ware.f_mblno = #{fMblno}</if>
+            <if test="warehouse.fGoodsid != null">and item.f_goodsid = #{warehouse.fGoodsid}</if>
+            <if test="warehouse.fBillno != null">and ware.f_billno = #{warehouse.fBillno}</if>
+            <if test="warehouse.fMblno != null">and ware.f_mblno = #{warehouse.fMblno}</if>
         </where>
     </select>