|
@@ -401,12 +401,13 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
|
|
|
* @param sheet 报表
|
|
|
* @param year 年
|
|
|
* @param month 月
|
|
|
+ * @param shareLevelId
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public ExcelWriter getShareReportTemplate(ExcelWriter writer, Integer levelSort, Sheet sheet, Integer year, Integer month) {
|
|
|
+ public ExcelWriter getShareReportTemplate(ExcelWriter writer, Integer levelSort, Sheet sheet, Integer year, Integer month, Long shareLevelId) {
|
|
|
// 获取数据
|
|
|
- List<AllocationReportVO> allocationReportVOList = getAllocationReportVOS(levelSort, year, month);
|
|
|
+ List<AllocationReportVO> allocationReportVOList = getAllocationReportVOS(levelSort, year, month,shareLevelId);
|
|
|
// 设置导出
|
|
|
Map<String, List<AllocationReportVO>> responsibilityMap = allocationReportVOList.stream().collect(Collectors.groupingBy(AllocationReportVO::getResponsibilityCode));
|
|
|
Map<String, List<AllocationReportVO>> targetResponsibilityMap = allocationReportVOList.stream().collect(Collectors.groupingBy(AllocationReportVO::getTargetResponsibilityCode));
|
|
@@ -605,16 +606,16 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
|
|
|
* @param month
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<AllocationReportVO> getAllocationReportVOS(Integer levelSort, Integer year, Integer month) {
|
|
|
+ private List<AllocationReportVO> getAllocationReportVOS(Integer levelSort, Integer year, Integer month,Long shareLevelId) {
|
|
|
Long hospId = UserContext.getHospId();
|
|
|
if (Objects.isNull(levelSort) || Objects.isNull(year) || Objects.isNull(month)) {
|
|
|
throw new CostException(500, "参数异常");
|
|
|
}
|
|
|
// 处理第几次分摊计算值
|
|
|
List<Allocation> allocationList = baseMapper.selectList(new QueryWrapper<Allocation>().lambda()
|
|
|
- .eq(Allocation::getHospId, hospId).eq(Allocation::getLevelSort, levelSort).eq(Allocation::getDateYear, year)
|
|
|
+ .eq(Allocation::getHospId, hospId).eq(Allocation::getLevelSort, levelSort).eq(Allocation::getShareLevelId,shareLevelId).eq(Allocation::getDateYear, year)
|
|
|
.eq(Allocation::getDateMonth, month));
|
|
|
-
|
|
|
+ // 找会计科室的时候使用的
|
|
|
List<Allocation> allocations = baseMapper.selectList(new QueryWrapper<Allocation>().lambda()
|
|
|
.eq(Allocation::getHospId, hospId).eq(Allocation::getDateYear, year)
|
|
|
.eq(Allocation::getDateMonth, month));
|