From 2bd631f14ab70203d08e5792e35677f914b46a7e Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 21 Sep 2020 13:32:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?SQL=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/extract/FactOriginProjectLogDailyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index d6825a5eb1..2cf8eb9b10 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -8,7 +8,7 @@ WHERE CUSTOMER_ID = #{customerId} - DATE_ID = #{date} + AND DATE_ID = #{date} From 20758d1807b339a2c4545b4640aac78ef96f3a0f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 21 Sep 2020 13:36:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3=20?= =?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/impl/CalGridIndexServiceImpl.java | 19 +++++++++-------- ...FactIndexGovrnAblityOrgMonthlyService.java | 21 +++++++++++++++++++ ...FactIndexPartyAblityOrgMonthlyService.java | 20 ++++++++++++++++++ ...IndexGovrnAblityOrgMonthlyServiceImpl.java | 19 +++++++++++++++++ ...IndexPartyAblityOrgMonthlyServiceImpl.java | 19 +++++++++++++++++ .../extract/FactOriginTopicMainDailyDao.xml | 2 +- 6 files changed, 90 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java index 082fc28114..ee562f54d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java @@ -17,6 +17,8 @@ import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.dto.extract.result.*; import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import com.epmet.service.evaluationindex.extract.*; +import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; import com.epmet.service.stats.FactArticlePublishedGridDailyService; import com.epmet.service.stats.user.FactRegUserGridMonthlyService; import lombok.extern.slf4j.Slf4j; @@ -44,10 +46,6 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { @Autowired private IssueExtractService issueExtractService; @Autowired - private FactIndexGovernAbilityGridMonthlyService governAbilityGridMonthlyService; - @Autowired - private FactIndexPartyAbilityGridMonthlyService partyAbilityGridMonthlyService; - @Autowired private FactIndexGovrnAblityGridMonthlyDao governAbilityDao; @Autowired private FactOriginProjectMainDailyService projectMainService; @@ -63,7 +61,10 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { private GroupExtractService groupExtractService; @Autowired private FactOriginTopicLogDailyService topicLogService; - + @Autowired + private FactIndexPartyAblityOrgMonthlyService partyAbilityOrgMonthlyService; + @Autowired + private FactIndexGovrnAblityOrgMonthlyService governAbilityOrgMonthlyService; @Autowired private FactIndexServiceAbilityGridMonthlyService factIndexServiceAbilityGridMonthlyService; @Autowired @@ -497,8 +498,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { @Transactional(rollbackFor = Exception.class) public void delAndInsertPartyAbility(List result,String customerId,String monthId){ if (!CollectionUtils.isEmpty(result)){ - partyAbilityGridMonthlyService.deleteOldPartyAbility(customerId, monthId); - partyAbilityGridMonthlyService.insertPartyAbility(result); + partyAbilityOrgMonthlyService.deleteOldPartyAbility(customerId, monthId); + partyAbilityOrgMonthlyService.insertPartyAbility(result); } } @@ -511,8 +512,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { @Transactional(rollbackFor = Exception.class) public void delAndInsertGovernAbility(List result,String customerId,String monthId){ if (!CollectionUtils.isEmpty(result)){ - governAbilityGridMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId); - governAbilityGridMonthlyService.insertGovernAbilityRecord(result); + governAbilityOrgMonthlyService.deleteOldGovernAbilityRecord(customerId, monthId); + governAbilityOrgMonthlyService.insertGovernAbilityRecord(result); } } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java index c2e3b3a179..ade3c57f5b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyService.java @@ -1,7 +1,11 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @author zhaoqifeng @@ -19,4 +23,21 @@ public interface FactIndexGovrnAblityOrgMonthlyService extends BaseService lists); + + /** + * @Description 删除治理能力旧纪录 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/19 4:31 下午 + */ + void deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java index 0227a835f8..4dbf8a26a2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyService.java @@ -1,8 +1,11 @@ package com.epmet.service.evaluationindex.indexcoll; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import java.util.List; + /** * @author zhaoqifeng * @dscription @@ -19,4 +22,21 @@ public interface FactIndexPartyAblityOrgMonthlyService extends BaseService lists); + + /** + * @Description 删除旧的党建能力记录 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/19 10:45 上午 + */ + void deleteOldPartyAbility(String customerId,String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java index a1665b836c..954af7e1f8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityOrgMonthlyServiceImpl.java @@ -3,11 +3,16 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * @author zhaoqifeng * @dscription @@ -16,8 +21,22 @@ import org.springframework.stereotype.Service; @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class FactIndexGovrnAblityOrgMonthlyServiceImpl extends BaseServiceImpl implements FactIndexGovrnAblityOrgMonthlyService { + + @Autowired + private FactIndexGovrnAblityGridMonthlyDao governAbilityDao; + @Override public void deleteByCustomer(String customerId, String monthId, String type) { baseDao.deleteByCustomer(customerId, monthId, type); } + + @Override + public void insertGovernAbilityRecord(List lists) { + governAbilityDao.insertGovernAbilityRecord(lists); + } + + @Override + public void deleteOldGovernAbilityRecord(String customerId, String monthId) { + governAbilityDao.deleteOldGovernAbilityRecord(customerId, monthId); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java index 7964b2788b..f2caafd528 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexPartyAblityOrgMonthlyServiceImpl.java @@ -3,11 +3,16 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * @author zhaoqifeng * @dscription @@ -16,8 +21,22 @@ import org.springframework.stereotype.Service; @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class FactIndexPartyAblityOrgMonthlyServiceImpl extends BaseServiceImpl implements FactIndexPartyAblityOrgMonthlyService { + + @Autowired + private FactIndexPartyAblityGridMonthlyDao partyAbilityGridDao; + @Override public void deleteByCustomer(String customerId, String monthId, String type) { baseDao.deleteByCustomer(customerId, monthId, type); } + + @Override + public void insertPartyAbility(List lists) { + partyAbilityGridDao.insertPartyAbility(lists); + } + + @Override + public void deleteOldPartyAbility(String customerId, String monthId) { + partyAbilityGridDao.deleteOldPartyAbility(customerId, monthId); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml index ef87296be2..37064faf46 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml @@ -82,7 +82,7 @@