|
@@ -1,15 +1,19 @@
|
|
|
package com.imed.costaccount.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.imed.costaccount.common.exception.CostException;
|
|
|
import com.imed.costaccount.common.util.JacksonUtil;
|
|
|
+import com.imed.costaccount.common.util.PageUtils;
|
|
|
import com.imed.costaccount.mapper.AllocationMapper;
|
|
|
import com.imed.costaccount.model.*;
|
|
|
import com.imed.costaccount.model.dto.StartDTO;
|
|
|
import com.imed.costaccount.model.vo.AccountShareVO;
|
|
|
+import com.imed.costaccount.model.vo.AfterAllocationVO;
|
|
|
import com.imed.costaccount.model.vo.CostShareLevelVO;
|
|
|
import com.imed.costaccount.service.*;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -274,4 +278,31 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
|
|
|
List<Long> shareLevelIds = shareLevels.stream().map(CostShareLevel::getId).collect(Collectors.toList());
|
|
|
return responsibilityService.getByLevelIds(shareLevelIds, hospId);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分摊后查询列表
|
|
|
+ *
|
|
|
+ * @param year 年月 (yyyy-MM-dd)
|
|
|
+ * @param responsibilityCode 责任中心代码
|
|
|
+ * @param current 当前页
|
|
|
+ * @param pageSize 当前页展示的数据大小
|
|
|
+ * @param hospId 医院id
|
|
|
+ * @return PageUtils
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public PageUtils queryAfterAllocation(String year, String responsibilityCode, Integer current, Integer pageSize, Long hospId) {
|
|
|
+ Integer dateYear = null;
|
|
|
+ Integer dateMonth = null;
|
|
|
+ if (StrUtil.isNotBlank(year)) {
|
|
|
+ DateTime dateTime = DateUtil.parseDate(year);
|
|
|
+ dateYear = DateUtil.year(dateTime);
|
|
|
+ dateMonth = DateUtil.month(dateTime) + 1;
|
|
|
+ }
|
|
|
+ Integer startIndex = (current - 1) * pageSize;
|
|
|
+ List<AfterAllocationVO> list = baseMapper.queryAfterAllocationList(dateYear, dateMonth, responsibilityCode, startIndex, pageSize, hospId);
|
|
|
+ int totalCount = baseMapper.queryAfterAllocationListCount(dateYear, dateMonth, responsibilityCode, hospId);
|
|
|
+ BigDecimal sum = baseMapper.queryAfterAllocationListSum(dateYear, dateMonth, responsibilityCode, hospId);
|
|
|
+ return new PageUtils(list, totalCount, pageSize, current, sum);
|
|
|
+ }
|
|
|
}
|