diff --git a/warehousing-system/warehouse数据库设计文档_1.0.0.doc b/warehousing-system/warehouse数据库设计文档_1.0.0.doc
new file mode 100644
index 00000000..f98d710a
diff --git a/yxt-supervise-cyf/docs/sheji/favicon_logosc.zip b/yxt-supervise-cyf/docs/sheji/favicon_logosc.zip
new file mode 100644
index 00000000..4d052195
Binary files /dev/null and b/yxt-supervise-cyf/docs/sheji/favicon_logosc.zip differ
diff --git a/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql b/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql
index 1f0a489c..079fe66a 100644
--- a/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql
+++ b/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql
@@ -22,7 +22,7 @@ SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
DROP TABLE IF EXISTS `conf_brand_proportion`;
CREATE TABLE `conf_brand_proportion` (
- `id` int(11) NOT NULL COMMENT 'id',
+`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`brandSid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌Sid',
`brandName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌名称',
`typeName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '占比名称',
diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java
index 3d98a7cb..33a5e11b 100644
--- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java
+++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java
@@ -27,13 +27,13 @@ public class CrawlTask {
* 描述 : 每天上午10点30分抓取数据并保存到数据库.
*
*/
- @Scheduled(cron = "0 30 10 * * ?")
+ @Scheduled(cron = "0 0 5 * * ?")
public void pullZhjData() {
String currDay = DateUtil.format(DateUtil.offsetDay(new Date(), -1), "yyyy-MM-dd");
- String purchaseDay = DateUtil.format(DateUtil.offsetDay(new Date(), -2), "yyyy-MM-dd");
+// String purchaseDay = DateUtil.format(DateUtil.offsetDay(new Date(), -2), "yyyy-MM-dd");
ThreadUtil.execute(() -> crawlSalesAmountService.pullData(currDay));
ThreadUtil.execute(() -> crawlSalesDishesService.pullData(currDay));
- ThreadUtil.execute(() -> crawlPurchaseService.pullData(purchaseDay));
+ ThreadUtil.execute(() -> crawlPurchaseService.pullData(currDay));
}
}
diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java
index 2163e981..250f7f05 100644
--- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java
+++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java
@@ -173,7 +173,7 @@ public class ZhjSpider {
public static ZhjResp dopost(Map paramMap) {
HttpRequest request = ZhjSpiderConfig.fillHeaders(HttpRequest.post(url));
String result = request.form(paramMap).execute().body();
- L.debug("param:{}######result:{}", paramMap.toString(), result);
+ L.info("param:{}######result:{}", paramMap.toString(), result);
ZhjResp bean = JSONUtil.toBean(result, ZhjResp.class);
return bean;
}
diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java
index 67b42752..2f128614 100644
--- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java
+++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java
@@ -25,8 +25,9 @@ public class ZhjSpiderConfig {
private static void initHeaders() {
CACHE_HEADERS = new HashMap<>();
- CACHE_HEADERS.put("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk=19b6a50a88ee4c8cbeacee4420345262; csrf_token=be21ee6f-fb65-4978-b58f-53bc1ad0e7a6; qbi_version=2; qbi_redirected=1; xlly_s=1; isg=BPn5lzNHubARqWVPDzIOHAr9CGXTBu24S0hh_Bss2SCfoho0YlOFiBw0JKZUGoXw");
- CACHE_HEADERS.put("x-csrf-token", "be21ee6f-fb65-4978-b58f-53bc1ad0e7a6");
- CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=2");
+// CACHE_HEADERS.put("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk=19b6a50a88ee4c8cbeacee4420345262; xlly_s=1; qbi_version=1; qbi_redirected=1; csrf_token=f66e628f-d681-4be5-855e-56e77886e002; isg=BIqKYOxE2qEZjVZawN-NAZ2Y23Asew7V-iD6yBTCI11JxyuB_Q3P5fXx1zMbN4Zt");
+ CACHE_HEADERS.put("x-csrf-token", "f66e628f-d681-4be5-855e-56e77886e002");
+ CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=1");
+// CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto");
}
}
diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/HttpUtilTester.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/HttpUtilTester.java
new file mode 100644
index 00000000..d36e99f1
--- /dev/null
+++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/HttpUtilTester.java
@@ -0,0 +1,54 @@
+package com.yxt.supervise.dbcenter;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.http.HttpUtil;
+import cn.hutool.json.JSONUtil;
+import com.yxt.supervise.dbcenter.zhj.crawl.ZhjSpiderConfig;
+import com.yxt.supervise.dbcenter.zhj.crawl.spider.ZhjResp;
+import org.junit.jupiter.api.Test;
+
+import java.net.HttpCookie;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class HttpUtilTester {
+ private static String olapQueryParam_salesAmount = "{\"componentId\":\"52dece2d-ba6d-452e-8497-f94baff096c4\",\"componentName\":\"指标看板-熟溢香支付方式_knief\",\"configs\":[{\"type\":\"field\",\"config\":{\"fields\":[{\"guid\":\"31ce439f-747c-45d0-8f35-51fe9daea91e\",\"fid\":\"5805bc15e1\",\"areaType\":\"row\"},{\"guid\":\"6e8c6afd-038a-4644-85c1-ffb813dc8614\",\"fid\":\"fa1b7a0d21\",\"areaType\":\"column\",\"aggregate\":\"sum\"}]},\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\"},{\"type\":\"paging\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"limit\":1000,\"offset\":0,\"pagedByAllDim\":true}},{\"type\":\"beforeAggregateCondition\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"3fd928d207\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"POS点餐\"},{\"valueType\":\"string\",\"value\":\"会员充值\"},{\"valueType\":\"string\",\"value\":\"扫码点餐\"},{\"valueType\":\"string\",\"value\":\"美团外卖点餐\"},{\"valueType\":\"string\",\"value\":\"饿了么外卖点餐\"}]},{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"15784307a1\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"greaterThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]},{\"field\":{\"fid\":\"15784307a1\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"lessThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]}]}]}},{\"type\":\"queryConfig\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"needCount\":false,\"queryCount\":false,\"queryDetail\":false}},{\"type\":\"advancedParam\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"autoInsightParam\":{\"enable\":false},\"wordCloudParam\":{},\"summarizeParams\":[],\"trendLineParams\":[],\"forecastParams\":[],\"anomalyDetectionParams\":[],\"clusteringParams\":[],\"groupParam\":null}},{\"type\":\"annotationParam\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"measureThresholdParams\":[],\"inflectionPointParams\":[]}}],\"dataType\":\"general\",\"reportId\":\"85c4af04-1910-4005-8e47-742af1acb713\"}";
+ private static String reportId = "85c4af04-1910-4005-8e47-742af1acb713";
+
+ private static String urla = "https://bi.aliyuncs.com/api/v2/biPlatform/query/byQueryParam";
+ @Test
+ void sptest() {
+
+ String url = "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto";
+
+ HttpRequest request = HttpRequest.get(url);
+ HttpResponse execute = request.execute();
+ Map mm = new HashMap<>();
+ List cookies = execute.getCookies();
+ for (HttpCookie c : cookies ) {
+ String name = c.getName();
+ String value = c.getValue();
+ mm.put(name,value);
+ }
+ System.out.println();
+
+
+ String olapQueryParam = olapQueryParam_salesAmount.replace("VAR_DATE_STR", "2023-055-13");
+ String componentId = "52dece2d-ba6d-452e-8497-f94baff096c4";
+ Map paramMap = new HashMap<>();
+ paramMap.put("olapQueryParam", olapQueryParam);
+ paramMap.put("componentId", componentId);
+ paramMap.put("reportId", reportId);
+ paramMap.put("componentType", "66");
+
+ String result = HttpRequest.post(urla)
+ .header("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk="+mm.get("x_login_pk")+"; qbi_version=1; csrf_token=hello123456")
+ .header("x-csrf-token", "hello123456")
+ .header("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=1")
+ .form(paramMap).execute().body();
+
+ System.out.println( result);
+ }
+}
diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/YxtSuperviseDbcenterApplicationTests.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/YxtSuperviseDbcenterApplicationTests.java
index ef9f7576..f9a95b87 100644
--- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/YxtSuperviseDbcenterApplicationTests.java
+++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/YxtSuperviseDbcenterApplicationTests.java
@@ -24,10 +24,10 @@ class YxtSuperviseDbcenterApplicationTests {
@Test
void contextLoads() {
- String currDay = "2023-05-11";
+ String currDay = "2023-05-13";
-// crawlSalesAmountService.pullData(currDay);
- crawlSalesDishesService.pullData(currDay);
+ crawlSalesAmountService.pullData(currDay);
+// crawlSalesDishesService.pullData(currDay);
// crawlPurchaseService.pullData(currDay);
}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLog.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLog.java
new file mode 100644
index 00000000..727267c8
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLog.java
@@ -0,0 +1,37 @@
+package com.yxt.supervise.customer.api.gdinventorylog;
+
+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;
+
+/**
+ * @author wangpengfei
+ * @date 2023/4/24 13:45
+ */
+@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-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLogQuery.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLogQuery.java
new file mode 100644
index 00000000..08bb10e5
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLogQuery.java
@@ -0,0 +1,24 @@
+package com.yxt.supervise.customer.api.gdinventorylog;
+
+import com.yxt.common.core.query.Query;
+
+public class GdInventoryLogQuery implements Query {
+ private String dataDateStart; // 数据日期
+ private String dataDateEnd; // 数据日期
+
+ public String getDataDateStart() {
+ return dataDateStart;
+ }
+
+ public void setDataDateStart(String dataDateStart) {
+ this.dataDateStart = dataDateStart;
+ }
+
+ public String getDataDateEnd() {
+ return dataDateEnd;
+ }
+
+ public void setDataDateEnd(String dataDateEnd) {
+ this.dataDateEnd = dataDateEnd;
+ }
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLogVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLogVo.java
new file mode 100644
index 00000000..0a043b0c
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventorylog/GdInventoryLogVo.java
@@ -0,0 +1,8 @@
+package com.yxt.supervise.customer.api.gdinventorylog;
+
+/**
+ * @author wangpengfei
+ * @date 2023/4/24 13:46
+ */
+public class GdInventoryLogVo {
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdlinventorylog/GdIinventoryLog.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdlinventorylog/GdIinventoryLog.java
deleted file mode 100644
index 8416da72..00000000
--- a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdlinventorylog/GdIinventoryLog.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.yxt.supervise.customer.api.gdlinventorylog;
-
-/**
- * @author wangpengfei
- * @date 2023/4/24 13:45
- */
-public class GdIinventoryLog {
-}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdlinventorylog/GdIinventoryLogVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdlinventorylog/GdIinventoryLogVo.java
deleted file mode 100644
index eeb4c08a..00000000
--- a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdlinventorylog/GdIinventoryLogVo.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.yxt.supervise.customer.api.gdlinventorylog;
-
-/**
- * @author wangpengfei
- * @date 2023/4/24 13:46
- */
-public class GdIinventoryLogVo {
-}