|
|
@ -150,10 +150,8 @@ public class KpiMetaDataServiceImpl extends BaseServiceImpl<KpiMetaDataDao, KpiM |
|
|
|
List<KpiEventReportAmountResultDTO> reportAmountList = this.getMetaDateFromEventsModule(eventReportAmountFormDto); |
|
|
|
// 组装元数据对象
|
|
|
|
List<KpiMetaDataEntity> kpiMetaDataEntities = this.packageMetaDataList(reportAmountList, eventReportAmountFormDto, kpiCycle); |
|
|
|
// 插入之前删除已存在
|
|
|
|
this.deleteRepetitionMetaList(kpiMetaDataEntities); |
|
|
|
// 插入数据库
|
|
|
|
this.insertBatch(kpiMetaDataEntities); |
|
|
|
// 删除已存在 并 批量插入
|
|
|
|
this.deleteAndInsertBatch(kpiMetaDataEntities); |
|
|
|
pageIndex++; |
|
|
|
gridList = deptUtils.getDeptIdList(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY, NumConstant.TEN, pageIndex); |
|
|
|
} while (CollUtil.isNotEmpty(gridList)); |
|
|
@ -326,12 +324,12 @@ public class KpiMetaDataServiceImpl extends BaseServiceImpl<KpiMetaDataDao, KpiM |
|
|
|
List<Long> gridList = deptUtils.getDeptIdList(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY, NumConstant.TEN, pageIndex); |
|
|
|
do { |
|
|
|
metaDataFormDto.setDeptIdList(gridList); |
|
|
|
// 从events模块查询数据
|
|
|
|
List<KpiEvaluationAmountResultDTO> peopleEvaluationDataList = this.getMetaDataListOfPeopleEvaluation(metaDataFormDto); |
|
|
|
// 组装元数据实体
|
|
|
|
List<KpiMetaDataEntity> kpiMetaDataEntities = this.packageMetaDataByEvaluationList(peopleEvaluationDataList, metaDataFormDto, kpiCycle); |
|
|
|
// 插入之前删除已存在
|
|
|
|
this.deleteRepetitionMetaList(kpiMetaDataEntities); |
|
|
|
// 插入数据库
|
|
|
|
this.insertBatch(kpiMetaDataEntities); |
|
|
|
// 删除已存在 并 批量插入
|
|
|
|
this.deleteAndInsertBatch(kpiMetaDataEntities); |
|
|
|
pageIndex++; |
|
|
|
gridList = deptUtils.getDeptIdList(OrganizationTypeConstant.ORG_TYPE_GRID_PARTY, NumConstant.TEN, pageIndex); |
|
|
|
} while (CollUtil.isNotEmpty(gridList)); |
|
|
@ -387,10 +385,8 @@ public class KpiMetaDataServiceImpl extends BaseServiceImpl<KpiMetaDataDao, KpiM |
|
|
|
|
|
|
|
List<KpiItemHandleAmountResultDTO> itemHandleAmountList = this.getHandleAmountListFromEvents(metaDataFormDto); |
|
|
|
List<KpiMetaDataEntity> kpiMetaDataEntities = this.packageMetaDataByItemHandleAmountList(itemHandleAmountList, metaDataFormDto, kpiCycle, deptTypeKey); |
|
|
|
// 插入之前删除已存在
|
|
|
|
this.deleteRepetitionMetaList(kpiMetaDataEntities); |
|
|
|
// 插入数据库
|
|
|
|
this.insertBatch(kpiMetaDataEntities); |
|
|
|
// 删除已存在 并 批量插入
|
|
|
|
this.deleteAndInsertBatch(kpiMetaDataEntities); |
|
|
|
pageIndex++; |
|
|
|
deptIdList = deptUtils.getDeptIdList(deptTypeKey, NumConstant.TEN, pageIndex); |
|
|
|
} while (CollUtil.isNotEmpty(deptIdList)); |
|
|
@ -446,18 +442,19 @@ public class KpiMetaDataServiceImpl extends BaseServiceImpl<KpiMetaDataDao, KpiM |
|
|
|
return eventResult.getData(); |
|
|
|
} |
|
|
|
|
|
|
|
/*** |
|
|
|
* 插入之前删除数据 防止插入部分出异常 |
|
|
|
* @param |
|
|
|
/** |
|
|
|
* 先删除已有数据再批量插入元数据表 |
|
|
|
* |
|
|
|
* @param metaDateList |
|
|
|
* @return void |
|
|
|
* @author qushutong |
|
|
|
* @date 2019/12/20 13:24 |
|
|
|
* @date 2019/12/24 14:38 |
|
|
|
*/ |
|
|
|
public void deleteRepetitionMetaList(List<KpiMetaDataEntity> metaList) { |
|
|
|
baseDao.deleteListRepetitionMeta(metaList); |
|
|
|
private void deleteAndInsertBatch(List<KpiMetaDataEntity> metaDateList) { |
|
|
|
baseDao.deleteListRepetitionMeta(metaDateList); |
|
|
|
this.insertBatch(metaDateList); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void statGridEvaluation() { |
|
|
|
statMetaDataOfGridEvaluation(KpiCycleEnum.KPI_CYCLE_MONTH.getValue(), OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT); |
|
|
@ -481,7 +478,7 @@ public class KpiMetaDataServiceImpl extends BaseServiceImpl<KpiMetaDataDao, KpiM |
|
|
|
*/ |
|
|
|
private void statMetaDataOfGridEvaluation(String kpiCycle, String deptTypeKey) { |
|
|
|
// 获取考核周期开始日
|
|
|
|
KpiMetaDataOfEventsFormDTO metaDataFormDto = this.initKpiParam(kpiCycle, "createJobEvaluation"); |
|
|
|
KpiMetaDataOfEventsFormDTO metaDataFormDto = this.initKpiParam(kpiCycle, "statGridEvaluation"); |
|
|
|
if (null != metaDataFormDto) { |
|
|
|
// 声明页容量和页码
|
|
|
|
int pageIndex = NumConstant.ONE; |
|
|
@ -493,10 +490,8 @@ public class KpiMetaDataServiceImpl extends BaseServiceImpl<KpiMetaDataDao, KpiM |
|
|
|
List<KpiEvaluationAmountResultDTO> jobEvaluationDataList = this.getjobEvaluationDataModule(metaDataFormDto); |
|
|
|
// 组装元数据对象
|
|
|
|
List<KpiMetaDataEntity> kpiMetaDataEntities = this.packageMetaDataByGridEvaluationList(jobEvaluationDataList, metaDataFormDto, kpiCycle, deptTypeKey); |
|
|
|
// 插入之前删除已存在
|
|
|
|
this.deleteRepetitionMetaList(kpiMetaDataEntities); |
|
|
|
// 插入数据库
|
|
|
|
this.insertBatch(kpiMetaDataEntities); |
|
|
|
// 删除已存在 并 批量插入
|
|
|
|
this.deleteAndInsertBatch(kpiMetaDataEntities); |
|
|
|
pageIndex++; |
|
|
|
gridList = deptUtils.getDeptIdList(deptTypeKey, NumConstant.TEN, pageIndex); |
|
|
|
} while (CollUtil.isNotEmpty(gridList)); |
|
|
|