Ver Fonte

添加货转后端文件,添加数据库字段

阿伏兔 há 4 anos atrás
pai
commit
092e34544c

+ 139 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/GoodsTransferController.java

@@ -0,0 +1,139 @@
+package com.ruoyi.web.controller.warehouse.warehouseBusiness;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 仓库详情主表Controller
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+@RestController
+@RequestMapping("/warehouseBusiness/goodsTransfer")
+public class GoodsTransferController extends BaseController {
+    @Autowired
+    private ITWarehouseBillsService itWarehouseBillsService;
+
+    /**
+     * 查询入库详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseBills tWarehouseBills) {
+        startPage();
+        tWarehouseBills.setfBilltype("HQZY");
+        List<Map<String, Object>> list = itWarehouseBillsService.selectWarehouseBusinessList(tWarehouseBills);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出入库详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:export')")
+    @Log(title = "详情主表", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseBills tWarehouseBills) {
+        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
+        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
+        return util.exportExcel(list, "warehousebills");
+    }
+
+    /**
+     * 获取入库仓库详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(itWarehouseBillsService.selectTWarehousebillsById(fId));
+    }
+
+    /**
+     * 新增入库详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:add')")
+    @Log(title = "详情主表", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/add")
+    public AjaxResult add(@RequestParam("tWarehouseBills") String tWarehouseBills,
+                          @RequestParam("tWhgenleg") String tWhgenleg,
+                          @RequestParam("tWarehousebillsfeesCr") String tWarehousebillsfeesCr,
+                          @RequestParam("tWarehousebillsfeesDr") String tWarehousebillsfeesDr,
+                          @RequestParam("tWarehousebillsitems") String tWarehousebillsitems) {
+        String billsType = "HQZY";
+        if (StringUtils.isEmpty(tWarehouseBills)) {
+            return AjaxResult.error("提交失败:请检查主表数据");
+        }
+        if (tWarehousebillsitems.equals("[]")) {
+            return AjaxResult.error("提交失败:请检查库存明细数据");
+        }
+        if (tWhgenleg.equals("[]")) {
+            return AjaxResult.error("提交失败:请检查附件信息");
+        }
+        if (tWarehousebillsfeesDr.equals("[]")) {
+            return AjaxResult.error("提交失败:请检查收款明细数据");
+        }
+        if (tWarehousebillsfeesCr.equals("[]")) {
+            return AjaxResult.error("提交失败:请检查付款明细数据");
+        }
+        /*if (StringUtils.isEmpty(tWarehousebillsitems)) {
+            return AjaxResult.error("提交失败:请检货物明细数据");
+        }
+        if (StringUtils.isEmpty(tWarehousebillsfeesCr) || StringUtils.isEmpty(tWarehousebillsfeesDr)) {
+            return AjaxResult.error("提交失败:请检费用明细数据");
+        }*/
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return itWarehouseBillsService.insertTWarehousebills(tWarehouseBills, tWarehousebillsfeesCr,
+                tWarehousebillsfeesDr, tWarehousebillsitems, tWhgenleg, loginUser, billsType);
+    }
+
+    /**
+     * 修改入库详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:edit')")
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TWarehouseBills tWarehouseBills) {
+        return toAjax(itWarehouseBillsService.updateTWarehousebills(tWarehouseBills));
+    }
+
+    /**
+     * 删除入库详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:remove')")
+    @Log(title = "详情主表", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(itWarehouseBillsService.deleteTWarehousebillsByIds(fIds));
+    }
+
+    /**
+     *  撤销入库信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:goodsTransfer:revoke')")
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @GetMapping("/get/{fId}")
+    public AjaxResult revoke(@PathVariable("fId") Long fId) {
+        String  billsType="HQZYRevoke";
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return toAjax(itWarehouseBillsService.revokeTWarehousebillsById(fId,loginUser,billsType));
+    }
+}

+ 250 - 39
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWhgenleg.java

@@ -1,11 +1,14 @@
 package com.ruoyi.reportManagement.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 
 /**
  * 库存总账对象 t_whgenleg
@@ -14,17 +17,18 @@ import java.math.BigDecimal;
  * @date 2020-12-25
  */
 public class TWhgenleg extends BaseEntity {
+
     private static final long serialVersionUID = 1L;
 
     /**
-     * 
+     * $column.columnComment
      */
-    private Long fAccyear;
+    private Long fId;
 
     /**
-     * $column.columnComment
+     * 
      */
-    private Long fId;
+    private Long fAccyear;
 
     /**
      * 月
@@ -48,12 +52,6 @@ public class TWhgenleg extends BaseEntity {
     private String fOriginalbillno;
 
     /**
-     * 仓库id
-     */
-    @Excel(name = "仓库id")
-    private Long fWarehouseid;
-
-    /**
      * 库区,显示仓库 库位 库区
      */
     private Long fWarehouseLocationid;
@@ -81,6 +79,12 @@ public class TWhgenleg extends BaseEntity {
     private BigDecimal fPregrossweight;
 
     /**
+     * 仓库
+     */
+    @Excel(name = "仓库")
+    private Long fWarehouseid;
+
+    /**
      * 上期净重,
      */
     @Excel(name = "上期净重,")
@@ -89,6 +93,7 @@ public class TWhgenleg extends BaseEntity {
     /**
      * 入库件数
      */
+
     @Excel(name = "入库件数")
     private Long fQtyd;
 
@@ -135,18 +140,18 @@ public class TWhgenleg extends BaseEntity {
     private BigDecimal fGrossweightc;
 
     /**
-     * 出库净重
-     */
-    @Excel(name = "出库净重")
-    private BigDecimal fNetweightc;
-
-    /**
      * 结余毛重
      */
     @Excel(name = "结余毛重")
     private BigDecimal fGrossweightblc;
 
     /**
+     * 出库净重
+     */
+    @Excel(name = "出库净重")
+    private BigDecimal fNetweightc;
+
+    /**
      * 结余净重
      */
     @Excel(name = "结余净重")
@@ -175,266 +180,472 @@ public class TWhgenleg extends BaseEntity {
     @Excel(name = "唛头")
     private String fMarks;
 
-    public void setfAccyear(Long fAccyear) {
-        this.fAccyear = fAccyear;
-    }
+    /**
+     * 原始入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "原始入库日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fOriginalbilldate;
 
-    public Long getfAccyear() {
-        return fAccyear;
+    private List<String> orgStorageDate;
+    public void setorgStorageDate(List<String> orgStorageDate) {
+        this.orgStorageDate = orgStorageDate;
+    }
+    public List<String> getorgStorageDate() {
+        return orgStorageDate;
     }
 
     public void setfId(Long fId) {
         this.fId = fId;
     }
 
+
     public Long getfId() {
         return fId;
     }
 
+    public void setfAccyear(Long fAccyear) {
+
+        this.fAccyear = fAccyear;
+
+    }
+
+
+    public Long getfAccyear() {
+
+        return fAccyear;
+
+    }
+
     public void setfAccmonth(Long fAccmonth) {
+
         this.fAccmonth = fAccmonth;
+
     }
 
+
     public Long getfAccmonth() {
+
         return fAccmonth;
+
     }
 
     public void setfCorpid(Long fCorpid) {
+
         this.fCorpid = fCorpid;
+
     }
 
+
     public Long getfCorpid() {
+
         return fCorpid;
+
     }
 
     public void setfMblno(String fMblno) {
+
         this.fMblno = fMblno;
+
     }
 
+
     public String getfMblno() {
+
         return fMblno;
+
     }
 
     public void setfOriginalbillno(String fOriginalbillno) {
+
         this.fOriginalbillno = fOriginalbillno;
+
     }
 
+
     public String getfOriginalbillno() {
+
         return fOriginalbillno;
+
     }
 
     public void setfWarehouseLocationid(Long fWarehouseLocationid) {
+
         this.fWarehouseLocationid = fWarehouseLocationid;
+
     }
 
+
     public Long getfWarehouseLocationid() {
-        return fWarehouseLocationid;
-    }
 
-    public void setfWarehouseid(Long fWarehouseid) {
-        this.fWarehouseid = fWarehouseid;
-    }
+        return fWarehouseLocationid;
 
-    public Long getfWarehouseid() {
-        return fWarehouseid;
     }
 
     public void setfGoodsid(Long fGoodsid) {
+
         this.fGoodsid = fGoodsid;
+
     }
 
+
     public Long getfGoodsid() {
+
         return fGoodsid;
+
     }
 
     public void setfTrademodeid(Long fTrademodeid) {
+
         this.fTrademodeid = fTrademodeid;
+
     }
 
+
     public Long getfTrademodeid() {
+
         return fTrademodeid;
+
     }
 
     public void setfPreqty(Long fPreqty) {
+
         this.fPreqty = fPreqty;
+
     }
 
+
     public Long getfPreqty() {
+
         return fPreqty;
+
     }
 
     public void setfPregrossweight(BigDecimal fPregrossweight) {
+
         this.fPregrossweight = fPregrossweight;
+
     }
 
+
     public BigDecimal getfPregrossweight() {
+
         return fPregrossweight;
+
+    }
+
+    public void setfWarehouseid(Long fWarehouseid) {
+
+        this.fWarehouseid = fWarehouseid;
+
+    }
+
+
+    public Long getfWarehouseid() {
+
+        return fWarehouseid;
+
     }
 
     public void setfPrenetweight(BigDecimal fPrenetweight) {
+
         this.fPrenetweight = fPrenetweight;
+
     }
 
+
     public BigDecimal getfPrenetweight() {
+
         return fPrenetweight;
+
     }
 
     public void setfQtyd(Long fQtyd) {
+
         this.fQtyd = fQtyd;
+
     }
 
+
     public Long getfQtyd() {
+
         return fQtyd;
+
     }
 
     public void setfVolumnd(BigDecimal fVolumnd) {
+
         this.fVolumnd = fVolumnd;
+
     }
 
+
     public BigDecimal getfVolumnd() {
+
         return fVolumnd;
+
     }
 
     public void setfGrossweightd(BigDecimal fGrossweightd) {
+
         this.fGrossweightd = fGrossweightd;
+
     }
 
+
     public BigDecimal getfGrossweightd() {
+
         return fGrossweightd;
+
     }
 
     public void setfNetweightd(BigDecimal fNetweightd) {
+
         this.fNetweightd = fNetweightd;
+
     }
 
+
     public BigDecimal getfNetweightd() {
+
         return fNetweightd;
+
     }
 
     public void setfVolumnc(BigDecimal fVolumnc) {
+
         this.fVolumnc = fVolumnc;
+
     }
 
+
     public BigDecimal getfVolumnc() {
+
         return fVolumnc;
+
     }
 
     public void setfQtyc(Long fQtyc) {
+
         this.fQtyc = fQtyc;
+
     }
 
+
     public Long getfQtyc() {
+
         return fQtyc;
+
     }
 
     public void setfQtyblc(Long fQtyblc) {
+
         this.fQtyblc = fQtyblc;
+
     }
 
+
     public Long getfQtyblc() {
+
         return fQtyblc;
+
     }
 
     public void setfGrossweightc(BigDecimal fGrossweightc) {
+
         this.fGrossweightc = fGrossweightc;
+
     }
 
+
     public BigDecimal getfGrossweightc() {
-        return fGrossweightc;
-    }
 
-    public void setfNetweightc(BigDecimal fNetweightc) {
-        this.fNetweightc = fNetweightc;
-    }
+        return fGrossweightc;
 
-    public BigDecimal getfNetweightc() {
-        return fNetweightc;
     }
 
     public void setfGrossweightblc(BigDecimal fGrossweightblc) {
+
         this.fGrossweightblc = fGrossweightblc;
+
     }
 
+
     public BigDecimal getfGrossweightblc() {
+
         return fGrossweightblc;
+
+    }
+
+    public void setfNetweightc(BigDecimal fNetweightc) {
+
+        this.fNetweightc = fNetweightc;
+
+    }
+
+
+    public BigDecimal getfNetweightc() {
+
+        return fNetweightc;
+
     }
 
     public void setfNetweightblc(BigDecimal fNetweightblc) {
+
         this.fNetweightblc = fNetweightblc;
+
     }
 
+
     public BigDecimal getfNetweightblc() {
+
         return fNetweightblc;
+
     }
 
     public void setfCntrno(String fCntrno) {
+
         this.fCntrno = fCntrno;
+
     }
 
+
     public String getfCntrno() {
+
         return fCntrno;
+
     }
 
     public void setfStatus(String fStatus) {
+
         this.fStatus = fStatus;
+
     }
 
+
     public String getfStatus() {
+
         return fStatus;
+
     }
 
     public void setDelFlag(String delFlag) {
+
         this.delFlag = delFlag;
+
     }
 
+
     public String getDelFlag() {
+
         return delFlag;
+
     }
 
     public void setfMarks(String fMarks) {
+
         this.fMarks = fMarks;
+
     }
 
+
     public String getfMarks() {
+
         return fMarks;
+
+    }
+
+    public void setfOriginalbilldate(Date fOriginalbilldate) {
+
+        this.fOriginalbilldate = fOriginalbilldate;
+
+    }
+
+
+    public Date getfOriginalbilldate() {
+
+        return fOriginalbilldate;
+
     }
 
+
     @Override
+
     public String toString() {
+
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("fAccyear", getfAccyear())
+
                 .append("fId", getfId())
+
+                .append("fAccyear", getfAccyear())
+
                 .append("fAccmonth", getfAccmonth())
+
                 .append("fCorpid", getfCorpid())
+
                 .append("fMblno", getfMblno())
+
                 .append("fOriginalbillno", getfOriginalbillno())
+
                 .append("fWarehouseLocationid", getfWarehouseLocationid())
+
                 .append("fGoodsid", getfGoodsid())
+
                 .append("fTrademodeid", getfTrademodeid())
+
                 .append("fPreqty", getfPreqty())
+
                 .append("fPregrossweight", getfPregrossweight())
+
+                .append("fWarehouseid", getfWarehouseid())
+
                 .append("fPrenetweight", getfPrenetweight())
+
                 .append("fQtyd", getfQtyd())
-                .append("fWarehouseid", getfWarehouseid())
+
                 .append("fVolumnd", getfVolumnd())
+
                 .append("fGrossweightd", getfGrossweightd())
+
                 .append("fNetweightd", getfNetweightd())
+
                 .append("fVolumnc", getfVolumnc())
+
                 .append("fQtyc", getfQtyc())
+
                 .append("fQtyblc", getfQtyblc())
+
                 .append("fGrossweightc", getfGrossweightc())
-                .append("fNetweightc", getfNetweightc())
+
                 .append("fGrossweightblc", getfGrossweightblc())
+
+                .append("fNetweightc", getfNetweightc())
+
                 .append("fNetweightblc", getfNetweightblc())
+
                 .append("fCntrno", getfCntrno())
+
                 .append("fStatus", getfStatus())
+
                 .append("delFlag", getDelFlag())
-                .append("createBy", getCreateBy())
+
                 .append("fMarks", getfMarks())
+
+                .append("createBy", getCreateBy())
+
                 .append("createTime", getCreateTime())
+
                 .append("updateBy", getUpdateBy())
+
                 .append("updateTime", getUpdateTime())
+
                 .append("remark", getRemark())
+
+                .append("fOriginalbilldate", getfOriginalbilldate())
+
                 .toString();
+
     }
+
 }
+

+ 21 - 5
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java

@@ -43,6 +43,13 @@ public class TWarehouseBills extends BaseEntity {
     private String fOriginalbillno;
 
     /**
+     * 仓储计费日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "仓储计费日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fChargedate;
+
+    /**
      * 制单部门
      */
     @Excel(name = "制单部门")
@@ -193,7 +200,9 @@ public class TWarehouseBills extends BaseEntity {
     @Excel(name = "船名航次,CMA/A0001")
     private String fVslvoy;
 
-    /** 唛头 */
+    /**
+     * 唛头
+     */
     @Excel(name = "唛头")
     private String fMarks;
 
@@ -483,13 +492,11 @@ public class TWarehouseBills extends BaseEntity {
         return fVslvoy;
     }
 
-    public void setfMarks(String fMarks)
-    {
+    public void setfMarks(String fMarks) {
         this.fMarks = fMarks;
     }
 
-    public String getfMarks()
-    {
+    public String getfMarks() {
         return fMarks;
     }
 
@@ -545,6 +552,14 @@ public class TWarehouseBills extends BaseEntity {
         this.fBilltype = fBilltype;
     }
 
+    public void setfChargedate(Date fChargedate) {
+        this.fChargedate = fChargedate;
+    }
+
+    public Date getfChargedate() {
+        return fChargedate;
+    }
+
     public String getfBilltype() {
         return fBilltype;
     }
@@ -582,6 +597,7 @@ public class TWarehouseBills extends BaseEntity {
                 .append("fBscorpno", getfBscorpno())
                 .append("fWarehouseid", getfWarehouseid())
                 .append("fStorekeeper", getfStorekeeper())
+                .append("fChargedate", getfChargedate())
                 .append("fBsdate", getfBsdate())
                 .append("fPlanqty", getfPlanqty())
                 .append("fPlangrossweight", getfPlangrossweight())

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

@@ -29,6 +29,12 @@ public class TWarehousebillsitems extends BaseEntity {
     private Long fPid;
 
     /**
+     * 原始入库业务编号
+     */
+    @Excel(name = "原始入库业务编号")
+    private String fOriginalbillno;
+
+    /**
      * 行号,针对pid顺序排列,1,2,3,4,
      */
     @Excel(name = "行号,针对pid顺序排列,1,2,3,4,")
@@ -221,6 +227,14 @@ public class TWarehousebillsitems extends BaseEntity {
         return fBoxno;
     }
 
+    public void setfOriginalbillno(String fOriginalbillno) {
+        this.fOriginalbillno = fOriginalbillno;
+    }
+
+    public String getfOriginalbillno() {
+        return fOriginalbillno;
+    }
+
     public void setfMblno(String fMblno) {
         this.fMblno = fMblno;
     }
@@ -374,6 +388,7 @@ public class TWarehousebillsitems extends BaseEntity {
                 .append("fGoodsid", getfGoodsid())
                 .append("fWarehouselocid", getfWarehouselocid())
                 .append("fBsdate", getfBsdate())
+                .append("fOriginalbillno", getfOriginalbillno())
                 .append("fBoxno", getfBoxno())
                 .append("fMblno", getfMblno())
                 .append("fCntqty", getfCntqty())

+ 9 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -233,7 +233,11 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         // 客户
         tWhgenleg.setfCorpid(warehouseBills.getfCorpid());
         // 提单号
-        tWhgenleg.setfMblno(warehouseBills.getfMblno());
+        if ("HQZY".equals(warehouseBills.getfBilltype())) {
+            tWhgenleg.setfMblno(warehousebillsitems.getfMblno());
+        } else {
+            tWhgenleg.setfMblno(warehouseBills.getfMblno());
+        }
         // 库区
         tWhgenleg.setfWarehouseLocationid(warehousebillsitems.getfWarehouselocid());
         // 货物品名
@@ -253,6 +257,9 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     @Transactional
     public int instalTWhgenleg(TWarehouseBills warehouseBills, TWarehousebillsitems warehousebillsitems, SysUser user) {
         TWhgenleg tWhgenleg = new TWhgenleg();
+        if ("SJRK".equals(warehouseBills.getfBilltype()) || "HQZY".equals(warehouseBills.getfBilltype())) {
+            tWhgenleg.setfOriginalbilldate(new Date());
+        }
         // 客户
         tWhgenleg.setfCorpid(warehouseBills.getfCorpid());
         // 提单号
@@ -428,9 +435,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                             if (StringUtils.isNull(tWhgenle1)) {   // 5、 不存在 进行新增库存
                                 instalTWhgenleg(warehouseBills, wbItem, loginUser.getUser());
                             } else { // 4、 存在 进行跟新库存
-                                if ("6".equals(warehouseBills.getfBillstatus())) {
-                                    updateTWhgenlegData(wbItem, tWhgenle1.getfId(), "SJRK");
-                                }
+                                updateTWhgenlegData(wbItem, tWhgenle1.getfId(), "SJRK");
                             }
                         }
                     }

+ 33 - 16
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -37,11 +37,12 @@
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
+        <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="remark" column="remark"/>
     </resultMap>
 
     <sql id="selectTWhgenlegVo">
-        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
+        select f_accyear, f_id, f_accmonth, f_corpid, f_mblno, f_originalbilldate, 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">
@@ -57,6 +58,7 @@
             <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="fOriginalbilldate != null ">and f_originalbilldate = #{fOriginalbilldate}</if>
             <if test="fNetweightd != null ">and f_netweightD = #{fNetweightd}</if>
             <if test="fVolumnc != null ">and f_volumnC = #{fVolumnc}</if>
             <if test="fQtyc != null ">and f_qtyC = #{fQtyc}</if>
@@ -75,11 +77,12 @@
         select
             leg.f_id AS fId,
             corp.f_name AS fCorpid,
-            area.f_name AS fWarehouseLocationid,
-            leg.f_warehouse_locationid AS fWarehouseLocationids,
+            area.f_name AS fWarehouseLocationids,
+            leg.f_originalbillno AS fOriginalbillno,
+            leg.f_warehouse_locationid AS fWarehouseLocationid,
             leg.f_trademodeid AS fTrademodeid,
-            goods.f_name AS fGoodsid,
-            leg.f_goodsid AS fGoodsids,
+            goods.f_name AS fGoodsids,
+            leg.f_goodsid AS fGoodsid,
             leg.f_volumnD AS fVolumnD,
             leg.f_qtyD AS fQtyD,
             leg.f_mblno AS fMblno,
@@ -94,6 +97,7 @@
             leg.f_netweightblc AS fNetweightblc,
             leg.f_marks AS fMarks,
             DATE_FORMAT( leg.create_time, '%Y-%m-%d' ) AS createTime,
+            DATE_FORMAT( leg.f_originalbilldate, '%Y-%m-%d' ) AS fOriginalbilldate,
             leg.f_cntrno AS fCntrno
         FROM
             t_whgenleg leg
@@ -101,19 +105,29 @@
             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>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and leg.f_originalbillno =
+                #{fOriginalbillno}
+            </if>
             <if test="fPreqty != null ">and leg.f_preqty = #{fPreqty}</if>
             <if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
             <if test="fMblno != null ">and leg.f_mblno = #{fMblno}</if>
+            <if test='orgStorageDate != null and orgStorageDate[0] != null and orgStorageDate[0]!= ""'>
+                and leg.f_originalbilldate &gt;= #{orgStorageDate[0]}
+            </if>
+            <if test='orgStorageDate != null and orgStorageDate[1] != null and orgStorageDate[1]!= ""'>
+                and leg.f_originalbilldate &lt;= #{orgStorageDate[1]}
+            </if>
             <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="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</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>
             <if test="fVolumnc != null ">and leg.f_volumnC = #{fVolumnc}</if>
             <if test="fQtyc != null ">and leg.f_qtyC = #{fQtyc}</if>
+            <if test="fOriginalbilldate != null ">and leg.f_originalbilldate = #{fOriginalbilldate}</if>
             <if test="fMarks != null  and fMarks != ''">and leg.f_marks = #{fMarks}</if>
             <if test="fQtyblc != null ">and leg.f_qtyblc = #{fQtyblc}</if>
             <if test="fGrossweightc != null ">and leg.f_grossweightC = #{fGrossweightc}</if>
@@ -157,16 +171,16 @@
             <if test="fWarehouseid != null">f_warehouseid,</if>
             <if test="fPregrossweight != null">f_pregrossweight,</if>
             <if test="fPrenetweight != null">f_prenetweight,</if>
-            <if test="fVolumnd != null">f_volumnD,</if>
             <if test="fQtyd != null">f_qtyD,</if>
+            <if test="fVolumnd != null">f_volumnD,</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="fQtyblc != null">f_qtyblc,</if>
             <if test="fGrossweightc != null">f_grossweightC,</if>
-            <if test="fGrossweightblc != null">f_grossweightblc,</if>
+            <if test="fQtyblc != null">f_qtyblc,</if>
             <if test="fNetweightc != null">f_netweightC,</if>
+            <if test="fGrossweightblc != null">f_grossweightblc,</if>
             <if test="fNetweightblc != null">f_netweightblc,</if>
             <if test="fCntrno != null">f_cntrno,</if>
             <if test="fStatus != null">f_status,</if>
@@ -177,6 +191,7 @@
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="fOriginalbilldate != null">f_originalbilldate,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fAccyear != null">#{fAccyear},</if>
@@ -192,16 +207,16 @@
             <if test="fWarehouseid != null">#{fWarehouseid},</if>
             <if test="fPregrossweight != null">#{fPregrossweight},</if>
             <if test="fPrenetweight != null">#{fPrenetweight},</if>
-            <if test="fVolumnd != null">#{fVolumnd},</if>
             <if test="fQtyd != null">#{fQtyd},</if>
+            <if test="fVolumnd != null">#{fVolumnd},</if>
             <if test="fGrossweightd != null">#{fGrossweightd},</if>
             <if test="fNetweightd != null">#{fNetweightd},</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="fGrossweightblc != null">#{fGrossweightblc},</if>
+            <if test="fQtyblc != null">#{fQtyblc},</if>
             <if test="fNetweightc != null">#{fNetweightc},</if>
+            <if test="fGrossweightblc != null">#{fGrossweightblc},</if>
             <if test="fNetweightblc != null">#{fNetweightblc},</if>
             <if test="fCntrno != null">#{fCntrno},</if>
             <if test="fStatus != null">#{fStatus},</if>
@@ -212,6 +227,7 @@
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
         </trim>
     </insert>
 
@@ -230,16 +246,16 @@
             <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="fVolumnd != null">f_volumnD = #{fVolumnd},</if>
             <if test="fQtyd != null">f_qtyD = #{fQtyd},</if>
+            <if test="fVolumnd != null">f_volumnD = #{fVolumnd},</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="fGrossweightc != null">f_grossweightC = #{fGrossweightc},</if>
-            <if test="fGrossweightblc != null">f_grossweightblc = #{fGrossweightblc},</if>
+            <if test="fQtyblc != null">f_qtyblc = #{fQtyblc},</if>
             <if test="fNetweightc != null">f_netweightC = #{fNetweightc},</if>
+            <if test="fGrossweightblc != null">f_grossweightblc = #{fGrossweightblc},</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>
@@ -250,6 +266,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="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
         </trim>
         where f_accyear = #{fAccyear}
     </update>
@@ -289,7 +306,7 @@
                 f_grossweightC = f_grossweightC - #{map.warehousebillsitems.fGrossweight},
                 f_qtyblc = f_qtyblc + #{map.warehousebillsitems.fQty}
             </if>
---             update_by = NOW()
+            -- update_by = NOW()
         </trim>
         where f_id = #{map.whgenlegId}
     </update>

+ 13 - 7
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -13,6 +13,7 @@
         <result property="fBsdeptid" column="f_bsdeptid"/>
         <result property="fContacts" column="f_contacts"/>
         <result property="fTel" column="f_tel"/>
+        <result property="fChargedate" column="f_chargedate"/>
         <result property="fCorpid" column="f_corpid"/>
         <result property="fTocorpid" column="f_tocorpid"/>
         <result property="fStltypeid" column="f_stltypeid"/>
@@ -52,7 +53,7 @@
     </resultMap>
 
     <sql id="selectTWarehousebillsVo">
-        select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_marks, f_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, f_billingway, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark from t_warehousebills
+        select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_marks, f_tel, f_chargedate, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, f_billingway, f_sbu, f_feetunit, f_mblno, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid, f_billtype, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -69,6 +70,7 @@
             <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
             <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
             <if test="fTocorpid != null ">and f_tocorpid = #{fTocorpid}</if>
+            <if test="fChargedate != null "> and f_chargedate = #{fChargedate}</if>
             <if test="fStltypeid != null ">and f_stltypeid = #{fStltypeid}</if>
             <if test="fBscorpno != null  and fBscorpno != ''">and f_bscorpno = #{fBscorpno}</if>
             <if test="fWarehouseid != null ">and f_warehouseid = #{fWarehouseid}</if>
@@ -128,6 +130,7 @@
             </if>
             <if test="fDeptid != null ">and bill.f_deptid = #{fDeptid}</if>
             <if test="fBsdeptid != null ">and bill.f_bsdeptid = #{fBsdeptid}</if>
+            <if test="fChargedate != null ">and bill.f_chargedate = #{fChargedate}</if>
             <if test="fContacts != null  and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
             <if test="fTel != null  and fTel != ''">and bill.f_tel = #{fTel}</if>
             <if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
@@ -185,6 +188,7 @@
             <if test="fWarehouseid != null">f_warehouseid,</if>
             <if test="fStorekeeper != null">f_storekeeper,</if>
             <if test="fBsdate != null">f_bsdate,</if>
+            <if test="fChargedate != null">f_chargedate,</if>
             <if test="fPlanqty != null">f_planqty,</if>
             <if test="fPlangrossweight != null">f_plangrossweight,</if>
             <if test="fPlannetweight != null">f_plannetweight,</if>
@@ -199,8 +203,8 @@
             <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="fEta != null">f_eta,</if>
             <if test="fCustomno != null">f_customno,</if>
             <if test="fIfweigh != null">f_ifweigh,</if>
             <if test="fIfpledge != null">f_ifpledge,</if>
@@ -230,6 +234,7 @@
             <if test="fWarehouseid != null">#{fWarehouseid},</if>
             <if test="fStorekeeper != null">#{fStorekeeper},</if>
             <if test="fBsdate != null">#{fBsdate},</if>
+            <if test="fChargedate != null">#{fChargedate},</if>
             <if test="fPlanqty != null">#{fPlanqty},</if>
             <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
             <if test="fPlannetweight != null">#{fPlannetweight},</if>
@@ -244,8 +249,8 @@
             <if test="fFeetunit != null">#{fFeetunit},</if>
             <if test="fMblno != null">#{fMblno},</if>
             <if test="fVslvoy != null">#{fVslvoy},</if>
-            <if test="fEta != null">#{fEta},</if>
             <if test="fMarks != null and fMarks != ''">#{fMarks},</if>
+            <if test="fEta != null">#{fEta},</if>
             <if test="fCustomno != null">#{fCustomno},</if>
             <if test="fIfweigh != null">#{fIfweigh},</if>
             <if test="fIfpledge != null">#{fIfpledge},</if>
@@ -279,6 +284,7 @@
             <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
             <if test="fStorekeeper != null">f_storekeeper = #{fStorekeeper},</if>
             <if test="fBsdate != null">f_bsdate = #{fBsdate},</if>
+            <if test="fChargedate != null">f_chargedate = #{fChargedate},</if>
             <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
             <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
             <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
@@ -293,8 +299,8 @@
             <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="fEta != null">f_eta = #{fEta},</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>
@@ -329,9 +335,9 @@
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
         where
             bill.f_id in
-            <foreach item="fId" collection="array" open="(" separator="," close=")">
-                #{fId}
-            </foreach>
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
     </delete>
 
 </mapper>

+ 11 - 5
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -15,6 +15,7 @@
         <result property="fCntqty" column="f_cntqty"/>
         <result property="fGoodsval" column="f_goodsval"/>
         <result property="fCntrtype" column="f_cntrtype"/>
+        <result property="fOriginalbillno" column="f_originalbillno"/>
         <result property="fPlanqty" column="f_planqty"/>
         <result property="fMblno" column="f_mblno"/>
         <result property="fPlanvolumn" column="f_planvolumn"/>
@@ -37,7 +38,7 @@
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
-        select f_id, f_pid, f_lineno, f_goodsid, f_warehouselocid, f_mblno, f_bsdate, f_boxno, f_cntqty, f_goodsval, f_cntrtype, f_planqty, f_planvolumn, f_packagespecs, f_plangrossweight, f_plannetweight, f_qty, f_volumn, f_grossweight, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark from t_warehousebillsitems
+        select f_id, f_pid, f_lineno, f_goodsid, f_warehouselocid, f_originalbillno, f_mblno, f_bsdate, f_boxno, f_cntqty, f_goodsval, f_cntrtype, f_planqty, f_planvolumn, f_packagespecs, f_plangrossweight, f_plannetweight, f_qty, f_volumn, f_grossweight, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark from t_warehousebillsitems
     </sql>
 
     <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
@@ -51,6 +52,7 @@
             <if test="fBsdate != null ">and f_bsdate = #{fBsdate}</if>
             <if test="fBoxno != null  and fBoxno != ''">and f_boxno = #{fBoxno}</if>
             <if test="fCntqty != null ">and f_cntqty = #{fCntqty}</if>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and f_originalbillno = #{fOriginalbillno}</if>
             <if test="fGoodsval != null ">and f_goodsval = #{fGoodsval}</if>
             <if test="fCntrtype != null  and fCntrtype != ''">and f_cntrtype = #{fCntrtype}</if>
             <if test="fPlanqty != null ">and f_planqty = #{fPlanqty}</if>
@@ -74,7 +76,8 @@
         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>
@@ -83,14 +86,15 @@
             <if test="fMblno != null">f_mblno,</if>
             <if test="fWarehouselocid != null">f_warehouselocid,</if>
             <if test="fBsdate != null">f_bsdate,</if>
+            <if test="fOriginalbillno != null">f_originalbillno,</if>
             <if test="fCntqty != null">f_cntqty,</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="fPlanvolumn != null">f_planvolumn,</if>
-            <if test="fPlangrossweight != null">f_plangrossweight,</if>
             <if test="fPackagespecs != null">f_packagespecs,</if>
+            <if test="fPlangrossweight != null">f_plangrossweight,</if>
             <if test="fPlannetweight != null">f_plannetweight,</if>
             <if test="fQty != null">f_qty,</if>
             <if test="fGrossweight != null">f_grossweight,</if>
@@ -114,14 +118,15 @@
             <if test="fMblno != null">#{fMblno},</if>
             <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
             <if test="fBsdate != null">#{fBsdate},</if>
+            <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
             <if test="fCntqty != null">#{fCntqty},</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="fPlanvolumn != null">#{fPlanvolumn},</if>
-            <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
             <if test="fPackagespecs != null">#{fPackagespecs},</if>
+            <if test="fPlangrossweight != null">#{fPlangrossweight},</if>
             <if test="fPlannetweight != null">#{fPlannetweight},</if>
             <if test="fQty != null">#{fQty},</if>
             <if test="fGrossweight != null">#{fGrossweight},</if>
@@ -149,14 +154,15 @@
             <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="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
             <if test="fCntqty != null">f_cntqty = #{fCntqty},</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="fPlanvolumn != null">f_planvolumn = #{fPlanvolumn},</if>
-            <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
             <if test="fPackagespecs != null">f_packagespecs = #{fPackagespecs},</if>
+            <if test="fPlangrossweight != null">f_plangrossweight = #{fPlangrossweight},</if>
             <if test="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>
             <if test="fGrossweight != null">f_grossweight = #{fGrossweight},</if>