Browse Source

修改陆运台账问题,修改仓库app取值问题

阿伏兔 4 years ago
parent
commit
8dd68070f8

+ 1 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/finance/FTmsaccbillsController.java

@@ -115,9 +115,7 @@ public class FTmsaccbillsController extends BaseController {
         if (StringUtils.isEmpty(tFeeDo) || "[]".equals(tFeeDo)) {
             return AjaxResult.error("未找到财务明细数据,请确认");
         }
-        // 获取当前的用户
-        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
-        return fTmsaccbillsService.confirm(tFee,tFeeDo,loginUser,billsType);
+        return fTmsaccbillsService.confirm(tFee,tFeeDo,billsType);
     }
 
 }

+ 1 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/finance/TChargesController.java

@@ -110,9 +110,7 @@ public class TChargesController extends BaseController {
     public AjaxResult confirm(@RequestParam("tFee") String tFee,
                               @RequestParam("tFeeDo") String tFeeDo ) {
         String billsType = "JSSF";
-        // 获取当前的用户
-        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
-        return fTmsaccbillsService.confirm(tFee,tFeeDo,loginUser,billsType);
+        return fTmsaccbillsService.confirm(tFee,tFeeDo,billsType);
     }
 
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/finance/TPaymentsController.java

@@ -112,6 +112,6 @@ public class TPaymentsController extends BaseController {
         String billsType = "JSFF";
         // 获取当前的用户
         LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
-        return fTmsaccbillsService.confirm(tFee,tFeeDo,loginUser,billsType);
+        return fTmsaccbillsService.confirm(tFee,tFeeDo,billsType);
     }
 }

+ 1 - 1
ruoyi-fleet/src/main/java/com/ruoyi/orderManagement/finance/service/IFTmsaccbillsService.java

@@ -44,5 +44,5 @@ public interface IFTmsaccbillsService
 
     public AjaxResult queryRemove(Long fId);
 
-    public AjaxResult confirm(String tfee, String tfeeDo ,LoginUser loginUser,String fBilltype);
+    public AjaxResult confirm(String tfee, String tfeeDo ,String fBilltype);
 }

+ 12 - 12
ruoyi-fleet/src/main/java/com/ruoyi/orderManagement/finance/service/impl/FTmsaccbillsServiceImpl.java

@@ -8,6 +8,7 @@ import com.ruoyi.basicData.mapper.TCorpsMapper;
 import com.ruoyi.basicData.mapper.TFeesMapper;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
@@ -274,14 +275,17 @@ public class FTmsaccbillsServiceImpl implements IFTmsaccbillsService {
      *  费用确认
      * @param tfee
      * @param tfeeDo
-     * @param loginUser
      * @param fBilltype
      * @return
      */
     @Override
     @Transactional
-    public AjaxResult confirm(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype) {
+    public AjaxResult confirm(String tfee, String tfeeDo, String fBilltype) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
         FTmsaccbills fTmsaccbills = JSONArray.parseObject(tfee, FTmsaccbills.class);
+        if (StringUtils.isNotNull(fTmsaccbills.getfBillstatus()) && fTmsaccbills.getfBillstatus() == 6) {
+            return AjaxResult.success();
+        }
         fTmsaccbills.setfBillstatus(4L);
         if (StringUtils.isNull(fTmsaccbills.getId())) {
             // 如果是新数据
@@ -301,11 +305,11 @@ public class FTmsaccbillsServiceImpl implements IFTmsaccbillsService {
             }
             fTmsaccbills.setfBilltype(fBilltype);
             fTmsaccbills.setCreateTime(new Date());
-            fTmsaccbills.setfDeptid(loginUser.getUser().getDeptId());
-            fTmsaccbills.setCreateBy(loginUser.getUser().getUserName());
+            fTmsaccbills.setfDeptid(user.getDeptId());
+            fTmsaccbills.setCreateBy(user.getUserName());
             fTmsaccbillsMapper.insertFTmsaccbills(fTmsaccbills);
         } else {
-            fTmsaccbills.setUpdateBy(loginUser.getUser().getUserName());
+            fTmsaccbills.setUpdateBy(user.getUserName());
             fTmsaccbills.setUpdateTime(new Date());
             fTmsaccbillsMapper.updateFTmsaccbills(fTmsaccbills);
         }
@@ -317,7 +321,7 @@ public class FTmsaccbillsServiceImpl implements IFTmsaccbillsService {
         for (FTmsaccbillsitems tFeeDo : tFeeDoList) {
             tFeeDo.setCreateTime(new Date());
             tFeeDo.setFPid(fTmsaccbills.getId());
-            tFeeDo.setCreateBy(loginUser.getUser().getUserName());
+            tFeeDo.setCreateBy(user.getUserName());
             fTmsaccbillsitemsMapper.insertFTmsaccbillsitems(tFeeDo);
             // 跟新费用明细
             int m = updateBillsFees(fTmsaccbills.getId(), tFeeDo, fBilltype);
@@ -343,8 +347,8 @@ public class FTmsaccbillsServiceImpl implements IFTmsaccbillsService {
         }
         Map<String, Object> map = new HashMap<>();
         map.put("tFee", tFee);
-        map.put("billType", billsType);
         map.put("tFeeDo", tFeeDo);
+        map.put("billType", billsType);
         return ftmsorderbillsfeesMapper.updateFTmsorderbillsfee(map);
     }
 
@@ -356,11 +360,7 @@ public class FTmsaccbillsServiceImpl implements IFTmsaccbillsService {
         FTmsaccbills tFee = new FTmsaccbills();
         tFee.setId(fPid);
         tFee.setfBillstatus(fettle);
-        int tFeeUpdateResult = fTmsaccbillsMapper.updateFTmsaccbills(tFee);
-        if (tFeeUpdateResult <= 0) {
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            return AjaxResult.error("更新财务明细状态失败,请联系管理员");
-        }
+        fTmsaccbillsMapper.updateFTmsaccbills(tFee);
         fTmsaccbillsitemsMapper.tfeeDoFollowUpdate(fPid, fettle);
         return AjaxResult.success();
     }

+ 46 - 1
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/VehicleLedgerExcel.java

@@ -3,6 +3,7 @@ package com.ruoyi.orderPlan.domain;
 import com.ruoyi.common.annotation.Excel;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 车辆台账Excel
@@ -102,6 +103,21 @@ public class VehicleLedgerExcel {
     private BigDecimal profitCar;
 
     /**
+     *  检索条件:结算单位
+     */
+    private Long tCorpId;
+
+    /**
+     *  检索条件:接单日期区间
+     */
+    private List<String> acceptDateList;
+
+    /**
+     *  检索条件:对账日期区间
+     */
+    private List<String> accchkDateList;
+
+    /**
      *  检索条件:结算状态
      */
     private String stlStatus;
@@ -116,6 +132,30 @@ public class VehicleLedgerExcel {
      */
     private String invStatus;
 
+    public Long gettCorpId() {
+        return tCorpId;
+    }
+
+    public void settCorpId(Long tCorpId) {
+        this.tCorpId = tCorpId;
+    }
+
+    public List<String> getAcceptDateList() {
+        return acceptDateList;
+    }
+
+    public void setAcceptDateList(List<String> acceptDateList) {
+        this.acceptDateList = acceptDateList;
+    }
+
+    public List<String> getAccchkDateList() {
+        return accchkDateList;
+    }
+
+    public void setAccchkDateList(List<String> accchkDateList) {
+        this.accchkDateList = accchkDateList;
+    }
+
     public String getMblno() {
         return mblno;
     }
@@ -391,7 +431,9 @@ public class VehicleLedgerExcel {
     @Override
     public String toString() {
         return "VehicleLedgerExcel{" +
-                "mdLoadDate='" + mdLoadDate + '\'' +
+                "id=" + id +
+                ", mblno='" + mblno + '\'' +
+                ", mdLoadDate='" + mdLoadDate + '\'' +
                 ", billType='" + billType + '\'' +
                 ", transType='" + transType + '\'' +
                 ", corpId='" + corpId + '\'' +
@@ -420,6 +462,9 @@ public class VehicleLedgerExcel {
                 ", stlAmtCr=" + stlAmtCr +
                 ", profitBill=" + profitBill +
                 ", profitCar=" + profitCar +
+                ", tCorpId=" + tCorpId +
+                ", acceptDateList=" + acceptDateList +
+                ", accchkDateList=" + accchkDateList +
                 ", stlStatus='" + stlStatus + '\'' +
                 ", accchkStatus='" + accchkStatus + '\'' +
                 ", invStatus='" + invStatus + '\'' +

+ 6 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/mapper/FtmsorderbillscarsMapper.java

@@ -215,4 +215,10 @@ public interface FtmsorderbillscarsMapper {
      * @return  结果
      */
     public List<VehicleLedgerExcel> queryLedgerList(VehicleLedgerExcel vehicleLedgerExcel);
+
+    /**
+     *  根据car表id删除后续业务
+     * @param id
+     */
+    public void deleteFollowUpBusinessByCarId(Long id);
 }

+ 18 - 35
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java

@@ -521,17 +521,17 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         if (ftmsorderbillscars.getOrderStatus() > 80L || ftmsorderbillscars.getBillStatus() > 6) {
             return AjaxResult.error("该运单已回单或已完成无法撤销配载");
         }
-        ftmsorderbillscars.setmBillNo("");
+        ftmsorderbillscars.setmBillNo(null);
         ftmsorderbillscars.setBillKind("NN");
         ftmsorderbillscars.setUpdateTime(new Date());
         ftmsorderbillscars.setUpdateBy(SecurityUtils.getUsername());
         ftmsorderbillscarsMapper.updateftmsorderbillscars(ftmsorderbillscars);
-        tmsorderbillscars.setmBillNo("");
+        tmsorderbillscars.setmBillNo(null);
         tmsorderbillscars.setBillKind("NN");
         tmsorderbillscars.setUpdateTime(new Date());
         tmsorderbillscars.setUpdateBy(SecurityUtils.getUsername());
         ftmsorderbillscarsMapper.updateftmsorderbillscars(tmsorderbillscars);
-        return AjaxResult.success(tmsorderbillscars);
+        return AjaxResult.success(ftmsorderbillscarsMapper.selectftmsorderbillscarsByPid(tmsorderbillscars.getpId()));
     }
 
     /**
@@ -572,7 +572,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         orderNoCars.setUpdateTime(new Date());
         orderNoCars.setUpdateBy(SecurityUtils.getUsername());
         ftmsorderbillscarsMapper.updateftmsorderbillscars(orderNoCars);
-        return AjaxResult.success(tmsorderbillscars);
+        return AjaxResult.success(ftmsorderbillscarsMapper.selectftmsorderbillscarsByPid(tmsorderbillscars.getpId()));
     }
 
     /**
@@ -875,20 +875,10 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
             return AjaxResult.error("派车货量超出调度安排数量,请确认");
         }
         Ftmsorderbills tmsorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(ftmsorderbillsplans.getOrgId());
-        // 流水号 是否有回收
-        BillnoDel billnoDel = new BillnoDel();
-        billnoDel.setBillType("SJLSH");
-        List<BillnoDel> billnoDels = billnoDelMapper.selectBillnoDelList(billnoDel);
-        // 如果有数据在删除列表
-        if (StringUtils.isNotEmpty(billnoDels)) {
-            billnoDelMapper.deleteBillnoDelById(billnoDels.get(0).getId());
-            ftmsorderbillscars.setOrderNo(billnoDels.get(0).getBillNo());
-        } else {
-            // 生成流水号
-            Date time = new Date();
-            String billNo = billnoSerialServiceImpl.getSerialNumber("SJLSH", time);
-            ftmsorderbillscars.setOrderNo(billNo);
-        }
+        // 生成流水号
+        Date time = new Date();
+        String billNo = billnoSerialServiceImpl.getSerialNumber("SJLSH", time);
+        ftmsorderbillscars.setOrderNo(billNo);
         ftmsorderbillscars.setMblno(tmsorderbills.getMblno());
         ftmsorderbillscars.setOrgId(ftmsorderbillsplans.getOrgId());
         if (ftmsorderbillsplansMapper.updateftmsorderbillsplans(ftmsorderbillsplans) <= 0) {
@@ -914,7 +904,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         } else {
             ftmsorderbillscarsMapper.updateftmsorderbillscars(ftmsorderbillscars);
         }
-        map.put("cars", ftmsorderbillscars);
+        map.put("cars", ftmsorderbillscarsMapper.selectftmsorderbillscarsById(ftmsorderbillscars.getId()));
         map.put("plan", ftmsorderbillsplansMapper.selectftmsorderbillsplansById(ftmsorderbillsplans.getId()));
         SysUser sysUser = sysUserMapper.selectUserByTel(ftmsorderbillscars.getDriverTel());
         if (StringUtils.isNotNull(sysUser)) {
@@ -958,6 +948,9 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         Map<String, Object> map = new HashMap<>();
         // 验证司机是否产生费用,若产生的费用已经结算则拦截
         List<Ftmsorderbillsfees> ftmsorderbillsfeesList = ftmsorderbillsfeesMapper.selectFTmsorderbillsfeesByPId(ftmsorderbillscars.getId());
+        if (!"NN".equals(ftmsorderbillscars.getBillKind())) {
+            return AjaxResult.error("该运单已参与配载,无法撤销");
+        }
         if (ftmsorderbillsfeesList.size() != 0) {
             for (Ftmsorderbillsfees f : ftmsorderbillsfeesList) {
                 if (StringUtils.isNotEmpty(f.getfStlamountNo())) {
@@ -1001,7 +994,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         billnoDel.setBillType("SJLSH");
         billnoDel.setBillNo(tmsorderbillscars.getOrderNo());
         billnoDelMapper.insertBillnoDel(billnoDel);
-        ftmsorderbillscarsMapper.deleteFollowUpBusinessByCarPId(tmsorderbillscars.getId());
+        ftmsorderbillscarsMapper.deleteFollowUpBusinessByCarId(tmsorderbillscars.getId());
         map.put("plan", ftmsorderbillsplansMapper.selectftmsorderbillsplansById(ftmsorderbillscars.getpId()));
         map.put("cars", ftmsorderbillscars);
         return AjaxResult.success(map);
@@ -1036,20 +1029,10 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         ftmsorderbillscntrsMapper.updateftmsorderbillscntrs(ftmsorderbillscntrs);
         Ftmsorderbills ftmsorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(ftmsorderbillsplans.getOrgId());
         if (StringUtils.isNull(ftmsorderbillscars.getOrderNo())) {
-            // 流水号 是否有回收
-            BillnoDel billnoDel = new BillnoDel();
-            billnoDel.setBillType("SJLSH");
-            List<BillnoDel> billnoDels = billnoDelMapper.selectBillnoDelList(billnoDel);
-            // 如果有数据在删除列表
-            if (StringUtils.isNotEmpty(billnoDels)) {
-                billnoDelMapper.deleteBillnoDelById(billnoDels.get(0).getId());
-                ftmsorderbillscars.setOrderNo(billnoDels.get(0).getBillNo());
-            } else {
-                // 生成流水号
-                Date time = new Date();
-                String billNo = billnoSerialServiceImpl.getSerialNumber("SJLSH", time);
-                ftmsorderbillscars.setOrderNo(billNo);
-            }
+            // 生成流水号
+            Date time = new Date();
+            String billNo = billnoSerialServiceImpl.getSerialNumber("SJLSH", time);
+            ftmsorderbillscars.setOrderNo(billNo);
         }
         ftmsorderbillscars.setBillStatus(6L);
         ftmsorderbillscars.setPlanDate(new Date());
@@ -1060,7 +1043,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         ftmsorderbillscars.setCorpId(ftmsorderbills.getCorpId());
         ftmsorderbillscarsMapper.updateftmsorderbillscars(ftmsorderbillscars);
         map.put("plan", ftmsorderbillsplans);
-        map.put("cars", ftmsorderbillscars);
+        map.put("cars", ftmsorderbillscarsMapper.selectftmsorderbillscarsById(ftmsorderbillscars.getId()));
         return AjaxResult.success(map);
     }
 

+ 29 - 8
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -623,8 +623,9 @@
             #{id} id,
             c.mblno,
             c.order_no orderNo,
+            c.carreg_no carregNo,
             t.load_addr loadAddr,
-            t.load_date loadDate
+            date_format( t.load_date, '%Y-%m-%d' ) AS loadDate
         FROM
             F_TMSORDERBILLS t
             LEFT JOIN F_TMSORDERBILLSCARS c ON c.org_id = t.id
@@ -926,8 +927,8 @@
             c.profit_bill profitBill,
             c.profit_car profitCar
         FROM
-            F_TMSORDERBILLSCARS c
-            LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
+            F_TMSORDERBILLS t
+            LEFT JOIN F_TMSORDERBILLSCARS c ON t.id = c.org_id
             LEFT JOIN t_corps p ON p.f_id = t.corp_id
             LEFT JOIN t_corps fleet ON fleet.f_id = c.carcor_pid
             LEFT JOIN t_goods g ON g.f_id = t.goods_id
@@ -939,12 +940,25 @@
             AND dic.dict_type = 'data_cntrId'
             LEFT JOIN t_corps driver ON driver.f_id = c.driver_user_id
         <where>
-            <if test='stlStatus != null and stlStatus == "T"'>and c.stl_amt_dr != 0 or c.stl_amt_cr != 0</if>
+            <if test='tCorpId != null'>and c.corp_id = #{tCorpId}</if>
+            <if test='stlStatus != null and stlStatus == "T"'>and (c.stl_amt_dr != 0 or c.stl_amt_cr != 0)</if>
             <if test='stlStatus != null and stlStatus == "F"'>and c.stl_amt_dr = 0 and c.stl_amt_cr = 0</if>
-            <if test='accchkStatus != null and accchkStatus == "T"'>and c.accchk_amt_cr != 0 or c.accchk_amt_cr != 0</if>
+            <if test='accchkStatus != null and accchkStatus == "T"'>and (c.accchk_amt_cr != 0 or c.accchk_amt_cr != 0)</if>
             <if test='accchkStatus != null and accchkStatus == "F"'>and c.accchk_amt_dr = 0 and c.accchk_amt_dr = 0</if>
-            <if test='invStatus != null and invStatus == "T"'>and c.inv_amt_cr != 0 or c.inv_amt_cr != 0</if>
+            <if test='invStatus != null and invStatus == "T"'>and (c.inv_amt_cr != 0 or c.inv_amt_cr != 0)</if>
             <if test='invStatus != null and invStatus == "F"'>and c.inv_amt_dr = 0 and c.inv_amt_dr = 0</if>
+            <if test='acceptDateList != null and acceptDateList[0] != null and acceptDateList[0]!= ""'>
+                and c.accept_date &gt;= #{acceptDateList[0]}
+            </if>
+            <if test='acceptDateList != null and acceptDateList[1] != null and acceptDateList[1]!= ""'>
+                and c.accept_date &lt;= #{acceptDateList[1]}
+            </if>
+            <if test='accchkDateList != null and accchkDateList[0] != null and accchkDateList[0]!= ""'>
+                and c.accchk_date_dr &gt;= #{accchkDateList[0]}
+            </if>
+            <if test='accchkDateList != null and accchkDateList[1] != null and accchkDateList[1]!= ""'>
+                and c.accchk_date_dr &lt;= #{accchkDateList[1]}
+            </if>
         </where>
         ORDER BY c.id desc
     </select>
@@ -1180,6 +1194,7 @@
     <update id="updateftmsorderbillscars" parameterType="ftmsorderbillscars">
         update F_TMSORDERBILLSCARS
         <trim prefix="SET" suffixOverrides=",">
+            m_bill_no = #{mBillNo},
             <if test="pId != null">p_id = #{pId},</if>
             <if test="orgId != null">org_id = #{orgId},</if>
             <if test="orderNo != null">order_no = #{orderNo},</if>
@@ -1278,7 +1293,6 @@
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="accchkDateCr != null">accchk_date_cr = #{accchkDateCr},</if>
-            <if test="mBillNo != null">m_bill_no = #{mBillNo},</if>
             <if test="billKind != null">bill_kind = #{billKind},</if>
             <if test="profitBill != null">profit_bill = #{profitBill},</if>
             <if test="profitCar != null">profit_car = #{profitCar},</if>
@@ -1320,7 +1334,7 @@
     </delete>
 
     <delete id="deleteftmsorderbillscarsByPId" parameterType="Long">
-        delete from F_TMSORDERBILLSCARS c LEFT JOIN where p_id = #{id}
+        delete from F_TMSORDERBILLSCARS where p_id = #{id}
     </delete>
 
     <delete id="deleteFollowUpBusinessByCarPId" parameterType="Long">
@@ -1330,6 +1344,13 @@
         WHERE c.p_id = #{id}
     </delete>
 
+    <delete id="deleteFollowUpBusinessByCarId" parameterType="Long">
+        DELETE f.*, c.*, a.* FROM F_TMSORDERBILLSCARS c
+        LEFT JOIN F_TMSORDERBILLSFEES f ON f.f_pid = c.id
+        LEFT JOIN F_TMSORDERBILLSATTACHS a ON a.p_id = c.id
+        WHERE c.id = #{id}
+    </delete>
+
     <delete id="deleteftmsorderbillscarsByIds" parameterType="String">
         delete from F_TMSORDERBILLSCARS where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">

+ 107 - 55
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -306,6 +306,22 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "装卸工")
     private String fStevedore;
 
+    /** 装卸方式LNTYPE(人工 机械) */
+    @Excel(name = "装卸方式LNTYPE(人工 机械)")
+    private Long fLntype;
+
+    /** 叉车工 */
+    @Excel(name = "叉车工")
+    private String fForkliftman;
+
+    /** 库内箱号 */
+    @Excel(name = "库内箱号")
+    private String fLocalcntrno;
+
+    /** 封号 */
+    @Excel(name = "封号")
+    private String fSealno;
+
     /**
      * 备注
      */
@@ -739,6 +755,37 @@ public class TWarehousebillsitems extends BaseEntity {
         this.fWarehouseInformation = fWarehouseInformation;
     }
 
+    public Long getfLntype() {
+        return fLntype;
+    }
+
+    public void setfLntype(Long fLntype) {
+        this.fLntype = fLntype;
+    }
+
+    public String getfForkliftman() {
+        return fForkliftman;
+    }
+
+    public void setfForkliftman(String fForkliftman) {
+        this.fForkliftman = fForkliftman;
+    }
+
+    public String getfLocalcntrno() {
+        return fLocalcntrno;
+    }
+
+    public void setfLocalcntrno(String fLocalcntrno) {
+        this.fLocalcntrno = fLocalcntrno;
+    }
+
+    public String getfSealno() {
+        return fSealno;
+    }
+
+    public void setfSealno(String fSealno) {
+        this.fSealno = fSealno;
+    }
 
     public String getfOrgwarehouseInformation() {
         return fOrgwarehouseInformation;
@@ -750,60 +797,65 @@ public class TWarehousebillsitems extends BaseEntity {
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("fId", getfId())
-                .append("fPid", getfPid())
-                .append("fLineno", getfLineno())
-                .append("fSrcid", getfSrcid())
-                .append("fGoodsid", getfGoodsid())
-                .append("fBillno", getfBillno())
-                .append("fMblno", getfMblno())
-                .append("fWarehouselocid", getfWarehouselocid())
-                .append("fTransferWarehouselocid", getfTransferWarehouselocid())
-                .append("fOriginalbillno", getfOriginalbillno())
-                .append("fBsdate", getfBsdate())
-                .append("fBoxno", getfBoxno())
-                .append("fCntqty", getfCntqty())
-                .append("fGoodsval", getfGoodsval())
-                .append("fCntrtype", getfCntrtype())
-                .append("fPlanqty", getfPlanqty())
-                .append("fStorageFeeDeadline", getfStorageFeeDeadline())
-                .append("fBillingway", getfBillingway())
-                .append("fPlanvolumn", getfPlanvolumn())
-                .append("fOriginalbilldate", getfOriginalbilldate())
-                .append("fPackagespecs", getfPackagespecs())
-                .append("fPlangrossweight", getfPlangrossweight())
-                .append("fChargedate", getfChargedate())
-                .append("fPlannetweight", getfPlannetweight())
-                .append("fQty", getfQty())
-                .append("fVolumn", getfVolumn())
-                .append("fGrossweight", getfGrossweight())
-                .append("fNetweight", getfNetweight())
-                .append("fCntrno", getfCntrno())
-                .append("fWarehouseInformation", getfWarehouseInformation())
-                .append("fOrgwarehouseInformation", getfOrgwarehouseInformation())
-                .append("fTruckno", getfTruckno())
-                .append("fBillstatus", getfBillstatus())
-                .append("delFlag", getDelFlag())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .append("remark", getRemark())
-                .append("fMarks", getfMarks())
-                .append("fInventoryDays", getfInventoryDays())
-                .append("fAmt", getfAmt())
-                .append("fBillingDays", getfBillingDays())
-                .append("fDriverName", getfDriverName())
-                .append("fDriverTel", getfDriverTel())
-                .append("fDriverIdCar", getfDriverIdCar())
-                .append("fSerialNumber", getfSerialNumber())
-                .append("fIsPass", getfIsPass())
-                .append("fBilltype", getfBilltype())
-                .append("fBillingQty", getfBillingQty())
-                .append("fIsInventory", getfIsInventory())
-                .append("fBusinessType", getfBusinessType())
-                .append("fBillingDeadline", getfBillingDeadline())
-                .toString();
+        return "TWarehousebillsitems{" +
+                "fId=" + fId +
+                ", fPid=" + fPid +
+                ", fSrcid=" + fSrcid +
+                ", fLineno=" + fLineno +
+                ", fGoodsid=" + fGoodsid +
+                ", fBillno='" + fBillno + '\'' +
+                ", fMblno='" + fMblno + '\'' +
+                ", fWarehouselocid=" + fWarehouselocid +
+                ", fTransferWarehouselocid=" + fTransferWarehouselocid +
+                ", fOriginalbillno='" + fOriginalbillno + '\'' +
+                ", fBsdate=" + fBsdate +
+                ", fBoxno='" + fBoxno + '\'' +
+                ", fCntqty=" + fCntqty +
+                ", fGoodsval=" + fGoodsval +
+                ", fCntrtype='" + fCntrtype + '\'' +
+                ", fPlanqty=" + fPlanqty +
+                ", fBillingway=" + fBillingway +
+                ", fPlanvolumn=" + fPlanvolumn +
+                ", fOriginalbilldate=" + fOriginalbilldate +
+                ", fPackagespecs='" + fPackagespecs + '\'' +
+                ", fPlangrossweight=" + fPlangrossweight +
+                ", fChargedate=" + fChargedate +
+                ", fPlannetweight=" + fPlannetweight +
+                ", fQty=" + fQty +
+                ", fVolumn=" + fVolumn +
+                ", fGrossweight=" + fGrossweight +
+                ", fNetweight=" + fNetweight +
+                ", fCntrno='" + fCntrno + '\'' +
+                ", fTruckno='" + fTruckno + '\'' +
+                ", fBillstatus=" + fBillstatus +
+                ", delFlag='" + delFlag + '\'' +
+                ", fMarks='" + fMarks + '\'' +
+                ", fInventoryDays=" + fInventoryDays +
+                ", fAmt=" + fAmt +
+                ", fStorageFeeDeadline=" + fStorageFeeDeadline +
+                ", fBillingDays=" + fBillingDays +
+                ", fDriverName='" + fDriverName + '\'' +
+                ", fDriverTel='" + fDriverTel + '\'' +
+                ", fDriverIdCar='" + fDriverIdCar + '\'' +
+                ", fSerialNumber='" + fSerialNumber + '\'' +
+                ", fIsPass='" + fIsPass + '\'' +
+                ", fBilltype='" + fBilltype + '\'' +
+                ", fBillingQty=" + fBillingQty +
+                ", fBillingDeadline=" + fBillingDeadline +
+                ", fBusinessType=" + fBusinessType +
+                ", fIsInventory=" + fIsInventory +
+                ", fWarehouseInformation='" + fWarehouseInformation + '\'' +
+                ", fOrgwarehouseInformation='" + fOrgwarehouseInformation + '\'' +
+                ", fLabour=" + fLabour +
+                ", fFleet=" + fFleet +
+                ", fStevedore='" + fStevedore + '\'' +
+                ", fLntype=" + fLntype +
+                ", fForkliftman='" + fForkliftman + '\'' +
+                ", fLocalcntrno='" + fLocalcntrno + '\'' +
+                ", fSealno='" + fSealno + '\'' +
+                ", remark='" + remark + '\'' +
+                ", timeStartBsdate='" + timeStartBsdate + '\'' +
+                ", timeEndBsdate='" + timeEndBsdate + '\'' +
+                '}';
     }
 }

+ 0 - 46
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehousebillsfeesServiceImpl.java

@@ -93,52 +93,6 @@ public class TWarehousebillsfeesServiceImpl implements ITWarehousebillsfeesServi
         return tWarehousebillsfeesMapper.deleteTWarehousebillsfeesById(fId);
     }
 
-    public static void main(String[] args) {
-        List<FleetExcel> a = new ArrayList<>();
-        FleetExcel fleetExcel = new FleetExcel();
-        fleetExcel.setFeelMonth("一月");
-        fleetExcel.setCcf("100");
-        a.add(fleetExcel);
-        fleetExcel.setFeelMonth("一月");
-        fleetExcel.setCcf("200");
-        a.add(fleetExcel);
-        fleetExcel.setFeelMonth("二月");
-        fleetExcel.setCcf("300");
-        a.add(fleetExcel);
-        fleetExcel.setFeelMonth("二月");
-        fleetExcel.setCcf("400");
-        a.add(fleetExcel);
-        List<FleetExcel> b = new ArrayList<>();
-        FleetExcel excel = new FleetExcel();
-        excel.setFeelMonth("一月");
-        excel.setCcf("300");
-        excel.setCorpName("结果数据");
-        b.add(excel);
-        excel.setFeelMonth("二月");
-        excel.setCcf("700");
-        b.add(excel);
-
-        System.out.println(a);
-        System.out.println(b);
-        List<FleetExcel> excels = new ArrayList<>();
-
-
-
-        for (int m = 0; m <= b.size(); m++) {
-            for (int n = 0; n <= a.size(); n++) {
-                excels.add(a.get(n));
-                if (!b.get(m).getFeelMonth().equals(a.get(n).getFeelMonth())) {//如果存在这个数
-                    excels.add(b.get(m));
-                }
-            }
-        }
-
-
-        System.out.println("结果:" + excels);
-
-    }
-
-
     /**
      *  查询报表
      * @param tWarehousebillsfees

+ 2 - 2
ruoyi-warehouse/src/main/resources/mapper/basicData/TCorpsMapper.xml

@@ -71,7 +71,7 @@
         <include refid="selectTCorpsVo"/>
         <where>
             <if test="fTypeid != null  and fTypeid != ''"> and JSON_CONTAINS( f_typeid -> '$[*]', #{fTypeid}, '$')</if>
-            <if test="fTypeid == null or fTypeid == ''"> and f_typeid != '[\"100\"]' and f_typeid != '[\"102\"]'</if>
+            <if test="fTypeid == null and fTypeid == ''"> and f_typeid != '[\"100\"]' and f_typeid != '[\"102\"]'</if>
             <if test="fPid != null  and fPid != ''"> and f_pid = #{fPid}</if>
             <if test="fNo != null  and fNo != ''"> and f_no = #{fNo}</if>
             <if test="fName != null  and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
@@ -138,7 +138,7 @@
             c.f_name
         FROM
             t_corps c
-            LEFT JOIN F_TMSORDERBILLSCARS car ON car.driver_tel = c.f_tel
+            LEFT JOIN F_TMSORDERBILLSCARS car ON car.driver_tel = c.f_tel OR car.corp_id = c.f_id
         WHERE
             c.f_typeid != '[\"102\"]'
             OR car.id = #{fId}

+ 53 - 9
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -1806,7 +1806,7 @@
     </select>
 
     <select id="selectAppStockList" parameterType="TWarehousebills" resultType="Map">
-        SELECT
+        SELECT DISTINCT
             w.f_id fId,
             w.f_corpid fCorpid,
             c.f_name corpName,
@@ -1827,19 +1827,62 @@
             w.f_driver_tel fDriverTel,
             w.f_trademodeid fTrademodeid,
             w.f_product_name fProductName,
-            CASE WHEN w.f_billstatus = '1' THEN '录入'
-            WHEN w.f_billstatus = '2' THEN '暂存'
-            WHEN w.f_billstatus = '3' THEN '驳回'
-            WHEN w.f_billstatus = '4' THEN '请核'
-            WHEN w.f_billstatus = '5' THEN '审核中'
-            WHEN w.f_billstatus = '6' THEN '全部入账'
-            END fBillstatus
+            CASE
+            WHEN w.f_billtype = 'SJRK'
+            AND w.f_items_status = '1' THEN
+            '计划'
+            WHEN w.f_billtype = 'SJRK'
+            AND w.f_items_status = '2' THEN
+            '待入库'
+            WHEN w.f_billtype = 'SJRK'
+            AND w.f_items_status = '3' THEN
+            '入库中'
+            WHEN w.f_billtype = 'SJRK'
+            AND w.f_items_status = '4' THEN
+            '已入库'
+            WHEN w.f_billtype = 'SJCK'
+            AND w.f_items_status = '1' THEN
+            '计划'
+            WHEN w.f_billtype = 'SJCK'
+            AND w.f_items_status = '2' THEN
+            '待出库'
+            WHEN w.f_billtype = 'SJCK'
+            AND w.f_items_status = '3' THEN
+            '出库中'
+            WHEN w.f_billtype = 'SJCK'
+            AND w.f_items_status = '4' THEN
+            '已出库'
+            WHEN w.f_billtype = 'CKDB'
+            AND w.f_items_status = '1' THEN
+            '计划'
+            WHEN w.f_billtype = 'CKDB'
+            AND w.f_items_status = '2' THEN
+            '待调拨'
+            WHEN w.f_billtype = 'CKDB'
+            AND w.f_items_status = '3' THEN
+            '调拨中'
+            WHEN w.f_billtype = 'CKDB'
+            AND w.f_items_status = '4' THEN
+            '已调拨'
+            WHEN w.f_billtype = 'HWTG'
+            AND w.f_items_status = '1' THEN
+            '计划'
+            WHEN w.f_billtype = 'HWTG'
+            AND w.f_items_status = '2' THEN
+            '待调拨'
+            WHEN w.f_billtype = 'HWTG'
+            AND w.f_items_status = '3' THEN
+            '调拨中'
+            WHEN w.f_billtype = 'HWTG'
+            AND w.f_items_status = '4' THEN
+            '已调拨'
+            END AS fBillstatus
         FROM
             t_warehousebills w
             LEFT JOIN t_corps c ON c.f_id = w.f_corpid
             LEFT JOIN t_goods g ON g.f_id = w.f_goodsid
             LEFT JOIN t_warehouse t ON t.f_id = w.f_warehouseid
-            left join sys_user u on w.create_by = u.user_name or w.f_storekeeper = u.user_name
+            left join sys_user u on w.f_storekeeper = u.user_name
             left join sys_dept d on w.f_bsdeptid = d.dept_id
         where
             w.f_id != ''
@@ -1847,6 +1890,7 @@
             AND w.f_planqty != f_qty
             AND w.f_billstatus != 6
         <if test="fMblno != null ">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
+        <if test="fItemsStatus != null ">and w.f_items_status = #{fItemsStatus}</if>
         <if test="fBillstatus != null ">and w.f_billstatus = #{fBillstatus}</if>
         <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
             and w.f_bsdate &gt;= #{timeInterval[0]}

+ 103 - 76
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -7,34 +7,34 @@
     <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="fSrcid" column="f_srcid"/>
         <result property="fLineno" column="f_lineno"/>
-        <result property="fGoodsid" column="f_goodsid"/>
         <result property="fBillno" column="f_billno"/>
+        <result property="fGoodsid" column="f_goodsid"/>
         <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="fWarehouselocid" column="f_warehouselocid"/>
+        <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="fBsdate" column="f_bsdate"/>
+        <result property="fBillingway" column="f_billingway"/>
+        <result property="fChargedate" column="f_chargedate"/>
         <result property="fBoxno" column="f_boxno"/>
-        <result property="fCntqty" column="f_cntqty"/>
         <result property="fGoodsval" column="f_goodsval"/>
+        <result property="fCntqty" column="f_cntqty"/>
+        <result property="fPackagespecs" column="f_packagespecs"/>
         <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="fPlanqty" column="f_planqty"/>
         <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="fQty" column="f_qty"/>
         <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="fMarks" column="f_marks"/>
         <result property="fBillstatus" column="f_billstatus"/>
         <result property="delFlag" column="del_flag"/>
         <result property="createBy" column="create_by"/>
@@ -42,11 +42,8 @@
         <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="fStorageFeeDeadline" column="f_storage_fee_deadline"/>
         <result property="fAmt" column="f_amt"/>
         <result property="fBillingDays" column="f_billing_days"/>
         <result property="fDriverName" column="f_driver_name"/>
@@ -56,20 +53,28 @@
         <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"/>
+        <result property="fBusinessType" column="f_business_type"/>
+        <result property="fIsInventory" column="f_is_inventory"/>
+        <result property="fWarehouseInformation" column="f_warehouse_information"/>
+        <result property="fOrgwarehouseInformation" column="f_orgwarehouse_information"/>
+        <result property="fLabour" column="f_labour"/>
+        <result property="fFleet" column="f_fleet"/>
+        <result property="fStevedore" column="f_stevedore"/>
+        <result property="fLntype" column="f_lntype"/>
+        <result property="fForkliftman" column="f_forkliftman"/>
+        <result property="fLocalcntrno" column="f_localcntrno"/>
+        <result property="fSealno" column="f_sealno"/>
     </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
+        select f_id, f_pid, f_srcid, f_lineno, f_billno, f_goodsid, f_mblno, f_originalbillno, f_transfer_warehouselocid, f_warehouselocid,
+         f_originalbilldate, f_bsdate, f_billingway, f_chargedate, f_boxno, f_goodsval, f_cntqty, f_packagespecs, f_cntrtype, f_planvolumn,
+          f_planqty, f_plangrossweight, f_plannetweight, f_volumn, f_qty, f_grossweight, f_netweight, f_cntrno, f_truckno, f_marks, f_billstatus,
+           del_flag, create_by, create_time, update_by, update_time, remark, 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, f_lntype, f_forkliftman,
+              f_localcntrno, f_sealno from t_warehousebillsitems
     </sql>
 
     <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
@@ -126,8 +131,7 @@
     </select>
 
     <select id="selectGoodsTransferitemsList" parameterType="TWarehousebillsitems" resultType="Map">
-        select
-            DISTINCT
+        select DISTINCT
             item.f_id AS fId,
             item.f_pid AS fPid,
             item.f_srcid AS fSrcid,
@@ -170,17 +174,30 @@
             item.f_cntrno AS fCntrno,
             item.f_truckno AS fTruckno,
             item.f_billstatus AS fBillstatus,
-            item.remark ,
+            item.remark,
+            b.f_name AS fLabours,
+            item.f_labour AS fLabour,
+            f.f_name AS fFleets,
+            item.f_fleet AS fFleet,
+            item.f_stevedore AS fStevedore,
+            item.f_forkliftman AS fForkliftman,
+            item.f_localcntrno AS fLocalcntrno,
+            l.dict_label AS lntypes,
+            item.f_lntype AS lntype,
+            item.f_sealno AS fSealno,
             item.f_warehouse_information AS fWarehouseInformation,
             item.f_orgwarehouse_information AS fOrgwarehouseInformation
-        from
+        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>
+            LEFT JOIN t_corps b ON b.f_id = item.f_labour
+            LEFT JOIN t_corps f ON f.f_id = item.f_fleet
+            LEFT JOIN sys_dict_data l ON l.dict_value = item.f_lntype
+            AND l.dict_type = 'ln_way'
+        WHERE
+            item.f_pid = #{fPid}
     </select>
 
     <select id="selectTWarehousebillsitemsById" parameterType="Long" resultMap="TWarehousebillsitemsResult">
@@ -188,46 +205,45 @@
         where f_id = #{fId}
     </select>
 
-    <insert id="insertTWarehousebillsitems" parameterType="TWarehousebillsitems" useGeneratedKeys="true"
-            keyProperty="fId">
+    <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="fLineno != null">f_lineno,</if>
             <if test="fBillno != null">f_billno,</if>
-            <if test="fWarehouselocid != null">f_warehouselocid,</if>
+            <if test="fGoodsid != null">f_goodsid,</if>
             <if test="fMblno != null">f_mblno,</if>
             <if test="fOriginalbillno != null">f_originalbillno,</if>
+            <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid,</if>
+            <if test="fWarehouselocid != null">f_warehouselocid,</if>
+            <if test="fOriginalbilldate != null">f_originalbilldate,</if>
             <if test="fBsdate != null">f_bsdate,</if>
+            <if test="fBillingway != null">f_billingway,</if>
+            <if test="fChargedate != null">f_chargedate,</if>
             <if test="fBoxno != null">f_boxno,</if>
-            <if test="fCntqty != null">f_cntqty,</if>
             <if test="fGoodsval != null">f_goodsval,</if>
+            <if test="fCntqty != null">f_cntqty,</if>
+            <if test="fPackagespecs != null">f_packagespecs,</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="fPlanqty != null">f_planqty,</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="fQty != null">f_qty,</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="fMarks != null">f_marks,</if>
+            <if test="fBillstatus != null">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>
@@ -247,44 +263,48 @@
             <if test="fLabour != null">f_labour,</if>
             <if test="fFleet != null">f_fleet,</if>
             <if test="fStevedore != null">f_stevedore,</if>
+            <if test="fLntype != null">f_lntype,</if>
+            <if test="fForkliftman != null">f_forkliftman,</if>
+            <if test="fLocalcntrno != null">f_localcntrno,</if>
+            <if test="fSealno != null">f_sealno,</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="fLineno != null">#{fLineno},</if>
             <if test="fBillno != null">#{fBillno},</if>
-            <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
+            <if test="fGoodsid != null">#{fGoodsid},</if>
             <if test="fMblno != null">#{fMblno},</if>
             <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
+            <if test="fTransferWarehouselocid != null">#{fTransferWarehouselocid},</if>
+            <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
+            <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
             <if test="fBsdate != null">#{fBsdate},</if>
+            <if test="fBillingway != null">#{fBillingway},</if>
+            <if test="fChargedate != null">#{fChargedate},</if>
             <if test="fBoxno != null">#{fBoxno},</if>
-            <if test="fCntqty != null">#{fCntqty},</if>
             <if test="fGoodsval != null">#{fGoodsval},</if>
+            <if test="fCntqty != null">#{fCntqty},</if>
+            <if test="fPackagespecs != null">#{fPackagespecs},</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="fPlanqty != null">#{fPlanqty},</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="fQty != null">#{fQty},</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="fMarks != null">#{fMarks},</if>
+            <if test="fBillstatus != null">#{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>
@@ -304,6 +324,10 @@
             <if test="fLabour != null">#{fLabour},</if>
             <if test="fFleet != null">#{fFleet},</if>
             <if test="fStevedore != null">#{fStevedore},</if>
+            <if test="fLntype != null">#{fLntype},</if>
+            <if test="fForkliftman != null">#{fForkliftman},</if>
+            <if test="fLocalcntrno != null">#{fLocalcntrno},</if>
+            <if test="fSealno != null">#{fSealno},</if>
         </trim>
     </insert>
 
@@ -311,33 +335,34 @@
         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="fLineno != null">f_lineno = #{fLineno},</if>
             <if test="fBillno != null">f_billno = #{fBillno},</if>
-            <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</if>
+            <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
             <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
+            <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid = #{fTransferWarehouselocid},</if>
+            <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</if>
+            <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
             <if test="fBsdate != null">f_bsdate = #{fBsdate},</if>
+            <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
+            <if test="fChargedate != null">f_chargedate = #{fChargedate},</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="fCntqty != null">f_cntqty = #{fCntqty},</if>
+            <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</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="fVolumn != null">f_volumn = #{fVolumn},</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="fMarks != null">f_marks = #{fMarks},</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>
@@ -345,10 +370,6 @@
             <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>
@@ -357,15 +378,21 @@
             <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="fIsInventory != null">f_is_inventory = #{fIsInventory},</if>
             <if test="fWarehouseInformation != null">f_warehouse_information = #{fWarehouseInformation},</if>
             <if test="fOrgwarehouseInformation != null">f_orgwarehouse_information = #{fOrgwarehouseInformation},</if>
+            <if test="fLabour != null">f_labour = #{fLabour},</if>
+            <if test="fFleet != null">f_fleet = #{fFleet},</if>
+            <if test="fStevedore != null">f_stevedore = #{fStevedore},</if>
+            <if test="fLntype != null">f_lntype = #{fLntype},</if>
+            <if test="fForkliftman != null">f_forkliftman = #{fForkliftman},</if>
+            <if test="fLocalcntrno != null">f_localcntrno = #{fLocalcntrno},</if>
+            <if test="fSealno != null">f_sealno = #{fSealno},</if>
         </trim>
         where f_id = #{fId}
     </update>