diff --git a/docs/databases/table_create_report-inventory.sql b/docs/databases/table_create_report-inventory.sql
index 5bc439e2..2fa68038 100644
--- a/docs/databases/table_create_report-inventory.sql
+++ b/docs/databases/table_create_report-inventory.sql
@@ -9,6 +9,8 @@ CREATE TABLE `report_inventory_day_gather` (
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
+ `sort` int(11) DEFAULT 0 COMMENT '排序',
+
`storeType` VARCHAR(100) DEFAULT NULL COMMENT '仓库类型',
`storeNumber` int(11) DEFAULT 1 COMMENT '仓库数量',
`productCountNumber` int(11) DEFAULT 1 COMMENT '品种数量',
@@ -30,12 +32,13 @@ CREATE TABLE `report_inventory_day_store` (
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
- `warehouseType` int(11) DEFAULT NULL COMMENT '仓库类型',
+ `warehouseType` int(11) DEFAULT 2 COMMENT '仓库类型',
`storeCode` VARCHAR(100) DEFAULT NULL COMMENT '门店编号',
`storeCodeName` VARCHAR(100) DEFAULT NULL COMMENT '[门店编号]门店名称',
- `productCountNumber` int(11) DEFAULT 1 COMMENT '品种数量',
+ `productCountNumber` int(11) DEFAULT 0 COMMENT '商品数量',
`productAmount` DOUBLE(12,2) DEFAULT 0 COMMENT '货值',
`countAmount` double(12,2) DEFAULT NULL COMMENT '合计货值',
+ `countProductNumber` bigint(11) DEFAULT 0 COMMENT '合计品种数量',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='库存汇总表-仓库库存明细表';
@@ -51,12 +54,13 @@ CREATE TABLE `report_inventory_day_tobacco_store` (
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
- `warehouseType` int(11) DEFAULT NULL COMMENT '仓库类型',
+ `warehouseType` int(11) DEFAULT 2 COMMENT '仓库类型',
`storeCode` VARCHAR(100) DEFAULT NULL COMMENT '门店编号',
`storeCodeName` VARCHAR(100) DEFAULT NULL COMMENT '[门店编号]门店名称',
- `productCountNumber` int(11) DEFAULT 1 COMMENT '品种数量',
+ `productCountNumber` int(11) DEFAULT 0 COMMENT '品种数量',
`productAmount` DOUBLE(12,2) DEFAULT 0 COMMENT '货值',
`countAmount` double(12,2) DEFAULT NULL COMMENT '合计货值',
+ `countProductNumber` bigint(11) DEFAULT 0 COMMENT '合计品种数量',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='库存汇总表-烟草仓库库存明细表';
diff --git a/supervise-customer-ui/src/api/supervise/gdinventorylog.js b/supervise-customer-ui/src/api/supervise/gdinventorylog.js
index f6c4697a..da1f8864 100644
--- a/supervise-customer-ui/src/api/supervise/gdinventorylog.js
+++ b/supervise-customer-ui/src/api/supervise/gdinventorylog.js
@@ -55,5 +55,20 @@ export default {
method: 'post',
data: params
})
+ },
+ // 创建某一天的库存报表
+ kcReport: function(params) {
+ return request({
+ baseURL: '/api/report',
+ url: '/reportinventory/kcReport',
+ params: params
+ })
+ },
+ // 创建某一天的库存报表
+ kcExcel: function(params) {
+ return request({
+ url: '/customer/v1/gdinventorylog/kcExcel',
+ params: params
+ })
}
}
diff --git a/supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue b/supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue
index 6e174ebe..d1fdd2a9 100644
--- a/supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue
+++ b/supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue
@@ -85,7 +85,7 @@
{{ hzResultMesssage }}
下载库存汇总文件
-
+
@@ -99,6 +99,7 @@
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/supervise/gdinventorylog'
+
export default {
name: 'DaydatauploadGdinventoryLog',
components: {
@@ -123,22 +124,22 @@
},
tableLoading: false,
dataList: [],
- btnList: [
- {
- type: 'primary',
- size: 'small',
- icon: 'upload',
- btnKey: 'showUploadXlsx',
- btnLabel: '上传库存信息'
- },
- {
- type: 'info',
- size: 'small',
- icon: 'cross',
- btnKey: 'doClose',
- btnLabel: '关闭'
- }],
- dialogVisible: false,
+ btnList: [{
+ type: 'primary',
+ size: 'small',
+ icon: 'upload',
+ btnKey: 'showUploadXlsx',
+ btnLabel: '上传库存信息'
+ },
+ {
+ type: 'info',
+ size: 'small',
+ icon: 'cross',
+ btnKey: 'doClose',
+ btnLabel: '关闭'
+ }
+ ],
+ dialogVisible: false,
updateAction: '/api/customer' + '/v1/gdinventoryok/uploadGdData',
name: '库存数据导入',
fileList: [],
@@ -207,19 +208,19 @@
console.log('GdinventoryLog-loadList-ee:', e)
})
},
- doClose() {
- this.$store.dispatch('tagsView/delView', this.$route)
- this.$router.go(-1)
- },
- showUploadXlsx() {
- this.dialogVisible = true
- },
- dialogClose() {
- this.currentLog = {}
- this.fileList = []
- this.filecandown = true
- this.dialogVisible = false
- },
+ doClose() {
+ this.$store.dispatch('tagsView/delView', this.$route)
+ this.$router.go(-1)
+ },
+ showUploadXlsx() {
+ this.dialogVisible = true
+ },
+ dialogClose() {
+ this.currentLog = {}
+ this.fileList = []
+ this.filecandown = true
+ this.dialogVisible = false
+ },
// 返回
handleReturn() {
this.$router.go(-1)
@@ -246,31 +247,33 @@
console.log('222', resp)
const rdata = resp.data
const _this = this
- _this.fullscreenloading.text = '数据导入完成,进行汇总'
+ _this.fullscreenloading.text = '数据导入完成,正在生成报表~'
+ this.fileList = []
_this.uploadResultMesssage = '共导入数据:' + rdata.allNum + ' 条;普通商品数据:' + rdata.validNum + ' 条;烟草商品数据:' + rdata.errRowNum + ' 条;用时:' + rdata.durations + ' 毫秒。'
-
- kchz()
+ const param = {
+ orderDate: rdata.orderDate
+ }
+ req.kcReport(param)
.then(res => {
- if (this.fullscreenloading) this.fullscreenloading.close()
- this.fullscreenloading = null
console.log('333', res)
- _this.hzFilePath = res.data
+ _this.fullscreenloading.text = '报表数据完成,创建Excel文件'
+
+ req.kcExcel({ logid: rdata.id })
+ .then(res => {
+ if (this.fullscreenloading) this.fullscreenloading.close()
+ this.fullscreenloading = null
+ console.log('444', res)
+ _this.hzFilePath = res.data.fileUrl
+ })
+ .catch(e => {
+ if (this.fullscreenloading) this.fullscreenloading.close()
+ this.fullscreenloading = null
+ })
})
.catch(e => {
if (this.fullscreenloading) this.fullscreenloading.close()
this.fullscreenloading = null
})
- // kchzyc()
- // .then(res => {
- // if (this.fullscreenloading) this.fullscreenloading.close()
- // this.fullscreenloading = null
- // console.log('444', res)
- // _this.ychzFilePath = res.data
- // })
- // .catch(e => {
- // if (this.fullscreenloading) this.fullscreenloading.close()
- // this.fullscreenloading = null
- // })
},
doDownloadHz() {
window.open(this.hzFilePath, '_blank')
@@ -291,18 +294,6 @@
},
doDownloadHzYc() {
window.open(this.ychzFilePath, '_blank')
- },
- resetCache() {
- resetAllCache()
- .then(res => {
- this.$message({
- message: '缓存数据已重置!',
- type: 'success'
- })
- })
- .catch(e => {
- console.log('resetAllCache', e)
- })
}
}
}
diff --git a/yxt-portal-ui/.env.development b/yxt-portal-ui/.env.development
index 25971c4e..888c35d1 100644
--- a/yxt-portal-ui/.env.development
+++ b/yxt-portal-ui/.env.development
@@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
-# VUE_APP_URL = "http://127.0.0.1:8112"
-VUE_APP_URL = "http://8.130.39.13:8112"
+VUE_APP_URL = "http://127.0.0.1:8112"
+# VUE_APP_URL = "http://8.130.39.13:8112"
diff --git a/yxt-portal-ui/src/views/Home/Home.vue b/yxt-portal-ui/src/views/Home/Home.vue
index 438e5e95..e06d4175 100644
--- a/yxt-portal-ui/src/views/Home/Home.vue
+++ b/yxt-portal-ui/src/views/Home/Home.vue
@@ -440,8 +440,8 @@
if (index === 11) {
window.open('/#/index', '_blank')
} else if (index === 0) {
- // window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
- window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank')
+ window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
+ // window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 1) {
// window.open('http://192.168.3.8:9531#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/report/#/' + '?token=' + getStorage(), '_blank')
diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml
index 14cccaf6..d1cca09a 100644
--- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml
+++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml
@@ -2,8 +2,8 @@ spring:
application:
name: yxt-supervise-cyf
profiles:
- active: devv
-# active: test
+# active: devv
+ active: test
messages:
# 国际化资源文件路径
basename: i18n/messages
diff --git a/yxt_supervise/gateway/src/main/resources/application.yml b/yxt_supervise/gateway/src/main/resources/application.yml
index 693cf83e..6e56994f 100644
--- a/yxt_supervise/gateway/src/main/resources/application.yml
+++ b/yxt_supervise/gateway/src/main/resources/application.yml
@@ -12,8 +12,8 @@ spring:
application:
name: gateway-server
profiles:
-# active: devv
- active: test
+ active: devv
+# active: test
cloud:
gateway:
routes:
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventoryok/GdInventoryLog.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventoryok/GdInventoryLog.java
deleted file mode 100644
index 38dfe962..00000000
--- a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventoryok/GdInventoryLog.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.yxt.supervise.customer.api.gdinventoryok;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.yxt.common.core.domain.EntityWithId;
-import lombok.Data;
-
-import java.util.Date;
-
-@Data
-@TableName("gd_inventory_log")
-public class GdInventoryLog extends EntityWithId {
-
- public GdInventoryLog() {
- }
-
- public GdInventoryLog(String fileFullPath) {
- this.fileFullPath = fileFullPath;
- }
-
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime = new Date(); // 记录创建时间/
- private String remarks; // 备注说明/
- private String fileFullPath; // 文件完整路径/
- private String outFilePath; // 汇总文件路径
-// private String outfile; //输出文件名
- private String fileUrl; //文件下载地址
- private int allNum; // 总记录数/
- private int validNum; // 有效记录数/
- private long durations; // 程序运行时长/
- private int errRowNum; // 出错的条数/
- private String orderDate; // 单据日期
-}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogMapper.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogMapper.java
index fa97294d..79c99743 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogMapper.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogMapper.java
@@ -2,11 +2,13 @@ package com.yxt.supervise.customer.biz.gdinventorylog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.supervise.customer.api.gdinstoragelog.GdInstorageLog;
-import com.yxt.supervise.customer.api.gdinventoryok.GdInventoryLog;
+import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
+import java.util.List;
+
/**
* @author wangpengfei
* @date 2023/3/29 13:57
@@ -14,5 +16,14 @@ import org.apache.ibatis.annotations.Select;
@Mapper
public interface GdInventoryLogMapper extends BaseMapper {
@Select("select * from gd_inventory_log where orderDate=#{orderDate}")
- public GdInstorageLog getLogByOrderDate(@Param("oderDate") String orderDate);
+ public GdInstorageLog getLogByOrderDate(@Param("orderDate") String orderDate);
+
+ @Select("select * from report_inventory_day_gather where orderDate=#{orderDate} order by sort desc")
+ List reportInventoryDayGather(@Param("orderDate") String orderDate);
+
+ @Select("select * from report_inventory_day_store where orderDate=#{orderDate} ")
+ List reportInventoryDayStore(@Param("orderDate") String orderDate);
+
+ @Select("select * from report_inventory_day_tobacco_store where orderDate=#{orderDate} ")
+ List reportInventoryDayTobaccoStore(@Param("orderDate") String orderDate);
}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogRest.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogRest.java
index 5477b224..bec4ef55 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogRest.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogRest.java
@@ -1,28 +1,15 @@
package com.yxt.supervise.customer.biz.gdinventorylog;
-import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
-import com.yxt.common.core.vo.PagerVo;
-import com.yxt.supervise.customer.api.gdinstoragegd.*;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLogQuery;
-import com.yxt.supervise.customer.api.gdinventoryok.GdInventoryLog;
-import com.yxt.supervise.customer.api.gdsales.GdSales;
-import com.yxt.supervise.customer.api.gdsales.GdSalesQuery;
-import com.yxt.supervise.customer.api.gdsales.GdSalesVo;
+import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.List;
+import org.springframework.web.bind.annotation.*;
/**
* @author wangpengfei
@@ -43,4 +30,17 @@ public class GdInventoryLogRest {
IPage pv = gdInventoryLogService.listPage(pq);
return rb.success().setData(pv);
}
+
+ @GetMapping("/kcExcel")
+ public ResultBean kcExcel(@RequestParam("logid") String logid) {
+ ResultBean rb = ResultBean.fireFail();
+ if (StringUtils.isBlank(logid)) {
+ return rb.setMsg("上传日志SID不可为空");
+ }
+
+ GdInventoryLog log = gdInventoryLogService.buildExcelById(logid);
+ if (log == null)
+ return rb.setMsg("未得到上传日志");
+ return rb.success().setData(log);
+ }
}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogService.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogService.java
index 15ce4a42..3e18417b 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogService.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogService.java
@@ -1,6 +1,9 @@
package com.yxt.supervise.customer.biz.gdinventorylog;
+import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
+import cn.hutool.poi.excel.ExcelUtil;
+import cn.hutool.poi.excel.ExcelWriter;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -8,10 +11,16 @@ import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.supervise.customer.api.gdinstoragelog.GdInstorageLog;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLogQuery;
-import com.yxt.supervise.customer.api.gdinventoryok.GdInventoryLog;
+import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import java.io.File;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
/**
* @author wangpengfei
* @date 2023/3/29 14:00
@@ -19,6 +28,14 @@ import org.springframework.stereotype.Service;
@Slf4j
@Service
public class GdInventoryLogService extends ServiceImpl {
+
+ @Value("${image.upload.path:static/upload/}")
+ private String uploadPath;
+ @Value("${image.url.prefix:http://127.0.0.1:8080/upload/}")
+ private String urlPrefix;
+ @Value("${image.xlsxtmpl:static/upload/}")
+ private String xlsxtmplPath;
+
public GdInstorageLog getLogByOrderDate(String orderDate) {
//GdRukuQuery query = pq.getParams();
return baseMapper.getLogByOrderDate(orderDate);
@@ -33,11 +50,91 @@ public class GdInventoryLogService extends ServiceImpl iPage = PagerUtil.queryToPage(pq);
IPage page = baseMapper.selectPage(iPage, qw);
return page;
}
+
+ public GdInventoryLog buildExcelById(String logsid) {
+ GdInventoryLog gdInventoryLog = baseMapper.selectById(logsid);
+ if (gdInventoryLog == null)
+ return null;
+ String orderDate = gdInventoryLog.getOrderDate();
+
+ String xlsxpath = xlsxtmplPath + "库存汇总表模板.xlsx";
+ File srcFile = FileUtil.file(xlsxpath);
+ String tfile = "kchzb/库存汇总表" + orderDate + ".xlsx";
+
+ String url = urlPrefix + tfile;
+ String toFileName = uploadPath + tfile;
+ File file = FileUtil.file(toFileName);
+ FileUtil.copy(srcFile, file, true);
+
+ ExcelWriter writer = ExcelUtil.getWriter(file);
+
+ List gatherList = baseMapper.reportInventoryDayGather(orderDate);
+ if (gatherList != null && !gatherList.isEmpty()) {
+ ReportInventoryDayGather gather = gatherList.get(0);
+ // 库存汇总日报表
+ writer.setSheet(0);
+ writer.writeCellValue(0, 1, "编号:" + gather.getSerialNumber());
+ writer.writeCellValue(3, 1, gather.getReportTime());
+ int countRow = gatherList.size() + 3;
+ for (int y = 3; y < countRow; y++) {
+ ReportInventoryDayGather map = gatherList.get(y - 3);
+ writer.writeCellValue(0, y, map.getStoreType());
+ writer.writeCellValue(1, y, map.getStoreNumber());
+ writer.writeCellValue(2, y, map.getProductCountNumber());
+ writer.writeCellValue(3, y, map.getProductAmount());
+ }
+ writer.writeCellValue(0, countRow, "合计");
+ writer.writeCellValue(3, countRow, gather.getCountAmount());
+ }
+
+ List storeList = baseMapper.reportInventoryDayStore(orderDate);
+ if (storeList != null && !storeList.isEmpty()) {
+ ReportInventoryDayStore store = storeList.get(0);
+ // 仓库库存明细表
+ writer.setSheet(1);
+ int countRow = storeList.size() + 1;
+ for (int y = 1; y < countRow; y++) {
+ ReportInventoryDayStore map = storeList.get(y - 1);
+ writer.writeCellValue(0, y, map.getStoreCodeName());
+ writer.writeCellValue(1, y, map.getProductCountNumber());
+ writer.writeCellValue(2, y, map.getProductAmount());
+ }
+ writer.writeCellValue(0, countRow, "总计");
+ writer.writeCellValue(1, countRow, store.getCountProductNumber());
+ writer.writeCellValue(2, countRow, store.getCountAmount());
+ }
+
+ List ycList = baseMapper.reportInventoryDayTobaccoStore(orderDate);
+ if (ycList != null && !ycList.isEmpty()) {
+ ReportInventoryDayTobaccoStore store = ycList.get(0);
+ // 烟草仓库库存明细表
+ writer.setSheet(2);
+ int countRow = ycList.size() + 1;
+ for (int y = 1; y < countRow; y++) {
+ ReportInventoryDayTobaccoStore map = ycList.get(y - 1);
+ writer.writeCellValue(0, y, map.getStoreCodeName());
+ writer.writeCellValue(1, y, map.getProductCountNumber());
+ writer.writeCellValue(2, y, map.getProductAmount());
+ }
+ writer.writeCellValue(0, countRow, "总计");
+ writer.writeCellValue(1, countRow, store.getCountProductNumber());
+ writer.writeCellValue(2, countRow, store.getCountAmount());
+ }
+
+ writer.flush();
+ writer.close();
+
+ gdInventoryLog.setFileFullPath(tfile);
+ gdInventoryLog.setFileUrl(url);
+ baseMapper.updateById(gdInventoryLog);
+ return gdInventoryLog;
+
+ }
}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayGather.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayGather.java
new file mode 100644
index 00000000..75d4c9a9
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayGather.java
@@ -0,0 +1,129 @@
+package com.yxt.supervise.customer.biz.gdinventorylog;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yxt.common.core.domain.EntityWithId;
+
+import java.util.Date;
+
+@TableName("report_inventory_day_gather")
+public class ReportInventoryDayGather extends EntityWithId {
+
+ public ReportInventoryDayGather() {
+ }
+
+ public ReportInventoryDayGather(String storeType) {
+ this.storeType = storeType;
+ }
+
+ public ReportInventoryDayGather(String orderDate, String serialNumber, String reportTime, String storeType) {
+ this.orderDate = orderDate;
+ this.serialNumber = serialNumber;
+ this.reportTime = reportTime;
+ this.storeType = storeType;
+ }
+
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss",
+ timezone = "GMT+8"
+ )
+ private Date createTime = new Date(); // 记录创建时间
+ private String remarks; // 备注说明
+ private String orderDate; // 单据日期
+ private String serialNumber; // 编号
+ private String reportTime; // 上报时间
+ private int sort = 0; // 排序
+ private String storeType; // 仓库类型
+ private int storeNumber = 1; // 仓库数量
+ private int productCountNumber = 1; // 品种数量
+ private double productAmount; // 货值
+ private double countAmount; // 合计货值
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getRemarks() {
+ return remarks;
+ }
+
+ public void setRemarks(String remarks) {
+ this.remarks = remarks;
+ }
+
+ public String getOrderDate() {
+ return orderDate;
+ }
+
+ public void setOrderDate(String orderDate) {
+ this.orderDate = orderDate;
+ }
+
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ public void setSerialNumber(String serialNumber) {
+ this.serialNumber = serialNumber;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public void setReportTime(String reportTime) {
+ this.reportTime = reportTime;
+ }
+
+ public int getSort() {
+ return sort;
+ }
+
+ public void setSort(int sort) {
+ this.sort = sort;
+ }
+
+ public String getStoreType() {
+ return storeType;
+ }
+
+ public void setStoreType(String storeType) {
+ this.storeType = storeType;
+ }
+
+ public int getStoreNumber() {
+ return storeNumber;
+ }
+
+ public void setStoreNumber(int storeNumber) {
+ this.storeNumber = storeNumber;
+ }
+
+ public int getProductCountNumber() {
+ return productCountNumber;
+ }
+
+ public void setProductCountNumber(int productCountNumber) {
+ this.productCountNumber = productCountNumber;
+ }
+
+ public double getProductAmount() {
+ return productAmount;
+ }
+
+ public void setProductAmount(double productAmount) {
+ this.productAmount = productAmount;
+ }
+
+ public double getCountAmount() {
+ return countAmount;
+ }
+
+ public void setCountAmount(double countAmount) {
+ this.countAmount = countAmount;
+ }
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayStore.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayStore.java
new file mode 100644
index 00000000..f6d5eb5e
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayStore.java
@@ -0,0 +1,133 @@
+package com.yxt.supervise.customer.biz.gdinventorylog;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yxt.common.core.domain.EntityWithId;
+
+import java.util.Date;
+
+
+@TableName("report_inventory_day_store")
+public class ReportInventoryDayStore extends EntityWithId {
+ public ReportInventoryDayStore() {
+ }
+
+ public ReportInventoryDayStore(String orderDate, String storeCode, String storeCodeName) {
+ this.orderDate = orderDate;
+ this.storeCode = storeCode;
+ this.storeCodeName = storeCodeName;
+ }
+
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss",
+ timezone = "GMT+8"
+ )
+ private Date createTime = new Date(); // 记录创建时间
+ private String remarks; // 备注说明',
+ private String orderDate; // 单据日期',
+ private String serialNumber; // 编号',
+ private String reportTime; // 上报时间',
+ private int warehouseType = 2; // 仓库类型',
+ private String storeCode; // 门店编号',
+ private String storeCodeName; // [门店编号]门店名称',
+ private int productCountNumber; // 品种数量',
+ private double productAmount; // 货值',
+ private double countAmount; // 合计货值',
+ private long countProductNumber; // 合计品种数量',
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getRemarks() {
+ return remarks;
+ }
+
+ public void setRemarks(String remarks) {
+ this.remarks = remarks;
+ }
+
+ public String getOrderDate() {
+ return orderDate;
+ }
+
+ public void setOrderDate(String orderDate) {
+ this.orderDate = orderDate;
+ }
+
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ public void setSerialNumber(String serialNumber) {
+ this.serialNumber = serialNumber;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public void setReportTime(String reportTime) {
+ this.reportTime = reportTime;
+ }
+
+ public int getWarehouseType() {
+ return warehouseType;
+ }
+
+ public void setWarehouseType(int warehouseType) {
+ this.warehouseType = warehouseType;
+ }
+
+ public String getStoreCode() {
+ return storeCode;
+ }
+
+ public void setStoreCode(String storeCode) {
+ this.storeCode = storeCode;
+ }
+
+ public String getStoreCodeName() {
+ return storeCodeName;
+ }
+
+ public void setStoreCodeName(String storeCodeName) {
+ this.storeCodeName = storeCodeName;
+ }
+
+ public int getProductCountNumber() {
+ return productCountNumber;
+ }
+
+ public void setProductCountNumber(int productCountNumber) {
+ this.productCountNumber = productCountNumber;
+ }
+
+ public double getProductAmount() {
+ return productAmount;
+ }
+
+ public void setProductAmount(double productAmount) {
+ this.productAmount = productAmount;
+ }
+
+ public double getCountAmount() {
+ return countAmount;
+ }
+
+ public void setCountAmount(double countAmount) {
+ this.countAmount = countAmount;
+ }
+
+ public long getCountProductNumber() {
+ return countProductNumber;
+ }
+
+ public void setCountProductNumber(long countProductNumber) {
+ this.countProductNumber = countProductNumber;
+ }
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayTobaccoStore.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayTobaccoStore.java
new file mode 100644
index 00000000..2f20f37e
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/ReportInventoryDayTobaccoStore.java
@@ -0,0 +1,124 @@
+package com.yxt.supervise.customer.biz.gdinventorylog;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yxt.common.core.domain.EntityWithId;
+
+import java.util.Date;
+
+@TableName("report_inventory_day_tobacco_store")
+public class ReportInventoryDayTobaccoStore extends EntityWithId {
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss",
+ timezone = "GMT+8"
+ )
+ private Date createTime = new Date(); // 记录创建时间
+ private String remarks ; // 备注说明
+ private String orderDate ; // 单据日期
+ private String serialNumber ; // 编号
+ private String reportTime ; // 上报时间
+ private int warehouseType=2; // 仓库类型
+ private String storeCode ; // 门店编号
+ private String storeCodeName ; // [门店编号]门店名称
+ private int productCountNumber; // 品种数量
+ private double productAmount; // 货值
+ private double countAmount; // 合计货值
+ private long countProductNumber; // 合计品种数量
+
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getRemarks() {
+ return remarks;
+ }
+
+ public void setRemarks(String remarks) {
+ this.remarks = remarks;
+ }
+
+ public String getOrderDate() {
+ return orderDate;
+ }
+
+ public void setOrderDate(String orderDate) {
+ this.orderDate = orderDate;
+ }
+
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ public void setSerialNumber(String serialNumber) {
+ this.serialNumber = serialNumber;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public void setReportTime(String reportTime) {
+ this.reportTime = reportTime;
+ }
+
+ public int getWarehouseType() {
+ return warehouseType;
+ }
+
+ public void setWarehouseType(int warehouseType) {
+ this.warehouseType = warehouseType;
+ }
+
+ public String getStoreCode() {
+ return storeCode;
+ }
+
+ public void setStoreCode(String storeCode) {
+ this.storeCode = storeCode;
+ }
+
+ public String getStoreCodeName() {
+ return storeCodeName;
+ }
+
+ public void setStoreCodeName(String storeCodeName) {
+ this.storeCodeName = storeCodeName;
+ }
+
+ public int getProductCountNumber() {
+ return productCountNumber;
+ }
+
+ public void setProductCountNumber(int productCountNumber) {
+ this.productCountNumber = productCountNumber;
+ }
+
+ public double getProductAmount() {
+ return productAmount;
+ }
+
+ public void setProductAmount(double productAmount) {
+ this.productAmount = productAmount;
+ }
+
+ public double getCountAmount() {
+ return countAmount;
+ }
+
+ public void setCountAmount(double countAmount) {
+ this.countAmount = countAmount;
+ }
+
+ public long getCountProductNumber() {
+ return countProductNumber;
+ }
+
+ public void setCountProductNumber(long countProductNumber) {
+ this.countProductNumber = countProductNumber;
+ }
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkRest.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkRest.java
index 74ff39a9..dbd3d4b6 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkRest.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkRest.java
@@ -4,17 +4,13 @@ import com.alibaba.excel.EasyExcel;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
+import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import com.yxt.supervise.customer.api.gdinventoryok.*;
-import com.yxt.supervise.customer.api.gdsales.GdSales;
-import com.yxt.supervise.customer.api.gdsales.GdSalesExcelVo;
-import com.yxt.supervise.customer.api.gdsales.GdSalesQuery;
-import com.yxt.supervise.customer.api.gdsales.GdSalesVo;
import com.yxt.supervise.customer.biz.gdinstoragegd.GdInstorageGdService;
import com.yxt.supervise.customer.biz.gdinstoragelog.GdInstorageLogService;
import com.yxt.supervise.customer.biz.gdinventorylog.GdInventoryLogService;
import com.yxt.supervise.customer.biz.gdinventoryyc.GdInventoryYcService;
import com.yxt.supervise.customer.biz.gdsaleslog.GdSalesLogService;
-//import com.yxt.supervise.customer.kafka.messageproducer.MessageProducerRest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkService.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkService.java
index 65390dc0..d5ebea42 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkService.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkService.java
@@ -1,19 +1,15 @@
package com.yxt.supervise.customer.biz.gdinventoryok;
import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
-import cn.hutool.json.JSONUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
-import cn.hutool.poi.excel.sax.handler.RowHandler;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.builder.ExcelReaderBuilder;
import com.alibaba.excel.read.listener.ReadListener;
-import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.config.component.FileUploadComponent;
@@ -23,31 +19,22 @@ import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.FileUploadResult;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
-import com.yxt.supervise.customer.api.gdinventorylogerr.GdInventoryLogErr;
+import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import com.yxt.supervise.customer.api.gdinventoryok.*;
import com.yxt.supervise.customer.api.gdinventoryyc.GdInventoryYc;
-import com.yxt.supervise.customer.api.gdsales.GdSales;
-import com.yxt.supervise.customer.api.gdsales.GdSalesExcelVo;
-import com.yxt.supervise.customer.api.gdsales.GdSalesQuery;
-import com.yxt.supervise.customer.api.gdsales.GdSalesVo;
-import com.yxt.supervise.customer.api.purchaserequisition.PurchaseRequisition;
-import com.yxt.supervise.customer.api.purchaserequisitionpro.PurchaseRequisitionPro;
import com.yxt.supervise.customer.biz.gdinventorylog.GdInventoryLogService;
import com.yxt.supervise.customer.biz.gdinventorylogerr.GdInventoryLogErrService;
import com.yxt.supervise.customer.biz.gdinventoryyc.GdInventoryYcService;
import com.yxt.supervise.customer.biz.gdrescategoryprod.GdRescategoryProdService;
import com.yxt.supervise.customer.biz.storeindex.StoreIndexService;
import com.yxt.supervise.customer.biz.storeinfo.StoreInfoService;
-import com.yxt.supervise.customer.tools.StrTool;
import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ss.usermodel.CellStyle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
-import java.math.BigDecimal;
import java.util.*;
/**
@@ -156,7 +143,7 @@ public class GdInventoryOkService extends MybatisBaseService toInsertList = new ArrayList<>();
+ private List toInsertListYc = new ArrayList<>();
private boolean checkYcProd(String typeCode) {
if (StrUtil.isBlank(typeCode))
@@ -184,6 +172,7 @@ public class GdInventoryOkService extends MybatisBaseService= BATCH_COUNT) {
+ gdInventoryYcService.saveBatch(toInsertListYc);
+ // 存储完成清理 list
+ toInsertListYc.clear();
+ }
+ } else {
z++;
- }
-
- toInsertList.add(obj);
- // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
- if (toInsertList.size() >= BATCH_COUNT) {
- GdInventoryOkService.this.saveBatch(toInsertList);
- // 存储完成清理 list
- toInsertList.clear();;
+ toInsertList.add(obj);
+ // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
+ if (toInsertList.size() >= BATCH_COUNT) {
+ GdInventoryOkService.this.saveBatch(toInsertList);
+ // 存储完成清理 list
+ toInsertList.clear();
+ }
}
}
}
@@ -214,6 +210,9 @@ public class GdInventoryOkService extends MybatisBaseServicefastcsv
2.2.1
+
+ net.sf.json-lib
+ json-lib
+ jdk15
+ 2.4
+
diff --git a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportcashedtoday/CsmCashReportCashedTodayMapper.java b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportcashedtoday/CsmCashReportCashedTodayMapper.java
index 7cfc19a1..bd9c740f 100644
--- a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportcashedtoday/CsmCashReportCashedTodayMapper.java
+++ b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportcashedtoday/CsmCashReportCashedTodayMapper.java
@@ -2,10 +2,12 @@ package com.yxt.supervise.report.biz.csmcashreportcashedtoday;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.supervise.report.api.csmcashreportcashedtoday.CsmCashReportCashedToday;
+import org.apache.ibatis.annotations.Mapper;
/**
* @author wangpengfei
* @date 2023/6/21 10:56
*/
+@Mapper
public interface CsmCashReportCashedTodayMapper extends BaseMapper {
}
diff --git a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayMapper.java b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayMapper.java
index ca1f8d8d..c3a99d7f 100644
--- a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayMapper.java
+++ b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayMapper.java
@@ -2,10 +2,12 @@ package com.yxt.supervise.report.biz.csmcashreportsalesyesterday;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.supervise.report.api.csmcashreportsalesyesterday.CsmCashReportSalesYesterday;
+import org.apache.ibatis.annotations.Mapper;
/**
* @author wangpengfei
* @date 2023/6/21 10:57
*/
+@Mapper
public interface CsmCashReportSalesYesterdayMapper extends BaseMapper {
}
diff --git a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayService.java b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayService.java
index cfd37a9d..0b871125 100644
--- a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayService.java
+++ b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/csmcashreportsalesyesterday/CsmCashReportSalesYesterdayService.java
@@ -5,11 +5,13 @@ import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.report.api.csmcashreportcashedtoday.CsmCashReportCashedTodayDto;
import com.yxt.supervise.report.api.csmcashreportsalesyesterday.CsmCashReportSalesYesterday;
+import org.springframework.stereotype.Service;
/**
* @author wangpengfei
* @date 2023/6/21 10:57
*/
+@Service
public class CsmCashReportSalesYesterdayService extends MybatisBaseService {
public ResultBean save(CsmCashReportCashedTodayDto dto) {
ResultBean rb=new ResultBean();
diff --git a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGather.java b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGather.java
index 69ead614..3599383f 100644
--- a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGather.java
+++ b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGather.java
@@ -1,4 +1,129 @@
package com.yxt.supervise.report.biz.reportinventory;
-public class ReportInventoryDayGather {
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yxt.common.core.domain.EntityWithId;
+
+import java.util.Date;
+
+@TableName("report_inventory_day_gather")
+public class ReportInventoryDayGather extends EntityWithId {
+
+ public ReportInventoryDayGather() {
+ }
+
+ public ReportInventoryDayGather(String storeType) {
+ this.storeType = storeType;
+ }
+
+ public ReportInventoryDayGather(String orderDate, String serialNumber, String reportTime, String storeType) {
+ this.orderDate = orderDate;
+ this.serialNumber = serialNumber;
+ this.reportTime = reportTime;
+ this.storeType = storeType;
+ }
+
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss",
+ timezone = "GMT+8"
+ )
+ private Date createTime = new Date(); // 记录创建时间
+ private String remarks; // 备注说明
+ private String orderDate; // 单据日期
+ private String serialNumber; // 编号
+ private String reportTime; // 上报时间
+ private int sort = 0; // 排序
+ private String storeType; // 仓库类型
+ private int storeNumber = 1; // 仓库数量
+ private int productCountNumber = 1; // 品种数量
+ private double productAmount; // 货值
+ private double countAmount; // 合计货值
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getRemarks() {
+ return remarks;
+ }
+
+ public void setRemarks(String remarks) {
+ this.remarks = remarks;
+ }
+
+ public String getOrderDate() {
+ return orderDate;
+ }
+
+ public void setOrderDate(String orderDate) {
+ this.orderDate = orderDate;
+ }
+
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ public void setSerialNumber(String serialNumber) {
+ this.serialNumber = serialNumber;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public void setReportTime(String reportTime) {
+ this.reportTime = reportTime;
+ }
+
+ public int getSort() {
+ return sort;
+ }
+
+ public void setSort(int sort) {
+ this.sort = sort;
+ }
+
+ public String getStoreType() {
+ return storeType;
+ }
+
+ public void setStoreType(String storeType) {
+ this.storeType = storeType;
+ }
+
+ public int getStoreNumber() {
+ return storeNumber;
+ }
+
+ public void setStoreNumber(int storeNumber) {
+ this.storeNumber = storeNumber;
+ }
+
+ public int getProductCountNumber() {
+ return productCountNumber;
+ }
+
+ public void setProductCountNumber(int productCountNumber) {
+ this.productCountNumber = productCountNumber;
+ }
+
+ public double getProductAmount() {
+ return productAmount;
+ }
+
+ public void setProductAmount(double productAmount) {
+ this.productAmount = productAmount;
+ }
+
+ public double getCountAmount() {
+ return countAmount;
+ }
+
+ public void setCountAmount(double countAmount) {
+ this.countAmount = countAmount;
+ }
}
diff --git a/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGatherMapper.java b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGatherMapper.java
new file mode 100644
index 00000000..7e5c8f20
--- /dev/null
+++ b/yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/reportinventory/ReportInventoryDayGatherMapper.java
@@ -0,0 +1,79 @@
+package com.yxt.supervise.report.biz.reportinventory;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface ReportInventoryDayGatherMapper extends BaseMapper {
+
+ @Delete("delete from report_inventory_day_gather where orderDate=#{orderDate} ")
+ void clearDay(@Param("orderDate") String orderDate);
+
+ @Select("select " +
+ " warehouseCode, " +
+ " max(warehouseName) warehouseName " +
+ "from gd_inventory_ok gio where warehouseType=1 " +
+ "group by warehouseCode ")
+ List