diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PublicPartExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PublicPartExtractService.java new file mode 100644 index 0000000000..388559649d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PublicPartExtractService.java @@ -0,0 +1,32 @@ +package com.epmet.service.evaluationindex.extract.toscreen; + +/** + * @desc: 大屏 公众参与抽取服务接口 + * @Author: LiuJanJun + * @Date: 2020/9/25 10:03 上午 + * @Version: 1.0 + */ +public interface PublicPartExtractService { + + /** + * desc: 抽取公众参与 人均议题 总次数和平均参与度 + * target:screen_user_join + * + * @param + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/25 10:24 上午 + */ + Boolean extractTotalDataMonthly(); + + /** + * desc: 抽取公众参与 各类总数 + * target:screen_public_parti_total_data + * + * @param + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/25 10:24 上午 + */ + Boolean extractPerTotalDataDaily(); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenOrgService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenOrgService.java new file mode 100644 index 0000000000..bb177bd877 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenOrgService.java @@ -0,0 +1,32 @@ +package com.epmet.service.evaluationindex.extract.toscreen; + +/** + * @desc: 大屏 产品内部客户组织结构数据 + * @Author: LiuJanJun + * @Date: 2020/9/25 10:03 上午 + * @Version: 1.0 + */ +public interface ScreenOrgService { + + /** + * desc: 抽取公众参与 人均议题 总次数和平均参与度 + * target:screen_user_join + * + * @param + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/25 10:24 上午 + */ + Boolean getInnerCustomerAgencyTree(); + + /** + * desc: 抽取公众参与 各类总数 + * target:screen_public_parti_total_data + * + * @param + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/25 10:24 上午 + */ + Boolean extractPerTotalDataDaily(); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java new file mode 100644 index 0000000000..ae0aab7fa0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java @@ -0,0 +1,54 @@ +package com.epmet.service.evaluationindex.extract.toscreen.impl; + +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; +import com.epmet.service.evaluationindex.extract.toscreen.PublicPartExtractService; +import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; +import com.epmet.service.evaluationindex.screen.ScreenPublicPartiTotalDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * desc:公众参与抽取到大屏的接口实现类 + * + * @author: LiuJanJun + * @date: 2020/9/25 10:46 上午 + * @version: 1.0 + */ +@Service +public class PublicPartExtractServiceImpl implements PublicPartExtractService { + + @Autowired + private ScreenPublicPartiTotalDataService screenPublicPartiTotalDataService; + @Autowired + private FactOriginProjectMainDailyService factOriginProjectMainDailyService; + @Autowired + private ScreenCustomerAgencyService agencyService; + + + /** + * desc: 【月】抽取公众参与 人均议题 总次数和平均参与度 + * target:screen_user_join + * + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/25 10:24 上午 + */ + @Override + public Boolean extractTotalDataMonthly() { + //agencyService.initAgencies(); + return null; + } + + /** + * desc: 【日】抽取公众参与 各类总数 + * target:screen_public_parti_total_data + * + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/25 10:24 上午 + */ + @Override + public Boolean extractPerTotalDataDaily() { + return null; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java index 13d056ced5..404ee7240c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java @@ -22,13 +22,13 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgSourceTypeConstant; +import com.epmet.constant.ScreenConstant; import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.extract.form.PartyBaseInfoFormDTO; import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; import com.epmet.dto.extract.result.OrgNameResultDTO; import com.epmet.dto.screen.result.TreeResultDTO; -import com.epmet.constant.ScreenConstant; import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; @@ -39,10 +39,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import java.util.stream.Collectors; /** @@ -114,7 +110,7 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ @Transactional(rollbackFor = Exception.class) @Override public void initAgencies(List agencies2Add, List agencies2Update) { - String dateEndTime = DateUtils.format(new Date(), "YYYYmmdd"); + String dateEndTime = DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD); if (!CollectionUtils.isEmpty(agencies2Add)) { // 添加 for (CustomerAgencyEntity e : agencies2Add) {