diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java index f3fc1e37e2..91e78edefb 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java @@ -30,6 +30,7 @@ import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import com.yxt.wms.biz.inventory.wmsinventorycheckbill.*; import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.*; +import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportDetailsVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -72,6 +73,30 @@ public class WmsInventoryCheckbillRest { return rb.success(); } + @ApiOperation("生成盘点报告") + @PostMapping("/createReport") + public ResultBean createReport(@RequestParam("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.createReport(sid); + return rb.success(); + } + + @ApiOperation("查看盘点报告") + @PostMapping("/viewReport") + public ResultBean viewReport(@RequestParam("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryCheckbillReportDetailsVo wmsInventoryCheckbillReportDetailsVo = wmsInventoryCheckbillService.viewReport(sid); + return rb.success().success().setData(wmsInventoryCheckbillReportDetailsVo); + } + + @ApiOperation("生成盘点报告PDF") + @PostMapping("/createPdf") + public ResultBean createPdf(@RequestParam("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + String url = wmsInventoryCheckbillService.createPdf(sid); + return rb.success().success().setData(url); + } + @ApiOperation("根据sid批量删除") @DeleteMapping("/delBySids") public ResultBean delBySids(@RequestBody String[] sids){ diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java index c68bb51590..cd85bf1f1c 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java @@ -35,6 +35,7 @@ import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbi import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; import java.util.List; @@ -68,4 +69,7 @@ public interface WmsInventoryCheckbillMapper extends BaseMapper + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java index 9b422c6152..07ff51aeb1 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java @@ -26,16 +26,12 @@ package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail; import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.commons.lang3.StringUtils; +import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportSumVo; import com.yxt.common.base.service.MybatisBaseService; -import com.yxt.common.base.utils.PagerUtil; -import com.yxt.common.core.query.PagerQuery; -import com.yxt.common.core.vo.PagerVo; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -74,4 +70,17 @@ public class WmsInventoryCheckbillDetailService extends MybatisBaseService selByMainSid(String billSid) { return baseMapper.selByMainSid(billSid); } + + public List reportSum(String sid, String sumType) { + List wmsInventoryCheckbillReportSumVos = new ArrayList<>(); + if ("total".equals(sumType)){ + WmsInventoryCheckbillReportSumVo wmsInventoryCheckbillReportSumVo = baseMapper.reportSumTotal(sid); + wmsInventoryCheckbillReportSumVos.add(wmsInventoryCheckbillReportSumVo); + }else if ("ware".equals(sumType)){ + wmsInventoryCheckbillReportSumVos = baseMapper.reportSumWare(sid); + }else if ("area".equals(sumType)){ + wmsInventoryCheckbillReportSumVos = baseMapper.reportSumArea(sid); + } + return wmsInventoryCheckbillReportSumVos; + } } \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportDetailsVo.java index 451d8156f4..9d21eecc61 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportDetailsVo.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportDetailsVo.java @@ -26,12 +26,18 @@ package com.yxt.wms.biz.inventory.wmsinventorycheckbillreport; +import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.common.core.vo.Vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + /** * Project: yxt-wms(盘点报告)
* File: WmsInventoryCheckbillReportVo.java
@@ -51,9 +57,45 @@ public class WmsInventoryCheckbillReportDetailsVo implements Vo { private String sid; // sid - @ApiModelProperty("盘点单sid") - private String billSid; // 盘点单sid - @ApiModelProperty("pdf路径") - private String pdfUrl; // pdf路径 + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("申请部门名称") + private String deptName; + @ApiModelProperty("生成日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + @ApiModelProperty("监盘人姓名") + private String superviseName; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("pdf路径") + private String pdfUrl; + + //总体盘点情况 + @ApiModelProperty("应盘数量") + private BigDecimal bookCountTotal; + @ApiModelProperty("应盘金额") + private BigDecimal bookAmountTotal; + @ApiModelProperty("实盘数量") + private BigDecimal realCountTotal; + @ApiModelProperty("实盘金额") + private BigDecimal realAmountTotal; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCountTotal; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmountTotal; + @ApiModelProperty("盘亏数量") + private BigDecimal loseCountTotal; + @ApiModelProperty("盘亏金额") + private BigDecimal loseAmountTotal; + @ApiModelProperty("盘损数量") + private BigDecimal lossCountTotal; + @ApiModelProperty("盘损金额") + private BigDecimal lossAmountTotal; + + //仓库盘点情况 + List ware = new ArrayList<>(); + //库区盘点情况 + List Area = new ArrayList<>(); } \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportMapper.java index fa0f04cd69..8ba983b95f 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportMapper.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbillreport/WmsInventoryCheckbillReportMapper.java @@ -28,6 +28,7 @@ package com.yxt.wms.biz.inventory.wmsinventorycheckbillreport; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; /** * Project: yxt-wms(盘点报告)
@@ -47,4 +48,7 @@ public interface WmsInventoryCheckbillReportMapper extends BaseMapper_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventorycheckbillreport; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-wms(盘点报告)
+ * File: WmsInventoryCheckbillReportVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbillreport.WmsInventoryCheckbillReportVo
+ * Description: 盘点报告 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-19 09:52:51
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "盘点报告 视图数据详情", description = "盘点报告 视图数据详情") +public class WmsInventoryCheckbillReportSumVo implements Vo { + + @ApiModelProperty("仓库名称(或仓库-库区名称)") + private String warehouseName; + @ApiModelProperty("应盘数量") + private BigDecimal bookCount; + @ApiModelProperty("应盘金额") + private BigDecimal bookAmount; + @ApiModelProperty("实盘数量") + private BigDecimal realCount; + @ApiModelProperty("实盘金额") + private BigDecimal realAmount; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal loseCount; + @ApiModelProperty("盘亏金额") + private BigDecimal loseAmount; + @ApiModelProperty("盘损数量") + private BigDecimal lossCount; + @ApiModelProperty("盘损金额") + private BigDecimal lossAmount; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/resources/ftl/pdbg.ftl b/yxt-wms-biz/src/main/resources/ftl/pdbg.ftl new file mode 100644 index 0000000000..b736f5b412 --- /dev/null +++ b/yxt-wms-biz/src/main/resources/ftl/pdbg.ftl @@ -0,0 +1,3733 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘点报告 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发起人 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${createName} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发起部门 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${deptName} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发起日期 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${createTime} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘点人 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${pdrName} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 监盘人 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${jprName} + + + + + + + + + + + + + + + + + + + + + + + + + + + + 备注 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${remarks} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 总体盘点情况 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 应盘数量:${ypsl} 应盘金额:${ypje} 实盘数量:${spsl} 实盘金额:${spje} + 盘盈数量:${pysl} 盘盈金额:${pyje} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘亏数量:${pksl} 盘亏金额:${pkje} 盘损数量:${pssl} 盘损金额:${psje} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 仓库盘点情况 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 仓库 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 应盘 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 应盘金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 实盘 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 实盘金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘盈 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘盈金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘亏 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘亏金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘损 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘损金额 + + + + + <#list ware as w> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.id1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.ck1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.yp1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.ypje1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.sp1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.spje1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.py1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.pyje1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.pk1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.pkje1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.ps1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${w.psje1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 库区盘点情况 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 仓库-库区 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 应盘 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 应盘金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 实盘 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 实盘金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘盈 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘盈金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘亏 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘亏金额 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘损 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 盘损金额 + + + + + <#list area as a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.id2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.ck2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.yp2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.ypje2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.sp2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.spje2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.py2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.pyje2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.pk2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.pkje2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.ps2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${a.psje2} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 202 + 463 + 0 + 0 + 7 + false + false + 529 + WPS Office_12.1.0.17147_F1E327BC-269C-435d-A152-05C5408002CA + 0 + + + + + + + 2024-07-22T05:49:20Z + God + WPS_1599826008 + 2024-07-22T06:25:44Z + + + + + + + + 2052-12.1.0.17147 + + + 2CF64CCE4CE6487CAE9DE1713D1F25E1_13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/resources/ftl/盘点报告.doc b/yxt-wms-biz/src/main/resources/ftl/盘点报告.doc new file mode 100644 index 0000000000..0f8233bb79 --- /dev/null +++ b/yxt-wms-biz/src/main/resources/ftl/盘点报告.doc @@ -0,0 +1,18 @@ + +|盘点报告 | +|发起人 |${createName} |发起部|${deptName} |发起日|${createTime}| +| | |门 | |期 | | +|盘点人 |${pdrName} |监盘人|${jprName} |备注 |${remarks} | +|总体盘点情况 | +|应盘数量:${ypsl} 应盘金额:${ypje} | +|实盘数量:${spsl} 实盘金额:${spje} | +|盘盈数量:${pysl} 盘盈金额:${pyje} | +|盘亏数量:${pksl} 盘亏金额:${pkje} | +|盘损数量:${pssl} 盘损金额:${psje} | +|仓库盘点情况 | +|序号 | + + + 序号 |仓库-库区 |应盘 |应盘金额 |实盘 |实盘金额 |盘盈 |盘盈金额 |盘亏 + |盘亏金额 |盘损 |盘损金额 | |${id2} |${ck2} |${yp2} |${ypje2} |${sp2} + |${spje2} |${py2} |${pyje2} |${pk2} |${pkje2} |${ps2} |${psje2} | |