|
@@ -123,7 +123,7 @@ public class CostCostingGroupServiceImpl extends ServiceImpl<CostCostingGroupMap
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 开始归集代码
|
|
|
+ * 开始成本分摊
|
|
|
*
|
|
|
* @param startDTO {@link StartDTO}
|
|
|
* @param hospId 医院id
|
|
@@ -131,21 +131,24 @@ public class CostCostingGroupServiceImpl extends ServiceImpl<CostCostingGroupMap
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
|
public void startAllocation(StartDTO startDTO, Long hospId) {
|
|
|
-// // 先拿到这个月数据 如果数据量很大 优化处理
|
|
|
-// List<CostCostingGroup> list = this.list(
|
|
|
-// new LambdaQueryWrapper<CostCostingGroup>()
|
|
|
-// .eq(CostCostingGroup::getDateYear, startDTO.getYear())
|
|
|
-// .eq(CostCostingGroup::getDateMonth, startDTO.getMonth())
|
|
|
-// .eq(CostCostingGroup::getHospId, hospId)
|
|
|
-// );
|
|
|
-//
|
|
|
-// // 删除该年月已经归集过的数据
|
|
|
-// costingCollectionService.remove(
|
|
|
-// new LambdaQueryWrapper<CostCostingCollection>()
|
|
|
-// .eq(CostCostingCollection::getYear, startDTO.getYear())
|
|
|
-// .eq(CostCostingCollection::getMonth, startDTO.getMonth())
|
|
|
-// .eq(CostCostingCollection::getHospId, hospId)
|
|
|
-// );
|
|
|
+ // 先拿到这个月数据 如果数据量很大 优化处理
|
|
|
+ List<CostCostingGroup> list = this.list(
|
|
|
+ new LambdaQueryWrapper<CostCostingGroup>()
|
|
|
+ .eq(CostCostingGroup::getDateYear, startDTO.getYear())
|
|
|
+ .eq(CostCostingGroup::getDateMonth, startDTO.getMonth())
|
|
|
+ .eq(CostCostingGroup::getHospId, hospId)
|
|
|
+ );
|
|
|
+
|
|
|
+ // 删除该年月已经过的数据
|
|
|
+ costingCollectionService.remove(
|
|
|
+ new LambdaQueryWrapper<CostCostingCollection>()
|
|
|
+ .eq(CostCostingCollection::getYear, startDTO.getYear())
|
|
|
+ .eq(CostCostingCollection::getMonth, startDTO.getMonth())
|
|
|
+ .eq(CostCostingCollection::getHospId, hospId)
|
|
|
+ );
|
|
|
+ // 得到分摊层级为1 的
|
|
|
+// list.stream().map(get)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|