Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_screen_data_2.0

dev_shibei_match
wangchao 5 years ago
parent
commit
aac320a80f
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java
  3. 52
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java
  6. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java
  7. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java
  8. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml
  9. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java

@ -134,5 +134,5 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @author zxc
* @date 2020/9/19 4:31 下午
*/
void deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
Integer deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java

@ -114,5 +114,5 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao<FactIndexPar
* @author zxc
* @date 2020/9/19 10:45 上午
*/
void deleteOldPartyAbility(@Param("customerId")String customerId,@Param("monthId")String monthId);
Integer deleteOldPartyAbility(@Param("customerId")String customerId,@Param("monthId")String monthId);
}

52
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java

@ -216,7 +216,11 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
});
}
});
delAndInsertPartyAbility(result,customerId,monthId);
delPartyAbility(customerId, monthId);
List<List<PartyAbilityGridMonthlyFormDTO>> partition = ListUtils.partition(result, NumConstant.ONE_HUNDRED);
partition.forEach(r -> {
insertPartyAbility(r);
});
return true;
}
@ -364,7 +368,11 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
}
});
});
delAndInsertGovernAbility(result,customerId,monthId);
delGovernAbility(customerId, monthId);
List<List<GovernAbilityGridMonthlyFormDTO>> resultList = ListUtils.partition(result, NumConstant.ONE_HUNDRED);
resultList.forEach(r -> {
insertGovernAbility(r);
});
return true;
}
@ -490,30 +498,58 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
}
/**
* @Description 删除并插入党建能力的记录
* @Description 插入党建能力的记录
* @param result
* @author zxc
* @date 2020/9/19 4:06 下午
*/
@Transactional(rollbackFor = Exception.class)
public void delAndInsertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> result,String customerId,String monthId){
public void insertPartyAbility(List<PartyAbilityGridMonthlyFormDTO> result){
if (!CollectionUtils.isEmpty(result)){
partyAbilityOrgMonthlyService.deleteOldPartyAbility(customerId, monthId);
partyAbilityOrgMonthlyService.insertPartyAbility(result);
}
}
/**
* @Description 删除并插入治理能力的记录
* @Description 删除党建能力的记录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 4:06 下午
*/
@Transactional(rollbackFor = Exception.class)
public void delPartyAbility(String customerId,String monthId){
Integer delNum;
do {
delNum = partyAbilityOrgMonthlyService.deleteOldPartyAbility(customerId, monthId);
}while (delNum > NumConstant.ZERO);
}
/**
* @Description 插入治理能力的记录
* @param result
* @author zxc
* @date 2020/9/19 4:06 下午
*/
@Transactional(rollbackFor = Exception.class)
public void delAndInsertGovernAbility(List<GovernAbilityGridMonthlyFormDTO> result,String customerId,String monthId){
public void insertGovernAbility(List<GovernAbilityGridMonthlyFormDTO> result){
if (!CollectionUtils.isEmpty(result)){
governAbilityOrgMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId);
governAbilityOrgMonthlyService.insertGovernAbilityRecord(result);
}
}
/**
* @Description 删除治理能力的记录
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/19 4:06 下午
*/
@Transactional(rollbackFor = Exception.class)
public void delGovernAbility(String customerId,String monthId){
Integer delNum;
do {
delNum = governAbilityOrgMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId);
}while (delNum > NumConstant.ZERO);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java

@ -39,5 +39,5 @@ public interface FactIndexGovrnAblityOrgMonthlyService extends BaseService<FactI
* @author zxc
* @date 2020/9/19 4:31 下午
*/
void deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
Integer deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java

@ -38,5 +38,5 @@ public interface FactIndexPartyAblityOrgMonthlyService extends BaseService<FactI
* @author zxc
* @date 2020/9/19 10:45 上午
*/
void deleteOldPartyAbility(String customerId,String monthId);
Integer deleteOldPartyAbility(String customerId,String monthId);
}

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

@ -36,7 +36,7 @@ public class FactIndexGovrnAblityOrgMonthlyServiceImpl extends BaseServiceImpl<F
}
@Override
public void deleteOldGovernAbilityRecord(String customerId, String monthId) {
governAbilityDao.deleteOldGovernAbilityRecord(customerId, monthId);
public Integer deleteOldGovernAbilityRecord(String customerId, String monthId) {
return governAbilityDao.deleteOldGovernAbilityRecord(customerId, monthId);
}
}

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

@ -36,7 +36,7 @@ public class FactIndexPartyAblityOrgMonthlyServiceImpl extends BaseServiceImpl<F
}
@Override
public void deleteOldPartyAbility(String customerId, String monthId) {
partyAbilityGridDao.deleteOldPartyAbility(customerId, monthId);
public Integer deleteOldPartyAbility(String customerId, String monthId) {
return partyAbilityGridDao.deleteOldPartyAbility(customerId, monthId);
}
}

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml

@ -246,5 +246,6 @@
DELETE FROM fact_index_govrn_ablity_grid_monthly
WHERE CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
LIMIT 1000
</delete>
</mapper>

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml

@ -265,5 +265,6 @@
WHERE
CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
LIMIT 1000
</delete>
</mapper>

Loading…
Cancel
Save