Explorar el Código

Merge branch 'master' of huangrui/CostAccount into dev

lijiaxi hace 4 años
padre
commit
40d2e83014

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

@@ -767,6 +767,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
         int month = DateUtil.month(parse) + 1;
         // 得到这个月的分摊过的分摊层级
         List<Allocation> list = baseMapper.getAllSortLevel(hospId, year, month);
+        Map<Long, CostShareLevel> map = shareLevelService.list(new QueryWrapper<CostShareLevel>().lambda().eq(CostShareLevel::getHospId, hospId)).stream().collect(Collectors.toMap(CostShareLevel::getId, synOne -> synOne));
 //        list.
         List<AfterAllocationFormVO> vos = list.stream().map(i -> {
             AfterAllocationFormVO vo = new AfterAllocationFormVO();
@@ -774,7 +775,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
             vo.setYear(i.getDateYear());
             vo.setMonth(i.getDateMonth());
             vo.setShareLevel(i.getLevelSort());
-            vo.setShareReportName(i.getShareParamName() + "分摊");
+            vo.setShareReportName(map.get(i.getShareLevelId()).getShareName() + "分摊");
             vo.setShareTime(DateUtil.date(i.getCreateTime()));
             vo.setShareLevelId(i.getShareLevelId());
             return vo;