Browse Source

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

master
wangxianzhang 4 years ago
parent
commit
7fa5d135be
  1. 10
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql
  2. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  3. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  4. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  5. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  6. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  7. 29
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  8. 6
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  9. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java

10
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql

@ -0,0 +1,10 @@
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000012', 'grid_type', '网格类型', '', 12, 0, 0, '', '2021-12-23 18:23:27', '', '2021-12-23 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000300', 1000000000000000012, '党政机关', '0', '0', '', 0, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000301', 1000000000000000012, '企业', '1', '0', '', 0, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000302', 1000000000000000012, '园区', '2', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000303', 1000000000000000012, '商圈', '3', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000304', 1000000000000000012, '市场', '4', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000305', 1000000000000000012, '景区', '5', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000306', 1000000000000000012, '医院', '6', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000307', 1000000000000000012, '学校', '7', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18');

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -96,6 +96,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
wrapper.between(IcPartyActivityEntity::getActivityTime, formDTO.getStartTime(), formDTO.getEndTime()); wrapper.between(IcPartyActivityEntity::getActivityTime, formDTO.getStartTime(), formDTO.getEndTime());
wrapper.orderByDesc(IcPartyActivityEntity::getUpdatedTime); wrapper.orderByDesc(IcPartyActivityEntity::getUpdatedTime);
List<IcPartyActivityEntity> list = baseDao.selectList(wrapper); List<IcPartyActivityEntity> list = baseDao.selectList(wrapper);
PageInfo<IcPartyActivityEntity> pageInfo = new PageInfo<>(list);
List<IcPartyActivityDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class); List<IcPartyActivityDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class);
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); IcPartyUnitDTO unitDTO = new IcPartyUnitDTO();
@ -106,7 +107,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
dto.setUnitName(option.get(dto.getUnitId())); dto.setUnitName(option.get(dto.getUnitId()));
}); });
} }
PageInfo<IcPartyActivityDTO> pageInfo = new PageInfo<>(dtoList);
return new PageData<>(dtoList, pageInfo.getTotal()); return new PageData<>(dtoList, pageInfo.getTotal());
} }

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -101,6 +101,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile());
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
@ -121,7 +122,6 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2,BigDecimal.ROUND_HALF_UP).toString()); item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
} }
}); });
PageInfo<IcPartyUnitDTO> pageInfo = new PageInfo<>(dtoList);
return new PageData<>(dtoList, pageInfo.getTotal()); return new PageData<>(dtoList, pageInfo.getTotal());
} }

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java

@ -99,7 +99,6 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
@Autowired @Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired @Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient; private GovOrgOpenFeignClient govOrgOpenFeignClient;

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -771,6 +771,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
} }
CustomerGridDTO gridInfo = baseDao.gridAgencyByGrid(customerGridFormDTO.getGridId()); CustomerGridDTO gridInfo = baseDao.gridAgencyByGrid(customerGridFormDTO.getGridId());
if (null != gridInfo) {
redisUtils.hMSet(redisKey, BeanUtil.beanToMap(gridInfo));
}
/*CustomerGridDTO gridInfo = ConvertUtils.sourceToTarget(baseDao.selectById(customerGridFormDTO.getGridId()), CustomerGridDTO.class); /*CustomerGridDTO gridInfo = ConvertUtils.sourceToTarget(baseDao.selectById(customerGridFormDTO.getGridId()), CustomerGridDTO.class);
if (null != gridInfo) { if (null != gridInfo) {
CustomerAgencyEntity agency = customerAgencyService.selectById(gridInfo.getPid()); CustomerAgencyEntity agency = customerAgencyService.selectById(gridInfo.getPid());
@ -779,7 +782,6 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
redisUtils.hMSet(redisKey, BeanUtil.beanToMap(gridInfo)); redisUtils.hMSet(redisKey, BeanUtil.beanToMap(gridInfo));
}*/ }*/
redisUtils.hMSet(redisKey, BeanUtil.beanToMap(gridInfo));
return gridInfo; return gridInfo;
} }

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java

@ -259,6 +259,6 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @author zxc * @author zxc
* @date 2021/12/10 10:31 上午 * @date 2021/12/10 10:31 上午
*/ */
List<ProjectDistributionAnalysisRightDTO> selectProjectCountByOrg(@Param("orgIds")List<String> orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate); List<ProjectDistributionAnalysisRightDTO> selectProjectCountByOrg(List<SonOrgResultDTO> orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate);
} }

29
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -2918,26 +2918,31 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
ProjectDistributionAnalysisRightResultDTO result = new ProjectDistributionAnalysisRightResultDTO(); ProjectDistributionAnalysisRightResultDTO result = new ProjectDistributionAnalysisRightResultDTO();
List<ProjectDistributionAnalysisRightDTO> orgList = new ArrayList<>(); List<ProjectDistributionAnalysisRightDTO> orgList = new ArrayList<>();
Result<List<SonOrgResultDTO>> sonOrgList = govOrgOpenFeignClient.getSonAgencyId(formDTO.getOrgId(), agencyInfo.getLevel()); Result<List<SonOrgResultDTO>> sonOrgList = govOrgOpenFeignClient.getSonAgencyId(formDTO.getOrgId(), agencyInfo.getLevel());
if (!sonOrgList.success() || CollectionUtils.isEmpty(sonOrgList.getData())){ if (!sonOrgList.success()){
throw new EpmetException(String.format("查询组织{%s}的下级组织失败或为空...",formDTO.getOrgId())); throw new EpmetException(String.format("查询组织{%s}的下级组织失败...",formDTO.getOrgId()));
} }
if (CollectionUtils.isEmpty(sonOrgList.getData())){
return result;
}
// 所有子级orgId,并构建全部数据
List<SonOrgResultDTO> orgIds = sonOrgList.getData(); List<SonOrgResultDTO> orgIds = sonOrgList.getData();
for (SonOrgResultDTO o : orgIds) {
ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO();
dto.setOrgId(o.getOrgId());
orgList.add(dto);
}
List<ProjectDistributionAnalysisRightDTO> dtos;
if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){ if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){
orgList = baseDao.selectProjectCountByOrg(orgIds.stream().map(m -> m.getPids()).collect(Collectors.toList()), formDTO.getStartDate(),formDTO.getEndDate()); dtos = baseDao.selectProjectCountByOrg(orgIds, formDTO.getStartDate(),formDTO.getEndDate());
}else { }else {
for (SonOrgResultDTO o : orgIds) {
ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO();
dto.setOrgId(o.getOrgId());
orgList.add(dto);
}
Result<List<ProjectDistributionAnalysisRightDTO>> projectCountByGrid = govIssueOpenFeignClient.getProjectCountByGrid(formDTO); Result<List<ProjectDistributionAnalysisRightDTO>> projectCountByGrid = govIssueOpenFeignClient.getProjectCountByGrid(formDTO);
if (!projectCountByGrid.success()){ if (!projectCountByGrid.success()){
throw new EpmetException("查询网格项目数失败..."); throw new EpmetException("查询网格项目数失败...");
} }
if (CollectionUtils.isNotEmpty(projectCountByGrid.getData())){ dtos = projectCountByGrid.getData();
orgList.stream().forEach(o -> projectCountByGrid.getData().stream().filter(p -> p.getOrgId().equals(o.getOrgId())).forEach(p -> o.setCount(p.getCount()))); }
if (CollectionUtils.isNotEmpty(dtos)){
} orgList.stream().forEach(o -> dtos.stream().filter(p -> p.getOrgId().equals(o.getOrgId())).forEach(p -> o.setCount(p.getCount())));
} }
if (CollectionUtils.isEmpty(orgList)){ if (CollectionUtils.isEmpty(orgList)){
return result; return result;

6
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -470,13 +470,13 @@
<!-- 查询组织下的项目数 --> <!-- 查询组织下的项目数 -->
<select id="selectProjectCountByOrg" resultType="com.epmet.dto.result.ProjectDistributionAnalysisRightDTO"> <select id="selectProjectCountByOrg" resultType="com.epmet.dto.result.ProjectDistributionAnalysisRightDTO">
<foreach collection="orgIds" item="orgId" separator=" UNION ALL "> <foreach collection="orgIds" item="o" separator=" UNION ALL ">
SELECT SELECT
#{orgId} AS orgId, #{o.orgId} AS orgId,
COUNT(ID) AS count COUNT(ID) AS count
FROM project FROM project
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
AND ORG_ID_PATH LIKE CONCAT(#{orgId},'%') AND ORG_ID_PATH LIKE CONCAT(#{o.pids},':',#{o.orgId},'%')
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate} AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate}
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{endDate} AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{endDate}
</foreach> </foreach>

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java

@ -185,8 +185,8 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember
wrapper.like(StringUtils.isNotBlank(formDTO.getName()), IcPartymemberStyleEntity::getName, formDTO.getName()); wrapper.like(StringUtils.isNotBlank(formDTO.getName()), IcPartymemberStyleEntity::getName, formDTO.getName());
wrapper.like(StringUtils.isNotBlank(formDTO.getMainDeed()), IcPartymemberStyleEntity::getMainDeed, formDTO.getMainDeed()); wrapper.like(StringUtils.isNotBlank(formDTO.getMainDeed()), IcPartymemberStyleEntity::getMainDeed, formDTO.getMainDeed());
List<IcPartymemberStyleEntity> list = baseDao.selectList(wrapper); List<IcPartymemberStyleEntity> list = baseDao.selectList(wrapper);
PageInfo<IcPartymemberStyleEntity> pageInfo = new PageInfo<>(list);
List<IcPartymemberStyleDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartymemberStyleDTO.class); List<IcPartymemberStyleDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartymemberStyleDTO.class);
PageInfo<IcPartymemberStyleDTO> pageInfo = new PageInfo<>(dtoList);
//设置网格名 //设置网格名
dtoList.forEach(item -> { dtoList.forEach(item -> {
if (StringUtils.isNotBlank(item.getGridId())) { if (StringUtils.isNotBlank(item.getGridId())) {

Loading…
Cancel
Save