Commit 3a93dfe7b4d47b9cf59ea188828dfb7c7aa0de7a

Authored by 姜超
1 parent dc3c54cf

feature(*): 考评指标修改、数据导入修改

考评指标修改、数据导入修改
fw-morax-domain/src/main/java/cn/fw/morax/domain/dto/EvalIndicatorDTO.java
@@ -27,17 +27,17 @@ public class EvalIndicatorDTO { @@ -27,17 +27,17 @@ public class EvalIndicatorDTO {
27 @Length(max = 255, message = "指标名称超出最大长度限制") 27 @Length(max = 255, message = "指标名称超出最大长度限制")
28 private String name; 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 * 数据类型;1:数量 2:百分比 3:金额 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,12 +133,11 @@ public class EvalIndicatorController {
133 @IgnoreAuth 133 @IgnoreAuth
134 @PostMapping("/analysis-shop") 134 @PostMapping("/analysis-shop")
135 @ControllerMethod("上传门店指标") 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 if (file.isEmpty()) { 137 if (file.isEmpty()) {
138 throw new BusinessException("请上传文件"); 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,12 +246,12 @@ public class EvalIndicatorBizService {
246 public EvalIndicator convertToDB(EvalIndicatorDTO dto){ 246 public EvalIndicator convertToDB(EvalIndicatorDTO dto){
247 EvalIndicator indicators = EvalIndicator.builder() 247 EvalIndicator indicators = EvalIndicator.builder()
248 .name(dto.getName()) 248 .name(dto.getName())
249 - .enable(Boolean.FALSE) 249 + .enable(Boolean.TRUE)
250 .ruleType(dto.getRuleType()) 250 .ruleType(dto.getRuleType())
251 .dataType(dto.getDataType()) 251 .dataType(dto.getDataType())
252 .targetType(dto.getTargetType()) 252 .targetType(dto.getTargetType())
253 - .sysId(dto.getSysId())  
254 - .sysName(dto.getSysName()) 253 +// .sysId(dto.getSysId())
  254 +// .sysName(dto.getSysName())
255 .roleCode(dto.getRoleCode()) 255 .roleCode(dto.getRoleCode())
256 .roleName(dto.getRoleName()) 256 .roleName(dto.getRoleName())
257 .build(); 257 .build();
@@ -359,9 +359,11 @@ public class EvalIndicatorBizService { @@ -359,9 +359,11 @@ public class EvalIndicatorBizService {
359 compositeIndicator.setCodeType(IndicatorCodeTypeEnum.EVAL_INDICATOR); 359 compositeIndicator.setCodeType(IndicatorCodeTypeEnum.EVAL_INDICATOR);
360 compositeIndicator.setCode(evalIndicator.getCode()); 360 compositeIndicator.setCode(evalIndicator.getCode());
361 compositeIndicator.setName(evalIndicator.getName()); 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 compositeIndicator.setRoleCode(evalIndicator.getRoleCode()); 367 compositeIndicator.setRoleCode(evalIndicator.getRoleCode());
366 compositeIndicator.setRoleName(evalIndicator.getRoleName()); 368 compositeIndicator.setRoleName(evalIndicator.getRoleName());
367 compositeIndicator.setDataType(evalIndicator.getDataType()); 369 compositeIndicator.setDataType(evalIndicator.getDataType());