Parcourir la source

修改 入库列表页修改按钮所需数据,添加库存明细 表 提单号字段

阿伏兔 il y a 4 ans
Parent
commit
bf1264c3bc

+ 5 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWhgenlegController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/reportManagement/TWhgenlegController.java

@@ -1,4 +1,4 @@
-package com.ruoyi.web.controller.warehouse.warehouseBusiness;
+package com.ruoyi.web.controller.warehouse.reportManagement;
 
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
@@ -7,13 +7,14 @@ import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.warehouseBusiness.domain.TWhgenleg;
-import com.ruoyi.warehouseBusiness.service.ITWhgenlegService;
+import com.ruoyi.reportManagement.domain.TWhgenleg;
+import com.ruoyi.reportManagement.service.ITWhgenlegService;
 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
@@ -34,7 +35,7 @@ public class TWhgenlegController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(TWhgenleg tWhgenleg) {
         startPage();
-        List<TWhgenleg> list = tWhgenlegService.selectTWhgenlegList(tWhgenleg);
+        List<Map<String, Object>> list = tWhgenlegService.selectInventoryList(tWhgenleg);
         return getDataTable(list);
     }
 

+ 33 - 33
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWhgenleg.java → ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWhgenleg.java

@@ -1,4 +1,4 @@
-package com.ruoyi.warehouseBusiness.domain;
+package com.ruoyi.reportManagement.domain;
 
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
@@ -11,7 +11,7 @@ import java.math.BigDecimal;
  * 库存总账对象 t_whgenleg
  *
  * @author ruoyi
- * @date 2020-12-11
+ * @date 2020-12-25
  */
 public class TWhgenleg extends BaseEntity {
     private static final long serialVersionUID = 1L;
@@ -42,12 +42,6 @@ public class TWhgenleg extends BaseEntity {
     private String fMblno;
 
     /**
-     * 唛头
-     */
-    @Excel(name = "唛头")
-    private String fMarks;
-
-    /**
      * 原始入库业务编号
      */
     @Excel(name = "原始入库业务编号")
@@ -123,18 +117,18 @@ public class TWhgenleg extends BaseEntity {
     private Long fQtyc;
 
     /**
-     * 出库毛重,单位为吨
-     */
-    @Excel(name = "出库毛重,单位为吨")
-    private BigDecimal fGrossweightc;
-
-    /**
      * 结余件数
      */
     @Excel(name = "结余件数")
     private Long fQtyblc;
 
     /**
+     * 出库毛重,单位为吨
+     */
+    @Excel(name = "出库毛重,单位为吨")
+    private BigDecimal fGrossweightc;
+
+    /**
      * 出库净重
      */
     @Excel(name = "出库净重")
@@ -169,6 +163,12 @@ public class TWhgenleg extends BaseEntity {
      */
     private String delFlag;
 
+    /**
+     * 唛头
+     */
+    @Excel(name = "唛头")
+    private String fMarks;
+
     public void setfAccyear(Long fAccyear) {
         this.fAccyear = fAccyear;
     }
@@ -217,14 +217,6 @@ public class TWhgenleg extends BaseEntity {
         return fOriginalbillno;
     }
 
-    public void setfMarks(String fMarks) {
-        this.fMarks = fMarks;
-    }
-
-    public String getfMarks() {
-        return fMarks;
-    }
-
     public void setfWarehouseLocationid(Long fWarehouseLocationid) {
         this.fWarehouseLocationid = fWarehouseLocationid;
     }
@@ -321,14 +313,6 @@ public class TWhgenleg extends BaseEntity {
         return fQtyc;
     }
 
-    public void setfGrossweightc(BigDecimal fGrossweightc) {
-        this.fGrossweightc = fGrossweightc;
-    }
-
-    public BigDecimal getfGrossweightc() {
-        return fGrossweightc;
-    }
-
     public void setfQtyblc(Long fQtyblc) {
         this.fQtyblc = fQtyblc;
     }
@@ -337,6 +321,14 @@ public class TWhgenleg extends BaseEntity {
         return fQtyblc;
     }
 
+    public void setfGrossweightc(BigDecimal fGrossweightc) {
+        this.fGrossweightc = fGrossweightc;
+    }
+
+    public BigDecimal getfGrossweightc() {
+        return fGrossweightc;
+    }
+
     public void setfNetweightc(BigDecimal fNetweightc) {
         this.fNetweightc = fNetweightc;
     }
@@ -385,6 +377,14 @@ public class TWhgenleg extends BaseEntity {
         return delFlag;
     }
 
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    public String getfMarks() {
+        return fMarks;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -402,13 +402,12 @@ public class TWhgenleg extends BaseEntity {
                 .append("fPrenetweight", getfPrenetweight())
                 .append("fQtyd", getfQtyd())
                 .append("fVolumnd", getfVolumnd())
-                .append("fMarks", getfMarks())
                 .append("fGrossweightd", getfGrossweightd())
                 .append("fNetweightd", getfNetweightd())
                 .append("fVolumnc", getfVolumnc())
                 .append("fQtyc", getfQtyc())
-                .append("fGrossweightc", getfGrossweightc())
                 .append("fQtyblc", getfQtyblc())
+                .append("fGrossweightc", getfGrossweightc())
                 .append("fNetweightc", getfNetweightc())
                 .append("fGrossweightblc", getfGrossweightblc())
                 .append("fNetweightblc", getfNetweightblc())
@@ -416,10 +415,11 @@ public class TWhgenleg extends BaseEntity {
                 .append("fStatus", getfStatus())
                 .append("delFlag", getDelFlag())
                 .append("createBy", getCreateBy())
+                .append("fMarks", getfMarks())
                 .append("createTime", getCreateTime())
                 .append("updateBy", getUpdateBy())
                 .append("updateTime", getUpdateTime())
                 .append("remark", getRemark())
                 .toString();
     }
-}
+}

+ 4 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWhgenlegMapper.java → ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/mapper/TWhgenlegMapper.java

@@ -1,7 +1,7 @@
-package com.ruoyi.warehouseBusiness.mapper;
+package com.ruoyi.reportManagement.mapper;
 
 
-import com.ruoyi.warehouseBusiness.domain.TWhgenleg;
+import com.ruoyi.reportManagement.domain.TWhgenleg;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -77,4 +77,6 @@ public interface TWhgenlegMapper {
      * @return 结果
      */
     public int updateTWhgenlegData(@Param("map") Map<String, Object> map);
+
+    List<Map<String, Object>> selectInventoryList(TWhgenleg tWhgenleg);
 }

+ 10 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWhgenlegService.java → ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/ITWhgenlegService.java

@@ -1,7 +1,7 @@
-package com.ruoyi.warehouseBusiness.service;
+package com.ruoyi.reportManagement.service;
 
 
-import com.ruoyi.warehouseBusiness.domain.TWhgenleg;
+import com.ruoyi.reportManagement.domain.TWhgenleg;
 
 import java.util.List;
 import java.util.Map;
@@ -30,6 +30,14 @@ public interface ITWhgenlegService {
     public List<TWhgenleg> selectTWhgenlegList(TWhgenleg tWhgenleg);
 
     /**
+     * 查询库存总账列表
+     *
+     * @param tWhgenleg 库存总账
+     *      * @return 库存总账集合
+     */
+    List<Map<String, Object>> selectInventoryList(TWhgenleg tWhgenleg);
+
+    /**
      * 新增库存总账
      *
      * @param tWhgenleg 库存总账

+ 15 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWhgenlegServiceImpl.java → ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -1,12 +1,12 @@
-package com.ruoyi.warehouseBusiness.service.impl;
+package com.ruoyi.reportManagement.service.impl;
 
 
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.reportManagement.domain.TWhgenleg;
+import com.ruoyi.reportManagement.mapper.TWhgenlegMapper;
+import com.ruoyi.reportManagement.service.ITWhgenlegService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
-import com.ruoyi.warehouseBusiness.domain.TWhgenleg;
 import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
-import com.ruoyi.warehouseBusiness.mapper.TWhgenlegMapper;
-import com.ruoyi.warehouseBusiness.service.ITWhgenlegService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -59,6 +59,17 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     }
 
     /**
+     * 查询库存总账列表
+     *
+     * @param tWhgenleg 库存总账
+     * @return 库存总账
+     */
+    @Override
+    public List<Map<String, Object>> selectInventoryList(TWhgenleg tWhgenleg) {
+        return tWhgenlegMapper.selectInventoryList(tWhgenleg);
+    }
+
+    /**
      * 新增库存总账
      *
      * @param tWhgenleg 库存总账

+ 153 - 118
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -14,311 +14,346 @@ import java.util.Date;
  * @author ruoyi
  * @date 2020-12-16
  */
-public class TWarehousebillsitems extends BaseEntity
-{
+public class TWarehousebillsitems extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** $column.columnComment */
+    /**
+     * $column.columnComment
+     */
     private Long fId;
 
-    /** PID,对应主表id */
+    /**
+     * PID,对应主表id
+     */
     @Excel(name = "PID,对应主表id")
     private Long fPid;
 
-    /** 行号,针对pid顺序排列,1,2,3,4, */
+    /**
+     * 行号,针对pid顺序排列,1,2,3,4,
+     */
     @Excel(name = "行号,针对pid顺序排列,1,2,3,4,")
     private Long fLineno;
 
-    /** 货物品名,存储id 显示名称	t_goods 中的no或 name,模糊查找选择后,存储f_id,显示name */
+    /**
+     * 货物品名,存储id 显示名称	t_goods 中的no或 name,模糊查找选择后,存储f_id,显示name
+     */
     @Excel(name = "货物品名,存储id 显示名称	t_goods 中的no或 name,模糊查找选择后,存储f_id,显示name")
     private Long fGoodsid;
 
-    /** 入库库区,存储库区ID,显示仓库 库位 库区,t_warehouse_area中的f_id */
+    /**
+     * 入库库区,存储库区ID,显示仓库 库位 库区,t_warehouse_area中的f_id
+     */
     @Excel(name = "入库库区,存储库区ID,显示仓库 库位 库区,t_warehouse_area中的f_id")
     private Long fWarehouselocid;
 
-    /** 入(出)库日期 */
+    /**
+     * 入(出)库日期
+     */
     @Excel(name = "入", readConverterExp = "出=")
     private Date fBsdate;
 
-    /** 箱号 */
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String fMblno;
+
+    /**
+     * 箱号
+     */
     @Excel(name = "箱号")
     private String fBoxno;
 
-    /** 箱量 */
+    /**
+     * 箱量
+     */
     @Excel(name = "箱量")
     private Long fCntqty;
 
-    /** 货值 */
+    /**
+     * 货值
+     */
     @Excel(name = "货值")
     private BigDecimal fGoodsval;
 
-    /** 箱型,20GP 4OGP */
+    /**
+     * 箱型,20GP 4OGP
+     */
     @Excel(name = "箱型,20GP 4OGP")
     private String fCntrtype;
 
-    /** 计划件数 */
+    /**
+     * 计划件数
+     */
     @Excel(name = "计划件数")
     private Long fPlanqty;
 
-    /** 计划尺码 */
+    /**
+     * 计划尺码
+     */
     @Excel(name = "计划尺码")
     private BigDecimal fPlanvolumn;
 
-    /** 包装规格 */
+    /**
+     * 包装规格
+     */
     @Excel(name = "包装规格")
     private Long fPackagespecs;
 
-    /** 计划毛重 */
+    /**
+     * 计划毛重
+     */
     @Excel(name = "计划毛重")
     private BigDecimal fPlangrossweight;
 
-    /** 计划净重 */
+    /**
+     * 计划净重
+     */
     @Excel(name = "计划净重")
     private BigDecimal fPlannetweight;
 
-    /** 件数 */
+    /**
+     * 件数
+     */
     @Excel(name = "件数")
     private Long fQty;
 
-    /** 尺码 */
+    /**
+     * 尺码
+     */
     @Excel(name = "尺码")
     private BigDecimal fVolumn;
 
-    /** 毛重 */
+    /**
+     * 毛重
+     */
     @Excel(name = "毛重")
     private BigDecimal fGrossweight;
 
-    /** 净重 */
+    /**
+     * 净重
+     */
     @Excel(name = "净重")
     private BigDecimal fNetweight;
 
-    /** 箱号 */
+    /**
+     * 箱号
+     */
     @Excel(name = "箱号")
     private String fCntrno;
 
-    /** 车号 */
+    /**
+     * 车号
+     */
     @Excel(name = "车号")
     private String fTruckno;
 
-    /** 状态,N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。 */
+    /**
+     * 状态,N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。
+     */
     @Excel(name = "状态,N 入", readConverterExp = "出=")
     private String fBillstatus;
 
-    /** 删除状态 */
+    /**
+     * 删除状态
+     */
     private String delFlag;
 
-    public void setfId(Long fId)
-    {
+    public void setfId(Long fId) {
         this.fId = fId;
     }
 
-    public Long getfId()
-    {
+    public Long getfId() {
         return fId;
     }
-    public void setfPid(Long fPid)
-    {
+
+    public void setfPid(Long fPid) {
         this.fPid = fPid;
     }
 
-    public Long getfPid()
-    {
+    public Long getfPid() {
         return fPid;
     }
-    public void setfLineno(Long fLineno)
-    {
+
+    public void setfLineno(Long fLineno) {
         this.fLineno = fLineno;
     }
 
-    public Long getfLineno()
-    {
+    public Long getfLineno() {
         return fLineno;
     }
-    public void setfGoodsid(Long fGoodsid)
-    {
+
+    public void setfGoodsid(Long fGoodsid) {
         this.fGoodsid = fGoodsid;
     }
 
-    public Long getfGoodsid()
-    {
+    public Long getfGoodsid() {
         return fGoodsid;
     }
-    public void setfWarehouselocid(Long fWarehouselocid)
-    {
+
+    public void setfWarehouselocid(Long fWarehouselocid) {
         this.fWarehouselocid = fWarehouselocid;
     }
 
-    public Long getfWarehouselocid()
-    {
+    public Long getfWarehouselocid() {
         return fWarehouselocid;
     }
-    public void setfBsdate(Date fBsdate)
-    {
+
+    public void setfBsdate(Date fBsdate) {
         this.fBsdate = fBsdate;
     }
 
-    public Date getfBsdate()
-    {
+    public Date getfBsdate() {
         return fBsdate;
     }
-    public void setfBoxno(String fBoxno)
-    {
+
+    public void setfBoxno(String fBoxno) {
         this.fBoxno = fBoxno;
     }
 
-    public String getfBoxno()
-    {
+    public String getfBoxno() {
         return fBoxno;
     }
-    public void setfCntqty(Long fCntqty)
-    {
+
+    public void setfMblno(String fMblno) {
+        this.fMblno = fMblno;
+    }
+
+    public String getfMblno() {
+        return fMblno;
+    }
+
+    public void setfCntqty(Long fCntqty) {
         this.fCntqty = fCntqty;
     }
 
-    public Long getfCntqty()
-    {
+    public Long getfCntqty() {
         return fCntqty;
     }
-    public void setfGoodsval(BigDecimal fGoodsval)
-    {
+
+    public void setfGoodsval(BigDecimal fGoodsval) {
         this.fGoodsval = fGoodsval;
     }
 
-    public BigDecimal getfGoodsval()
-    {
+    public BigDecimal getfGoodsval() {
         return fGoodsval;
     }
-    public void setfCntrtype(String fCntrtype)
-    {
+
+    public void setfCntrtype(String fCntrtype) {
         this.fCntrtype = fCntrtype;
     }
 
-    public String getfCntrtype()
-    {
+    public String getfCntrtype() {
         return fCntrtype;
     }
-    public void setfPlanqty(Long fPlanqty)
-    {
+
+    public void setfPlanqty(Long fPlanqty) {
         this.fPlanqty = fPlanqty;
     }
 
-    public Long getfPlanqty()
-    {
+    public Long getfPlanqty() {
         return fPlanqty;
     }
-    public void setfPlanvolumn(BigDecimal fPlanvolumn)
-    {
+
+    public void setfPlanvolumn(BigDecimal fPlanvolumn) {
         this.fPlanvolumn = fPlanvolumn;
     }
 
-    public BigDecimal getfPlanvolumn()
-    {
+    public BigDecimal getfPlanvolumn() {
         return fPlanvolumn;
     }
-    public void setfPackagespecs(Long fPackagespecs)
-    {
+
+    public void setfPackagespecs(Long fPackagespecs) {
         this.fPackagespecs = fPackagespecs;
     }
 
-    public Long getfPackagespecs()
-    {
+    public Long getfPackagespecs() {
         return fPackagespecs;
     }
-    public void setfPlangrossweight(BigDecimal fPlangrossweight)
-    {
+
+    public void setfPlangrossweight(BigDecimal fPlangrossweight) {
         this.fPlangrossweight = fPlangrossweight;
     }
 
-    public BigDecimal getfPlangrossweight()
-    {
+    public BigDecimal getfPlangrossweight() {
         return fPlangrossweight;
     }
-    public void setfPlannetweight(BigDecimal fPlannetweight)
-    {
+
+    public void setfPlannetweight(BigDecimal fPlannetweight) {
         this.fPlannetweight = fPlannetweight;
     }
 
-    public BigDecimal getfPlannetweight()
-    {
+    public BigDecimal getfPlannetweight() {
         return fPlannetweight;
     }
-    public void setfQty(Long fQty)
-    {
+
+    public void setfQty(Long fQty) {
         this.fQty = fQty;
     }
 
-    public Long getfQty()
-    {
+    public Long getfQty() {
         return fQty;
     }
-    public void setfVolumn(BigDecimal fVolumn)
-    {
+
+    public void setfVolumn(BigDecimal fVolumn) {
         this.fVolumn = fVolumn;
     }
 
-    public BigDecimal getfVolumn()
-    {
+    public BigDecimal getfVolumn() {
         return fVolumn;
     }
-    public void setfGrossweight(BigDecimal fGrossweight)
-    {
+
+    public void setfGrossweight(BigDecimal fGrossweight) {
         this.fGrossweight = fGrossweight;
     }
 
-    public BigDecimal getfGrossweight()
-    {
+    public BigDecimal getfGrossweight() {
         return fGrossweight;
     }
-    public void setfNetweight(BigDecimal fNetweight)
-    {
+
+    public void setfNetweight(BigDecimal fNetweight) {
         this.fNetweight = fNetweight;
     }
 
-    public BigDecimal getfNetweight()
-    {
+    public BigDecimal getfNetweight() {
         return fNetweight;
     }
-    public void setfCntrno(String fCntrno)
-    {
+
+    public void setfCntrno(String fCntrno) {
         this.fCntrno = fCntrno;
     }
 
-    public String getfCntrno()
-    {
+    public String getfCntrno() {
         return fCntrno;
     }
-    public void setfTruckno(String fTruckno)
-    {
+
+    public void setfTruckno(String fTruckno) {
         this.fTruckno = fTruckno;
     }
 
-    public String getfTruckno()
-    {
+    public String getfTruckno() {
         return fTruckno;
     }
-    public void setfBillstatus(String fBillstatus)
-    {
+
+    public void setfBillstatus(String fBillstatus) {
         this.fBillstatus = fBillstatus;
     }
 
-    public String getfBillstatus()
-    {
+    public String getfBillstatus() {
         return fBillstatus;
     }
-    public void setDelFlag(String delFlag)
-    {
+
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
 
-    public String getDelFlag()
-    {
+    public String getDelFlag() {
         return delFlag;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                 .append("fId", getfId())
                 .append("fPid", getfPid())
                 .append("fLineno", getfLineno())

+ 21 - 7
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -10,10 +10,18 @@ import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.reportManagement.domain.TWhgenleg;
+import com.ruoyi.reportManagement.mapper.TWhgenlegMapper;
 import com.ruoyi.system.mapper.SysDeptMapper;
 import com.ruoyi.system.mapper.SysUserMapper;
-import com.ruoyi.warehouseBusiness.domain.*;
-import com.ruoyi.warehouseBusiness.mapper.*;
+import com.ruoyi.warehouseBusiness.domain.TEnclosure;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
+import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
+import com.ruoyi.warehouseBusiness.mapper.TEnclosureMapper;
+import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
+import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsfeesMapper;
+import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsitemsMapper;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -72,7 +80,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     private BillnoSerialServiceImpl billnoSerialServiceImpl;
 
 
-
     /**
      * 查询详情主表
      *
@@ -141,9 +148,16 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         // 查询仓库费用明细表数据
         TWarehousebillsfees tWarehousebillsfees = new TWarehousebillsfees();
         tWarehousebillsfees.setfPid(fId);
+        List<TWarehousebillsfees> warehousebillsfeesDr = new ArrayList<>();
+        List<TWarehousebillsfees> warehousebillsfeesCr = new ArrayList<>();
         List<TWarehousebillsfees> warehousebillsfees = tWarehousebillsfeesMapper.selectTWarehousebillsfeesList(tWarehousebillsfees);
         if (StringUtils.isNotEmpty(warehousebillsfees)) {
             for (TWarehousebillsfees fees : warehousebillsfees) {
+                if ("C".equals(fees.getfDc())) {
+                    warehousebillsfeesCr.add(fees);
+                } else {
+                    warehousebillsfeesDr.add(fees);
+                }
                 TCorps corps = tCorpsMapper.selectTCorpsById(fees.getfCorpid());
                 if (StringUtils.isNotNull(corps)) {
                     corpsList.add(corps);
@@ -153,7 +167,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     feesList.add(tFees);
                 }
             }
-            map.put("warehousebillsfees", warehousebillsfees);
         }
         // 查询附件表数据
         TEnclosure enclosure = new TEnclosure();
@@ -168,6 +181,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         map.put("sysUser", sysUserList);
         map.put("warehouse", warehouseList);
         map.put("warehouseAreas", warehouseAreaList);
+        map.put("warehousebillsfeesDr", warehousebillsfeesDr);
+        map.put("warehousebillsfeesCr", warehousebillsfeesCr);
         map.put("dept", sysDeptMapper.selectDeptById(tWarehousebills.getfDeptid()));
         return map;
     }
@@ -259,7 +274,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     @Transactional
     public int updateTWhgenlegData(TWarehousebillsitems warehousebillsitems, long whgenlegId, String billtype) {
         Map<String, Object> map = new HashMap<>();
-        System.out.println(warehousebillsitems.toString());
         map.put("whgenlegId", whgenlegId);
         map.put("billType", billtype);
         map.put("warehousebillsitems", warehousebillsitems);
@@ -359,13 +373,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             List<TWarehousebillsfees> warehousebillsfeesCrList = JSONObject.parseArray(jsonCrArray.toJSONString(), TWarehousebillsfees.class);
             for (TWarehousebillsfees wbCr : warehousebillsfeesCrList) {
                 // 检验  数量*单价=金额
-                if (wbCr.getfQty() != null && !wbCr.getfQty().equals("")
+                /*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());

+ 53 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWhgenlegMapper.xml → ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.warehouseBusiness.mapper.TWhgenlegMapper">
+<mapper namespace="com.ruoyi.reportManagement.mapper.TWhgenlegMapper">
 
     <resultMap type="TWhgenleg" id="TWhgenlegResult">
         <result property="fAccyear" column="f_accyear"/>
@@ -48,6 +48,8 @@
         <where>
             <if test="fOriginalbillno != null  and fOriginalbillno != ''">and f_originalbillno = #{fOriginalbillno}</if>
             <if test="fPreqty != null ">and f_preqty = #{fPreqty}</if>
+            <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
+            <if test="fMblno != null ">and f_mblno = #{fMblno}</if>
             <if test="fPregrossweight != null ">and f_pregrossweight = #{fPregrossweight}</if>
             <if test="fPrenetweight != null ">and f_prenetweight = #{fPrenetweight}</if>
             <if test="fQtyd != null ">and f_qtyD = #{fQtyd}</if>
@@ -67,6 +69,56 @@
         </where>
     </select>
 
+    <select id="selectInventoryList" parameterType="TWhgenleg" resultType="Map">
+        SELECT
+            leg.f_id AS fId,
+            corp.f_name AS fCorpid,
+            ware.f_name AS fWarehouseLocationid,
+            goods.f_name AS fGoodsid,
+            leg.f_volumnD AS fVolumnD,
+            leg.f_qtyD AS fQtyD,
+            leg.f_mblno AS fMblno,
+            leg.f_grossweightD AS fGrossweightD,
+            leg.f_netweightD AS fNetweightD,
+            leg.f_volumnC AS fVolumnC,
+            leg.f_qtyC AS fQtyC,
+            leg.f_grossweightC AS fGrossweightC,
+            leg.f_netweightC AS fNetweightC,
+            leg.f_qtyblc AS fQtyblc,
+            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,
+            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_goods goods ON goods.f_id = leg.f_goodsid
+        <where>
+            <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="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="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="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>
+            <if test="fNetweightc != null ">and leg.f_netweightC = #{fNetweightc}</if>
+            <if test="fGrossweightblc != null ">and leg.f_grossweightblc = #{fGrossweightblc}</if>
+            <if test="fNetweightblc != null ">and leg.f_netweightblc = #{fNetweightblc}</if>
+            <if test="fCntrno != null  and fCntrno != ''">and leg.f_cntrno = #{fCntrno}</if>
+            <if test="fStatus != null  and fStatus != ''">and leg.f_status = #{fStatus}</if>
+        </where>
+    </select>
+
     <select id="selectTWhgenleg" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
         <include refid="selectTWhgenlegVo"/>
         <where>

+ 5 - 4
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -319,14 +319,15 @@
         delete
             item.*,
             bill.*,
+            fess.*,
             enclosure.*
         from
             t_warehousebills bill
-            LEFT t_warehousebillsfees fess ON fess.f_pid = bill.f_id
-            LEFT t_enclosure enclosure ON enclosure.f_pid = bill.f_id
-            LEFT t_warehousebillsitems item ON item.f_pid = bill.f_id
+            LEFT JOIN t_warehousebillsfees fess ON fess.f_pid = bill.f_id
+            LEFT JOIN t_enclosure enclosure ON enclosure.f_pid = bill.f_id
+            LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
         where
-             item.f_id in
+            bill.f_id in
             <foreach item="fId" collection="array" open="(" separator="," close=")">
                 #{fId}
             </foreach>

+ 6 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -16,6 +16,7 @@
         <result property="fGoodsval" column="f_goodsval"/>
         <result property="fCntrtype" column="f_cntrtype"/>
         <result property="fPlanqty" column="f_planqty"/>
+        <result property="fMblno" column="f_mblno"/>
         <result property="fPlanvolumn" column="f_planvolumn"/>
         <result property="fPackagespecs" column="f_packagespecs"/>
         <result property="fPlangrossweight" column="f_plangrossweight"/>
@@ -36,7 +37,7 @@
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
-        select f_id, f_pid, f_lineno, f_goodsid, f_warehouselocid, 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_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"
@@ -53,6 +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="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>
@@ -86,6 +88,7 @@
             <if test="fGoodsval != null">f_goodsval,</if>
             <if test="fCntrtype != null">f_cntrtype,</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>
@@ -115,6 +118,7 @@
             <if test="fGoodsval != null">#{fGoodsval},</if>
             <if test="fCntrtype != null">#{fCntrtype},</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>
@@ -148,6 +152,7 @@
             <if test="fGoodsval != null">f_goodsval = #{fGoodsval},</if>
             <if test="fCntrtype != null">f_cntrtype = #{fCntrtype},</if>
             <if test="fPlanqty != null">f_planqty = #{fPlanqty},</if>
+            <if test="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>