Browse Source

服务能力统计

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
a1b4a4a2ad
  1. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java
  2. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java
  3. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java
  4. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java
  5. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java
  6. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java
  7. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  8. 50
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  9. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyService.java
  10. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityOrgMonthlyServiceImpl.java
  11. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActInfoService.java
  12. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActInfoServiceImpl.java
  13. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java
  14. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java
  15. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml
  16. 14
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml
  17. 24
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java

@ -78,4 +78,15 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao<FactIndexSe
* @date 2020/9/2 2:09 下午
*/
List<Map<String,Object>> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level);
/**
* 根据组织类型删除数据
* @author zhaoqifeng
* @date 2020/9/20 20:52
* @param customerId
* @param monthId
* @param type
* @return java.lang.Integer
*/
Integer deleteByCustomer(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("type") String type);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/heart/ActInfoDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.heart;
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -61,4 +62,14 @@ public interface ActInfoDao{
* @date 2020/9/25 4:00 下午
*/
List<ScreenPartyBranchDataFormDTO> selectActInfo(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* 获取机关活动次数
* @author zhaoqifeng
* @date 2020/9/30 16:53
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> selectAgencyActCount(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java

@ -56,6 +56,16 @@ public interface ProjectProcessDao extends BaseDao<ProjectProcessEntity> {
*/
List<ProcessInfoDTO> selectProcessListByCustomer(@Param("customerId") String customerId, @Param("date") String date);
/**
* 根据客户查询响应节点
* @author zhaoqifeng
* @date 2020/9/16 15:18
* @param customerId
* @param date
* @return java.util.List<com.epmet.entity.project.ProjectProcessEntity>
*/
List<ProcessInfoDTO> selectResponseProcessList(@Param("customerId") String customerId, @Param("date") String date);
/**
* 查询各个节点的受理人
* @author zhaoqifeng

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java

@ -8,16 +8,20 @@ import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectOrgPeriodDailyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService;
import com.epmet.service.heart.ActInfoService;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.FactArticlePublishedAgencyDailyService;
import com.epmet.util.DimIdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -51,6 +55,10 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService;
@Autowired
private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService;
@Autowired
private FactIndexServiceAblityOrgMonthlyService factIndexServiceAblityOrgMonthlyService;
@Autowired
private ActInfoService actInfoService;
@Override
public void saveCommunityAbility(String customerId, String dateId) {
@ -175,6 +183,31 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
}
factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);
factIndexPartyAblityOrgMonthlyService.saveList(partyList);
//3. 服务能力
List<FactIndexServiceAblityOrgMonthlyEntity> serviceList = agencyList.stream().map(agency ->{
FactIndexServiceAblityOrgMonthlyEntity entity = new FactIndexServiceAblityOrgMonthlyEntity();
entity.setCustomerId(customerId);
entity.setAgencyId(agency.getId());
entity.setParentId(agency.getPid());
entity.setYearId(dimId.getYearId());
entity.setQuarterId(dimId.getQuarterId());
entity.setMonthId(dimId.getMonthId());
entity.setDataType(OrgTypeConstant.COMMUNITY);
entity.setActivityCount(NumConstant.ZERO);
return entity;
}).collect(Collectors.toList());
//获取活动组织次数
List<OrgStatisticsResultDTO> actList = actInfoService.getAgencyActCount(customerId, dimId.getMonthId());
if (CollectionUtils.isNotEmpty(actList)) {
serviceList.forEach(entity -> actList.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> {
entity.setActivityCount(dto.getCount());
}));
}
factIndexServiceAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);
factIndexServiceAblityOrgMonthlyService.saveList(serviceList);
}
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java

@ -10,11 +10,14 @@ import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollDistrictService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectOrgPeriodDailyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService;
import com.epmet.service.heart.ActInfoService;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.FactArticlePublishedAgencyDailyService;
import com.epmet.util.DimIdGenerator;
@ -53,6 +56,10 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService {
private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService;
@Autowired
private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService;
@Autowired
private FactIndexServiceAblityOrgMonthlyService factIndexServiceAblityOrgMonthlyService;
@Autowired
private ActInfoService actInfoService;
@Override
public void saveDistrictAbility(String customerId, String dateId) {
@ -168,5 +175,29 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService {
}
factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.DISTRICT);
factIndexPartyAblityOrgMonthlyService.saveList(partyList);
//3. 服务能力
List<FactIndexServiceAblityOrgMonthlyEntity> serviceList = agencyList.stream().map(agency ->{
FactIndexServiceAblityOrgMonthlyEntity entity = new FactIndexServiceAblityOrgMonthlyEntity();
entity.setCustomerId(customerId);
entity.setAgencyId(agency.getId());
entity.setParentId(agency.getPid());
entity.setYearId(dimId.getYearId());
entity.setQuarterId(dimId.getQuarterId());
entity.setMonthId(dimId.getMonthId());
entity.setDataType(OrgTypeConstant.DISTRICT);
entity.setActivityCount(NumConstant.ZERO);
return entity;
}).collect(Collectors.toList());
//获取活动组织次数
List<OrgStatisticsResultDTO> actList = actInfoService.getAgencyActCount(customerId, dimId.getMonthId());
if (CollectionUtils.isNotEmpty(actList)) {
serviceList.forEach(entity -> actList.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> {
entity.setActivityCount(dto.getCount());
}));
}
factIndexServiceAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.DISTRICT);
factIndexServiceAblityOrgMonthlyService.saveList(serviceList);
}
}

32
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java

@ -8,16 +8,20 @@ import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.dto.stats.FactArticlePublishedAgencyDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectOrgPeriodDailyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService;
import com.epmet.service.heart.ActInfoService;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.FactArticlePublishedAgencyDailyService;
import com.epmet.util.DimIdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -51,6 +55,10 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService;
@Autowired
private FactIndexPartyAblityOrgMonthlyService factIndexPartyAblityOrgMonthlyService;
@Autowired
private FactIndexServiceAblityOrgMonthlyService factIndexServiceAblityOrgMonthlyService;
@Autowired
private ActInfoService actInfoService;
@Override
public void saveStreetAbility(String customerId, String dateId) {
@ -165,5 +173,29 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
}
factIndexPartyAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET);
factIndexPartyAblityOrgMonthlyService.saveList(partyList);
//3. 服务能力
List<FactIndexServiceAblityOrgMonthlyEntity> serviceList = agencyList.stream().map(agency ->{
FactIndexServiceAblityOrgMonthlyEntity entity = new FactIndexServiceAblityOrgMonthlyEntity();
entity.setCustomerId(customerId);
entity.setAgencyId(agency.getId());
entity.setParentId(agency.getPid());
entity.setYearId(dimId.getYearId());
entity.setQuarterId(dimId.getQuarterId());
entity.setMonthId(dimId.getMonthId());
entity.setDataType(OrgTypeConstant.STREET);
entity.setActivityCount(NumConstant.ZERO);
return entity;
}).collect(Collectors.toList());
//获取活动组织次数
List<OrgStatisticsResultDTO> actList = actInfoService.getAgencyActCount(customerId, dimId.getMonthId());
if (CollectionUtils.isNotEmpty(actList)) {
serviceList.forEach(entity -> actList.stream().filter(article -> entity.getAgencyId().equals(article.getAgencyId())).forEach(dto -> {
entity.setActivityCount(dto.getCount());
}));
}
factIndexServiceAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET);
factIndexServiceAblityOrgMonthlyService.saveList(serviceList);
}
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -109,17 +109,17 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
try{
indexCollStreetService.saveStreetAbility(customerId, monthId);
}catch (Exception e){
log.error("抽取【街道治理能力-街道党建能力】发生异常,参数:" + JSON.toJSONString(param), e);
log.error("抽取【街道治理能力-街道党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
indexCollCommunityService.saveCommunityAbility(customerId, monthId);
}catch (Exception e){
log.error("抽取【社区治理能力-社区党建能力】发生异常,参数:" + JSON.toJSONString(param), e);
log.error("抽取【社区治理能力-社区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
try{
indexCollDistrictService.saveDistrictAbility(customerId, monthId);
}catch (Exception e){
log.error("抽取【全区治理能力-全区党建能力】发生异常,参数:" + JSON.toJSONString(param), e);
log.error("抽取【全区治理能力-全区党建能力-服务能力】发生异常,参数:" + JSON.toJSONString(param), e);
}
});
}

50
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java

@ -232,6 +232,56 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
return entity;
}).collect(Collectors.toList());
List<ProcessInfoDTO> responseList = projectProcessService.getResponseProcessList(customerId, dateString);
if (!CollectionUtils.isEmpty(responseList)) {
logList.addAll(responseList.stream().map(process -> {
//获取日期相关维度
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime());
FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity();
entity.setCustomerId(customerId);
entity.setAgencyId(process.getAgencyId());
entity.setYearId(dimId.getYearId());
entity.setQuarterId(dimId.getQuarterId());
entity.setMonthId(dimId.getMonthId());
entity.setDateId(dimId.getDateId());
entity.setProjectId(process.getProjectId());
entity.setOperationUserId(process.getStaffId());
entity.setActionCode(process.getOperation());
entity.setIsActive(NumConstant.ONE);
entity.setPids(process.getPids());
if (StringUtils.isNotBlank(process.getDepartmentId())) {
entity.setOrgType("department");
entity.setOrgId(process.getDepartmentId());
entity.setPid(process.getAgencyId());
} else if (StringUtils.isNotBlank(process.getGridId())) {
entity.setOrgType("grid");
entity.setOrgId(process.getGridId());
entity.setPid(process.getAgencyId());
} else {
if (!process.getPids().contains(StrConstant.COLON)) {
entity.setPids("");
entity.setPid(NumConstant.ZERO_STR);
} else {
String[] orgArray = process.getPids().split(StrConstant.COLON);
if (orgArray.length > NumConstant.ONE) {
entity.setPid(orgArray[orgArray.length - NumConstant.TWO]);
String path = process.getPids().replaceAll(process.getAgencyId(), "");
if (path.endsWith(StrConstant.COLON)) {
path = path.substring(NumConstant.ZERO, path.length() - NumConstant.ONE);
}
entity.setPids(path);
} else {
log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}", process.getAgencyId(), process.getPids());
entity.setPid(NumConstant.ZERO_STR);
entity.setPids("");
}
}
}
return entity;
}).collect(Collectors.toList()));
}
//项目评论人
List<ProcessInfoDTO> satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString);

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyService.java

@ -0,0 +1,33 @@
package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/9/30 16:39
*/
public interface FactIndexServiceAblityOrgMonthlyService extends BaseService<FactIndexServiceAblityOrgMonthlyEntity> {
/**
* 根据客户清空数据
* @author zhaoqifeng
* @date 2020/9/20 20:33
* @param customerId
* @param monthId
* @param type
* @return void
*/
void deleteByCustomer(String customerId, String monthId, String type);
/**
* 批量插入
* @author zhaoqifeng
* @date 2020/9/21 17:08
* @param list
* @return void
*/
void saveList(List<FactIndexServiceAblityOrgMonthlyEntity> list);
}

30
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexServiceAblityOrgMonthlyServiceImpl.java

@ -0,0 +1,30 @@
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.FactIndexServiceAblityOrgMonthlyDao;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/9/30 16:39
*/
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class FactIndexServiceAblityOrgMonthlyServiceImpl extends BaseServiceImpl<FactIndexServiceAblityOrgMonthlyDao, FactIndexServiceAblityOrgMonthlyEntity> implements FactIndexServiceAblityOrgMonthlyService {
@Override
public void deleteByCustomer(String customerId, String monthId, String type) {
baseDao.deleteByCustomer(customerId, monthId, type);
}
@Override
public void saveList(List<FactIndexServiceAblityOrgMonthlyEntity> list) {
insertBatch(list);
}
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/ActInfoService.java

@ -1,6 +1,7 @@
package com.epmet.service.heart;
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import java.util.List;
import java.util.Map;
@ -40,4 +41,14 @@ public interface ActInfoService {
* @date 2020/9/25 4:00 下午
*/
List<ScreenPartyBranchDataFormDTO> selectActInfo(String customerId, String monthId);
/**
* 获取机关活动次数
* @author zhaoqifeng
* @date 2020/9/30 17:02
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> getAgencyActCount(String customerId, String monthId);
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/heart/impl/ActInfoServiceImpl.java

@ -4,6 +4,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.heart.ActInfoDao;
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.service.heart.ActInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -74,4 +75,9 @@ public class ActInfoServiceImpl implements ActInfoService {
public List<ScreenPartyBranchDataFormDTO> selectActInfo(String customerId, String monthId) {
return baseDao.selectActInfo(customerId, monthId);
}
@Override
public List<OrgStatisticsResultDTO> getAgencyActCount(String customerId, String monthId) {
return baseDao.selectAgencyActCount(customerId, monthId);
}
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java

@ -53,6 +53,16 @@ public interface ProjectProcessService extends BaseService<ProjectProcessEntity>
*/
List<ProcessInfoDTO> getProcessListByCustomer(String customerId, String date);
/**
* 根据客户查询响应节点
* @author zhaoqifeng
* @date 2020/9/30 16:27
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.project.ProcessInfoDTO>
*/
List<ProcessInfoDTO> getResponseProcessList(String customerId, String date);
/**
* 查询各个节点的受理人
* @author zhaoqifeng

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java

@ -66,6 +66,11 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
return baseDao.selectProcessListByCustomer(customerId, date);
}
@Override
public List<ProcessInfoDTO> getResponseProcessList(String customerId, String date) {
return baseDao.selectResponseProcessList(customerId, date);
}
@Override
public List<ProcessInfoDTO> getProcessStaffByCustomer(String customerId, String date) {
return baseDao.selectProcessStaffByCustomer(customerId, date);

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml

@ -27,6 +27,12 @@
AND MONTH_ID = #{monthId}
limit 1000;
</delete>
<delete id="deleteByCustomer">
delete from fact_index_service_ablity_org_monthly
where CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
AND DATA_TYPE = #{type}
</delete>
<insert id="batchInsertFactIndexServiceAblityOrgMonthly" parameterType="map">
insert into fact_index_service_ablity_org_monthly

14
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/heart/ActInfoDao.xml

@ -53,4 +53,18 @@
AND DATE_FORMAT( ACTUAL_END_TIME, '%Y%m' ) = #{monthId}
GROUP BY SPONSOR_ID
</select>
<select id="selectAgencyActCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT
SPONSOR_ID AS "agencyId",
COUNT(ID) AS "count"
FROM
act_info
WHERE
DEL_FLAG = 0
AND ACT_STATUS = 'finished'
AND SPONSOR_TYPE = 'agency'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT( ACTUAL_END_TIME, '%Y%m' ) = #{monthId}
GROUP BY SPONSOR_ID
</select>
</mapper>

24
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml

@ -206,4 +206,28 @@
GROUP BY process.PROJECT_ID
ORDER BY process.CREATED_TIME DESC
</select>
<select id="selectResponseProcessList" resultType="com.epmet.dto.project.ProcessInfoDTO">
SELECT DISTINCT
ps.ORG_ID AS "agencyId",
ps.DEPARTMENT_ID,
ps.GRID_ID,
ps.ORG_ID_PATH AS pids,
pp.PROJECT_ID,
pp.OPERATION,
pp.STAFF_ID,
pp.CREATED_TIME,
FROM
project_process pp
INNER JOIN project p ON pp.PROJECT_ID = p.ID
LEFT JOIN project_staff ps ON pp.PROJECT_ID = ps.PROJECT_ID
AND pp.STAFF_ID = ps.STAFF_ID
AND pp.DEPARTMENT_NAME = ps.DEPARTMENT_NAME
WHERE
1=1
AND p.CUSTOMER_ID = #{customerId}
AND pp.OPERATION = 'response'
<if test="date != null and date.trim() != ''">
AND DATE_FORMAT(pp.CREATED_TIME,'%Y%m%d') = #{date}
</if>
</select>
</mapper>
Loading…
Cancel
Save