Commit 3a93dfe7b4d47b9cf59ea188828dfb7c7aa0de7a
1 parent
dc3c54cf
feature(*): 考评指标修改、数据导入修改
考评指标修改、数据导入修改
Showing
3 changed files
with
21 additions
and
20 deletions
fw-morax-domain/src/main/java/cn/fw/morax/domain/dto/EvalIndicatorDTO.java
... | ... | @@ -27,17 +27,17 @@ public class EvalIndicatorDTO { |
27 | 27 | @Length(max = 255, message = "指标名称超出最大长度限制") |
28 | 28 | private String name; |
29 | 29 | |
30 | - /** | |
31 | - * 归属系统id | |
32 | - */ | |
33 | - @NotNull(message = "归属系统不能为空") | |
34 | - private Long sysId; | |
35 | - | |
36 | - /** | |
37 | - * 归属系统名称 | |
38 | - */ | |
39 | - @NotNull(message = "归属系统名称不能为空") | |
40 | - private String sysName; | |
30 | +// /** | |
31 | +// * 归属系统id | |
32 | +// */ | |
33 | +// @NotNull(message = "归属系统不能为空") | |
34 | +// private Long sysId; | |
35 | +// | |
36 | +// /** | |
37 | +// * 归属系统名称 | |
38 | +// */ | |
39 | +// @NotNull(message = "归属系统名称不能为空") | |
40 | +// private String sysName; | |
41 | 41 | |
42 | 42 | /** |
43 | 43 | * 数据类型;1:数量 2:百分比 3:金额 | ... | ... |
fw-morax-server/src/main/java/cn/fw/morax/server/controller/erp/EvalIndicatorController.java
... | ... | @@ -133,12 +133,11 @@ public class EvalIndicatorController { |
133 | 133 | @IgnoreAuth |
134 | 134 | @PostMapping("/analysis-shop") |
135 | 135 | @ControllerMethod("上传门店指标") |
136 | - public Message<Void> uploadShopIndicator(@RequestParam("file") MultipartFile file, @CurrentUser LoginAuthBean user) { | |
136 | + public Message<EvalIndicatorImportRecordVO> uploadShopIndicator(@RequestParam("file") MultipartFile file, @CurrentUser LoginAuthBean user) { | |
137 | 137 | if (file.isEmpty()) { |
138 | 138 | throw new BusinessException("请上传文件"); |
139 | 139 | } |
140 | - evalIndicatorReportService.uploadShopIndicator(file, user); | |
141 | - return success(); | |
140 | + return success(evalIndicatorReportService.uploadShopIndicator(file, user)); | |
142 | 141 | } |
143 | 142 | |
144 | 143 | /** | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorBizService.java
... | ... | @@ -246,12 +246,12 @@ public class EvalIndicatorBizService { |
246 | 246 | public EvalIndicator convertToDB(EvalIndicatorDTO dto){ |
247 | 247 | EvalIndicator indicators = EvalIndicator.builder() |
248 | 248 | .name(dto.getName()) |
249 | - .enable(Boolean.FALSE) | |
249 | + .enable(Boolean.TRUE) | |
250 | 250 | .ruleType(dto.getRuleType()) |
251 | 251 | .dataType(dto.getDataType()) |
252 | 252 | .targetType(dto.getTargetType()) |
253 | - .sysId(dto.getSysId()) | |
254 | - .sysName(dto.getSysName()) | |
253 | +// .sysId(dto.getSysId()) | |
254 | +// .sysName(dto.getSysName()) | |
255 | 255 | .roleCode(dto.getRoleCode()) |
256 | 256 | .roleName(dto.getRoleName()) |
257 | 257 | .build(); |
... | ... | @@ -359,9 +359,11 @@ public class EvalIndicatorBizService { |
359 | 359 | compositeIndicator.setCodeType(IndicatorCodeTypeEnum.EVAL_INDICATOR); |
360 | 360 | compositeIndicator.setCode(evalIndicator.getCode()); |
361 | 361 | compositeIndicator.setName(evalIndicator.getName()); |
362 | - compositeIndicator.setSysId(evalIndicator.getSysId()); | |
363 | - compositeIndicator.setSysPrefix(evalIndicator.getSysPrefix()); | |
364 | - compositeIndicator.setSysName(evalIndicator.getSysName()); | |
362 | + if (PublicUtil.isNotEmpty(evalIndicator.getSysId())) { | |
363 | + compositeIndicator.setSysId(evalIndicator.getSysId()); | |
364 | + compositeIndicator.setSysPrefix(evalIndicator.getSysPrefix()); | |
365 | + compositeIndicator.setSysName(evalIndicator.getSysName()); | |
366 | + } | |
365 | 367 | compositeIndicator.setRoleCode(evalIndicator.getRoleCode()); |
366 | 368 | compositeIndicator.setRoleName(evalIndicator.getRoleName()); |
367 | 369 | compositeIndicator.setDataType(evalIndicator.getDataType()); | ... | ... |