|
@@ -13,13 +13,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.common.collect.ImmutableMap;
|
|
|
import com.kcim.common.constants.Constant;
|
|
|
import com.kcim.common.constants.NumberConstant;
|
|
|
-import com.kcim.common.enums.CalcTypeEnum;
|
|
|
-import com.kcim.common.enums.ErrorCodeEnum;
|
|
|
-import com.kcim.common.enums.ReportTypeEnum;
|
|
|
+import com.kcim.common.constants.SQLParameter;
|
|
|
+import com.kcim.common.enums.*;
|
|
|
import com.kcim.common.exception.CostException;
|
|
|
import com.kcim.common.file.MinioConfig;
|
|
|
import com.kcim.common.file.MinioFileUtil;
|
|
|
import com.kcim.common.util.BeanUtil;
|
|
|
+import com.kcim.common.util.DateUtils;
|
|
|
import com.kcim.common.util.PageUtils;
|
|
|
import com.kcim.common.util.UserContext;
|
|
|
import com.kcim.common.util.excel.ExcelPoiUtil;
|
|
@@ -82,15 +82,10 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
|
|
|
|
|
|
private final MinioFileUtil minioFileUtil;
|
|
|
|
|
|
+ private final SqlService sqlService;
|
|
|
|
|
|
- public HospProfitAndLossServiceImpl(ReportFormService reportFormService,
|
|
|
- IncomeCollectionService collectionService,
|
|
|
- AllocationQueryService allocationQueryService,
|
|
|
- AllocationService allocationService, ReportRelationService reportRelationService,
|
|
|
- CostShareLevelService shareLevelService,
|
|
|
- CostOtherPaymentsDataService otherPaymentsDataService,
|
|
|
- ResponsibilityService responsibilityService,
|
|
|
- CostAccountShareService accountShareService, FileRecordService fileRecordService, MinioConfig minioConfig, MinioFileUtil minioFileUtil) {
|
|
|
+
|
|
|
+ public HospProfitAndLossServiceImpl(ReportFormService reportFormService, IncomeCollectionService collectionService, AllocationQueryService allocationQueryService, AllocationService allocationService, ReportRelationService reportRelationService, CostShareLevelService shareLevelService, CostOtherPaymentsDataService otherPaymentsDataService, ResponsibilityService responsibilityService, CostAccountShareService accountShareService, FileRecordService fileRecordService, MinioConfig minioConfig, MinioFileUtil minioFileUtil, SqlService sqlService) {
|
|
|
this.reportFormService = reportFormService;
|
|
|
this.collectionService = collectionService;
|
|
|
this.allocationQueryService = allocationQueryService;
|
|
@@ -103,9 +98,9 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
|
|
|
this.fileRecordService = fileRecordService;
|
|
|
this.minioConfig = minioConfig;
|
|
|
this.minioFileUtil = minioFileUtil;
|
|
|
+ this.sqlService = sqlService;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 计算全院损益
|
|
|
*
|
|
@@ -1305,6 +1300,12 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
|
|
|
i.setCreateTime(l);
|
|
|
});
|
|
|
this.saveBatch(list);
|
|
|
+
|
|
|
+ Map<String,String> sqlParameter = new HashMap<>();
|
|
|
+
|
|
|
+ sqlParameter.put(SQLParameter.COMPUTE_DATE_CODE,DateUtils.StringToString(date, DateStyleEnum.YYYY_MM));
|
|
|
+ sqlParameter.put(SQLParameter.REPORT_TYPE_CODE,NumberConstant.THREE_S);
|
|
|
+ sqlService.autoExecuteSql(CustomSqlTypeEnum.HOSP_PROFIT_CALC.getCode(),sqlParameter);
|
|
|
}
|
|
|
|
|
|
private void setCalculationAmount(List<HospProfitAndLossVo> listVo) {
|