|
@@ -23,10 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@@ -47,8 +44,7 @@ public class CostShareParamServiceImpl extends ServiceImpl<CostShareParamMapper,
|
|
|
Page<CostShareParam> costShareParamPage = new Page<>(current, pageSize);
|
|
|
Page<CostShareParam> pages = this.page(costShareParamPage, new QueryWrapper<CostShareParam>().lambda()
|
|
|
.eq(!StringUtils.isEmpty(hospId), CostShareParam::getHospId, hospId)
|
|
|
- .like(!StringUtils.isEmpty(name), CostShareParam::getShareParamName, name)
|
|
|
- .orderByDesc(CostShareParam::getCreateTime))
|
|
|
+ .like(!StringUtils.isEmpty(name), CostShareParam::getShareParamName, name).orderByDesc(CostShareParam::getCreateTime))
|
|
|
;
|
|
|
List<CostShareParam> records = pages.getRecords();
|
|
|
List<CostShareParamVO> costShareParamVOList = BeanUtil.convertList(records, CostShareParamVO.class);
|
|
@@ -181,9 +177,15 @@ public class CostShareParamServiceImpl extends ServiceImpl<CostShareParamMapper,
|
|
|
throw new CostException(500, "当前分摊参数已被移除或不存在");
|
|
|
}
|
|
|
String accountingId = byId.getAccountingId();
|
|
|
- String[] split = accountingId.split(StrUtil.COMMA);
|
|
|
- List<Integer> collect = Arrays.stream(split).map(Integer::valueOf).collect(Collectors.toList());
|
|
|
- return collect;
|
|
|
+ if (!StringUtils.isEmpty(accountingId)){
|
|
|
+ String[] split = accountingId.split(StrUtil.COMMA);
|
|
|
+ List<Integer> collect = Arrays.stream(split).map(Integer::valueOf).collect(Collectors.toList());
|
|
|
+ return collect;
|
|
|
+ }else {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
+
|
|
|
}
|