Browse Source

deleteByDeptIdAndMonthId修改

master
yinzuomei 5 years ago
parent
commit
62499b4cfd
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  3. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java

@ -160,7 +160,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
formDTO.getMonthId(),
indexCode,
IndexCalConstant.DELETE_SIZE);
} while (masterDeleteNum != NumConstant.ZERO);
} while (masterDeleteNum > NumConstant.ZERO);
//删除明细时,需要根据分组删,比方说当前计算的是区直部门治理能力,主表需要删除indexCode=zhilinengli的,明细需要删除区直部门:治理能力下面所有的指标明细
int detailDelteNum;
@ -169,7 +169,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
formDTO.getMonthId(),
allParentIndexCode,
IndexCalConstant.DELETE_SIZE);
} while (detailDelteNum != NumConstant.ZERO);
} while (detailDelteNum > NumConstant.ZERO);
log.info("delete fact_index_dept_score and fact_index_dept_sub_score complete");
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

@ -344,7 +344,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
formDTO.getMonthId(),
indexCode,
IndexCalConstant.DELETE_SIZE);
} while (masterDeleteNum != NumConstant.ZERO);
} while (masterDeleteNum > NumConstant.ZERO);
//删除明细时,需要根据分组删,比方说当前计算的是网格相关-党建能力,主表需要删除indexCode=dangjiannengli的,明细需要删除网格相关:党建能力 下面所有的指标明细
int detailDelteNum;
do {
@ -352,7 +352,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
formDTO.getMonthId(),
allParentIndexCode,
IndexCalConstant.DELETE_SIZE);
} while (detailDelteNum != NumConstant.ZERO);
} while (detailDelteNum > NumConstant.ZERO);
log.info("delete fact_index_grid_score and fact_index_grid_sub_score complete");
}

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java

@ -87,7 +87,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO.getDataList(), customerId);
@ -101,7 +101,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexPartyAblityGridMonthlyDao.deleteFactIndexPartyAblityGridMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if ( !CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexPartyAblityGridMonthlyDao.batchInsertFactIndexPartyAblityGridMonthly(formDTO.getDataList(), customerId);
@ -115,7 +115,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexPartyAblityOrgMonthlyDao.deleteFactIndexPartyAblityOrgMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexPartyAblityOrgMonthlyDao.batchInsertFactIndexPartyAblityOrgMonthly(formDTO.getDataList(), customerId);
@ -129,7 +129,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexServiceAblityGridMonthlyDao.deleteFactIndexServiceAblityGridMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexServiceAblityGridMonthlyDao.batchInsertFactIndexServiceAblityGridMonthly(formDTO.getDataList(), customerId);
@ -143,7 +143,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexServiceAblityOrgMonthlyDao.deleteFactIndexServiceAblityOrgMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexServiceAblityOrgMonthlyDao.batchInsertFactIndexServiceAblityOrgMonthly(formDTO.getDataList(), customerId);
@ -157,7 +157,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexGovrnAblityGridMonthlyDao.deleteFactIndexGovrnAblityGridMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexGovrnAblityGridMonthlyDao.batchInsertFactIndexGovrnAblityGridMonthly(formDTO.getDataList(), customerId);
@ -171,7 +171,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexGovrnAblityOrgMonthlyDao.deleteFactIndexGovrnAblityOrgMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexGovrnAblityOrgMonthlyDao.batchInsertFactIndexGovrnAblityOrgMonthly(formDTO.getDataList(), customerId);
@ -185,7 +185,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = factIndexGovrnAblityDeptMonthlyDao.deleteFactIndexGovrnAblityDeptMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
if (!CollectionUtils.isEmpty(formDTO.getDataList())) {
factIndexGovrnAblityDeptMonthlyDao.batchInsertFactIndexGovrnAblityDeptMonthly(formDTO.getDataList(), customerId);
@ -275,7 +275,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId,monthId);
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId);
}
@ -337,7 +337,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId,monthId);
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
}
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId);
}
@ -738,7 +738,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
int deleteNum;
do {
deleteNum = screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, getYearStr(monthId));
} while (deleteNum != NumConstant.ZERO);
} while (deleteNum > NumConstant.ZERO);
List<IndexDataYearlyFormDTO> entity = ConvertUtils.sourceToTarget(monthlyFormList, IndexDataYearlyFormDTO.class);
screenIndexDataYearlyDao.batchInsertIndexDataYearly(entity, customerId);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml

@ -58,6 +58,6 @@
CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
AND ALL_PARENT_INDEX_CODE = #{allParentIndexCode}
limit #{deleteNum}
limit #{deleteSize}
</delete>
</mapper>
Loading…
Cancel
Save