123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ruoyi.warehouseBusiness.mapper.TWarehousebillsitemsMapper">
- <resultMap type="TWarehousebillsitems" id="TWarehousebillsitemsResult">
- <result property="fId" column="f_id"/>
- <result property="fPid" column="f_pid"/>
- <result property="fSrcid" column="f_srcid" />
- <result property="fLineno" column="f_lineno"/>
- <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="fOriginalbillno" column="f_originalbillno"/>
- <result property="fTransferWarehouselocid" column="f_transfer_warehouselocid"/>
- <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="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"/>
- <result property="fGrossweight" column="f_grossweight"/>
- <result property="fStorageFeeDeadline" column="f_storage_fee_deadline"/>
- <result property="fNetweight" column="f_netweight"/>
- <result property="fCntrno" column="f_cntrno"/>
- <result property="fTruckno" column="f_truckno"/>
- <result property="fBillstatus" column="f_billstatus"/>
- <result property="delFlag" column="del_flag"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateTime" column="update_time"/>
- <result property="remark" column="remark"/>
- <result property="fMarks" column="f_marks"/>
- <result property="fLabour" column="f_labour"/>
- <result property="fFleet" column="f_fleet"/>
- <result property="fStevedore" column="f_stevedore"/>
- <result property="fInventoryDays" column="f_inventory_days"/>
- <result property="fAmt" column="f_amt"/>
- <result property="fBillingDays" column="f_billing_days"/>
- <result property="fDriverName" column="f_driver_name"/>
- <result property="fDriverTel" column="f_driver_tel"/>
- <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="fIsInventory" column="f_is_inventory"/>
- <result property="fBusinessType" column="f_business_type"/>
- <result property="fBillingDeadline" column="f_billing_deadline"/>
- <result property="fWarehouseInformation" column="f_warehouse_information"/>
- <result property="fOrgwarehouseInformation" column="f_orgwarehouse_information"/>
- </resultMap>
- <sql id="selectTWarehousebillsitemsVo">
- select f_id, f_pid, f_lineno, f_srcid, f_goodsid, f_billno, f_warehouselocid, f_mblno, f_originalbillno, f_bsdate, f_boxno, f_cntqty,
- f_goodsval, f_cntrtype, f_planvolumn, f_originalbilldate, f_transfer_warehouselocid, f_planqty, f_billingway, f_plangrossweight, f_packagespecs,
- f_chargedate, f_plannetweight, f_qty, f_grossweight, f_volumn, 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, f_business_type, f_is_inventory , f_warehouse_information,
- f_orgwarehouse_information, f_labour, f_fleet, f_stevedore from t_warehousebillsitems
- </sql>
- <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
- resultMap="TWarehousebillsitemsResult">
- <include refid="selectTWarehousebillsitemsVo"/>
- <where>
- <if test="fPid != null ">and f_pid = #{fPid}</if>
- <if test="fLineno != null ">and f_lineno = #{fLineno}</if>
- <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>
- <if test="fMblno != null and fMblno != ''">and f_mblno = #{fMblno}</if>
- <if test="fBillno != null and fBillno != ''">and f_billno = #{fBillno}</if>
- <if test="fWarehouselocid != null ">and f_warehouselocid = #{fWarehouselocid}</if>
- <if test="fBsdate != null ">and f_bsdate = #{fBsdate}</if>
- <if test="fLabour != null ">and f_labour = #{fLabour}</if>
- <if test="fLabour != null ">and f_labour = #{fLabour}</if>
- <if test="fFleet != null ">and f_fleet = #{fFleet}</if>
- <if test="fOriginalbillno != null and fOriginalbillno != ''">and f_originalbillno = #{fOriginalbillno}</if>
- <if test="fBoxno != null and fBoxno != ''">and f_boxno = #{fBoxno}</if>
- <if test="fOriginalbilldate != null ">and f_originalbilldate = #{fOriginalbilldate}</if>
- <if test="fStorageFeeDeadline != null "> and f_storage_fee_deadline = #{fStorageFeeDeadline}</if>
- <if test="fTransferWarehouselocid != null "> and f_transfer_warehouselocid = #{fTransferWarehouselocid}</if>
- <if test="fCntqty != null ">and f_cntqty = #{fCntqty}</if>
- <if test="fGoodsval != null ">and f_goodsval = #{fGoodsval}</if>
- <if test="fCntrtype != null and fCntrtype != ''">and f_cntrtype = #{fCntrtype}</if>
- <if test="fPlanqty != null ">and f_planqty = #{fPlanqty}</if>
- <if test="fPlanvolumn != null ">and f_planvolumn = #{fPlanvolumn}</if>
- <if test="fChargedate != null ">and f_chargedate = #{fChargedate}</if>
- <if test="fIsInventory != null ">and f_is_inventory = #{fIsInventory}</if>
- <if test="fPackagespecs != null ">and f_packagespecs = #{fPackagespecs}</if>
- <if test="fBusinessType != null "> and f_business_type = #{fBusinessType}</if>
- <if test="fWarehouseInformation != null "> and f_warehouse_information = #{fWarehouseInformation}</if>
- <if test="fOrgwarehouseInformation != null "> and f_orgwarehouse_information = #{fOrgwarehouseInformation}</if>
- <if test="fPlangrossweight != null ">and f_plangrossweight = #{fPlangrossweight}</if>
- <if test="fPlannetweight != null ">and f_plannetweight = #{fPlannetweight}</if>
- <if test="fQty != null ">and f_qty = #{fQty}</if>
- <if test="fVolumn != null ">and f_volumn = #{fVolumn}</if>
- <if test="fGrossweight != null ">and f_grossweight = #{fGrossweight}</if>
- <if test="fNetweight != null ">and f_netweight = #{fNetweight}</if>
- <if test="fCntrno != null and fCntrno != ''">and f_cntrno = #{fCntrno}</if>
- <if test="fTruckno != null and fTruckno != ''">and f_truckno = #{fTruckno}</if>
- <if test="fBillstatus != null and fBillstatus != ''">and f_billstatus = #{fBillstatus}</if>
- <if test="fMarks != null and fMarks != ''">and f_marks = #{fMarks}</if>
- <if test="fInventoryDays != null ">and f_inventory_days = #{fInventoryDays}</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="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>
- <if test="fIsPass != null and fIsPass != ''">and f_is_pass = #{fIsPass}</if>
- </where>
- </select>
- <select id="selectGoodsTransferitemsList" parameterType="TWarehousebillsitems" resultType="Map">
- select
- DISTINCT
- item.f_id AS fId,
- item.f_pid AS fPid,
- item.f_srcid AS fSrcid,
- item.f_lineno AS fLineno,
- item.f_billno AS fBillno,
- item.f_goodsid AS fGoodsid,
- goods.f_name AS fGoodsids,
- goods.if_cntrno AS ifCntrno,
- item.f_warehouselocid AS fWarehouselocid,
- area.f_name AS fWarehouselocids,
- ware.f_name AS fWarehouseids,
- item.f_is_pass AS fIsPass,
- item.f_originalbillno AS fOriginalbillno,
- item.f_mblno AS fMblno,
- item.f_bsdate AS fBsdate,
- item.f_boxno AS fBoxno,
- item.f_cntqty AS fCntqty,
- item.f_goodsval AS fGoodsval,
- item.f_cntrtype AS fCntrtype,
- item.f_planqty AS fPlanqty,
- item.f_planvolumn AS fPlanvolumn,
- item.f_billingway AS fBillingway,
- item.f_chargedate AS fChargedate,
- item.f_packagespecs AS fPackagespecs,
- item.f_plangrossweight AS fPlangrossweight,
- item.f_originalbilldate AS fOriginalbilldate,
- item.f_plannetweight AS fPlannetweight,
- item.f_transfer_warehouselocid AS fTransferWarehouselocid,
- item.f_qty AS fQty,
- item.f_volumn AS fVolumn,
- item.f_driver_name AS fDriverName,
- item.f_driver_tel AS fDriverTel,
- item.f_driver_id_car AS fDriverIdCar,
- item.f_serial_number AS fSerialNumber,
- item.f_marks AS fMarks,
- item.f_grossweight AS fGrossweight,
- item.f_is_inventory AS fIsInventory,
- item.f_business_type AS fBusinessType,
- item.f_netweight AS fNetweight,
- item.f_cntrno AS fCntrno,
- item.f_truckno AS fTruckno,
- item.f_billstatus AS fBillstatus,
- item.remark ,
- item.f_warehouse_information AS fWarehouseInformation,
- item.f_orgwarehouse_information AS fOrgwarehouseInformation
- from
- t_warehousebillsitems item
- LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
- LEFT JOIN t_warehouse_area area ON area.f_id = item.f_warehouselocid
- LEFT JOIN t_warehouse ware ON ware.f_id = area.f_warehouseid
- <where>
- <if test="fPid != null ">and item.f_pid = #{fPid}</if>
- </where>
- </select>
- <select id="selectTWarehousebillsitemsById" parameterType="Long" resultMap="TWarehousebillsitemsResult">
- <include refid="selectTWarehousebillsitemsVo"/>
- where f_id = #{fId}
- </select>
- <insert id="insertTWarehousebillsitems" parameterType="TWarehousebillsitems" useGeneratedKeys="true"
- keyProperty="fId">
- insert into t_warehousebillsitems
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fPid != null">f_pid,</if>
- <if test="fLineno != null">f_lineno,</if>
- <if test="fSrcid != null">f_srcid,</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="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="fOriginalbilldate != null">f_originalbilldate,</if>
- <if test="fBillingway != null">f_billingway,</if>
- <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid,</if>
- <if test="fPlanqty != null">f_planqty,</if>
- <if test="fPlanvolumn != null">f_planvolumn,</if>
- <if test="fChargedate != null">f_chargedate,</if>
- <if test="fPlangrossweight != null">f_plangrossweight,</if>
- <if test="fPackagespecs != null">f_packagespecs,</if>
- <if test="fPlannetweight != null">f_plannetweight,</if>
- <if test="fQty != null">f_qty,</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>
- <if test="fBillstatus != null and fBillstatus != ''">f_billstatus,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- <if test="fMarks != null">f_marks,</if>
- <if test="fInventoryDays != null">f_inventory_days,</if>
- <if test="fStorageFeeDeadline != null">f_storage_fee_deadline,</if>
- <if test="fAmt != null">f_amt,</if>
- <if test="fBillingDays != null">f_billing_days,</if>
- <if test="fDriverName != null">f_driver_name,</if>
- <if test="fDriverTel != null">f_driver_tel,</if>
- <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>
- <if test="fBusinessType != null">f_business_type,</if>
- <if test="fIsInventory != null">f_is_inventory,</if>
- <if test="fWarehouseInformation != null">f_warehouse_information,</if>
- <if test="fOrgwarehouseInformation != null">f_orgwarehouse_information,</if>
- <if test="fLabour != null">f_labour,</if>
- <if test="fFleet != null">f_fleet,</if>
- <if test="fStevedore != null">f_stevedore,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fPid != null">#{fPid},</if>
- <if test="fLineno != null">#{fLineno},</if>
- <if test="fSrcid != null">#{fSrcid},</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="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="fOriginalbilldate != null">#{fOriginalbilldate},</if>
- <if test="fBillingway != null">#{fBillingway},</if>
- <if test="fTransferWarehouselocid != null">#{fTransferWarehouselocid},</if>
- <if test="fPlanqty != null">#{fPlanqty},</if>
- <if test="fPlanvolumn != null">#{fPlanvolumn},</if>
- <if test="fChargedate != null">#{fChargedate},</if>
- <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
- <if test="fPackagespecs != null">#{fPackagespecs},</if>
- <if test="fPlannetweight != null">#{fPlannetweight},</if>
- <if test="fQty != null">#{fQty},</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>
- <if test="fBillstatus != null and fBillstatus != ''">#{fBillstatus},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- <if test="fMarks != null">#{fMarks},</if>
- <if test="fInventoryDays != null">#{fInventoryDays},</if>
- <if test="fStorageFeeDeadline != null">#{fStorageFeeDeadline},</if>
- <if test="fAmt != null">#{fAmt},</if>
- <if test="fBillingDays != null">#{fBillingDays},</if>
- <if test="fDriverName != null">#{fDriverName},</if>
- <if test="fDriverTel != null">#{fDriverTel},</if>
- <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>
- <if test="fBusinessType != null">#{fBusinessType},</if>
- <if test="fIsInventory != null">#{fIsInventory},</if>
- <if test="fWarehouseInformation != null">#{fWarehouseInformation},</if>
- <if test="fOrgwarehouseInformation != null">#{fOrgwarehouseInformation},</if>
- <if test="fLabour != null">#{fLabour},</if>
- <if test="fFleet != null">#{fFleet},</if>
- <if test="fStevedore != null">#{fStevedore},</if>
- </trim>
- </insert>
- <update id="updateTWarehousebillsitems" parameterType="TWarehousebillsitems">
- update t_warehousebillsitems
- <trim prefix="SET" suffixOverrides=",">
- <if test="fPid != null">f_pid = #{fPid},</if>
- <if test="fLineno != null">f_lineno = #{fLineno},</if>
- <if test="fSrcid != null">f_srcid = #{fSrcid},</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="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="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
- <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
- <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid = #{fTransferWarehouselocid},</if>
- <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
- <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
- <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
- <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</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="fNetweight != null">f_netweight = #{fNetweight},</if>
- <if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
- <if test="fTruckno != null">f_truckno = #{fTruckno},</if>
- <if test="fBillstatus != null and fBillstatus != ''">f_billstatus = #{fBillstatus},</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="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="fMarks != null">f_marks = #{fMarks},</if>
- <if test="fLabour != null">f_labour = #{fLabour},</if>
- <if test="fFleet != null">f_fleet = #{fFleet},</if>
- <if test="fMarks != null">f_stevedore = #{fStevedore},</if>
- <if test="fInventoryDays != null">f_inventory_days = #{fInventoryDays},</if>
- <if test="fStorageFeeDeadline != null">f_storage_fee_deadline = #{fStorageFeeDeadline},</if>
- <if test="fAmt != null">f_amt = #{fAmt},</if>
- <if test="fBillingDays != null">f_billing_days = #{fBillingDays},</if>
- <if test="fDriverName != null">f_driver_name = #{fDriverName},</if>
- <if test="fDriverTel != null">f_driver_tel = #{fDriverTel},</if>
- <if test="fDriverIdCar != null">f_driver_id_car = #{fDriverIdCar},</if>
- <if test="fSerialNumber != null">f_serial_number = #{fSerialNumber},</if>
- <if test="fSerialNumber == null">f_serial_number = null ,</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="fIsInventory != null">f_is_inventory = #{fIsInventory},</if>
- <if test="fBillingDeadline != null">f_billing_deadline = #{fBillingDeadline},</if>
- <if test="fBusinessType != null">f_business_type = #{fBusinessType},</if>
- <if test="fWarehouseInformation != null">f_warehouse_information = #{fWarehouseInformation},</if>
- <if test="fOrgwarehouseInformation != null">f_orgwarehouse_information = #{fOrgwarehouseInformation},</if>
- </trim>
- where f_id = #{fId}
- </update>
- <update id="agreementApprovalRejected" parameterType="TWarehousebillsitems">
- UPDATE
- t_warehousebillsitems
- SET f_storage_fee_deadline = null, f_chargedate = #{fChargedate}
- WHERE
- f_id = #{fId}
- </update>
- <delete id="deleteTWarehousebillsitemsById" parameterType="Long">
- delete from t_warehousebillsitems where f_id = #{fId}
- </delete>
- <delete id="deleteTWarehousebillsitemsByIds" parameterType="String">
- delete from t_warehousebillsitems where f_id in
- <foreach item="fId" collection="array" open="(" separator="," close=")">
- #{fId}
- </foreach>
- </delete>
- <delete id="deleteByFPid" parameterType="Long">
- delete from t_warehousebillsitems where f_pid = #{fId}
- </delete>
- <select id="selectStorageFeeItemList" parameterType="com.ruoyi.warehouseBusiness.domain.TWarehouseBills"
- resultType="Map">
- SELECT
- item.f_id AS fId,
- item.f_billno AS fBillno,
- item.f_goodsid AS fGoodsid,
- item.f_bsdate AS fBsdate,
- item.f_billingway AS fBillingway,
- item.f_chargedate AS fChargedate,
- item.f_originalbilldate AS fOriginalbilldate,
- item.f_mblno AS fMblno,
- item.f_volumn AS fVolumn,
- item.f_marks AS fMarks,
- item.f_billing_days AS fBillingDays,
- item.f_is_inventory AS fIsInventory,
- item.f_qty AS fQty,
- item.f_orgwarehouse_information AS fOrgwarehouseInformation,
- item.f_grossweight AS fGrossweight,
- item.f_netweight AS fNetweight,
- item.f_billtype AS fBilltype,
- goods.f_typeid AS fTypeid,
- goods.f_name AS fGoodsids
- FROM
- t_warehousebills ware
- LEFT JOIN t_warehousebillsitems item ON item.f_pid = ware.f_id
- LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
- LEFT JOIN t_warehouse wa ON wa.f_id = ware.f_warehouseid
- <where>
- ware.f_corpid = #{warehouse.fCorpid}
- and ware.f_billtype in ("HQZY", "SJCK")
- and wa.f_charg = 1
- and item.f_billstatus = 40
- and item.f_storage_fee_deadline IS NULL
- and item.f_chargedate < #{warehouse.fBillingDeadline}
- <if test="warehouse.fGoodsid != null">and item.f_goodsid = #{warehouse.fGoodsid}</if>
- <if test="warehouse.fMblno != null">and ware.f_mblno = #{warehouse.fMblno}</if>
- </where>
- </select>
- <select id="warehousebillsitemsWarehouselocidSize" resultType="java.lang.Integer">
- SELECT
- COUNT( 1 )
- FROM
- t_warehousebillsitems
- WHERE
- f_warehouselocid = #{fWarehouselocid}
- </select>
- <select id="inStock" resultType="java.lang.Integer">
- SELECT
- COUNT(f_id)
- FROM
- t_warehousebillsitems
- WHERE
- f_billtype = 'SJRK'
- AND
- f_billstatus in (20,30)
- </select>
- <select id="outStock" resultType="java.lang.Integer">
- SELECT
- COUNT(f_id)
- FROM
- t_warehousebillsitems
- WHERE
- f_billtype = 'SJCK'
- AND
- f_billstatus in (20,30)
- </select>
- <select id="monthInStock" resultType="java.lang.Integer">
- SELECT
- COUNT(f_id)
- FROM
- t_warehousebillsitems
- WHERE
- f_billtype = 'SJRK'
- AND
- f_billstatus =40
- AND
- f_bsdate >= #{timeInterval[0]}
- AND
- f_bsdate <= #{timeInterval[1]}
- </select>
- <select id="monthOutStock" resultType="java.lang.Integer">
- SELECT
- COUNT(f_id)
- FROM
- t_warehousebillsitems
- WHERE
- f_billtype = 'SJCK'
- AND
- f_billstatus =40
- AND
- f_bsdate >= #{timeInterval[0]}
- AND
- f_bsdate <= #{timeInterval[1]}
- </select>
- <select id="selectWarehouseBusinesInList" resultType="java.util.Map">
- SELECT
- items.f_id AS fId,
- items.f_pid AS fPid,
- c.f_name AS fName,
- items.f_mblno AS fMblno,
- items.f_bsdate AS fBsdate,
- items.f_is_pass AS fIsPass,
- CASE
- WHEN items.f_billstatus = 20 THEN
- '待入库'
- WHEN items.f_billstatus = 30 THEN
- '入库中'
- END AS fBillstatus,
- g.f_name AS fGoodsid,
- items.f_driver_tel AS fDriverTel,
- dict.dict_label AS fBusinessType ,
- items.f_marks AS fMarks,
- items.f_warehouse_information AS fWarehouseInformation,
- items.f_qty AS fQty,
- items.f_grossweight AS fGrossweight,
- items.f_netweight AS fNetweight
- FROM
- t_warehousebillsitems items
- LEFT JOIN t_warehousebills t ON items.f_pid = t.f_id
- LEFT JOIN t_corps c ON t.f_corpid = c.f_id
- LEFT JOIN t_goods g ON items.f_goodsid = g.f_id
- LEFT JOIN sys_dict_data dict ON dict.dict_type = 'storage_type'
- AND dict.dict_value = items.f_business_type
- WHERE
- items.f_billtype = 'SJRK'
- AND items.f_billstatus IN ( 20, 30 )
- <if test="timeStartBsdate != null">AND items.f_bsdate >= #{timeStartBsdate}</if>
- <if test="timeEndBsdate != null">AND items.f_bsdate <= #{timeEndBsdate}</if>
- <if test="fBillstatus != null">AND items.f_billstatus = #{fBillstatus}</if>
- <if test="fMblno != null and fMblno != '' ">AND items.f_mblno like concat('%',#{fMblno},'%') </if>
- </select>
- <select id="selectWarehouseBusinesOutList" resultType="java.util.Map">
- SELECT
- items.f_id AS fId,
- items.f_pid AS fPid,
- c.f_name AS fName,
- items.f_mblno AS fMblno,
- items.f_bsdate AS fBsdate,
- items.f_is_pass AS fIsPass,
- CASE
- WHEN items.f_billstatus = 20 THEN
- '待出库'
- WHEN items.f_billstatus = 30 THEN
- '出库中'
- END AS fBillstatus,
- g.f_name AS fGoodsid,
- items.f_driver_tel AS fDriverTel,
- dict.dict_label AS fBusinessType ,
- items.f_marks AS fMarks,
- items.f_warehouse_information AS fWarehouseInformation,
- items.f_qty AS fQty,
- items.f_grossweight AS fGrossweight,
- items.f_netweight AS fNetweight
- FROM
- t_warehousebillsitems items
- LEFT JOIN t_warehousebills t ON items.f_pid = t.f_id
- LEFT JOIN t_corps c ON t.f_corpid = c.f_id
- LEFT JOIN t_goods g ON items.f_goodsid = g.f_id
- LEFT JOIN sys_dict_data dict ON dict.dict_type = 'storage_type'
- AND dict.dict_value = items.f_business_type
- WHERE
- items.f_billtype = 'SJCK'
- AND items.f_billstatus IN ( 20, 30 )
- <if test="timeStartBsdate != null">AND items.f_bsdate >= #{timeStartBsdate}</if>
- <if test="timeEndBsdate != null">AND items.f_bsdate <= #{timeEndBsdate}</if>
- <if test="fBillstatus != null">AND items.f_billstatus = #{fBillstatus}</if>
- <if test="fMblno != null and fMblno != '' ">AND items.f_mblno like concat('%',#{fMblno},'%') </if>
- order by items.f_bsdate desc
- </select>
- <select id="selectWarehouseItemsByPId" parameterType="long" resultType="Map">
- SELECT
- t.f_id fId,
- t.f_pid fPid,
- t.f_bsdate bsdate,
- corp.f_name corpName,
- t.f_mblno fMblno,
- stor.dict_label businessType,
- t.f_marks marks,
- t.f_labour labour,
- g.f_name goodsName,
- fleet.f_name fleetName,
- t.f_warehouse_information warehouseInformation,
- t.f_warehouselocid fWarehouselocid,
- t.f_truckno truckno,
- t.f_cntrtype cntrtype,
- t.f_cntqty cntqty,
- t.f_cntrno cntrno,
- t.f_qty fQty,
- t.f_grossweight fGrossweight,
- t.f_netweight fNetweight,
- t.f_driver_tel fDriverTel,
- CASE
- WHEN t.f_billstatus = '10' THEN
- '计划'
- WHEN t.f_billstatus = '20' THEN
- '待入库'
- WHEN t.f_billstatus = '30' THEN
- '入库中'
- WHEN t.f_billstatus = '40' THEN
- '已入库'
- END billstatus,
- t.remark
- FROM
- t_warehousebillsitems t
- LEFT JOIN t_warehousebills w ON w.f_id = t.f_pid
- LEFT JOIN sys_dict_data stor ON stor.dict_value = t.f_business_type
- AND stor.dict_type = 'storage_type'
- LEFT JOIN t_goods g ON g.f_id = t.f_goodsid
- LEFT JOIN t_corps fleet ON fleet.f_id = t.f_fleet
- LEFT JOIN t_corps corp ON corp.f_id = w.f_corpid
- where
- t.f_id = #{fId}
- </select>
- <update id="warehouseItemFollowUpdate" parameterType="Long">
- update
- t_warehousebillsitems
- SET f_billstatus = IF
- ( f_billtype = 'SJCK' || f_billtype = 'SJRK', 40, #{fettle} )
- where
- f_pid = #{fPid}
- </update>
- </mapper>
|