Przeglądaj źródła

修改 入库接口,添加出库controller文件

阿伏兔 4 lat temu
rodzic
commit
7ccfa1cb3c
15 zmienionych plików z 497 dodań i 208 usunięć
  1. 17 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  2. 128 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInStockController.java
  3. 30 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseOutStockController.java
  4. 3 3
      ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
  5. 2 2
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java
  6. 148 128
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java
  7. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TEnclosureMapper.java
  8. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsfeesMapper.java
  9. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsitemsMapper.java
  10. 6 1
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java
  11. 128 53
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java
  12. 4 0
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TEnclosureMapper.xml
  13. 5 1
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml
  14. 4 0
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml
  15. 16 1
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

+ 17 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -15,6 +15,7 @@ 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.system.service.ISysDeptService;
 import com.ruoyi.system.service.ISysPostService;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
@@ -24,7 +25,9 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -47,9 +50,20 @@ public class SysUserController extends BaseController {
     @Autowired
     private TokenService tokenService;
 
-    @PostMapping("/getUser")
-    public SysUser list() {
-        return SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()).getUser();
+    @Autowired
+    private ISysDeptService deptService;
+
+    /**
+     * 查询 当前登录用户
+     * @return
+     */
+    @PostMapping("/queryUserVal")
+    public Map<String, Object> queryUserVal() {
+        Map<String, Object> map = new HashMap<>();
+        SysUser user = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()).getUser();
+        map.put("user", user);
+        map.put("dept", deptService.selectDeptById(user.getDeptId()));
+        return map;
     }
 
     /**

+ 128 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInStockController.java

@@ -0,0 +1,128 @@
+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;
+
+/**
+ * 仓库详情主表Controller
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+@RestController
+@RequestMapping("/warehouseBusiness/inStock")
+public class TWarehouseInStockController extends BaseController {
+    @Autowired
+    private ITWarehouseBillsService itWarehouseBillsService;
+
+    /**
+     * 查询入库详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseBills tWarehouseBills) {
+        startPage();
+        tWarehouseBills.setFBilltype("SJRK");
+        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 查询出库详情主表列表
+     */
+    @GetMapping("/getWarehouseInStock")
+    public String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills) {
+        return itWarehouseBillsService.getWarehouseInStockBillsNo(tWarehouseBills);
+    }
+
+
+    /**
+     * 导出入库详情主表列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock: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:inStock:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(itWarehouseBillsService.selectTWarehousebillsById(fId));
+    }
+
+    /**
+     * 新增入库详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock: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) {
+        System.out.println("主表:" + tWarehouseBills);
+        System.out.println("附件:" + tWhgenleg);
+        System.out.println("付款:" + tWarehousebillsfeesCr);
+        System.out.println("收款:" + tWarehousebillsfeesDr);
+        System.out.println("明细:" + tWarehousebillsitems);
+        String billsType = "SJRK";
+        if (StringUtils.isEmpty(tWarehouseBills)) {
+            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:inStock:edit')")
+    @Log(title = "详情主表", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TWarehouseBills tWarehouseBills) {
+        return toAjax(itWarehouseBillsService.updateTWarehousebills(tWarehouseBills));
+    }
+
+    /**
+     * 删除入库详情主表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:inStock:remove')")
+    @Log(title = "详情主表", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(itWarehouseBillsService.deleteTWarehousebillsByIds(fIds));
+    }
+}

+ 30 - 16
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseBillsController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseOutStockController.java

@@ -26,26 +26,39 @@ import java.util.List;
  * @date 2020-12-11
  */
 @RestController
-@RequestMapping("/warehouseBusiness/warehousebills")
-public class TWarehouseBillsController extends BaseController {
+@RequestMapping("/warehouseBusiness/outStock")
+public class TWarehouseOutStockController extends BaseController {
     @Autowired
     private ITWarehouseBillsService itWarehouseBillsService;
 
     /**
-     * 查询详情主表列表
+     * 查询出库详情主表列表
      */
-    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebills:list')")
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:list')")
     @GetMapping("/list")
     public TableDataInfo list(TWarehouseBills tWarehouseBills) {
         startPage();
+        tWarehouseBills.setFBilltype("SJCK");
         List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
         return getDataTable(list);
     }
 
+
+
+    /**
+     * 查询出库详情主表列表
+     */
+    @GetMapping("/getWarehouseOutStock")
+    public String getWarehouseOutStockBillsNo(TWarehouseBills tWarehouseBills) {
+        return itWarehouseBillsService.getWarehouseOutStockBillsNo(tWarehouseBills);
+    }
+
+
+
     /**
-     * 导出详情主表列表
+     * 导出出库详情主表列表
      */
-    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebills:export')")
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:export')")
     @Log(title = "详情主表", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TWarehouseBills tWarehouseBills) {
@@ -55,25 +68,26 @@ public class TWarehouseBillsController extends BaseController {
     }
 
     /**
-     * 获取仓库详细信息
+     * 获取出库仓库详细信息
      */
-    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebills:query')")
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:query')")
     @GetMapping(value = "/{fId}")
     public AjaxResult getInfo(@PathVariable("fId") Long fId) {
         return AjaxResult.success(itWarehouseBillsService.selectTWarehousebillsById(fId));
     }
 
     /**
-     * 新增详情主表
+     * 新增出库详情主表
      */
-    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebills:add')")
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
     @Log(title = "详情主表", businessType = BusinessType.INSERT)
-    @PostMapping
+    @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 = "SJCK";
         if (StringUtils.isEmpty(tWarehouseBills)) {
             return AjaxResult.error("提交失败:请检查主表数据");
         }
@@ -86,13 +100,13 @@ public class TWarehouseBillsController extends BaseController {
         // 获取当前的用户
         LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
         return itWarehouseBillsService.insertTWarehousebills(tWarehouseBills, tWarehousebillsfeesCr,
-                tWarehousebillsfeesDr, tWarehousebillsitems, tWhgenleg, loginUser);
+                tWarehousebillsfeesDr, tWarehousebillsitems, tWhgenleg, loginUser, billsType);
     }
 
     /**
-     * 修改详情主表
+     * 修改出库详情主表
      */
-    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebills:edit')")
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:edit')")
     @Log(title = "详情主表", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TWarehouseBills tWarehouseBills) {
@@ -100,9 +114,9 @@ public class TWarehouseBillsController extends BaseController {
     }
 
     /**
-     * 删除详情主表
+     * 删除出库详情主表
      */
-    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehousebills:remove')")
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:remove')")
     @Log(title = "详情主表", businessType = BusinessType.DELETE)
     @DeleteMapping("/{fIds}")
     public AjaxResult remove(@PathVariable Long[] fIds) {

+ 3 - 3
ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -45,17 +45,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectDictDataVo"/>
 		where status = '0' and dict_type = #{dictType} order by dict_sort asc
 	</select>
-	
+
 	<select id="selectDictLabel" resultType="String">
 		select dict_label from sys_dict_data
 		where dict_type = #{dictType} and dict_value = #{dictValue}
 	</select>
-	
+
 	<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
 		<include refid="selectDictDataVo"/>
 		where dict_code = #{dictCode}
 	</select>
-	
+
 	<select id="countDictDataByType" resultType="Integer">
 	    select count(1) from sys_dict_data where dict_type=#{dictType}  
 	</select>

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

@@ -159,7 +159,7 @@ public class TWarehouseBills extends BaseEntity {
     private BigDecimal fNetweight;
 
     /**
-     * 贸易方式(数据字典),对应t_sbu
+     * 经营单位(数据字典),对应t_sbu
      */
     @Excel(name = "经营单位(客户表)")
     private Long fSbu;
@@ -229,7 +229,7 @@ public class TWarehouseBills extends BaseEntity {
      * 银行名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
      */
     @Excel(name = "银行名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name")
-    private Long fBankcorpid;
+    private String fBankcorpid;
 
     /**
      * 单据类型(数据字典)SJRK(入库) SJCK(实际出库) CKDB(调拨) HQZY(货权转移)

+ 148 - 128
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -1,9 +1,7 @@
 package com.ruoyi.warehouseBusiness.domain;
 
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
-import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -14,304 +12,326 @@ import java.util.Date;
  * 仓库明细从表对象 t_warehousebillsitems
  *
  * @author ruoyi
- * @date 2020-12-11
+ * @date 2020-12-16
  */
-@Data
-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 fBoxno;
+
+    /** 箱量 */
     @Excel(name = "箱量")
     private Long fCntqty;
 
-    /**
-     * 箱型,20GP 4OGP
-     */
+    /** 货值 */
+    @Excel(name = "货值")
+    private BigDecimal fGoodsval;
+
+    /** 箱型,20GP 4OGP */
     @Excel(name = "箱型,20GP 4OGP")
     private String fCntrtype;
 
-    /**
-     * 计划尺码
-     */
+    /** 计划件数 */
+    @Excel(name = "计划件数")
+    private Long fPlanqty;
+
+    /** 计划尺码 */
     @Excel(name = "计划尺码")
     private BigDecimal fPlanvolumn;
 
-    /**
-     * 计划件数
-     */
-    @Excel(name = "计划件数")
-    private Long fPlanqty;
+    /** 包装规格 */
+    @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;
 
-    /**
-     * 删除状态
-     */
-    @TableLogic
+    /** 删除状态 */
     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)
+    {
+        this.fBoxno = fBoxno;
+    }
 
-    public void setfCntqty(Long fCntqty) {
+    public String getfBoxno()
+    {
+        return fBoxno;
+    }
+    public void setfCntqty(Long fCntqty)
+    {
         this.fCntqty = fCntqty;
     }
 
-    public Long getfCntqty() {
+    public Long getfCntqty()
+    {
         return fCntqty;
     }
+    public void setfGoodsval(BigDecimal fGoodsval)
+    {
+        this.fGoodsval = fGoodsval;
+    }
 
-    public void setfCntrtype(String fCntrtype) {
+    public BigDecimal getfGoodsval()
+    {
+        return fGoodsval;
+    }
+    public void setfCntrtype(String fCntrtype)
+    {
         this.fCntrtype = fCntrtype;
     }
 
-    public String getfCntrtype() {
+    public String getfCntrtype()
+    {
         return fCntrtype;
     }
+    public void setfPlanqty(Long fPlanqty)
+    {
+        this.fPlanqty = fPlanqty;
+    }
 
-    public void setfPlanvolumn(BigDecimal fPlanvolumn) {
+    public Long getfPlanqty()
+    {
+        return fPlanqty;
+    }
+    public void setfPlanvolumn(BigDecimal fPlanvolumn)
+    {
         this.fPlanvolumn = fPlanvolumn;
     }
 
-    public BigDecimal getfPlanvolumn() {
+    public BigDecimal getfPlanvolumn()
+    {
         return fPlanvolumn;
     }
-
-    public void setfPlanqty(Long fPlanqty) {
-        this.fPlanqty = fPlanqty;
+    public void setfPackagespecs(Long fPackagespecs)
+    {
+        this.fPackagespecs = fPackagespecs;
     }
 
-    public Long getfPlanqty() {
-        return fPlanqty;
+    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())
                 .append("fGoodsid", getfGoodsid())
                 .append("fWarehouselocid", getfWarehouselocid())
                 .append("fBsdate", getfBsdate())
+                .append("fBoxno", getfBoxno())
                 .append("fCntqty", getfCntqty())
+                .append("fGoodsval", getfGoodsval())
                 .append("fCntrtype", getfCntrtype())
-                .append("fPlanvolumn", getfPlanvolumn())
                 .append("fPlanqty", getfPlanqty())
+                .append("fPlanvolumn", getfPlanvolumn())
+                .append("fPackagespecs", getfPackagespecs())
                 .append("fPlangrossweight", getfPlangrossweight())
                 .append("fPlannetweight", getfPlannetweight())
                 .append("fQty", getfQty())

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TEnclosureMapper.java

@@ -60,4 +60,6 @@ public interface TEnclosureMapper extends BaseMapper<TEnclosure> {
      * @return 结果
      */
     public int deleteTEnclosureByIds(Long[] fIds);
+
+    int deleteByFPid(Long fId);
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsfeesMapper.java

@@ -60,4 +60,6 @@ public interface TWarehousebillsfeesMapper extends BaseMapper<TWarehousebillsfee
      * @return 结果
      */
     public int deleteTWarehousebillsfeesByIds(Long[] fIds);
+
+    int deleteByFPid(Long fId);
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsitemsMapper.java

@@ -60,4 +60,6 @@ public interface TWarehousebillsitemsMapper extends BaseMapper<TWarehousebillsit
      * @return 结果
      */
     public int deleteTWarehousebillsitemsByIds(Long[] fIds);
+
+    int deleteByFPid(Long fId);
 }

+ 6 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -38,10 +38,11 @@ public interface ITWarehouseBillsService {
      * @param tWarehousebillsfeesDr  仓库费用收款明细表
      * @param tWarehousebillsitems 仓库货物明细表
      * @param loginUser            当前登陆人
+     * @param billsType             操作状态
      * @return 结果
      */
     public AjaxResult insertTWarehousebills(String tWarehouseBills, String tWarehousebillsfeesCr, String tWarehousebillsfeesDr,
-                                              String tWarehousebillsitems, String tWhgenleg, LoginUser loginUser);
+                                            String tWarehousebillsitems, String tWhgenleg, LoginUser loginUser, String billsType);
 
     /**
      * 修改详情主表
@@ -66,4 +67,8 @@ public interface ITWarehouseBillsService {
      * @return 结果
      */
     public int deleteTWarehousebillsById(Long fId);
+
+    String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills);
+
+    String getWarehouseOutStockBillsNo(TWarehouseBills tWarehouseBills);
 }

+ 128 - 53
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -3,11 +3,16 @@ package com.ruoyi.warehouseBusiness.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.ruoyi.basicData.domain.TGoods;
+import com.ruoyi.basicData.mapper.TCorpsMapper;
+import com.ruoyi.basicData.mapper.TGoodsMapper;
+import com.ruoyi.basicData.mapper.TWarehouseMapper;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.mapper.SysDeptMapper;
+import com.ruoyi.system.mapper.SysUserMapper;
 import com.ruoyi.warehouseBusiness.domain.TEnclosure;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
@@ -21,10 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 详情主表Service业务层处理
@@ -34,6 +36,23 @@ import java.util.Map;
  */
 @Service
 public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
+
+
+    @Autowired
+    private TGoodsMapper tGoodsMapper;
+
+    @Autowired
+    private SysDeptMapper sysDeptMapper;
+
+    @Autowired
+    private SysUserMapper sysUserMapper;
+
+    @Autowired
+    private TCorpsMapper tCorpsMapper;
+
+    @Autowired
+    private TWarehouseMapper tWarehouseMapper;
+
     @Autowired
     private TEnclosureMapper tEnclosureMapper;
 
@@ -58,22 +77,54 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         Map<String, Object> map = new HashMap<>();
         // 查询仓库主表数据
         TWarehouseBills tWarehousebills = tWarehouseBillsMapper.selectTWarehousebillsById(fId);
-        if (StringUtils.isNull(tWarehousebills)) {
+        if (!StringUtils.isNull(tWarehousebills)) {
+            // 查询货权方 以及 经营单位
+            map.put("warehouse", tWarehouseMapper.selectTWarehouseById(tWarehousebills.getFWarehouseid()));
+            // 查询联系人
+            map.put("sysUser", sysUserMapper.selectUserByUserName(tWarehousebills.getFContacts()));
+            // 查询货权方
+            map.put("fCorps", tCorpsMapper.selectTCorpsById(tWarehousebills.getFCorpid()));
+            // 查询 经营单位
+            map.put("fSbu", tCorpsMapper.selectTCorpsById(tWarehousebills.getFSbu()));
+            // 查询所属部门
+            map.put("dept", sysDeptMapper.selectDeptById(tWarehousebills.getFDeptid()));
             map.put("warehousebills", tWarehousebills);
         }
         // 查询仓库明细从表数据
-        List<TWarehousebillsitems> warehousebillsitems = tWarehousebillsitemsMapper.selectList(new EntityWrapper<TWarehousebillsitems>().eq("f_pid", fId));
-        if (StringUtils.isEmpty(warehousebillsitems)) {
+        TWarehousebillsitems tWarehousebillsitems = new TWarehousebillsitems();
+        tWarehousebillsitems.setfPid(fId);
+
+
+
+
+
+        List<TWarehousebillsitems> warehousebillsitems = tWarehousebillsitemsMapper.selectTWarehousebillsitemsList(tWarehousebillsitems);
+//        List<TWarehousebillsitems> warehousebillsitems = tWarehousebillsitemsMapper.selectList(new EntityWrapper<TWarehousebillsitems>().eq("f_pid", ));
+        if (!StringUtils.isEmpty(warehousebillsitems)) {
+            List<TGoods> goodsList = new ArrayList<>();
+            for (TWarehousebillsitems wb : warehousebillsitems) {
+                TGoods tGoods = tGoodsMapper.selectTGoodsById(wb.getfGoodsid());
+                if (!StringUtils.isNull(tGoods)) {
+                    goodsList.add(tGoods);
+                }
+            }
+            map.put("goodsList", goodsList);
             map.put("warehouseBillsItem", warehousebillsitems);
         }
         // 查询仓库费用明细表数据
-        List<TWarehousebillsfees> warehousebillsfees = tWarehousebillsfeesMapper.selectList(new EntityWrapper<TWarehousebillsfees>().eq("f_pid", fId));
-        if (StringUtils.isEmpty(warehousebillsfees)) {
+        TWarehousebillsfees tWarehousebillsfees = new TWarehousebillsfees();
+        tWarehousebillsfees.setfPid(fId);
+        List<TWarehousebillsfees> warehousebillsfees = tWarehousebillsfeesMapper.selectTWarehousebillsfeesList(tWarehousebillsfees);
+//        List<TWarehousebillsfees> warehousebillsfees = tWarehousebillsfeesMapper.selectList(new EntityWrapper<TWarehousebillsfees>().eq("f_pid", fId));
+        if (!StringUtils.isEmpty(warehousebillsfees)) {
             map.put("warehousebillsfees", warehousebillsfees);
         }
         // 查询附件表数据
-        List<TEnclosure> enclosures = tEnclosureMapper.selectList(new EntityWrapper<TEnclosure>().eq("f_pid", fId));
-        if (StringUtils.isEmpty(enclosures)) {
+        TEnclosure enclosure = new TEnclosure();
+        enclosure.setfPid(fId);
+        List<TEnclosure> enclosures = tEnclosureMapper.selectTEnclosureList(enclosure);
+//        List<TEnclosure> enclosures = tEnclosureMapper.selectList(new EntityWrapper<TEnclosure>().eq("f_pid", fId));
+        if (!StringUtils.isEmpty(enclosures)) {
             map.put("enclosures", enclosures);
         }
         return map;
@@ -99,61 +150,74 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      *                               款用明细表
      * @param tWarehousebillsitems 仓库货物明细表
      * @param loginUser            当前登陆人
+     * @param billsType             判断标识
      * @return 结果
      */
     @Override
     @Transactional
     public AjaxResult insertTWarehousebills(String tWarehouseBills, String tWarehousebillsfeesCr, String tWarehousebillsfeesDr
-            , String tWarehousebillsitems, String tWhgenleg, LoginUser loginUser) {
+            , String tWarehousebillsitems, String tWhgenleg, LoginUser loginUser, String billsType) {
         TWarehouseBills warehouseBills = JSONArray.parseObject(tWarehouseBills, TWarehouseBills.class);
-        JSONArray whgenlegJSON = JSONArray.parseArray(tWhgenleg);
-        List<TEnclosure> enclosures = JSONObject.parseArray(whgenlegJSON.toJSONString(), TEnclosure.class);
-        JSONArray jsonCrArray = JSONArray.parseArray(tWarehousebillsfeesCr);
-        List<TWarehousebillsfees> warehousebillsfeesCrList = JSONObject.parseArray(jsonCrArray.toJSONString(), TWarehousebillsfees.class);
-        JSONArray jsonDrArray = JSONArray.parseArray(tWarehousebillsfeesCr);
-        List<TWarehousebillsfees> warehousebillsfeesDrList = JSONObject.parseArray(jsonDrArray.toJSONString(), TWarehousebillsfees.class);
-        JSONArray warehouseJSON = JSONArray.parseArray(tWarehousebillsitems);
-        List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
         if (StringUtils.isNull(warehouseBills.getFId())) {
             warehouseBills.setCreateBy(loginUser.getUser().getUserName());
-            warehouseBills.setCreateTime(new Date());
-            tWarehouseBillsMapper.updateById(warehouseBills);
-            tWarehousebillsitemsMapper.delete(new EntityWrapper<TWarehousebillsitems>().eq("f_pid", warehouseBills.getFId()));
-            tWarehousebillsfeesMapper.delete(new EntityWrapper<TWarehousebillsfees>().eq("f_pid", warehouseBills.getFId()));
-            tEnclosureMapper.delete(new EntityWrapper<TEnclosure>().eq("f_pid", warehouseBills.getFId()));
+            warehouseBills.setFBilltype(billsType);
+            warehouseBills.setFBsdeptid(loginUser.getUser().getDeptId());
+            warehouseBills.setFBillstatus("T");
+            tWarehouseBillsMapper.insertTWarehousebills(warehouseBills);
         } else {
             warehouseBills.setUpdateBy(loginUser.getUser().getUserName());
             warehouseBills.setUpdateTime(new Date());
-            warehouseBills.setFBilltype("SJRK");
-            warehouseBills.setFBillstatus("SJRK");
-            tWarehouseBillsMapper.insertTWarehousebills(warehouseBills);
+            tWarehouseBillsMapper.updateTWarehousebills(warehouseBills);
+            tWarehousebillsitemsMapper.deleteByFPid(warehouseBills.getFId());
+            tWarehousebillsfeesMapper.deleteByFPid( warehouseBills.getFId());
+            tEnclosureMapper.deleteByFPid(warehouseBills.getFId());
         }
-        for (TWarehousebillsfees wbCr : warehousebillsfeesCrList) {
-            wbCr.setfPid(warehouseBills.getFId());
-            wbCr.setfDc("C");
-            wbCr.setCreateBy(loginUser.getUser().getUserName());
-            wbCr.setCreateTime(new Date());
-            tWarehousebillsfeesMapper.insertTWarehousebillsfees(wbCr);
-        }
-        for (TWarehousebillsfees wbDr : warehousebillsfeesDrList) {
-            wbDr.setfPid(warehouseBills.getFId());
-            wbDr.setfDc("D");
-            wbDr.setCreateBy(loginUser.getUser().getUserName());
-            wbDr.setCreateTime(new Date());
-            tWarehousebillsfeesMapper.insertTWarehousebillsfees(wbDr);
-        }
-        for (TWarehousebillsitems wbItem : warehousebillsitemsList) {
-            wbItem.setfPid(warehouseBills.getFId());
-            wbItem.setCreateBy(loginUser.getUser().getUserName());
-            wbItem.setCreateTime(new Date());
-            tWarehousebillsitemsMapper.insertTWarehousebillsitems(wbItem);
+
+
+        /*if (tWhgenleg != null) {
+            JSONArray whgenlegJSON = JSONArray.parseArray(tWhgenleg);
+            List<TEnclosure> enclosures = JSONObject.parseArray(whgenlegJSON.toJSONString(), TEnclosure.class);
+            for (TEnclosure enclosure : enclosures) {
+                enclosure.setfPid(warehouseBills.getFId());
+                enclosure.setCreateBy(loginUser.getUser().getUserName());
+                enclosure.setCreateTime(new Date());
+                tEnclosureMapper.insertTEnclosure(enclosure);
+            }
+        }*/
+        /*if (tWarehousebillsfeesCr != null) {
+            JSONArray jsonCrArray = JSONArray.parseArray(tWarehousebillsfeesCr);
+            List<TWarehousebillsfees> warehousebillsfeesCrList = JSONObject.parseArray(jsonCrArray.toJSONString(), TWarehousebillsfees.class);
+            for (TWarehousebillsfees wbCr : warehousebillsfeesCrList) {
+                wbCr.setfPid(warehouseBills.getFId());
+                wbCr.setfDc("C");
+                wbCr.setCreateBy(loginUser.getUser().getUserName());
+                wbCr.setCreateTime(new Date());
+                tWarehousebillsfeesMapper.insertTWarehousebillsfees(wbCr);
+            }
         }
-        for (TEnclosure enclosure : enclosures) {
-            enclosure.setfPid(warehouseBills.getFId());
-            enclosure.setCreateBy(loginUser.getUser().getUserName());
-            enclosure.setCreateTime(new Date());
-            tEnclosureMapper.insertTEnclosure(enclosure);
+        if (tWarehousebillsfeesDr != null) {
+            JSONArray jsonDrArray = JSONArray.parseArray(tWarehousebillsfeesDr);
+            List<TWarehousebillsfees> warehousebillsfeesDrList = JSONObject.parseArray(jsonDrArray.toJSONString(), TWarehousebillsfees.class);
+            for (TWarehousebillsfees wbDr : warehousebillsfeesDrList) {
+                wbDr.setfPid(warehouseBills.getFId());
+                wbDr.setfDc("D");
+                wbDr.setCreateBy(loginUser.getUser().getUserName());
+                wbDr.setCreateTime(new Date());
+                tWarehousebillsfeesMapper.insertTWarehousebillsfees(wbDr);
+            }
+        }*/
+
+        if (tWarehousebillsitems != null) {
+            JSONArray warehouseJSON = JSONArray.parseArray(tWarehousebillsitems);
+            List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
+            for (TWarehousebillsitems wbItem : warehousebillsitemsList) {
+                wbItem.setfPid(warehouseBills.getFId());
+                wbItem.setCreateBy(loginUser.getUser().getUserName());
+                wbItem.setCreateTime(new Date());
+                tWarehousebillsitemsMapper.insertTWarehousebillsitems(wbItem);
+            }
         }
+
         // 后续 添加优化 计算数据是否正确
         /*for (TWarehousebillsfees wFees : warehousebillsfeesCrList) {
             if (Objects.equals(0, wFees.getfFeeunitid())) {
@@ -197,4 +261,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     public int deleteTWarehousebillsById(Long fId) {
         return tWarehouseBillsMapper.deleteTWarehousebillsById(fId);
     }
+
+    @Override
+    public String getWarehouseInStockBillsNo(TWarehouseBills tWarehouseBills) {
+
+        return null;
+    }
+
+    @Override
+    public String getWarehouseOutStockBillsNo(TWarehouseBills tWarehouseBills) {
+        return null;
+    }
 }

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TEnclosureMapper.xml

@@ -96,6 +96,10 @@
         delete from t_enclosure where f_id = #{fId}
     </delete>
 
+    <delete id="deleteByFPid" parameterType="Long">
+        delete from t_enclosure where f_pid = #{fId}
+    </delete>
+
     <delete id="deleteTEnclosureByIds" parameterType="String">
         delete from t_enclosure where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">

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

@@ -19,6 +19,7 @@
         <result property="fBscorpno" column="f_bscorpno"/>
         <result property="fWarehouseid" column="f_warehouseid"/>
         <result property="fStorekeeper" column="f_storekeeper"/>
+        <result property="fBillingway" column="f_billingway"/>
         <result property="fBsdate" column="f_bsdate"/>
         <result property="fPlanqty" column="f_planqty"/>
         <result property="fPlangrossweight" column="f_plangrossweight"/>
@@ -50,7 +51,7 @@
     </resultMap>
 
     <sql id="selectTWarehousebillsVo">
-        select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, 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_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_tel, f_corpid, f_tocorpid, f_stltypeid, f_bscorpno, f_warehouseid, f_storekeeper, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_billingway, f_qty, f_grossweight, f_netweight, f_volumn, f_trademodeid, 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">
@@ -130,6 +131,7 @@
             <if test="fSbu != null">f_sbu,</if>
             <if test="fFeetunit != null">f_feetunit,</if>
             <if test="fMblno != null">f_mblno,</if>
+            <if test="fBillingway != null">f_billingway,</if>
             <if test="fVslvoy != null">f_vslvoy,</if>
             <if test="fEta != null">f_eta,</if>
             <if test="fCustomno != null">f_customno,</if>
@@ -173,6 +175,7 @@
             <if test="fSbu != null">#{fSbu},</if>
             <if test="fFeetunit != null">#{fFeetunit},</if>
             <if test="fMblno != null">#{fMblno},</if>
+            <if test="fBillingway != null">#{fBillingway},</if>
             <if test="fVslvoy != null">#{fVslvoy},</if>
             <if test="fEta != null">#{fEta},</if>
             <if test="fCustomno != null">#{fCustomno},</if>
@@ -217,6 +220,7 @@
             <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="fSbu != null">f_sbu = #{fSbu},</if>
             <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -163,6 +163,10 @@
         delete from t_warehousebillsfees where f_id = #{fId}
     </delete>
 
+    <delete id="deleteByFPid" parameterType="Long">
+        delete from t_warehousebillsfees where f_pid = #{fId}
+    </delete>
+
     <delete id="deleteTWarehousebillsfeesByIds" parameterType="String">
         delete from t_warehousebillsfees where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">

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

@@ -11,10 +11,13 @@
         <result property="fGoodsid" column="f_goodsid"/>
         <result property="fWarehouselocid" column="f_warehouselocid"/>
         <result property="fBsdate" column="f_bsdate"/>
+        <result property="fBoxno" column="f_boxno"/>
         <result property="fCntqty" column="f_cntqty"/>
+        <result property="fGoodsval" column="f_goodsval"/>
         <result property="fCntrtype" column="f_cntrtype"/>
         <result property="fPlanqty" column="f_planqty"/>
         <result property="fPlanvolumn" column="f_planvolumn"/>
+        <result property="fPackagespecs" column="f_packagespecs"/>
         <result property="fPlangrossweight" column="f_plangrossweight"/>
         <result property="fPlannetweight" column="f_plannetweight"/>
         <result property="fQty" column="f_qty"/>
@@ -33,7 +36,7 @@
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
-        select f_id, f_pid, f_lineno, f_goodsid, f_warehouselocid, f_bsdate, f_cntqty, f_cntrtype, f_planqty, f_planvolumn, 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_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"
@@ -45,10 +48,13 @@
             <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>
             <if test="fWarehouselocid != null ">and f_warehouselocid = #{fWarehouselocid}</if>
             <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="fGoodsval != null ">and f_goodsval = #{fGoodsval}</if>
             <if test="fCntrtype != null  and fCntrtype != ''">and f_cntrtype = #{fCntrtype}</if>
             <if test="fPlanqty != null ">and f_planqty = #{fPlanqty}</if>
             <if test="fPlanvolumn != null ">and f_planvolumn = #{fPlanvolumn}</if>
+            <if test="fPackagespecs != null ">and f_packagespecs = #{fPackagespecs}</if>
             <if test="fPlangrossweight != null ">and f_plangrossweight = #{fPlangrossweight}</if>
             <if test="fPlannetweight != null ">and f_plannetweight = #{fPlannetweight}</if>
             <if test="fQty != null ">and f_qty = #{fQty}</if>
@@ -75,10 +81,13 @@
             <if test="fGoodsid != null">f_goodsid,</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="fCntrtype != null">f_cntrtype,</if>
             <if test="fPlanqty != null">f_planqty,</if>
             <if test="fPlanvolumn != null">f_planvolumn,</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>
@@ -101,10 +110,13 @@
             <if test="fGoodsid != null">#{fGoodsid},</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="fCntrtype != null">#{fCntrtype},</if>
             <if test="fPlanqty != null">#{fPlanqty},</if>
             <if test="fPlanvolumn != null">#{fPlanvolumn},</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>
@@ -131,10 +143,13 @@
             <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</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="fCntrtype != null">f_cntrtype = #{fCntrtype},</if>
             <if test="fPlanqty != null">f_planqty = #{fPlanqty},</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="fPlannetweight != null">f_plannetweight = #{fPlannetweight},</if>
             <if test="fQty != null">f_qty = #{fQty},</if>