Selaa lähdekoodia

Merge branch 'master' of huangrui/CostAccount into dev

lijiaxi 4 vuotta sitten
vanhempi
commit
749469917c

+ 2 - 1
src/main/java/com/imed/costaccount/model/dto/CostShareLevelSaveDto.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
 
 
+import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.NotNull;
 
 
 /**
 /**
@@ -22,7 +23,7 @@ public class CostShareLevelSaveDto {
     @NotNull(message = "层级序号不能为空")
     @NotNull(message = "层级序号不能为空")
     private Integer leverSort;
     private Integer leverSort;
     @ApiModelProperty(name = "targetLevel",value = "目标层级")
     @ApiModelProperty(name = "targetLevel",value = "目标层级")
-    @NotNull(message = "目标层级不能为空")
+    @NotBlank(message = "目标层级不能为空")
     private String targetLevel;
     private String targetLevel;
     @ApiModelProperty(name = "calcType",value = "计算方式  0合并计算  1 分开计算")
     @ApiModelProperty(name = "calcType",value = "计算方式  0合并计算  1 分开计算")
     @NotNull(message = "计算方式不能为空")
     @NotNull(message = "计算方式不能为空")

+ 1 - 1
src/main/java/com/imed/costaccount/service/impl/CostAccountShareServiceImpl.java

@@ -170,7 +170,7 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
                     Integer isShareCost = i.getIsShareCost();
                     Integer isShareCost = i.getIsShareCost();
                     List<Long> accountIdListRequest = Arrays.stream(accountingIds.split(StrUtil.COMMA)).map(Long::valueOf).collect(Collectors.toList());
                     List<Long> accountIdListRequest = Arrays.stream(accountingIds.split(StrUtil.COMMA)).map(Long::valueOf).collect(Collectors.toList());
                     if (!Collections.disjoint(accountIdListRequest, accountIdList)) {
                     if (!Collections.disjoint(accountIdListRequest, accountIdList)) {
-                        throw new CostException(500, "存在重复的数据");
+                        throw new CostException(500, "存在相同的会计科目数据");
                     }
                     }
                     if (NumberConstant.ONE.equals(isShareCost) && NumberConstant.ONE.equals(costAccountShareSaveDto.getIsShareCost())) {
                     if (NumberConstant.ONE.equals(isShareCost) && NumberConstant.ONE.equals(costAccountShareSaveDto.getIsShareCost())) {
                         throw new CostException(500, "同个责任中心只允许一条设置包含分摊成本");
                         throw new CostException(500, "同个责任中心只允许一条设置包含分摊成本");

+ 2 - 1
src/main/java/com/imed/costaccount/service/impl/ShareParamValueServiceImpl.java

@@ -460,7 +460,8 @@ public class ShareParamValueServiceImpl extends ServiceImpl<ShareParamValueMappe
             }
             }
         }
         }
         list.forEach(i -> {
         list.forEach(i -> {
-            BigDecimal bigDecimal = map.get(i);
+            // TODO: 2021/8/19
+            BigDecimal bigDecimal = map.getOrDefault(i,new BigDecimal("0.3125"));
             if (Objects.nonNull(bigDecimal)) {
             if (Objects.nonNull(bigDecimal)) {
                 i.setValueNum(bigDecimal);
                 i.setValueNum(bigDecimal);
             }
             }