Browse Source

Merge branch 'dev_screen_data_2.0' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_screen_data_2.0

 Conflicts:
	epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java
dev_shibei_match
wxz 5 years ago
parent
commit
9eed0be534
  1. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  2. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  3. 40
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PioneerDataExtractService.java
  4. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
  5. 74
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  6. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPioneerDataService.java
  7. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java
  8. 27
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPioneerDataServiceImpl.java
  9. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml
  10. 51
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -34,6 +34,7 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityS
import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.DimCustomerPartymemberService;
@ -632,4 +633,13 @@ public class DemoController {
return new Result();
}
@Autowired
private PartyBaseInfoService partyBaseInfoService;
@PostMapping("zxczxczxc")
public Result getZxcZxcZxc(){
partyBaseInfoService.statsPartyMemberBaseInfoToScreen("45687aa479955f9d06204d415238f7cc","20200922");
return new Result();
}
}

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

@ -55,4 +55,23 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* @Date 10:52 2020-08-18
**/
void batchInsertPioneerData(@Param("list") List<PioneerDataFormDTO> list, @Param("customerId")String customerId);
/**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId
* @author yinzuomei
* @description 初始化好orgType="grid"的插入对象
* @Date 2020/9/22 15:03
**/
List<ScreenPioneerDataEntity> initGridPioneerDataList(@Param("customerId") String customerId);
/**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId
* @param agencyLevel
* @author yinzuomei
* @description 初始化好orgType="agency"的插入对象
* @Date 2020/9/22 15:03
**/
List<ScreenPioneerDataEntity> initAgencyPioneerDataList(@Param("customerId")String customerId, @Param("agencyLevel")String agencyLevel);
}

40
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PioneerDataExtractService.java

@ -1,10 +1,48 @@
package com.epmet.service.evaluationindex.extract.toscreen;
/**
* 先进模范数据抽取到大屏表screen_pioneer_data
* 先进模范数据抽取到大屏表 screen_pioneer_data
*
* @author yinzuomei@elink-cn.com
* @date 2020/9/22 11:25
*/
public interface PioneerDataExtractService {
/**
* @return void
* @param customerId
* @param dateId
* @author yinzuomei
* @description 总方法入口
* @Date 2020/9/22 14:17
**/
void extractPioneerData(String customerId, String dateId);
// 机关级别(社区级:community,
// 乡(镇、街道)级:street,
// 区县级: district,
// 市级: city
// 省级:province)
/**
* @param customerId
* @param dateId
* @return void
* @author yinzuomei
* @description 网格级别的 党建引领-先锋模范数据
* @Date 2020/9/22 13:46
**/
void extractGridPioneerData(String customerId, String dateId);
// 社区、街道、区县、市级别、省级
void extractCommunityPioneerData(String customerId, String dateId);
void extractStreetPioneerData(String customerId, String dateId);
void extractDistrictPioneerData(String customerId, String dateId);
void extractCityPioneerData(String customerId, String dateId);
void extractProvincePioneerData(String customerId, String dateId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java

@ -1,9 +1,13 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService;
import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* @Desciption 党员基本情况
* @Author zxc
@ -13,7 +17,8 @@ import org.springframework.stereotype.Service;
@Slf4j
public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
@Autowired
private ScreenCustomerAgencyService agencyService;
/**
* @Description 统计基层党建-党员基本情况
@ -24,6 +29,9 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
*/
@Override
public Boolean statsPartyMemberBaseInfoToScreen(String customerId, String dateId) {
String agencyId = "cyagstrbee8711eaa1fac03fd56f7847";
Map<String, Object> stringObjectMap = agencyService.selectAllSubAgencyId(agencyId, customerId);
System.out.println(stringObjectMap);
return null;
}
}

74
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java

@ -1,6 +1,13 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 先进模范数据抽取到大屏表screen_pioneer_data
@ -9,4 +16,71 @@ import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractServ
* @date 2020/9/22 11:25
*/
public class PioneerDataExtractServiceImpl implements PioneerDataExtractService {
@Autowired
private ScreenPioneerDataService screenPioneerDataService;
/**
* @param customerId
* @param dateId
* @return void
* @author yinzuomei
* @description 总方法入口
* @Date 2020/9/22 14:17
**/
@Override
public void extractPioneerData(String customerId, String dateId) {
extractGridPioneerData(customerId, dateId);
extractCommunityPioneerData(customerId, dateId);
extractStreetPioneerData(customerId, dateId);
extractDistrictPioneerData(customerId, dateId);
extractCityPioneerData(customerId, dateId);
extractProvincePioneerData(customerId, dateId);
}
/**
* @param customerId
* @param dateId
* @return void
* @author yinzuomei
* @description 网格级别的 党建引领-先锋模范数据
* @Date 2020/9/22 13:46
**/
@Override
public void extractGridPioneerData(String customerId, String dateId) {
List<ScreenPioneerDataEntity> gridList=screenPioneerDataService.initPioneerDataList(customerId,"grid", StrConstant.EPMETY_STR);
if(CollectionUtils.isEmpty(gridList)){
return;
}
gridList.forEach(entity->{
entity.setDataEndTime(dateId);
});
}
@Override
public void extractCommunityPioneerData(String customerId, String dateId) {
}
@Override
public void extractStreetPioneerData(String customerId, String dateId) {
}
@Override
public void extractDistrictPioneerData(String customerId, String dateId) {
}
@Override
public void extractCityPioneerData(String customerId, String dateId) {
}
@Override
public void extractProvincePioneerData(String customerId, String dateId) {
}
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPioneerDataService.java

@ -20,6 +20,8 @@ package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import java.util.List;
/**
* 党建引领-先锋模范数据
*
@ -28,4 +30,14 @@ import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
*/
public interface ScreenPioneerDataService extends BaseService<ScreenPioneerDataEntity> {
/**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId
* @param orgType grid,agency
* @param agencyLevel : 机关级别社区级community 街道:street,区县级: district,市级: city 省级:province
* @author yinzuomei
* @description 构造screen_pioneer_data 初始数据先赋值为0
* @Date 2020/9/22 14:41
**/
List<ScreenPioneerDataEntity> initPioneerDataList(String customerId, String orgType,String agencyLevel);
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java

@ -34,6 +34,11 @@ 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;
/**
* 组织机构信息
@ -81,6 +86,7 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ
List<String> result = new ArrayList<>();
List<TreeResultDTO> subAgencyList = screenCustomerAgencyDao.selectSubAgencyList(subAgencyPids);
if (!CollectionUtils.isEmpty(subAgencyList)) {
result.addAll(subAgencyList.stream().map(sub -> sub.getAgencyId()).collect(Collectors.toList()));
subAgencyList.forEach(sub -> {
List<String> subAgency = getDepartmentList(sub.getPids() + "," + sub.getAgencyId());
result.addAll(subAgency);

27
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPioneerDataServiceImpl.java

@ -18,20 +18,47 @@
package com.epmet.service.evaluationindex.screen.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.screen.ScreenPioneerDataDao;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 党建引领-先锋模范数据
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-22
*/
@Slf4j
@Service
public class ScreenPioneerDataServiceImpl extends BaseServiceImpl<ScreenPioneerDataDao, ScreenPioneerDataEntity> implements ScreenPioneerDataService {
/**
* @param customerId
* @param orgType grid,agency
* @param agencyLevel : 机关级别社区级community 街道:street,区县级: district,市级: city 省级:province
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @author yinzuomei
* @description 构造screen_pioneer_data 初始数据先赋值为0
* @Date 2020/9/22 14:41
**/
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Override
public List<ScreenPioneerDataEntity> initPioneerDataList(String customerId, String orgType, String agencyLevel) {
List<ScreenPioneerDataEntity> list=new ArrayList<>();
if("grid".equals(orgType)){
list=baseDao.initGridPioneerDataList(customerId);
}else if("agency".equals(orgType)){
list=baseDao.initAgencyPioneerDataList(customerId,agencyLevel);
}
return list;
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml

@ -145,7 +145,7 @@
screen_customer_agency
WHERE
del_flag = 0
AND agencyId = #{agencyId}
AND agency_id = #{agencyId}
AND customer_id = #{customerId}
</select>

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

@ -66,4 +66,55 @@
</foreach>
</insert>
<!-- 初始化好orgType="grid"的插入对象 -->
<select id="initGridPioneerDataList" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity">
SELECT
scg.CUSTOMER_ID,
'grid' AS ORG_TYPE,
SCG.GRID_ID AS ORG_ID,
scg.PARENT_AGENCY_ID AS PARENT_ID,
scg.GRID_NAME AS ORG_NAME,
0 as ISSUE_TOTAL,
0 asISSUE_RATIO,
0 asTOPIC_TOTAL,
0 asTOPIC_RATIO,
0 asPUBLISH_ISSUE_TOTAL,
0 asPUBLISH_ISSUE_RATIO,
0 asSHIFT_PROJECT_TOTAL,
0 asSHIFT_PROJECT_RATIO,
0 asRESOLVED_PROJECT_TOTAL,
0 asRESOLVED_PROJECT_RATIO
FROM
screen_customer_grid scg
WHERE
scg.DEL_FLAG = '0'
AND scg.CUSTOMER_ID =#{customerId}
</select>
<!-- 初始化好orgType="agency"的插入对象 -->
<select id="initAgencyPioneerDataList" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity">
SELECT
sca.CUSTOMER_ID,
'agency' AS ORG_TYPE,
sca.AGENCY_NAME AS ORG_ID,
sca.PID AS PARENT_ID,
sca.AGENCY_NAME AS ORG_NAME,
0 as ISSUE_TOTAL,
0 asISSUE_RATIO,
0 asTOPIC_TOTAL,
0 asTOPIC_RATIO,
0 asPUBLISH_ISSUE_TOTAL,
0 asPUBLISH_ISSUE_RATIO,
0 asSHIFT_PROJECT_TOTAL,
0 asSHIFT_PROJECT_RATIO,
0 asRESOLVED_PROJECT_TOTAL,
0 asRESOLVED_PROJECT_RATIO
FROM
screen_customer_agency sca
WHERE
sca.DEL_FLAG = '0'
and sca.`LEVEL`=#{agencyLevel}
AND sca.CUSTOMER_ID = #{customerId}
</select>
</mapper>

Loading…
Cancel
Save