Browse Source

先进模范数据抽取到大屏表screen_pioneer_dataV0.5

dev
yinzuomei 5 years ago
parent
commit
6ec26edad9
  1. 2
      epmet-cloud-generator/src/main/resources/application.yml
  2. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  3. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
  4. 52
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

2
epmet-cloud-generator/src/main/resources/application.yml

@ -9,7 +9,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
#MySQL配置 #MySQL配置
driverClassName: com.mysql.jdbc.Driver driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.1.130:3306/epmet_evaluation_index?useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://192.168.1.130:3306/epmet_data_statistical?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: epmet_dba username: epmet_dba
password: EpmEt-dbA-UsEr password: EpmEt-dbA-UsEr
#oracle配置 #oracle配置

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java

@ -75,12 +75,20 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
/** /**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity> * @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId * @param customerId
* @param agencyLevel
* @author yinzuomei * @author yinzuomei
* @description 初始化好orgType="agency"的插入对象 * @description 初始化好社区, orgType="agency"的插入对象
* @Date 2020/9/22 15:03 * @Date 2020/9/22 15:03
**/ **/
List<ScreenPioneerDataEntity> initAgencyPioneerDataList(@Param("customerId")String customerId, @Param("agencyLevel")String agencyLevel); List<ScreenPioneerDataEntity> initCommunityPioneerDataList(@Param("customerId")String customerId);
/**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId
* @author yinzuomei
* @description 初始化好非社区的, orgType="agency"的插入对象
* @Date 2020/9/24 13:45
**/
List<ScreenPioneerDataEntity> initExceptCommunityPioneerDataList(@Param("customerId")String customerId);
/** /**
* @return void * @return void

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java

@ -117,4 +117,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/ */
private String dataEndTime; private String dataEndTime;
/**
*
*/
private String pid;
private String agencyPids;
private String agencyPath;
} }

52
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

@ -113,7 +113,7 @@
</select> </select>
<!-- 初始化好orgType="agency"的插入对象 --> <!-- 初始化好orgType="agency"的插入对象 -->
<select id="initAgencyPioneerDataList" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity"> <select id="initCommunityPioneerDataList" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity">
SELECT SELECT
sca.CUSTOMER_ID, sca.CUSTOMER_ID,
'agency' AS ORG_TYPE, 'agency' AS ORG_TYPE,
@ -121,22 +121,48 @@
sca.PID AS PARENT_ID, sca.PID AS PARENT_ID,
sca.AGENCY_NAME AS ORG_NAME, sca.AGENCY_NAME AS ORG_NAME,
0 as ISSUE_TOTAL, 0 as ISSUE_TOTAL,
0 asISSUE_RATIO, 0 as ISSUE_RATIO,
0 asTOPIC_TOTAL, 0 as TOPIC_TOTAL,
0 asTOPIC_RATIO, 0 as TOPIC_RATIO,
0 asPUBLISH_ISSUE_TOTAL, 0 as PUBLISH_ISSUE_TOTAL,
0 asPUBLISH_ISSUE_RATIO, 0 as PUBLISH_ISSUE_RATIO,
0 asSHIFT_PROJECT_TOTAL, 0 as SHIFT_PROJECT_TOTAL,
0 asSHIFT_PROJECT_RATIO, 0 as SHIFT_PROJECT_RATIO,
0 asRESOLVED_PROJECT_TOTAL, 0 as RESOLVED_PROJECT_TOTAL,
0 asRESOLVED_PROJECT_RATIO 0 as RESOLVED_PROJECT_RATIO
FROM FROM
screen_customer_agency sca screen_customer_agency sca
WHERE WHERE
sca.DEL_FLAG = '0' sca.DEL_FLAG = '0'
<if test='null !=agencyLevel and ""!=agencyLevel'> and sca.`LEVEL`='community'
and sca.`LEVEL`=#{agencyLevel} AND sca.CUSTOMER_ID = #{customerId}
</if> </select>
<!-- 初始化好非社区的, orgType="agency"的插入对象 -->
<select id="initExceptCommunityPioneerDataList" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity">
SELECT
sca.CUSTOMER_ID,
'agency' AS ORG_TYPE,
sca.AGENCY_ID AS ORG_ID,
sca.PID AS PARENT_ID,
sca.AGENCY_NAME AS ORG_NAME,
0 as ISSUE_TOTAL,
0 as ISSUE_RATIO,
0 as TOPIC_TOTAL,
0 as TOPIC_RATIO,
0 as PUBLISH_ISSUE_TOTAL,
0 as PUBLISH_ISSUE_RATIO,
0 as SHIFT_PROJECT_TOTAL,
0 as SHIFT_PROJECT_RATIO,
0 as RESOLVED_PROJECT_TOTAL,
0 as RESOLVED_PROJECT_RATIO,
sca.PID as pid,
sca.PIDS as agencyPids
FROM
screen_customer_agency sca
WHERE
sca.DEL_FLAG = '0'
and sca.`LEVEL` !='community'
AND sca.CUSTOMER_ID = #{customerId} AND sca.CUSTOMER_ID = #{customerId}
</select> </select>

Loading…
Cancel
Save