diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index beb1a475ed..a7d6eda645 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -33,10 +33,7 @@ import com.epmet.entity.stats.DimCustomerEntity; import com.epmet.entity.stats.DimDateEntity; import com.epmet.entity.stats.DimMonthEntity; import com.epmet.service.StatsDemoService; -import com.epmet.service.evaluationindex.extract.dataToIndex.CalCpcIndexService; -import com.epmet.service.evaluationindex.extract.dataToIndex.CalGridIndexService; -import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityService; -import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService; +import com.epmet.service.evaluationindex.extract.dataToIndex.*; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.extract.toscreen.*; @@ -99,6 +96,8 @@ public class DemoController { @Autowired private IndexCollStreetService indexCollStreetService; @Autowired + private IndexCollDistrictDepartmentService indexCollDistrictDepartmentService; + @Autowired private GovernRankDataExtractService governRankDataExtractService; @Autowired private OrgRankExtractService orgRankExtractService; @@ -629,6 +628,12 @@ public class DemoController { return new Result(); } + @PostMapping("indexCollDept") + public Result indexCollDept(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ + indexCollDistrictDepartmentService.saveDepartmentAbility(formDTO.getCustomerId(), formDTO.getDateId()); + return new Result(); + } + @Autowired private PartyBaseInfoService partyBaseInfoService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java index d701e89da9..328a7c694a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java @@ -128,7 +128,7 @@ public class IndexCollDistrictDepartmentServiceImpl implements IndexCollDistrict factIndexGovrnAblityDeptMonthlyService.deleteByCustomer(customerId, dimId.getMonthId()); - factIndexGovrnAblityDeptMonthlyService.insertBatch(list); + factIndexGovrnAblityDeptMonthlyService.saveList(list); } } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java index bf8254d738..d2d25c7a6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyService.java @@ -3,6 +3,8 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import java.util.List; + /** * @author zhaoqifeng * @dscription @@ -18,4 +20,13 @@ public interface FactIndexGovrnAblityDeptMonthlyService extends BaseService list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java index a8df14af94..896ca7c334 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityDeptMonthlyServiceImpl.java @@ -8,6 +8,8 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthl import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyService; import org.springframework.stereotype.Service; +import java.util.List; + /** * @author zhaoqifeng * @dscription @@ -21,4 +23,17 @@ public class FactIndexGovrnAblityDeptMonthlyServiceImpl extends BaseServiceImpl< public void deleteByCustomer(String customerId, String monthId) { baseDao.deleteFactIndexGovrnAblityDeptMonthly(customerId, monthId); } + + /** + * 批量插入 + * + * @param list + * @return void + * @author zhaoqifeng + * @date 2020/9/21 17:08 + */ + @Override + public void saveList(List list) { + insertBatch(list); + } }