Commit 4f160ec611dcb91f6ee34328c0d784d0b539dde1
Merge branch 'main-modify' into 'main'
下载模板修改 下载模板修改 See merge request !74
Showing
5 changed files
with
45 additions
and
8 deletions
fw-morax-common/src/main/java/cn/fw/morax/common/config/FileVal.java
0 → 100644
1 | +package cn.fw.morax.common.config; | |
2 | + | |
3 | +import lombok.Data; | |
4 | +import org.springframework.boot.context.properties.ConfigurationProperties; | |
5 | +import org.springframework.stereotype.Component; | |
6 | + | |
7 | +@Data | |
8 | +@ConfigurationProperties(prefix = "file-url") | |
9 | +@Component | |
10 | +public class FileVal { | |
11 | + | |
12 | + /** | |
13 | + * 考评人员模板 | |
14 | + */ | |
15 | + private String evalStaff; | |
16 | + | |
17 | + /** | |
18 | + * 考评门店模板 | |
19 | + */ | |
20 | + private String evalShop; | |
21 | + | |
22 | +} | ... | ... |
fw-morax-server/src/main/java/cn/fw/morax/server/controller/erp/EvalIndicatorController.java
... | ... | @@ -93,9 +93,8 @@ public class EvalIndicatorController { |
93 | 93 | @IgnoreUserToken |
94 | 94 | @GetMapping("/staff/template-file") |
95 | 95 | @ControllerMethod("人员模板文件") |
96 | - public Message<Void> staffTemplateFile(HttpServletRequest request, HttpServletResponse response) { | |
97 | - evalIndicatorReportService.staffTemplateFile(request, response); | |
98 | - return success(); | |
96 | + public Message<String> staffTemplateFile() { | |
97 | + return success(evalIndicatorReportService.staffTemplateFileUrl()); | |
99 | 98 | } |
100 | 99 | |
101 | 100 | /** |
... | ... | @@ -106,9 +105,8 @@ public class EvalIndicatorController { |
106 | 105 | @IgnoreUserToken |
107 | 106 | @GetMapping("/shop/template-file") |
108 | 107 | @ControllerMethod("门店模板文件") |
109 | - public Message<Void> shopTemplateFile(HttpServletRequest request, HttpServletResponse response) { | |
110 | - evalIndicatorReportService.shopTemplateFile(request, response); | |
111 | - return success(); | |
108 | + public Message<String> shopTemplateFile() { | |
109 | + return success(evalIndicatorReportService.shopTemplateFileUrl()); | |
112 | 110 | } |
113 | 111 | |
114 | 112 | /** | ... | ... |
fw-morax-server/src/main/resources/application-prd.yml
... | ... | @@ -56,4 +56,8 @@ todo: |
56 | 56 | kpi-group-change: 'GoaTI9YO8v' |
57 | 57 | salary-group-change: 'IWGFvyS0Wl' |
58 | 58 | eval-indicator-import: 'PZm5ENk058' |
59 | - dist-eval-reward: '7gRDSfq8J7' | |
60 | 59 | \ No newline at end of file |
60 | + dist-eval-reward: '7gRDSfq8J7' | |
61 | + | |
62 | +file-url: | |
63 | + eval-staff: "https://gate.feewee.cn/file/download?fid=74d1d724f9be48baa5921f3782037c3b" | |
64 | + eval-shop: "https://gate.feewee.cn/file/download?fid=e4eb136962164264a78753bd1d6061f3" | |
61 | 65 | \ No newline at end of file | ... | ... |
fw-morax-server/src/main/resources/application-test.yml
... | ... | @@ -67,4 +67,8 @@ todo: |
67 | 67 | kpi-group-change: 'pWRIQeXZvI' |
68 | 68 | salary-group-change: 'zLFSx8BA2I' |
69 | 69 | eval-indicator-import: 'Ymxx2oDdoY' |
70 | - dist-eval-reward: 'Z5zts26iwi' | |
71 | 70 | \ No newline at end of file |
71 | + dist-eval-reward: 'Z5zts26iwi' | |
72 | + | |
73 | +file-url: | |
74 | + eval-staff: "https://testgate.feewee.cn/file/download?fid=2d2b7e2ea632493db10cf7f3c97342a5" | |
75 | + eval-shop: "https://testgate.feewee.cn/file/download?fid=05a391b7424d48b2bb8c8f12366ad22a" | |
72 | 76 | \ No newline at end of file | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorReportService.java
... | ... | @@ -4,6 +4,7 @@ import cn.fw.common.data.mybatis.pagination.PageData; |
4 | 4 | import cn.fw.common.exception.BusinessException; |
5 | 5 | import cn.fw.common.page.AppPage; |
6 | 6 | import cn.fw.common.web.auth.LoginAuthBean; |
7 | +import cn.fw.morax.common.config.FileVal; | |
7 | 8 | import cn.fw.morax.common.pojo.event.ImportEvalIndicatorEvent; |
8 | 9 | import cn.fw.morax.common.utils.EventBusUtil; |
9 | 10 | import cn.fw.morax.common.utils.ExcelDataUtil; |
... | ... | @@ -67,6 +68,7 @@ public class EvalIndicatorReportService { |
67 | 68 | private final StringRedisTemplate stringRedisTemplate; |
68 | 69 | private final EvalGroupService evalGroupService; |
69 | 70 | private final EvalService evalService; |
71 | + private final FileVal fileVal; | |
70 | 72 | |
71 | 73 | @Value("${spring.cache.custom.global-prefix}:eval-import:") |
72 | 74 | @Getter |
... | ... | @@ -81,6 +83,13 @@ public class EvalIndicatorReportService { |
81 | 83 | CommonService.downloadExcel(response, staffTemplateData(), encodeFileName, StaffIndicatorValueVO.class); |
82 | 84 | } |
83 | 85 | |
86 | + public String staffTemplateFileUrl() { | |
87 | + return fileVal.getEvalStaff(); | |
88 | + } | |
89 | + public String shopTemplateFileUrl() { | |
90 | + return fileVal.getEvalShop(); | |
91 | + } | |
92 | + | |
84 | 93 | public void shopTemplateFile(HttpServletRequest request, HttpServletResponse response) { |
85 | 94 | String fileName = "门店导入标准模板.xlsx"; |
86 | 95 | String encodeFileName = CommonService.getEncodeName(request, fileName); | ... | ... |