Browse Source

Merge branch 'dev_prod_bug_syc' into dev_temp

# Conflicts:
#	epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java
#	epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
#	epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml
dev_shibei_match
sunyuchao 4 years ago
parent
commit
57882c837f
  1. 10
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/CategoryAnalysisResultDTO.java
  2. 3
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java
  3. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java
  4. 1
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java
  5. 4
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java
  6. 29
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/CustomerProjectCategoryDTO.java
  7. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  8. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  9. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java
  10. 10
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java
  11. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  12. 1
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
  13. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  14. 26
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java
  15. 45
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  16. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  17. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  18. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  19. 82
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml
  20. 4
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml
  21. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java
  22. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  23. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  24. 10
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  25. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java
  26. 14
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml

10
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/CategoryAnalysisResultDTO.java

@ -23,4 +23,14 @@ public class CategoryAnalysisResultDTO implements Serializable {
* 项目总数
*/
private Integer projectTotal;
/**
* 数据更新至
*/
private String dateId;
/**
* 分类编码
*/
private String categoryCode;
}

3
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java

@ -16,4 +16,7 @@ public class ScreenProjectDetailFormDTO implements Serializable {
@NotBlank(message = "projectId不能为空")
private String projectId;
@NotBlank(message = "customerId不能为空")
private String customerId;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java

@ -55,4 +55,6 @@ public class AdvanceBranchRankResultDTO implements Serializable {
*/
private String parentAgencyName;
private Integer sort;
private String orgId;
}

1
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java

@ -56,6 +56,7 @@ public class OrgRankDataResultDTO implements Serializable {
*/
private String parentAgencyName;
private String orgId;
/**
* 数据所属月份
*/

4
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java

@ -37,4 +37,8 @@ public class SubAgencyIndexRankResultDTO implements Serializable {
* 服务能力
*/
private Double serviceAbility = 0.0;
private String orgId;
private String orgType;
private String areaCode;
}

29
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/CustomerProjectCategoryDTO.java

@ -0,0 +1,29 @@
package com.epmet.project;
import lombok.Data;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/5/12 11:19
*/
@Data
public class CustomerProjectCategoryDTO implements Serializable {
/**
* 客户自己的分类编码
*/
private String categoryCode;
/**
* 客户自己的分类名称
*/
private String categoryName;
/**
* 分类等级12....产品只有2级分类
*/
private Integer level;
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -74,7 +74,9 @@ public class ScreenProjectController {
* @Date 2021/2/24 16:10
*/
@PostMapping("projectdetailv2")
public Result projectDetail(@RequestBody ScreenProjectDetailFormDTO formDTO){
public Result projectDetail(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenProjectDetailFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return screenProjectService.projectDistributionDetail(formDTO);
}

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -150,6 +150,14 @@ public interface ScreenCustomerAgencyDao {
**/
List<GridNodeDTO> selectGridList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId);
/**
* @return java.util.List<java.lang.String>
* @param areaCode
* @param agencyId
* @author yinzuomei
* @description 下一级组织+直属网格
* @Date 2021/5/10 14:02
**/
List<String> getNextAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId);
List<String> selectSubAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId);

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java

@ -18,6 +18,7 @@
package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.dto.result.screen.CategoryAnalysisResultDTO;
import com.epmet.project.CustomerProjectCategoryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -39,4 +40,6 @@ public interface ScreenProjectCategoryOrgDailyDao {
* @return java.util.List<com.epmet.dto.result.screen.CategoryAnalysisResultDTO>
*/
List<CategoryAnalysisResultDTO> selectCategoryAnalysis(@Param("agencyId") String agencyId,@Param("customerId")String customerId);
CustomerProjectCategoryDTO selectProjectCategory(@Param("categoryCode")String categoryCode, @Param("customerId")String customerId, @Param("subCustomerIds")List<String> subCustomerIds);
}

10
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -19,9 +19,13 @@ public interface ScreenProjectDataDao {
List<ScreenProjectDetailResultDTO> projectDistributionDetail(@Param("projectId") String projectId);
List<String> selectProjectImgs(@Param("projectId") String projectId);
List<String> selectProjectImgs(@Param("projectId") String projectId,
@Param("customerId") String customerId);
List<ScreenProjectDetailResultDTO.processDTO> selectProjectProcess(@Param("projectId") String projectId);
List<ScreenProjectDetailResultDTO.processDTO> selectProjectProcess(@Param("projectId") String projectId,
@Param("customerId") String customerId);
List<ScreenProjectDetailResultDTO.processDTO.AttachmentDTO> selectProjectProcessAttachments(@Param("processId") String processId);
List<ScreenProjectDetailResultDTO.processDTO.AttachmentDTO> selectProjectProcessAttachments(@Param("processId") String processId,
@Param("projectId") String projectId,
@Param("customerId") String customerId);
}

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java

@ -303,7 +303,7 @@ public class AgencyServiceImpl implements AgencyService {
* @param agencyId
* @return java.util.List<java.lang.String>
* @author yinzuomei
* @description 获取当前组织的下级组织集合
* @description 获取当前组织的下级组织集合:下一级组织+直属网格
* @Date 2021/2/25 16:52
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)

1
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java

@ -67,6 +67,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) {
if(StringUtils.isNotBlank(param.getAreaCode())){
logger.info(String.format("党员基本情况-饼状图概况按照areaCode查询:%s",param.getAreaCode()));
//下一级组织+直属网格
List<String> ids=screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(),param.getAgencyId());
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(ids)){
PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercentByIds(ids);

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java

@ -404,6 +404,7 @@ public class IndexServiceImpl implements IndexService {
List<SubAgencyIndexRankResultDTO> streetList = screenIndexDataMonthlyDao.selectSubStreetByAreaCode(formDTO.getCustomerId(),yearId,formDTO.getAreaCode(),formDTO.getTopNum());
// 小数四舍五入
streetList.forEach(indexRank -> {
indexRank.setOrgType("street");
indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility()));
indexRank.setGovernAbility(getRound(indexRank.getGovernAbility()));
indexRank.setServiceAbility(getRound(indexRank.getServiceAbility()));
@ -414,6 +415,7 @@ public class IndexServiceImpl implements IndexService {
List<SubAgencyIndexRankResultDTO> gridList = screenIndexDataMonthlyDao.selectSubGridByAreaCode(formDTO.getCustomerId(),yearId,formDTO.getAreaCode(),formDTO.getTopNum());
// 小数四舍五入
gridList.forEach(indexRank -> {
indexRank.setOrgType("grid");
indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility()));
indexRank.setGovernAbility(getRound(indexRank.getGovernAbility()));
indexRank.setServiceAbility(getRound(indexRank.getServiceAbility()));

26
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java

@ -120,11 +120,17 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) {
ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO();
List<String> subAgencyIdorGridIdList=screenCustomerAgencyService.getNextAgencyIds(contactMassLineChartFormDTO.getAreaCode(),contactMassLineChartFormDTO.getAgencyId());
log.info("当前组织的下级id:"+JSON.toJSONString(subAgencyIdorGridIdList));
ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO();
if(CollectionUtils.isEmpty(subAgencyIdorGridIdList)){
//如果没有下级组织或者直属网格
result.setXAxis(new ArrayList<>());
result.setGroupMemberData(new ArrayList<>());
result.setGroupData(new ArrayList<>());
return result;
}
// List<ContactMassLineChartResult> contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId());
//多客户版修改如下:
List<ContactMassLineChartResult> contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChartByAgencyIds(subAgencyIdorGridIdList);
@ -277,12 +283,16 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
gridData = screenOrgRankDataDao.selectGridDataMonthlyAreaCode(monthId,param.getAreaCode());
}
if(null == gridData || gridData.isEmpty()) return result;
gridData.forEach( data -> {
int num=1;
for(OrgRankDataResultDTO data:gridData){
AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class);
o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio()));
o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio()));
o.setSort(num);
o.setOrgId(data.getOrgId());
num++;
result.add(o);
});
};
}else{
List<OrgRankDataResultDTO> gridData =
screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
@ -294,12 +304,16 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
}
if(null == gridData || gridData.isEmpty()) return result;
gridData.forEach( data -> {
int num=1;
for(OrgRankDataResultDTO data:gridData){
AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class);
o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio()));
o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio()));
o.setSort(num);
o.setOrgId(data.getOrgId());
num++;
result.add(o);
});
};
}
return result;
}

45
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java

@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao;
@ -17,10 +18,15 @@ import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDT
import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDistributionResultDTO;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.epmet.project.CustomerProjectCategoryDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
/**
@ -29,6 +35,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:23
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenProjectServiceImpl implements ScreenProjectService {
@ -42,6 +50,8 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
@Autowired
private ScreenProjectCategoryOrgDailyDao screenProjectCategoryOrgDailyDao;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
/**
* @Description 3项目详情
@ -74,14 +84,15 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
// 1:红色:为刚提交未做任何响应处理未结案的项目;
// 2:黄色: 至少做过一次响应处理答复但未结案的项目;
// 3:绿色:已经结案的项目。
List<String> areaIds = null;
List<String> orgIds = null;
if (StringUtils.isNotBlank(formDTO.getAreaCode())){
areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode());
//所有组织+网格
orgIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode());
}
if (formDTO.getPageSize() == null){
formDTO.setPageSize(NumConstant.TWO_HUNDRED);
}
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel(),formDTO.getPageSize());
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),orgIds,formDTO.getLevel(),formDTO.getPageSize());
return resultDTOS;
}
@ -90,13 +101,14 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
List<ScreenProjectDetailResultDTO> resultDTOS = screenProjectDataDao.projectDistributionDetail(formDTO.getProjectId());
resultDTOS.forEach(item -> {
//项目图片
List<String> imgList = screenProjectDataDao.selectProjectImgs(formDTO.getProjectId());
List<String> imgList = screenProjectDataDao.selectProjectImgs(formDTO.getProjectId(),item.getCustomerId());
item.setImgList(imgList);
//项目处理流程
List<ScreenProjectDetailResultDTO.processDTO> processDTOS = screenProjectDataDao.selectProjectProcess(formDTO.getProjectId());
List<ScreenProjectDetailResultDTO.processDTO> processDTOS = screenProjectDataDao.selectProjectProcess(formDTO.getProjectId(),item.getCustomerId());
//流程附件
processDTOS.forEach(processDTO -> {
List<ScreenProjectDetailResultDTO.processDTO.AttachmentDTO> attachmentDTOS = screenProjectDataDao.selectProjectProcessAttachments(processDTO.getProcessId());
List<ScreenProjectDetailResultDTO.processDTO.AttachmentDTO> attachmentDTOS =
screenProjectDataDao.selectProjectProcessAttachments(processDTO.getProcessId(),formDTO.getProjectId(),item.getCustomerId());
processDTO.setAttachments(attachmentDTOS);
});
item.setProcessList(processDTOS);
@ -116,6 +128,25 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public List<CategoryAnalysisResultDTO> categoryAnalysis(String customerId, CategoryAnalysisFormDTO formDTO) {
return screenProjectCategoryOrgDailyDao.selectCategoryAnalysis(formDTO.getAgencyId(),customerId);
List<CategoryAnalysisResultDTO> resultDTOList = screenProjectCategoryOrgDailyDao.selectCategoryAnalysis(formDTO.getAgencyId(), customerId);
List<CategoryAnalysisResultDTO> resultList = new ArrayList<>();
if (!CollectionUtils.isEmpty(resultDTOList)) {
Result<List<String>> crmRes = operCrmOpenFeignClient.getAllSubCustomerIds(customerId);
List<String> subCustomerIds = new ArrayList<>();
if (crmRes.success() && !CollectionUtils.isEmpty(crmRes.getData())) {
subCustomerIds = crmRes.getData();
}
for (CategoryAnalysisResultDTO dto : resultDTOList) {
CustomerProjectCategoryDTO projectCategoryDTO = screenProjectCategoryOrgDailyDao.selectProjectCategory(dto.getCategoryCode(), customerId, subCustomerIds);
if (null == projectCategoryDTO || StringUtils.isBlank(projectCategoryDTO.getCategoryName())) {
log.warn(String.format("查询分类名称失败,当前客户:%s, categoryCode:%s", dto.getCategoryCode(), customerId));
continue;
}
CategoryAnalysisResultDTO resultDto = ConvertUtils.sourceToTarget(dto, CategoryAnalysisResultDTO.class);
resultDto.setCategoryName(projectCategoryDTO.getCategoryName());
resultList.add(resultDto);
}
}
return resultList;
}
}

1
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -272,6 +272,7 @@
and grid.PARENT_AGENCY_ID=#{agencyId}
</select>
<!-- 下一级组织+直属网格 -->
<select id="getNextAgencyIds" parameterType="map" resultType="java.lang.String">
SELECT
sca.AGENCY_ID as orgId

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -289,7 +289,9 @@
sca.AGENCY_NAME AS NAME,
sy.govern_ablity AS governAbility,
sy.party_dev_ablity AS partyDevAbility,
sy.service_ablity AS serviceAbility
sy.service_ablity AS serviceAbility,
sy.ORG_ID as orgId,
sca.area_code as areaCode
FROM screen_customer_agency sca
left join screen_index_data_yearly sy
on(sca.AGENCY_ID=sy.ORG_ID
@ -310,7 +312,9 @@
scg.GRID_NAME AS NAME,
sy.govern_ablity AS governAbility,
sy.party_dev_ablity AS partyDevAbility,
sy.service_ablity AS serviceAbility
sy.service_ablity AS serviceAbility,
sy.ORG_ID as orgId,
scg.area_code as areaCode
FROM screen_customer_grid scg
left join screen_index_data_yearly sy
on(scg.GRID_ID=sy.ORG_ID

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml

@ -14,6 +14,7 @@
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName,
rankData.ORG_ID as orgId,
rankData.MONTH_ID
FROM
screen_org_rank_data rankData
@ -45,6 +46,7 @@
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName,
rankData.ORG_ID as orgId,
rankData.MONTH_ID
FROM
screen_org_rank_data rankData

82
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml

@ -5,30 +5,66 @@
<select id="selectCategoryAnalysis" resultType="com.epmet.dto.result.screen.CategoryAnalysisResultDTO">
SELECT D.CATEGORY_NAME AS categoryName,
M.PROJECT_TOTAL AS projectTotal
SELECT '' AS categoryName,
M.PROJECT_TOTAL AS projectTotal,
m.DATE_ID as dateId,
m.CATEGORY_CODE as categoryCode
FROM screen_project_category_org_daily m
left join customer_project_category_dict d
on(m.CATEGORY_CODE=D.CATEGORY_CODE
AND D.DEL_FLAG='0'
and d.CUSTOMER_ID=#{customerId})
WHERE M.DEL_FLAG = '0'
AND M.ORG_ID = #{agencyId}
AND M.DATE_ID = (
select
date_id
from
screen_project_category_org_daily
where
del_flag = '0'
and ORG_ID = #{agencyId}
and CUSTOMER_ID=#{customerId}
order by
date_id desc,
created_time desc
limit 1
)
ORDER BY M.PROJECT_TOTAL desc,D.CATEGORY_NAME asc
limit 20
and m.level='1'
AND M.ORG_ID = #{agencyId}
and M.CUSTOMER_ID=#{customerId}
AND M.DATE_ID = (
select
date_id
from
screen_project_category_org_daily
where
del_flag = '0'
and ORG_ID = #{agencyId}
and CUSTOMER_ID=#{customerId}
order by
date_id desc,
created_time desc
limit 1
)
ORDER BY M.PROJECT_TOTAL desc
</select>
<!-- 平阴的分类编码: 平阴自己的+ 子客户未对照的 -->
<select id="selectProjectCategory" parameterType="map" resultType="com.epmet.project.CustomerProjectCategoryDTO">
SELECT
*
FROM
(
SELECT DISTINCT
m.CATEGORY_CODE,
m.CATEGORY_NAME,
m.`LEVEL`
FROM
customer_project_category_dict m
WHERE
m.DEL_FLAG = '0'
AND m.customer_id = #{customerId}
<if test="subCustomerIds != null and subCustomerIds.size() > 0">
UNION ALL
SELECT DISTINCT
m.CATEGORY_CODE,
m.CATEGORY_NAME,
m.`LEVEL`
FROM
customer_project_category_dict m
WHERE
m.DEL_FLAG = '0'
AND m.EPMET_CATEGORY_CODE IS NULL
AND m.customer_id IN
<foreach item="subCustomerId" collection="subCustomerIds" open="(" separator="," close=")">
#{subCustomerId}
</foreach>
</if>
) temp
WHERE
temp.CATEGORY_CODE = #{categoryCode}
LIMIT 1
</select>
</mapper>

4
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -77,6 +77,7 @@
select PROJECT_IMG_URL from screen_project_img_data
where del_flag = '0'
and project_id = #{projectId}
and CUSTOMER_ID= #{customerId}
order by sort asc
</select>
<select id="selectProjectProcess" resultType="com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO$processDTO">
@ -90,6 +91,7 @@
from screen_project_process
where del_flag = '0'
and project_id = #{projectId}
and CUSTOMER_ID= #{customerId}
order by process_time asc
</select>
<select id="selectProjectProcessAttachments" resultType="com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO$processDTO$AttachmentDTO">
@ -106,6 +108,8 @@
where del_flag = '0'
and file_place = 'public'
AND PROCESS_ID=#{processId}
and project_id = #{projectId}
and CUSTOMER_ID= #{customerId}
order by sort asc
</select>
</mapper>

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

@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
@ -132,6 +133,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public void insertPartyBranchData(PartyBranchDataListFormDTO formDTO, String customerId) {
if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) {
throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId());
}
if (formDTO.getIsFirst()) {
int deleteNum;
do {
@ -147,6 +151,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public void insertOrgRankData(OrgRankDataListFormDTO formDTO, String customerId) {
if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) {
throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId());
}
if (formDTO.getIsFirst()) {
int deleteNum;
do {
@ -162,6 +169,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public void insertGovernRankData(GovernRankDataListFormDTO formDTO, String customerId) {
if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) {
throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId());
}
if (formDTO.getIsFirst()) {
int deleteNum;
do {
@ -250,6 +260,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public void insertIndexDataMonthly(IndexDataListMonthlyFormDTO formDTO, String customerId) {
if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) {
throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId());
}
if (formDTO.getIsFirst()) {
int deleteNum;
do {
@ -345,6 +358,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public void insertUserJoin(UserJoinListFormDTO formDTO, String customerId) {
if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) {
throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId());
}
if (formDTO.getIsFirst()) {
int deleteNum;
do {

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -58,6 +58,7 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @Description 组织首页-下级机关列表
**/
List<SubListResultDTO> selectSubAgencyById(@Param("pId") String pId, @Param("agencyNum") Integer agencyNum);
List<SubListResultDTO> selectSubAgencyByAgencyId(@Param("pId") String pId);
/**
* @param pId

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -287,7 +287,7 @@ public class AgencyServiceImpl implements AgencyService {
public Result<SubAgencyResultDTO> subAgencyList(SubAgencyFormDTO formDTO) {
SubAgencyResultDTO subAgencyResultDTO = new SubAgencyResultDTO();
//1:根据当前机关Id查询直属下一级机关列表,只返回前十条
List<SubListResultDTO> agencyList = customerAgencyDao.selectSubAgencyById(formDTO.getAgencyId(),formDTO.getAgencyNum());
List<SubListResultDTO> agencyList = customerAgencyDao.selectSubAgencyByAgencyId(formDTO.getAgencyId());
if (null == agencyList || agencyList.size() < NumConstant.ONE) {
subAgencyResultDTO.setAgencyList(new ArrayList<SubListResultDTO>());
subAgencyResultDTO.setSubAgencyCount(NumConstant.ZERO);

10
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -70,6 +70,16 @@
ORDER BY created_time DESC
LIMIT #{agencyNum}
</select>
<select id="selectSubAgencyByAgencyId" resultType="com.epmet.dto.result.SubListResultDTO">
SELECT
id AS 'agencyId',
organization_name AS 'agencyName',
`level` AS 'agencyLevel'
FROM customer_agency
WHERE del_flag = '0'
AND pid = #{pId}
ORDER BY created_time DESC
</select>
<select id="selectAgencyList" resultType="com.epmet.dto.result.AgencyListResultDTO">
SELECT

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java

@ -232,7 +232,6 @@ public class ExitGroupServiceImpl implements ExitGroupService {
}
//3.修改组成员出入群记录表数据状态、删除组成员关系表数据、新增退群记录表数据
//3.1.修改组成员出入群记录表数据状态 group_memeber_operation
// TODO ???
GroupMemeberOperationDTO lastRec=groupMemeberOperationService.selectLatestRecord(formDTO.getGroupId(),formDTO.getUserId());
GroupMemeberOperationDTO operationDTO = new GroupMemeberOperationDTO();
operationDTO.setCustomerId(formDTO.getCustomerId());

14
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml

@ -97,21 +97,15 @@
<select id="getMembersCountInGrid" resultType="integer">
SELECT
COUNT(
DISTINCT
CUSTOMER_USER_ID
)
FROM
COUNT( DISTINCT member.CUSTOMER_USER_ID )
FROM
RESI_GROUP groupp
INNER JOIN RESI_GROUP_MEMBER member ON member.RESI_GROUP_ID = groupp.ID AND member.DEL_FLAG = '0' AND (member.STATUS = 'approved' OR
member.STATUS = 'silent')
WHERE
groupp.DEL_FLAG = '0'
AND
groupp.GRID_ID = #{gridId}
AND
groupp.STATE = 'approved'
AND groupp.GRID_ID = #{gridId}
AND groupp.STATE = 'approved'
</select>
<select id="getMembersCountInGrids" resultType="com.epmet.resi.group.dto.member.result.VotableCountResultDTO">

Loading…
Cancel
Save