Forráskód Böngészése

添加出入库流水号生成方法

阿伏兔 4 éve
szülő
commit
4cd1a87532

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

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 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;
@@ -18,7 +19,7 @@ import java.util.List;
  * 库存总账Controller
  *
  * @author ruoyi
- * @date 2020-12-11
+ * @date 2020-12-23
  */
 @RestController
 @RequestMapping("/warehouseBusiness/whgenleg")
@@ -53,9 +54,12 @@ public class TWhgenlegController extends BaseController {
      * 获取库存总账详细信息
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:whgenleg:query')")
-    @GetMapping(value = "/{fAccyear}")
-    public AjaxResult getInfo(@PathVariable("fAccyear") Long fAccyear) {
-        return AjaxResult.success(tWhgenlegService.selectTWhgenlegById(fAccyear));
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        if (StringUtils.isNull(fId)) {
+            return AjaxResult.error("未获取到库存总账信息");
+        }
+        return AjaxResult.success(tWhgenlegService.selectTWhgenlegById(fId));
     }
 
     /**

+ 79 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/BillnoDel.java

@@ -0,0 +1,79 @@
+package com.ruoyi.warehouseBusiness.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 被删除的客户存货编号对象 billno_del
+ * 
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+public class BillnoDel extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 单据类型 */
+    @Excel(name = "单据类型")
+    private String billType;
+
+    /** 单据编号 */
+    @Excel(name = "单据编号")
+    private String billNo;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBillType(String billType) 
+    {
+        this.billType = billType;
+    }
+
+    public String getBillType() 
+    {
+        return billType;
+    }
+    public void setBillNo(String billNo) 
+    {
+        this.billNo = billNo;
+    }
+
+    public String getBillNo() 
+    {
+        return billNo;
+    }
+    public void setRemarks(String remarks) 
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() 
+    {
+        return remarks;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("billType", getBillType())
+            .append("billNo", getBillNo())
+            .append("remarks", getRemarks())
+            .toString();
+    }
+}

+ 93 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/BillnoSerial.java

@@ -0,0 +1,93 @@
+package com.ruoyi.warehouseBusiness.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 客户存货编号流水号对象 billno_serial
+ * 
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+public class BillnoSerial extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 单据类型 */
+    @Excel(name = "单据类型")
+    private String billType;
+
+    /** 单据前缀 */
+    @Excel(name = "单据前缀")
+    private String billPrefix;
+
+    /** 序号 */
+    @Excel(name = "序号")
+    private Integer serial;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBillType(String billType) 
+    {
+        this.billType = billType;
+    }
+
+    public String getBillType() 
+    {
+        return billType;
+    }
+    public void setBillPrefix(String billPrefix) 
+    {
+        this.billPrefix = billPrefix;
+    }
+
+    public String getBillPrefix() 
+    {
+        return billPrefix;
+    }
+    public void setSerial(Integer serial)
+    {
+        this.serial = serial;
+    }
+
+    public Integer getSerial()
+    {
+        return serial;
+    }
+    public void setRemarks(String remarks) 
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() 
+    {
+        return remarks;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("billType", getBillType())
+            .append("billPrefix", getBillPrefix())
+            .append("serial", getSerial())
+            .append("remarks", getRemarks())
+            .toString();
+    }
+}

+ 24 - 26
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWhgenleg.java

@@ -1,6 +1,5 @@
 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 org.apache.commons.lang3.builder.ToStringBuilder;
@@ -118,22 +117,16 @@ public class TWhgenleg extends BaseEntity {
     private Long fQtyc;
 
     /**
-     * 结余件数
-     */
-    @Excel(name = "结余件数")
-    private Long fQtyblc;
-
-    /**
      * 出库毛重,单位为吨
      */
     @Excel(name = "出库毛重,单位为吨")
     private BigDecimal fGrossweightc;
 
     /**
-     * 结余毛重
+     * 结余件数
      */
-    @Excel(name = "结余毛重")
-    private BigDecimal fGrossweightblc;
+    @Excel(name = "结余件数")
+    private Long fQtyblc;
 
     /**
      * 出库净重
@@ -142,6 +135,12 @@ public class TWhgenleg extends BaseEntity {
     private BigDecimal fNetweightc;
 
     /**
+     * 结余毛重
+     */
+    @Excel(name = "结余毛重")
+    private BigDecimal fGrossweightblc;
+
+    /**
      * 结余净重
      */
     @Excel(name = "结余净重")
@@ -162,7 +161,6 @@ public class TWhgenleg extends BaseEntity {
     /**
      * 删除状态
      */
-    @TableLogic
     private String delFlag;
 
     public void setfAccyear(Long fAccyear) {
@@ -309,14 +307,6 @@ public class TWhgenleg extends BaseEntity {
         return fQtyc;
     }
 
-    public void setfQtyblc(Long fQtyblc) {
-        this.fQtyblc = fQtyblc;
-    }
-
-    public Long getfQtyblc() {
-        return fQtyblc;
-    }
-
     public void setfGrossweightc(BigDecimal fGrossweightc) {
         this.fGrossweightc = fGrossweightc;
     }
@@ -325,12 +315,12 @@ public class TWhgenleg extends BaseEntity {
         return fGrossweightc;
     }
 
-    public void setfGrossweightblc(BigDecimal fGrossweightblc) {
-        this.fGrossweightblc = fGrossweightblc;
+    public void setfQtyblc(Long fQtyblc) {
+        this.fQtyblc = fQtyblc;
     }
 
-    public BigDecimal getfGrossweightblc() {
-        return fGrossweightblc;
+    public Long getfQtyblc() {
+        return fQtyblc;
     }
 
     public void setfNetweightc(BigDecimal fNetweightc) {
@@ -341,6 +331,14 @@ public class TWhgenleg extends BaseEntity {
         return fNetweightc;
     }
 
+    public void setfGrossweightblc(BigDecimal fGrossweightblc) {
+        this.fGrossweightblc = fGrossweightblc;
+    }
+
+    public BigDecimal getfGrossweightblc() {
+        return fGrossweightblc;
+    }
+
     public void setfNetweightblc(BigDecimal fNetweightblc) {
         this.fNetweightblc = fNetweightblc;
     }
@@ -394,10 +392,10 @@ public class TWhgenleg extends BaseEntity {
                 .append("fNetweightd", getfNetweightd())
                 .append("fVolumnc", getfVolumnc())
                 .append("fQtyc", getfQtyc())
-                .append("fQtyblc", getfQtyblc())
                 .append("fGrossweightc", getfGrossweightc())
-                .append("fGrossweightblc", getfGrossweightblc())
+                .append("fQtyblc", getfQtyblc())
                 .append("fNetweightc", getfNetweightc())
+                .append("fGrossweightblc", getfGrossweightblc())
                 .append("fNetweightblc", getfNetweightblc())
                 .append("fCntrno", getfCntrno())
                 .append("fStatus", getfStatus())
@@ -409,4 +407,4 @@ public class TWhgenleg extends BaseEntity {
                 .append("remark", getRemark())
                 .toString();
     }
-}
+}

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/BillnoDelMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.warehouseBusiness.mapper;
+
+import com.ruoyi.warehouseBusiness.domain.BillnoDel;
+
+import java.util.List;
+
+/**
+ * 被删除的客户存货编号Mapper接口
+ *
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+public interface BillnoDelMapper {
+    /**
+     * 查询被删除的客户存货编号
+     *
+     * @param id 被删除的客户存货编号ID
+     * @return 被删除的客户存货编号
+     */
+    public BillnoDel selectBillnoDelById(Long id);
+
+    /**
+     * 查询被删除的客户存货编号列表
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 被删除的客户存货编号集合
+     */
+    public List<BillnoDel> selectBillnoDelList(BillnoDel billnoDel);
+
+    /**
+     * 新增被删除的客户存货编号
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 结果
+     */
+    public int insertBillnoDel(BillnoDel billnoDel);
+
+    /**
+     * 修改被删除的客户存货编号
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 结果
+     */
+    public int updateBillnoDel(BillnoDel billnoDel);
+
+    /**
+     * 删除被删除的客户存货编号
+     *
+     * @param id 被删除的客户存货编号ID
+     * @return 结果
+     */
+    public int deleteBillnoDelById(Long id);
+
+    /**
+     * 批量删除被删除的客户存货编号
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteBillnoDelByIds(Long[] ids);
+}

+ 69 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/BillnoSerialMapper.java

@@ -0,0 +1,69 @@
+package com.ruoyi.warehouseBusiness.mapper;
+
+import com.ruoyi.warehouseBusiness.domain.BillnoSerial;
+
+import java.util.List;
+
+/**
+ * 客户存货编号流水号Mapper接口
+ *
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+public interface BillnoSerialMapper {
+    /**
+     * 查询客户存货编号流水号
+     *
+     * @param id 客户存货编号流水号ID
+     * @return 客户存货编号流水号
+     */
+    public BillnoSerial selectBillnoSerialById(Long id);
+
+    /**
+     * 查询客户存货编号流水号列表
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 客户存货编号流水号集合
+     */
+    public List<BillnoSerial> selectBillnoSerialList(BillnoSerial billnoSerial);
+
+    /**
+     * 新增客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 结果
+     */
+    public int insertBillnoSerial(BillnoSerial billnoSerial);
+
+    /**
+     * 修改客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 结果
+     */
+    public int updateBillnoSerial(BillnoSerial billnoSerial);
+
+    /**
+     * 删除客户存货编号流水号
+     *
+     * @param id 客户存货编号流水号ID
+     * @return 结果
+     */
+    public int deleteBillnoSerialById(Long id);
+
+    /**
+     * 批量删除客户存货编号流水号
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteBillnoSerialByIds(Long[] ids);
+
+    /**
+     * 查询客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 客户存货编号流水号集合
+     */
+    BillnoSerial selectBillnoSerial(BillnoSerial billnoSerial);
+}

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/IBillnoDelService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.warehouseBusiness.service;
+
+import com.ruoyi.warehouseBusiness.domain.BillnoDel;
+
+import java.util.List;
+
+/**
+ * 被删除的客户存货编号Service接口
+ *
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+public interface IBillnoDelService {
+    /**
+     * 查询被删除的客户存货编号
+     *
+     * @param id 被删除的客户存货编号ID
+     * @return 被删除的客户存货编号
+     */
+    public BillnoDel selectBillnoDelById(Long id);
+
+    /**
+     * 查询被删除的客户存货编号列表
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 被删除的客户存货编号集合
+     */
+    public List<BillnoDel> selectBillnoDelList(BillnoDel billnoDel);
+
+    /**
+     * 新增被删除的客户存货编号
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 结果
+     */
+    public int insertBillnoDel(BillnoDel billnoDel);
+
+    /**
+     * 修改被删除的客户存货编号
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 结果
+     */
+    public int updateBillnoDel(BillnoDel billnoDel);
+
+    /**
+     * 批量删除被删除的客户存货编号
+     *
+     * @param ids 需要删除的被删除的客户存货编号ID
+     * @return 结果
+     */
+    public int deleteBillnoDelByIds(Long[] ids);
+
+    /**
+     * 删除被删除的客户存货编号信息
+     *
+     * @param id 被删除的客户存货编号ID
+     * @return 结果
+     */
+    public int deleteBillnoDelById(Long id);
+}

+ 61 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/IBillnoSerialService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.warehouseBusiness.service;
+
+import com.ruoyi.warehouseBusiness.domain.BillnoSerial;
+
+import java.util.List;
+
+/**
+ * 客户存货编号流水号Service接口
+ *
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+public interface IBillnoSerialService {
+    /**
+     * 查询客户存货编号流水号
+     *
+     * @param id 客户存货编号流水号ID
+     * @return 客户存货编号流水号
+     */
+    public BillnoSerial selectBillnoSerialById(Long id);
+
+    /**
+     * 查询客户存货编号流水号列表
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 客户存货编号流水号集合
+     */
+    public List<BillnoSerial> selectBillnoSerialList(BillnoSerial billnoSerial);
+
+    /**
+     * 新增客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 结果
+     */
+    public int insertBillnoSerial(BillnoSerial billnoSerial);
+
+    /**
+     * 修改客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 结果
+     */
+    public int updateBillnoSerial(BillnoSerial billnoSerial);
+
+    /**
+     * 批量删除客户存货编号流水号
+     *
+     * @param ids 需要删除的客户存货编号流水号ID
+     * @return 结果
+     */
+    public int deleteBillnoSerialByIds(Long[] ids);
+
+    /**
+     * 删除客户存货编号流水号信息
+     *
+     * @param id 客户存货编号流水号ID
+     * @return 结果
+     */
+    public int deleteBillnoSerialById(Long id);
+}

+ 2 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWhgenlegService.java

@@ -4,6 +4,7 @@ package com.ruoyi.warehouseBusiness.service;
 import com.ruoyi.warehouseBusiness.domain.TWhgenleg;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 库存总账Service接口
@@ -18,7 +19,7 @@ public interface ITWhgenlegService {
      * @param fAccyear 库存总账ID
      * @return 库存总账
      */
-    public TWhgenleg selectTWhgenlegById(Long fAccyear);
+    public Map<String, Object> selectTWhgenlegById(Long fAccyear);
 
     /**
      * 查询库存总账列表

+ 87 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/BillnoDelServiceImpl.java

@@ -0,0 +1,87 @@
+package com.ruoyi.warehouseBusiness.service.impl;
+
+import com.ruoyi.warehouseBusiness.domain.BillnoDel;
+import com.ruoyi.warehouseBusiness.mapper.BillnoDelMapper;
+import com.ruoyi.warehouseBusiness.service.IBillnoDelService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 被删除的客户存货编号Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+@Service
+public class BillnoDelServiceImpl implements IBillnoDelService {
+    @Autowired
+    private BillnoDelMapper billnoDelMapper;
+
+    /**
+     * 查询被删除的客户存货编号
+     *
+     * @param id 被删除的客户存货编号ID
+     * @return 被删除的客户存货编号
+     */
+    @Override
+    public BillnoDel selectBillnoDelById(Long id) {
+        return billnoDelMapper.selectBillnoDelById(id);
+    }
+
+    /**
+     * 查询被删除的客户存货编号列表
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 被删除的客户存货编号
+     */
+    @Override
+    public List<BillnoDel> selectBillnoDelList(BillnoDel billnoDel) {
+        return billnoDelMapper.selectBillnoDelList(billnoDel);
+    }
+
+    /**
+     * 新增被删除的客户存货编号
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 结果
+     */
+    @Override
+    public int insertBillnoDel(BillnoDel billnoDel) {
+        return billnoDelMapper.insertBillnoDel(billnoDel);
+    }
+
+    /**
+     * 修改被删除的客户存货编号
+     *
+     * @param billnoDel 被删除的客户存货编号
+     * @return 结果
+     */
+    @Override
+    public int updateBillnoDel(BillnoDel billnoDel) {
+        return billnoDelMapper.updateBillnoDel(billnoDel);
+    }
+
+    /**
+     * 批量删除被删除的客户存货编号
+     *
+     * @param ids 需要删除的被删除的客户存货编号ID
+     * @return 结果
+     */
+    @Override
+    public int deleteBillnoDelByIds(Long[] ids) {
+        return billnoDelMapper.deleteBillnoDelByIds(ids);
+    }
+
+    /**
+     * 删除被删除的客户存货编号信息
+     *
+     * @param id 被删除的客户存货编号ID
+     * @return 结果
+     */
+    @Override
+    public int deleteBillnoDelById(Long id) {
+        return billnoDelMapper.deleteBillnoDelById(id);
+    }
+}

+ 138 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/BillnoSerialServiceImpl.java

@@ -0,0 +1,138 @@
+package com.ruoyi.warehouseBusiness.service.impl;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.warehouseBusiness.domain.BillnoDel;
+import com.ruoyi.warehouseBusiness.domain.BillnoSerial;
+import com.ruoyi.warehouseBusiness.mapper.BillnoDelMapper;
+import com.ruoyi.warehouseBusiness.mapper.BillnoSerialMapper;
+import com.ruoyi.warehouseBusiness.service.IBillnoSerialService;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 客户存货编号流水号Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2020-12-23
+ */
+@Service
+public class BillnoSerialServiceImpl implements IBillnoSerialService {
+    @Autowired
+    private BillnoDelMapper billnoDelMapper;
+
+    @Autowired
+    private BillnoSerialMapper billnoSerialMapper;
+
+    public String getBillNo(String billType, Date time) {
+        String billNo = null;
+        BillnoDel billnoDel = new BillnoDel();
+        billnoDel.setBillType(billType);
+        List<BillnoDel> billnoDels = billnoDelMapper.selectBillnoDelList(billnoDel);
+        // 如果有数据在删除列表
+        if (StringUtils.isNotEmpty(billnoDels)) {
+            billnoDelMapper.deleteBillnoDelById(billnoDels.get(0).getId());
+            billNo = billnoDels.get(0).getBillNo();
+        } else {
+            String yyyyMM = DateFormatUtils.format(time, "yyyyMM");
+            BillnoSerial billnoSerial = new BillnoSerial();
+            billnoSerial.setBillType(billType);
+            billnoSerial.setBillPrefix(yyyyMM);
+            BillnoSerial billnoSerials = billnoSerialMapper.selectBillnoSerial(billnoSerial);
+            if (StringUtils.isNotNull(billnoSerials)) {
+                if (billnoSerials.getSerial() <= 9) {
+                    billNo = "00" + billnoSerials.getSerial();
+                } else if (billnoSerials.getSerial() <= 99) {
+                    billNo = "0" + billnoSerials.getSerial();
+                } else if (billnoSerials.getSerial() <= 999) {
+                    billNo = "" + billnoSerials.getSerial();
+                }
+                billnoSerials.setSerial(billnoSerials.getSerial() + 1);
+                billnoSerialMapper.updateBillnoSerial(billnoSerials);
+            } else {
+                billNo = yyyyMM + "001";
+                billnoSerial.setSerial(1);
+                billnoSerialMapper.insertBillnoSerial(billnoSerials);
+            }
+        }
+        if ("SJRK".equals(billType)) {
+            billNo = "RK" + billNo;
+        } else if ("SJCK".equals(billType)) {
+            billNo = "CK" + billNo;
+        } else if ("CKDB".equals(billType)) {
+            billNo = "DB" + billNo;
+        } else if ("HQZY".equals(billType)) {
+            billNo = "HZ" + billNo;
+        }
+        return billNo;
+    }
+
+    /**
+     * 查询客户存货编号流水号
+     *
+     * @param id 客户存货编号流水号ID
+     * @return 客户存货编号流水号
+     */
+    @Override
+    public BillnoSerial selectBillnoSerialById(Long id) {
+        return billnoSerialMapper.selectBillnoSerialById(id);
+    }
+
+    /**
+     * 查询客户存货编号流水号列表
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 客户存货编号流水号
+     */
+    @Override
+    public List<BillnoSerial> selectBillnoSerialList(BillnoSerial billnoSerial) {
+        return billnoSerialMapper.selectBillnoSerialList(billnoSerial);
+    }
+
+    /**
+     * 新增客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 结果
+     */
+    @Override
+    public int insertBillnoSerial(BillnoSerial billnoSerial) {
+        return billnoSerialMapper.insertBillnoSerial(billnoSerial);
+    }
+
+    /**
+     * 修改客户存货编号流水号
+     *
+     * @param billnoSerial 客户存货编号流水号
+     * @return 结果
+     */
+    @Override
+    public int updateBillnoSerial(BillnoSerial billnoSerial) {
+        return billnoSerialMapper.updateBillnoSerial(billnoSerial);
+    }
+
+    /**
+     * 批量删除客户存货编号流水号
+     *
+     * @param ids 需要删除的客户存货编号流水号ID
+     * @return 结果
+     */
+    @Override
+    public int deleteBillnoSerialByIds(Long[] ids) {
+        return billnoSerialMapper.deleteBillnoSerialByIds(ids);
+    }
+
+    /**
+     * 删除客户存货编号流水号信息
+     *
+     * @param id 客户存货编号流水号ID
+     * @return 结果
+     */
+    @Override
+    public int deleteBillnoSerialById(Long id) {
+        return billnoSerialMapper.deleteBillnoSerialById(id);
+    }
+}

+ 17 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWhgenlegServiceImpl.java

@@ -2,13 +2,17 @@ package com.ruoyi.warehouseBusiness.service.impl;
 
 
 import com.ruoyi.common.utils.DateUtils;
+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;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 库存总账Service业务层处理
@@ -21,6 +25,9 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     @Autowired
     private TWhgenlegMapper tWhgenlegMapper;
 
+    @Autowired
+    private TWarehouseBillsMapper tWarehouseBillsMapper;
+
     /**
      * 查询库存总账
      *
@@ -28,8 +35,16 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
      * @return 库存总账
      */
     @Override
-    public TWhgenleg selectTWhgenlegById(Long fAccyear) {
-        return tWhgenlegMapper.selectTWhgenlegById(fAccyear);
+    public Map<String, Object> selectTWhgenlegById(Long fAccyear) {
+        Map<String, Object> map = new HashMap<>();
+        TWhgenleg whgenleg = tWhgenlegMapper.selectTWhgenlegById(fAccyear);
+        map.put("whgenleg", whgenleg);
+        TWarehouseBills warehouseBills = new TWarehouseBills();
+        warehouseBills.setFCorpid(whgenleg.getfCorpid());
+        warehouseBills.setFMblno(whgenleg.getfMblno());
+        warehouseBills.setFTrademodeid(whgenleg.getfTrademodeid());
+        map.put("warehouseList", tWarehouseBillsMapper.selectTWarehousebillsList(warehouseBills));
+        return map;
     }
 
     /**

+ 67 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/BillnoDelMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.warehouseBusiness.mapper.BillnoDelMapper">
+
+    <resultMap type="BillnoDel" id="BillnoDelResult">
+        <result property="id" column="id"/>
+        <result property="billType" column="bill_type"/>
+        <result property="billNo" column="bill_no"/>
+        <result property="remarks" column="remarks"/>
+    </resultMap>
+
+    <sql id="selectBillnoDelVo">
+        select id, bill_type, bill_no, remarks from billno_del
+    </sql>
+
+    <select id="selectBillnoDelList" parameterType="BillnoDel" resultMap="BillnoDelResult">
+        <include refid="selectBillnoDelVo"/>
+        <where>
+            <if test="billType != null  and billType != ''">and bill_type = #{billType}</if>
+            <if test="billNo != null  and billNo != ''">and bill_no = #{billNo}</if>
+            <if test="remarks != null  and remarks != ''">and remarks = #{remarks}</if>
+        </where>
+    </select>
+
+    <select id="selectBillnoDelById" parameterType="Long" resultMap="BillnoDelResult">
+        <include refid="selectBillnoDelVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertBillnoDel" parameterType="BillnoDel" useGeneratedKeys="true" keyProperty="id">
+        insert into billno_del
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="billType != null">bill_type,</if>
+            <if test="billNo != null">bill_no,</if>
+            <if test="remarks != null">remarks,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="billType != null">#{billType},</if>
+            <if test="billNo != null">#{billNo},</if>
+            <if test="remarks != null">#{remarks},</if>
+        </trim>
+    </insert>
+
+    <update id="updateBillnoDel" parameterType="BillnoDel">
+        update billno_del
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="billType != null">bill_type = #{billType},</if>
+            <if test="billNo != null">bill_no = #{billNo},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBillnoDelById" parameterType="Long">
+        delete from billno_del where id = #{id}
+    </delete>
+
+    <delete id="deleteBillnoDelByIds" parameterType="String">
+        delete from billno_del where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 82 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/BillnoSerialMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.warehouseBusiness.mapper.BillnoSerialMapper">
+
+    <resultMap type="BillnoSerial" id="BillnoSerialResult">
+        <result property="id" column="id"/>
+        <result property="billType" column="bill_type"/>
+        <result property="billPrefix" column="bill_prefix"/>
+        <result property="serial" column="serial"/>
+        <result property="remarks" column="remarks"/>
+    </resultMap>
+
+    <sql id="selectBillnoSerialVo">
+        select id, bill_type, bill_prefix, serial, remarks from billno_serial
+    </sql>
+
+    <select id="selectBillnoSerial" parameterType="BillnoSerial" resultMap="BillnoSerialResult">
+        <include refid="selectBillnoSerialVo"/>
+        <where>
+            <if test="billType != null  and billType != ''">and bill_type = #{billType}</if>
+            <if test="billPrefix != null  and billPrefix != ''">and bill_prefix = #{billPrefix}</if>
+            <if test="serial != null ">and serial = #{serial}</if>
+            <if test="remarks != null  and remarks != ''">and remarks = #{remarks}</if>
+        </where>
+    </select>
+
+    <select id="selectBillnoSerialList" parameterType="BillnoSerial" resultMap="BillnoSerialResult">
+        <include refid="selectBillnoSerialVo"/>
+        <where>
+            <if test="billType != null  and billType != ''">and bill_type = #{billType}</if>
+            <if test="billPrefix != null  and billPrefix != ''">and bill_prefix = #{billPrefix}</if>
+            <if test="serial != null ">and serial = #{serial}</if>
+            <if test="remarks != null  and remarks != ''">and remarks = #{remarks}</if>
+        </where>
+    </select>
+
+    <select id="selectBillnoSerialById" parameterType="Long" resultMap="BillnoSerialResult">
+        <include refid="selectBillnoSerialVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertBillnoSerial" parameterType="BillnoSerial" useGeneratedKeys="true" keyProperty="id">
+        insert into billno_serial
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="billType != null">bill_type,</if>
+            <if test="billPrefix != null">bill_prefix,</if>
+            <if test="serial != null">serial,</if>
+            <if test="remarks != null">remarks,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="billType != null">#{billType},</if>
+            <if test="billPrefix != null">#{billPrefix},</if>
+            <if test="serial != null">#{serial},</if>
+            <if test="remarks != null">#{remarks},</if>
+        </trim>
+    </insert>
+
+    <update id="updateBillnoSerial" parameterType="BillnoSerial">
+        update billno_serial
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="billType != null">bill_type = #{billType},</if>
+            <if test="billPrefix != null">bill_prefix = #{billPrefix},</if>
+            <if test="serial != null">serial = #{serial},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBillnoSerialById" parameterType="Long">
+        delete from billno_serial where id = #{id}
+    </delete>
+
+    <delete id="deleteBillnoSerialByIds" parameterType="String">
+        delete from billno_serial where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>