Преглед изворни кода

修改查看明细时 去除重复数据

阿伏兔 пре 4 година
родитељ
комит
e0ae413be4

+ 13 - 7
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java

@@ -1,14 +1,9 @@
 package com.ruoyi.common.utils;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import com.ruoyi.common.core.text.StrFormatter;
 
+import java.util.*;
+
 /**
  * 字符串工具类
  *
@@ -55,6 +50,17 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
         return !isEmpty(coll);
     }
 
+    // 整数集合去重
+    public static List<Long> integerDeduplication(List<Long> integerList) {
+        List<Long> listTemp = new ArrayList();
+        for (int i = 0; i < integerList.size(); i++) {
+            if (!listTemp.contains(integerList.get(i))) {
+                listTemp.add(integerList.get(i));
+            }
+        }
+        return listTemp;
+    }
+
     /**
      * * 判断一个对象数组是否为空
      *

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWhgenleg.java

@@ -48,6 +48,12 @@ public class TWhgenleg extends BaseEntity {
     private String fOriginalbillno;
 
     /**
+     * 仓库id
+     */
+    @Excel(name = "仓库id")
+    private Long fWarehouseid;
+
+    /**
      * 库区,显示仓库 库位 库区
      */
     private Long fWarehouseLocationid;
@@ -225,6 +231,14 @@ public class TWhgenleg extends BaseEntity {
         return fWarehouseLocationid;
     }
 
+    public void setfWarehouseid(Long fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public Long getfWarehouseid() {
+        return fWarehouseid;
+    }
+
     public void setfGoodsid(Long fGoodsid) {
         this.fGoodsid = fGoodsid;
     }
@@ -401,6 +415,7 @@ public class TWhgenleg extends BaseEntity {
                 .append("fPregrossweight", getfPregrossweight())
                 .append("fPrenetweight", getfPrenetweight())
                 .append("fQtyd", getfQtyd())
+                .append("fWarehouseid", getfWarehouseid())
                 .append("fVolumnd", getfVolumnd())
                 .append("fGrossweightd", getfGrossweightd())
                 .append("fNetweightd", getfNetweightd())

+ 1 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/mapper/TWhgenlegMapper.java

@@ -70,6 +70,7 @@ public interface TWhgenlegMapper {
      */
     public TWhgenleg selectTWhgenleg(TWhgenleg tWhgenleg);
 
+
     /**
      * 修改库存总账表
      *

+ 6 - 6
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsfees.java

@@ -50,7 +50,7 @@ public class TWarehousebillsfees extends BaseEntity {
      * 计价单位(数据字典),对应,t_unitfees f_id,如果选择为毛重,数量(f_qty)取主表的毛重,如果选择净重,取主表的净重,如果为箱量,取主表的箱量
      */
     @Excel(name = "计价单位(数据字典),对应,t_unitfees f_id,如果选择为毛重,数量", readConverterExp = "f=_qty")
-    private Long fFeeunitid;
+    private Long fFeeUnitid;
 
     /**
      * 数量
@@ -182,12 +182,12 @@ public class TWarehousebillsfees extends BaseEntity {
         return fFeeid;
     }
 
-    public void setfFeeunitid(Long fFeeunitid) {
-        this.fFeeunitid = fFeeunitid;
+    public void setfFeeUnitid(Long fFeeUnitid) {
+        this.fFeeUnitid = fFeeUnitid;
     }
 
-    public Long getfFeeunitid() {
-        return fFeeunitid;
+    public Long getfFeeUnitid() {
+        return fFeeUnitid;
     }
 
     public void setfQty(BigDecimal fQty) {
@@ -318,7 +318,7 @@ public class TWarehousebillsfees extends BaseEntity {
                 .append("fLineno", getfLineno())
                 .append("fCorpid", getfCorpid())
                 .append("fFeeid", getfFeeid())
-                .append("fFeeunitid", getfFeeunitid())
+                .append("fFeeUnitid", getfFeeUnitid())
                 .append("fQty", getfQty())
                 .append("fUnitprice", getfUnitprice())
                 .append("fAmount", getfAmount())

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -59,6 +59,12 @@ public class TWarehousebillsitems extends BaseEntity {
     private String fMblno;
 
     /**
+     * 唛头
+     */
+    @Excel(name = "唛头")
+    private String fMarks;
+
+    /**
      * 箱号
      */
     @Excel(name = "箱号")
@@ -223,6 +229,14 @@ public class TWarehousebillsitems extends BaseEntity {
         return fMblno;
     }
 
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    public String getfMarks() {
+        return fMarks;
+    }
+
     public void setfCntqty(Long fCntqty) {
         this.fCntqty = fCntqty;
     }
@@ -361,6 +375,7 @@ public class TWarehousebillsitems extends BaseEntity {
                 .append("fWarehouselocid", getfWarehouselocid())
                 .append("fBsdate", getfBsdate())
                 .append("fBoxno", getfBoxno())
+                .append("fMblno", getfMblno())
                 .append("fCntqty", getfCntqty())
                 .append("fGoodsval", getfGoodsval())
                 .append("fCntrtype", getfCntrtype())

+ 90 - 93
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -92,26 +92,21 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         // 查询仓库主表数据
         TWarehouseBills tWarehousebills = tWarehouseBillsMapper.selectTWarehousebillsById(fId);
         // 客户表
-        List<TCorps> corpsList = new ArrayList<>();
+        List<Long> corpsId = new ArrayList<>();
         // 用户表
         List<SysUser> sysUserList = new ArrayList<>();
         // 仓库表
         List<TWarehouse> warehouseList = new ArrayList<>();
         // 商品
-        List<TGoods> goodsList = new ArrayList<>();
+        List<Long> goodsId = new ArrayList<>();
         // 费用
-        List<TFees> feesList = new ArrayList<>();
+        List<Long> feesId = new ArrayList<>();
         // 库区
-        List<TWarehouseArea> warehouseAreaList = new ArrayList<>();
-
+        List<Long> warehouseAreaId = new ArrayList<>();
         if (!StringUtils.isNull(tWarehousebills)) {
-            // 查询货权方
-            TCorps corps = tCorpsMapper.selectTCorpsById(tWarehousebills.getfCorpid());
-            if (StringUtils.isNotNull(corps)) {
-                corpsList.add(corps);
-            }
+            corpsId.add(tWarehousebills.getfCorpid());
             // 查询联系人
-            SysUser sysUser = sysUserMapper.selectUserByUserName(tWarehousebills.getfContacts());
+            SysUser sysUser = sysUserMapper.selectUserByUserName(tWarehousebills.getfStorekeeper());
             if (StringUtils.isNotNull(sysUser)) {
                 sysUserList.add(sysUser);
             }
@@ -121,10 +116,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 warehouseList.add(tWarehouse);
             }
             // 查询经营单位
-            TCorps corp = tCorpsMapper.selectTCorpsById(tWarehousebills.getfSbu());
-            if (StringUtils.isNotNull(corp)) {
-                corpsList.add(corp);
-            }
+            corpsId.add(tWarehousebills.getfSbu());
             map.put("warehousebills", tWarehousebills);
         }
         // 查询仓库明细从表数据
@@ -133,18 +125,11 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         List<TWarehousebillsitems> warehousebillsitems = tWarehousebillsitemsMapper.selectTWarehousebillsitemsList(tWarehousebillsitems);
         if (StringUtils.isNotEmpty(warehousebillsitems)) {
             for (TWarehousebillsitems wb : warehousebillsitems) {
-                TGoods tGoods = tGoodsMapper.selectTGoodsById(wb.getfGoodsid());
-                if (StringUtils.isNotNull(tGoods)) {
-                    goodsList.add(tGoods);
-                }
-                TWarehouseArea warehouseArea = tWarehouseAreaMapper.selectTWarehouseAreaById(wb.getfWarehouselocid());
-                if (StringUtils.isNotNull(warehouseArea)) {
-                    warehouseAreaList.add(warehouseArea);
-                }
+                goodsId.add(wb.getfGoodsid());
+                warehouseAreaId.add(wb.getfWarehouselocid());
             }
             map.put("warehouseBillsItem", warehousebillsitems);
         }
-
         // 查询仓库费用明细表数据
         TWarehousebillsfees tWarehousebillsfees = new TWarehousebillsfees();
         tWarehousebillsfees.setfPid(fId);
@@ -158,14 +143,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 } else {
                     warehousebillsfeesDr.add(fees);
                 }
-                TCorps corps = tCorpsMapper.selectTCorpsById(fees.getfCorpid());
-                if (StringUtils.isNotNull(corps)) {
-                    corpsList.add(corps);
-                }
-                TFees tFees = tFeesMapper.selectTFeesById(fees.getfFeeid());
-                if (StringUtils.isNotNull(tFees)) {
-                    feesList.add(tFees);
-                }
+                corpsId.add(fees.getfCorpid());
+                feesId.add(fees.getfFeeid());
             }
         }
         // 查询附件表数据
@@ -175,6 +154,38 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         if (StringUtils.isNotEmpty(enclosures)) {
             map.put("enclosures", enclosures);
         }
+        List<TCorps> corpsList = new ArrayList<>();
+        List<Long> corpsIdList = StringUtils.integerDeduplication(corpsId);
+        for (Long corpId : corpsIdList) {
+            TCorps corps = tCorpsMapper.selectTCorpsById(corpId);
+            if (StringUtils.isNotNull(corps)) {
+                corpsList.add(corps);
+            }
+        }
+        List<TWarehouseArea> warehouseAreaList = new ArrayList<>();
+        List<Long> warehouseAreaIdList = StringUtils.integerDeduplication(warehouseAreaId);
+        for (Long warehouseArea : warehouseAreaIdList) {
+            TWarehouseArea tWarehouseArea = tWarehouseAreaMapper.selectTWarehouseAreaById(warehouseArea);
+            if (StringUtils.isNotNull(tWarehouseArea)) {
+                warehouseAreaList.add(tWarehouseArea);
+            }
+        }
+        List<TGoods> goodsList = new ArrayList<>();
+        List<Long> goodsIdList = StringUtils.integerDeduplication(goodsId);
+        for (Long goods : goodsIdList) {
+            TGoods tGoods = tGoodsMapper.selectTGoodsById(goods);
+            if (StringUtils.isNotNull(tGoods)) {
+                goodsList.add(tGoods);
+            }
+        }
+        List<TFees> feesList = new ArrayList<>();
+        List<Long> longList = StringUtils.integerDeduplication(feesId);
+        for (Long fees : longList) {
+            TFees tFees = tFeesMapper.selectTFeesById(fees);
+            if (StringUtils.isNotNull(tFees)) {
+                feesList.add(tFees);
+            }
+        }
         map.put("corps", corpsList);
         map.put("goodsList", goodsList);
         map.put("feesList", feesList);
@@ -233,9 +244,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 
     /**
      * 新增库存总账
-     * @param warehouseBills        仓库主表
-     * @param warehousebillsitems   仓库明细表
-     * @return  结果
+     *
+     * @param warehouseBills      仓库主表
+     * @param warehousebillsitems 仓库明细表
+     * @return 结果
      */
     @Transactional
     public int instalTWhgenleg(TWarehouseBills warehouseBills, TWarehousebillsitems warehousebillsitems, SysUser user) {
@@ -246,6 +258,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         tWhgenleg.setfMblno(warehouseBills.getfMblno());
         // 原始单号
         tWhgenleg.setfOriginalbillno(warehouseBills.getfMblno());
+        // 仓库
+        tWhgenleg.setfWarehouseid(warehouseBills.getfWarehouseid());
         // 库区
         tWhgenleg.setfWarehouseLocationid(warehousebillsitems.getfWarehouselocid());
         // 货物品名
@@ -256,6 +270,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         tWhgenleg.setfQtyd(warehousebillsitems.getfQty());
         // 入库尺码
         tWhgenleg.setfVolumnd(warehousebillsitems.getfVolumn());
+        // 唛头
+        tWhgenleg.setfMarks(warehousebillsitems.getfMarks());
         // 入库毛重
         tWhgenleg.setfGrossweightd(warehousebillsitems.getfGrossweight());
         // 入库净重
@@ -270,6 +286,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         tWhgenleg.setfStatus("T");
         // 结余件数
         tWhgenleg.setfQtyblc(warehousebillsitems.getfQty());
+        System.out.println("主表新增:" + warehouseBills.toString());
+        System.out.println("要添加的总账:" + tWhgenleg.toString());
         return tWhgenlegMapper.insertTWhgenleg(tWhgenleg);
     }
 
@@ -301,49 +319,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         Long fPid = null;
         TWarehouseBills warehouseBills = JSONArray.parseObject(tWarehouseBills, TWarehouseBills.class);
 
-        // 查询库存总账   库存明细不为空 并且 入库不是暂存状态 进行库存总账的查询新增修改
-        if (tWarehousebillsitems != null && !warehouseBills.getfBillstatus().equals("2")) {
-            JSONArray warehouseJSON = JSONArray.parseArray(tWarehousebillsitems);
-            List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
-            for (TWarehousebillsitems wbItem : warehousebillsitemsList) {
-                // 查询总账是否存在
-                TWhgenleg tWhgenle=queryTWhgenleg(warehouseBills,wbItem);
-                if(billsType=="SJRK"){ //  入库数 、结余数
-                    if(StringUtils.isNull(tWhgenle)){ // 为空添加库存总账
-                        SysUser sysUser=new SysUser();
-                        sysUser.setUserName(loginUser.getUser().getUserName());
-                        instalTWhgenleg(warehouseBills,wbItem,sysUser);
-                    }else { // 非空修改库存总账
-                        if(warehouseBills.getfBillstatus().equals("6")){
-                            updateTWhgenlegData(wbItem,tWhgenle.getfId(),billsType);
-                        }
-                    }
-                } else if (billsType=="SJCK"){ // 出库 查询
-                    if(StringUtils.isNull(tWhgenle)){ // 为空 提示没有库存
-                        return AjaxResult.error("库存为空");
-                    }else { // 非空修改库存总账
-                        if(warehouseBills.getfBillstatus().equals("6")){
-                            //  库存 <  出库件数  提示库存不足
-                            if(tWhgenle.getfQtyblc()< wbItem.getfQty()){
-                                return AjaxResult.error("库存不足");
-                            }
-                            updateTWhgenlegData(wbItem,tWhgenle.getfId(),billsType);
-                        }
-                    }
-                }
-
-            }
-        }
-
         if (StringUtils.isNull(warehouseBills.getfId())) {
             // 如果是新数据
             warehouseBills.setCreateBy(loginUser.getUser().getUserName());
             warehouseBills.setfBilltype(billsType);
             warehouseBills.setfBsdeptid(loginUser.getUser().getDeptId());
             // 提交时:  生流水号
-            if (warehouseBills.getfBillstatus().equals("6")) {
+            if ("6".equals(warehouseBills.getfBillstatus())) {
                 // 业务编码
-                String billNo = billnoSerialServiceImpl.getBillNo("SJRK", warehouseBills.getfBsdate());
+                String billNo = billnoSerialServiceImpl.getBillNo(billsType, warehouseBills.getfBsdate());
                 warehouseBills.setfBillno(billNo);
                 // 存货编码
                 Date time = new Date();
@@ -361,13 +345,44 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             tWarehousebillsfeesMapper.deleteByFPid(fPid);
             tEnclosureMapper.deleteByFPid(fPid);
         }
-
+        // 查询库存总账   库存明细不为空 并且 入库不是暂存状态 进行库存总账的查询新增修改
+        if (tWarehousebillsitems != null && !"2".equals(warehouseBills.getfBillstatus())) {
+            JSONArray warehouseJSON = JSONArray.parseArray(tWarehousebillsitems);
+            List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
+            for (TWarehousebillsitems wbItem : warehousebillsitemsList) {
+                // 查询总账是否存在
+                TWhgenleg tWhgenle = queryTWhgenleg(warehouseBills, wbItem);
+                if ("SJRK".equals(billsType)) { //  入库数 、结余数
+                    if (StringUtils.isNull(tWhgenle)) { // 为空添加库存总账
+                        instalTWhgenleg(warehouseBills, wbItem, loginUser.getUser());
+                    } else { // 非空修改库存总账
+                        if ("6".equals(warehouseBills.getfBillstatus())) {
+                            updateTWhgenlegData(wbItem, tWhgenle.getfId(), billsType);
+                        }
+                    }
+                } else if ("SJCK".equals(billsType)) { // 出库 查询
+                    if (StringUtils.isNull(tWhgenle)) { // 为空 提示没有库存
+                        return AjaxResult.error("库存为空");
+                    } else { // 非空修改库存总账
+                        if ("6".equals(warehouseBills.getfBillstatus())) {
+                            //  库存 <  出库件数  提示库存不足
+                            if (tWhgenle.getfQtyblc() < wbItem.getfQty()) {
+                                return AjaxResult.error("库存不足");
+                            }
+                            updateTWhgenlegData(wbItem, tWhgenle.getfId(), billsType);
+                        }
+                    }
+                }
+            }
+        }
         // 库存明细添加
         if (tWarehousebillsitems != null) {
             JSONArray warehouseJSON = JSONArray.parseArray(tWarehousebillsitems);
             List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
             for (TWarehousebillsitems wbItem : warehousebillsitemsList) {
                 wbItem.setfPid(fPid);
+                wbItem.setfMarks(warehouseBills.getfMarks());
+                wbItem.setfMblno(warehouseBills.getfMblno());
                 wbItem.setCreateBy(loginUser.getUser().getUserName());
                 wbItem.setCreateTime(new Date());
                 tWarehousebillsitemsMapper.insertTWarehousebillsitems(wbItem);
@@ -390,13 +405,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             List<TWarehousebillsfees> warehousebillsfeesDrList = JSONObject.parseArray(jsonDrArray.toJSONString(), TWarehousebillsfees.class);
             for (TWarehousebillsfees wbDr : warehousebillsfeesDrList) {
                 // 检验  数量*单价=金额
-                if (wbDr.getfQty() != null && !wbDr.getfQty().equals("")
-                        && wbDr.getfUnitprice() != null && !wbDr.getfUnitprice().equals("")) {
-                    BigDecimal fqty = wbDr.getfQty();
-                    BigDecimal funitprice = wbDr.getfUnitprice();
-                    Long result = check(fqty, funitprice);
-                    wbDr.setfAmount(result);
-                }
                 wbDr.setfPid(fPid);
                 wbDr.setfDc("D");
                 wbDr.setCreateBy(loginUser.getUser().getUserName());
@@ -409,14 +417,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             JSONArray jsonCrArray = JSONArray.parseArray(tWarehousebillsfeesCr);
             List<TWarehousebillsfees> warehousebillsfeesCrList = JSONObject.parseArray(jsonCrArray.toJSONString(), TWarehousebillsfees.class);
             for (TWarehousebillsfees wbCr : warehousebillsfeesCrList) {
-                // 检验  数量*单价=金额
-                /*if (wbCr.getfQty() != null && !wbCr.getfQty().equals("")
-                        && wbCr.getfUnitprice() != null && !wbCr.getfUnitprice().equals("")) {
-                    BigDecimal fqty = wbCr.getfQty();
-                    BigDecimal funitprice = wbCr.getfUnitprice();
-                    Long result = check(fqty, funitprice);
-                    wbCr.setfAmount(result);
-                }*/
                 wbCr.setfPid(fPid);
                 wbCr.setfDc("C");
                 wbCr.setCreateBy(loginUser.getUser().getUserName());
@@ -424,22 +424,19 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 tWarehousebillsfeesMapper.insertTWarehousebillsfees(wbCr);
             }
         }
-
-
         return AjaxResult.success();
     }
 
     // 入库 收费明细 校验
-    public Long check (BigDecimal number ,BigDecimal unitPrice){
-        BigDecimal result1 =  number.multiply(unitPrice);
+    public Long check(BigDecimal number, BigDecimal unitPrice) {
+        BigDecimal result1 = number.multiply(unitPrice);
         // 保留两位小数且四舍五入
         result1 = result1.setScale(2, BigDecimal.ROUND_HALF_UP);
         // 转换去掉小数点
-        String result=result1.toString().replace(".","");
+        String result = result1.toString().replace(".", "");
         return Long.valueOf(result);
     }
 
-
     /**
      * 修改详情主表
      *

+ 26 - 17
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -15,6 +15,7 @@
         <result property="fGoodsid" column="f_goodsid"/>
         <result property="fTrademodeid" column="f_trademodeid"/>
         <result property="fPreqty" column="f_preqty"/>
+        <result property="fWarehouseid" column="f_warehouseid"/>
         <result property="fPregrossweight" column="f_pregrossweight"/>
         <result property="fPrenetweight" column="f_prenetweight"/>
         <result property="fQtyd" column="f_qtyD"/>
@@ -40,7 +41,7 @@
     </resultMap>
 
     <sql id="selectTWhgenlegVo">
-        select f_accyear, f_id, f_accmonth, f_corpid, f_mblno, f_originalbillno, f_marks, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty, f_pregrossweight, f_prenetweight, f_qtyD, f_volumnD, f_grossweightD, f_netweightD, f_volumnC, f_qtyC, f_qtyblc, f_grossweightC, f_netweightC, f_grossweightblc, f_netweightblc, f_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_whgenleg
+        select f_accyear, f_id, f_accmonth, f_corpid, f_mblno, f_warehouseid, f_originalbillno, f_marks, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty, f_pregrossweight, f_prenetweight, f_qtyD, f_volumnD, f_grossweightD, f_netweightD, f_volumnC, f_qtyC, f_qtyblc, f_grossweightC, f_netweightC, f_grossweightblc, f_netweightblc, f_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_whgenleg
     </sql>
 
     <select id="selectTWhgenlegList" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
@@ -54,6 +55,7 @@
             <if test="fPrenetweight != null ">and f_prenetweight = #{fPrenetweight}</if>
             <if test="fQtyd != null ">and f_qtyD = #{fQtyd}</if>
             <if test="fVolumnd != null ">and f_volumnD = #{fVolumnd}</if>
+            <if test="fWarehouseid != null ">and f_warehouseid = #{fWarehouseid}</if>
             <if test="fGrossweightd != null ">and f_grossweightD = #{fGrossweightd}</if>
             <if test="fNetweightd != null ">and f_netweightD = #{fNetweightd}</if>
             <if test="fVolumnc != null ">and f_volumnC = #{fVolumnc}</if>
@@ -70,11 +72,14 @@
     </select>
 
     <select id="selectInventoryList" parameterType="TWhgenleg" resultType="Map">
-        SELECT
+        select
             leg.f_id AS fId,
             corp.f_name AS fCorpid,
-            ware.f_name AS fWarehouseLocationid,
+            area.f_name AS fWarehouseLocationid,
+            leg.f_warehouse_locationid AS fWarehouseLocationids,
+            leg.f_trademodeid AS fTrademodeid,
             goods.f_name AS fGoodsid,
+            leg.f_goodsid AS fGoodsids,
             leg.f_volumnD AS fVolumnD,
             leg.f_qtyD AS fQtyD,
             leg.f_mblno AS fMblno,
@@ -88,12 +93,12 @@
             leg.f_grossweightblc AS fGrossweightblc,
             leg.f_netweightblc AS fNetweightblc,
             leg.f_marks AS fMarks,
-            DATE_FORMAT(leg.create_time,'%Y-%m-%d') AS createTime,
+            DATE_FORMAT( leg.create_time, '%Y-%m-%d' ) AS createTime,
             leg.f_cntrno AS fCntrno
         FROM
             t_whgenleg leg
             LEFT JOIN t_corps corp ON corp.f_id = leg.f_corpid
-            LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouse_locationid
+            LEFT JOIN t_warehouse_area area ON area.f_id = leg.f_warehouse_locationid
             LEFT JOIN t_goods goods ON goods.f_id = leg.f_goodsid
         <where>
             <if test="fOriginalbillno != null  and fOriginalbillno != ''">and leg.f_originalbillno = #{fOriginalbillno}</if>
@@ -103,6 +108,7 @@
             <if test="fPregrossweight != null ">and leg.f_pregrossweight = #{fPregrossweight}</if>
             <if test="fPrenetweight != null ">and leg.f_prenetweight = #{fPrenetweight}</if>
             <if test="fQtyd != null ">and leg.f_qtyD = #{fQtyd}</if>
+            <if test="fWarehouseid != null ">and leg.f_warehouseid = #{fWarehouseid}</if>
             <if test="fVolumnd != null ">and leg.f_volumnD = #{fVolumnd}</if>
             <if test="fGrossweightd != null ">and leg.f_grossweightD = #{fGrossweightd}</if>
             <if test="fNetweightd != null ">and leg.f_netweightD = #{fNetweightd}</if>
@@ -143,29 +149,30 @@
             <if test="fAccmonth != null">f_accmonth,</if>
             <if test="fCorpid != null">f_corpid,</if>
             <if test="fMblno != null">f_mblno,</if>
-            <if test="fOriginalbillno != null and fOriginalbillno != ''">f_originalbillno,</if>
+            <if test="fOriginalbillno != null">f_originalbillno,</if>
             <if test="fWarehouseLocationid != null">f_warehouse_locationid,</if>
             <if test="fGoodsid != null">f_goodsid,</if>
             <if test="fTrademodeid != null">f_trademodeid,</if>
             <if test="fPreqty != null">f_preqty,</if>
+            <if test="fWarehouseid != null">f_warehouseid,</if>
             <if test="fPregrossweight != null">f_pregrossweight,</if>
             <if test="fPrenetweight != null">f_prenetweight,</if>
-            <if test="fQtyd != null">f_qtyD,</if>
             <if test="fVolumnd != null">f_volumnD,</if>
+            <if test="fQtyd != null">f_qtyD,</if>
             <if test="fGrossweightd != null">f_grossweightD,</if>
             <if test="fNetweightd != null">f_netweightD,</if>
             <if test="fVolumnc != null">f_volumnC,</if>
             <if test="fQtyc != null">f_qtyC,</if>
-            <if test="fMarks != null and fMarks != ''">f_marks,</if>
             <if test="fQtyblc != null">f_qtyblc,</if>
             <if test="fGrossweightc != null">f_grossweightC,</if>
-            <if test="fNetweightc != null">f_netweightC,</if>
             <if test="fGrossweightblc != null">f_grossweightblc,</if>
+            <if test="fNetweightc != null">f_netweightC,</if>
             <if test="fNetweightblc != null">f_netweightblc,</if>
             <if test="fCntrno != null">f_cntrno,</if>
             <if test="fStatus != null">f_status,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
+            <if test="fMarks != null and fMarks != ''">f_marks,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
@@ -177,29 +184,30 @@
             <if test="fAccmonth != null">#{fAccmonth},</if>
             <if test="fCorpid != null">#{fCorpid},</if>
             <if test="fMblno != null">#{fMblno},</if>
-            <if test="fOriginalbillno != null and fOriginalbillno != ''">#{fOriginalbillno},</if>
+            <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
             <if test="fWarehouseLocationid != null">#{fWarehouseLocationid},</if>
             <if test="fGoodsid != null">#{fGoodsid},</if>
             <if test="fTrademodeid != null">#{fTrademodeid},</if>
             <if test="fPreqty != null">#{fPreqty},</if>
+            <if test="fWarehouseid != null">#{fWarehouseid},</if>
             <if test="fPregrossweight != null">#{fPregrossweight},</if>
             <if test="fPrenetweight != null">#{fPrenetweight},</if>
-            <if test="fQtyd != null">#{fQtyd},</if>
             <if test="fVolumnd != null">#{fVolumnd},</if>
+            <if test="fQtyd != null">#{fQtyd},</if>
             <if test="fGrossweightd != null">#{fGrossweightd},</if>
             <if test="fNetweightd != null">#{fNetweightd},</if>
-            <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
             <if test="fVolumnc != null">#{fVolumnc},</if>
             <if test="fQtyc != null">#{fQtyc},</if>
             <if test="fQtyblc != null">#{fQtyblc},</if>
             <if test="fGrossweightc != null">#{fGrossweightc},</if>
-            <if test="fNetweightc != null">#{fNetweightc},</if>
             <if test="fGrossweightblc != null">#{fGrossweightblc},</if>
+            <if test="fNetweightc != null">#{fNetweightc},</if>
             <if test="fNetweightblc != null">#{fNetweightblc},</if>
             <if test="fCntrno != null">#{fCntrno},</if>
             <if test="fStatus != null">#{fStatus},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createBy != null">#{createBy},</if>
+            <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
@@ -214,29 +222,30 @@
             <if test="fAccmonth != null">f_accmonth = #{fAccmonth},</if>
             <if test="fCorpid != null">f_corpid = #{fCorpid},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
-            <if test="fOriginalbillno != null and fOriginalbillno != ''">f_originalbillno = #{fOriginalbillno},</if>
+            <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
             <if test="fWarehouseLocationid != null">f_warehouse_locationid = #{fWarehouseLocationid},</if>
             <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
             <if test="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</if>
             <if test="fPreqty != null">f_preqty = #{fPreqty},</if>
+            <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
             <if test="fPregrossweight != null">f_pregrossweight = #{fPregrossweight},</if>
             <if test="fPrenetweight != null">f_prenetweight = #{fPrenetweight},</if>
-            <if test="fQtyd != null">f_qtyD = #{fQtyd},</if>
             <if test="fVolumnd != null">f_volumnD = #{fVolumnd},</if>
+            <if test="fQtyd != null">f_qtyD = #{fQtyd},</if>
             <if test="fGrossweightd != null">f_grossweightD = #{fGrossweightd},</if>
             <if test="fNetweightd != null">f_netweightD = #{fNetweightd},</if>
             <if test="fVolumnc != null">f_volumnC = #{fVolumnc},</if>
             <if test="fQtyc != null">f_qtyC = #{fQtyc},</if>
             <if test="fQtyblc != null">f_qtyblc = #{fQtyblc},</if>
-            <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
             <if test="fGrossweightc != null">f_grossweightC = #{fGrossweightc},</if>
-            <if test="fNetweightc != null">f_netweightC = #{fNetweightc},</if>
             <if test="fGrossweightblc != null">f_grossweightblc = #{fGrossweightblc},</if>
+            <if test="fNetweightc != null">f_netweightC = #{fNetweightc},</if>
             <if test="fNetweightblc != null">f_netweightblc = #{fNetweightblc},</if>
             <if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
             <if test="fStatus != null">f_status = #{fStatus},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</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>

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

@@ -102,21 +102,22 @@
 
     <select id="selectWarehouseBusinessList" parameterType="TWarehousebills" resultType="Map">
         SELECT
-        bill.f_id AS fId,
-        corp.f_name AS fCorpid,
-        bill.f_mblno AS fMblno,
-        corpSub.f_name AS fSbu,
-        bill.f_bsdate AS fBsdate,
-        bill.f_trademodeid AS fTrademodeid,
-        bill.f_warehouseid AS fWarehouseid,
-        bill.f_qty AS fQty,
-        bill.f_grossweight AS fGrossweight,
-        bill.f_netweight AS fNetweight
+            bill.f_id AS fId,
+            corp.f_name AS fCorpid,
+            bill.f_mblno AS fMblno,
+            corpSub.f_name AS fSbu,
+            bill.f_bsdate AS fBsdate,
+            bill.f_trademodeid AS fTrademodeid,
+            ware.f_name AS fWarehouseid,
+            bill.f_qty AS fQty,
+            bill.f_grossweight AS fGrossweight,
+            bill.f_netweight AS fNetweight,
+            bill.f_billstatus AS fBillstatus
         FROM
-        t_warehousebills bill
-        LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
-        LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
-        LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
+            t_warehousebills bill
+            LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
+            LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
+            LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
         <where>
             <if test="fBillno != null  and fBillno != ''">and bill.f_billno = #{fBillno}</if>
             <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and bill.f_customsdeclartion =
@@ -185,7 +186,6 @@
             <if test="fStorekeeper != null">f_storekeeper,</if>
             <if test="fBsdate != null">f_bsdate,</if>
             <if test="fPlanqty != null">f_planqty,</if>
-            <if test="fMarks != null and fMarks != ''">f_marks,</if>
             <if test="fPlangrossweight != null">f_plangrossweight,</if>
             <if test="fPlannetweight != null">f_plannetweight,</if>
             <if test="fPlanvolumn != null">f_planvolumn,</if>
@@ -193,13 +193,14 @@
             <if test="fGrossweight != null">f_grossweight,</if>
             <if test="fNetweight != null">f_netweight,</if>
             <if test="fVolumn != null">f_volumn,</if>
-            <if test="fTrademodeid != null">f_trademodeid,</if>
             <if test="fBillingway != null">f_billingway,</if>
+            <if test="fTrademodeid != null">f_trademodeid,</if>
             <if test="fSbu != null">f_sbu,</if>
             <if test="fFeetunit != null">f_feetunit,</if>
             <if test="fMblno != null">f_mblno,</if>
             <if test="fVslvoy != null">f_vslvoy,</if>
             <if test="fEta != null">f_eta,</if>
+            <if test="fMarks != null and fMarks != ''">f_marks,</if>
             <if test="fCustomno != null">f_customno,</if>
             <if test="fIfweigh != null">f_ifweigh,</if>
             <if test="fIfpledge != null">f_ifpledge,</if>
@@ -237,14 +238,14 @@
             <if test="fGrossweight != null">#{fGrossweight},</if>
             <if test="fNetweight != null">#{fNetweight},</if>
             <if test="fVolumn != null">#{fVolumn},</if>
-            <if test="fTrademodeid != null">#{fTrademodeid},</if>
             <if test="fBillingway != null">#{fBillingway},</if>
+            <if test="fTrademodeid != null">#{fTrademodeid},</if>
             <if test="fSbu != null">#{fSbu},</if>
             <if test="fFeetunit != null">#{fFeetunit},</if>
             <if test="fMblno != null">#{fMblno},</if>
-            <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
             <if test="fVslvoy != null">#{fVslvoy},</if>
             <if test="fEta != null">#{fEta},</if>
+            <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
             <if test="fCustomno != null">#{fCustomno},</if>
             <if test="fIfweigh != null">#{fIfweigh},</if>
             <if test="fIfpledge != null">#{fIfpledge},</if>
@@ -281,19 +282,19 @@
             <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
             <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
             <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
-            <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
             <if test="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>
             <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="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</if>
             <if test="fBillingway != null">f_billingway = #{fBillingway},</if>
+            <if test="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</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>
             <if test="fVslvoy != null">f_vslvoy = #{fVslvoy},</if>
             <if test="fEta != null">f_eta = #{fEta},</if>
+            <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
             <if test="fCustomno != null">f_customno = #{fCustomno},</if>
             <if test="fIfweigh != null">f_ifweigh = #{fIfweigh},</if>
             <if test="fIfpledge != null">f_ifpledge = #{fIfpledge},</if>

+ 6 - 7
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -10,7 +10,7 @@
         <result property="fLineno" column="f_lineno"/>
         <result property="fCorpid" column="f_corpid"/>
         <result property="fFeeid" column="f_feeid"/>
-        <result property="fFeeunitid" column="f_feeUnitid"/>
+        <result property="fFeeUnitid" column="f_feeUnitid"/>
         <result property="fQty" column="f_qty"/>
         <result property="fUnitprice" column="f_unitprice"/>
         <result property="fAmount" column="f_amount"/>
@@ -45,7 +45,7 @@
             <if test="fLineno != null ">and f_lineno = #{fLineno}</if>
             <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
             <if test="fFeeid != null ">and f_feeid = #{fFeeid}</if>
-            <if test="fFeeunitid != null ">and f_feeUnitid = #{fFeeunitid}</if>
+            <if test="fFeeUnitid != null ">and f_feeUnitid = #{fFeeUnitid}</if>
             <if test="fQty != null ">and f_qty = #{fQty}</if>
             <if test="fUnitprice != null ">and f_unitprice = #{fUnitprice}</if>
             <if test="fAmount != null ">and f_amount = #{fAmount}</if>
@@ -68,15 +68,14 @@
         where f_id = #{fId}
     </select>
 
-    <insert id="insertTWarehousebillsfees" parameterType="TWarehousebillsfees" useGeneratedKeys="true"
-            keyProperty="fId">
+    <insert id="insertTWarehousebillsfees" parameterType="TWarehousebillsfees" useGeneratedKeys="true" keyProperty="fId">
         insert into t_warehousebillsfees
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="fPid != null">f_pid,</if>
             <if test="fLineno != null">f_lineno,</if>
             <if test="fCorpid != null">f_corpid,</if>
             <if test="fFeeid != null">f_feeid,</if>
-            <if test="fFeeunitid != null">f_feeUnitid,</if>
+            <if test="fFeeUnitid != null">f_feeUnitid,</if>
             <if test="fQty != null">f_qty,</if>
             <if test="fUnitprice != null">f_unitprice,</if>
             <if test="fAmount != null">f_amount,</if>
@@ -103,7 +102,7 @@
             <if test="fLineno != null">#{fLineno},</if>
             <if test="fCorpid != null">#{fCorpid},</if>
             <if test="fFeeid != null">#{fFeeid},</if>
-            <if test="fFeeunitid != null">#{fFeeunitid},</if>
+            <if test="fFeeUnitid != null">#{fFeeUnitid},</if>
             <if test="fQty != null">#{fQty},</if>
             <if test="fUnitprice != null">#{fUnitprice},</if>
             <if test="fAmount != null">#{fAmount},</if>
@@ -134,7 +133,7 @@
             <if test="fLineno != null">f_lineno = #{fLineno},</if>
             <if test="fCorpid != null">f_corpid = #{fCorpid},</if>
             <if test="fFeeid != null">f_feeid = #{fFeeid},</if>
-            <if test="fFeeunitid != null">f_feeUnitid = #{fFeeunitid},</if>
+            <if test="fFeeUnitid != null">f_feeUnitid = #{fFeeUnitid},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>
             <if test="fUnitprice != null">f_unitprice = #{fUnitprice},</if>
             <if test="fAmount != null">f_amount = #{fAmount},</if>

+ 20 - 18
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -54,7 +54,7 @@
             <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="f_mblno != null ">and f_planqty = #{fMblno}</if>
+            <if test="fMblno != null ">and f_mblno = #{fMblno}</if>
             <if test="fPlanvolumn != null ">and f_planvolumn = #{fPlanvolumn}</if>
             <if test="fPackagespecs != null ">and f_packagespecs = #{fPackagespecs}</if>
             <if test="fPlangrossweight != null ">and f_plangrossweight = #{fPlangrossweight}</if>
@@ -74,28 +74,27 @@
         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="fGoodsid != null">f_goodsid,</if>
+            <if test="fMblno != null">f_mblno,</if>
             <if test="fWarehouselocid != null">f_warehouselocid,</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="fBoxno != null">f_boxno,</if>
             <if test="fCntrtype != null">f_cntrtype,</if>
+            <if test="fGoodsval != null">f_goodsval,</if>
             <if test="fPlanqty != null">f_planqty,</if>
-            <if test="fMblno != null">f_mblno,</if>
             <if test="fPlanvolumn != null">f_planvolumn,</if>
-            <if test="fPackagespecs != null">f_packagespecs,</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="fVolumn != null">f_volumn,</if>
             <if test="fNetweight != null">f_netweight,</if>
             <if test="fCntrno != null">f_cntrno,</if>
             <if test="fTruckno != null">f_truckno,</if>
@@ -106,26 +105,27 @@
             <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>
         </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="fMblno != null">#{fMblno},</if>
             <if test="fWarehouselocid != null">#{fWarehouselocid},</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="fBoxno != null">#{fBoxno},</if>
             <if test="fCntrtype != null">#{fCntrtype},</if>
+            <if test="fGoodsval != null">#{fGoodsval},</if>
             <if test="fPlanqty != null">#{fPlanqty},</if>
-            <if test="fMblno != null">#{fMblno},</if>
             <if test="fPlanvolumn != null">#{fPlanvolumn},</if>
-            <if test="fPackagespecs != null">#{fPackagespecs},</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="fVolumn != null">#{fVolumn},</if>
             <if test="fNetweight != null">#{fNetweight},</if>
             <if test="fCntrno != null">#{fCntrno},</if>
             <if test="fTruckno != null">#{fTruckno},</if>
@@ -136,6 +136,7 @@
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="fMarks != null">#{fMarks},</if>
         </trim>
     </insert>
 
@@ -145,21 +146,21 @@
             <if test="fPid != null">f_pid = #{fPid},</if>
             <if test="fLineno != null">f_lineno = #{fLineno},</if>
             <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
+            <if test="fMblno != null">f_mblno = #{fMblno},</if>
             <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</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="fBoxno != null">f_boxno = #{fBoxno},</if>
             <if test="fCntrtype != null">f_cntrtype = #{fCntrtype},</if>
+            <if test="fGoodsval != null">f_goodsval = #{fGoodsval},</if>
             <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
-            <if test="fMblno != null">f_planqty = #{fMblno},</if>
             <if test="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
-            <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</if>
             <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
+            <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</if>
             <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>
-            <if test="fVolumn != null">f_volumn = #{fVolumn},</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>
@@ -170,6 +171,7 @@
             <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>
         </trim>
         where f_id = #{fId}
     </update>