Browse Source

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
master
jianjun 4 years ago
parent
commit
52842aa6a4
  1. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  3. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  4. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SonOrgResultDTO.java
  5. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  6. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  7. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  8. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  9. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java
  10. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  11. 14
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  12. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  13. 30
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  14. 22
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  15. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java
  16. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

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());
} }

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

@ -67,6 +67,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.Optional;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;

20
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SonOrgResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/12/31 10:22 上午
* @DESC
*/
@Data
public class SonOrgResultDTO implements Serializable {
private static final long serialVersionUID = -1046350929245852333L;
private String orgId;
private String pids;
}

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -539,7 +539,7 @@ public interface GovOrgOpenFeignClient {
* @date 2021/12/9 4:42 下午 * @date 2021/12/9 4:42 下午
*/ */
@PostMapping("/gov/org/agency/getsonagencyid") @PostMapping("/gov/org/agency/getsonagencyid")
Result<List<String>> getSonAgencyId(@RequestParam("orgId")String orgId); Result<List<SonOrgResultDTO>> getSonAgencyId(@RequestParam("orgId")String orgId,@RequestParam("type")String type);
// /icbuilding/{id}?id=demoData // /icbuilding/{id}?id=demoData

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -335,8 +335,8 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
} }
@Override @Override
public Result<List<String>> getSonAgencyId(String orgId) { public Result<List<SonOrgResultDTO>> getSonAgencyId(String orgId,String type) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getSonAgencyId", orgId); return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getSonAgencyId", orgId,type);
} }
@Override @Override

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -356,8 +356,8 @@ public class AgencyController {
* @date 2021/12/9 4:42 下午 * @date 2021/12/9 4:42 下午
*/ */
@PostMapping("getsonagencyid") @PostMapping("getsonagencyid")
public Result<List<String>> getSonAgencyId(@RequestParam("orgId")String orgId){ public Result<List<SonOrgResultDTO>> getSonAgencyId(@RequestParam("orgId")String orgId,@RequestParam("type")String type){
return new Result<List<String>>().ok(agencyService.getSonAgencyId(orgId)); return new Result<List<SonOrgResultDTO>>().ok(agencyService.getSonAgencyId(orgId,type));
} }
} }

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

@ -289,7 +289,9 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @author zxc * @author zxc
* @date 2021/12/9 4:42 下午 * @date 2021/12/9 4:42 下午
*/ */
List<String> getSonAgencyId(@Param("orgId") String orgId); List<SonOrgResultDTO> getSonAgencyId(@Param("orgId") String orgId);
List<SonOrgResultDTO> getSonGridId(@Param("orgId") String orgId);
/** /**
* desc:获取组织和网格的数据 树形sql * desc:获取组织和网格的数据 树形sql

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

@ -154,6 +154,6 @@ public interface AgencyService {
* @author zxc * @author zxc
* @date 2021/12/9 4:42 下午 * @date 2021/12/9 4:42 下午
*/ */
List<String> getSonAgencyId(String orgId); List<SonOrgResultDTO> getSonAgencyId(String orgId,String type);
} }

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

@ -644,8 +644,13 @@ public class AgencyServiceImpl implements AgencyService {
* @date 2021/12/9 4:42 下午 * @date 2021/12/9 4:42 下午
*/ */
@Override @Override
public List<String> getSonAgencyId(String orgId) { public List<SonOrgResultDTO> getSonAgencyId(String orgId,String type) {
List<String> result = customerAgencyDao.getSonAgencyId(orgId); List<SonOrgResultDTO> result = new ArrayList<>();
if (type.equals("community")){
result = customerAgencyDao.getSonGridId(orgId);
}else {
result = customerAgencyDao.getSonAgencyId(orgId);
}
if (CollectionUtils.isNotEmpty(result)){ if (CollectionUtils.isNotEmpty(result)){
return result; return result;
} }

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

@ -684,9 +684,10 @@
</select> </select>
<!-- 查询下级agencyId --> <!-- 查询下级agencyId -->
<select id="getSonAgencyId" resultType="java.lang.String"> <select id="getSonAgencyId" resultType="com.epmet.dto.result.SonOrgResultDTO">
SELECT SELECT
ID ID AS orgId,
pids
FROM customer_agency FROM customer_agency
WHERE WHERE
DEL_FLAG = '0' DEL_FLAG = '0'
@ -720,5 +721,14 @@
AND ca.del_flag = '0' AND ca.del_flag = '0'
AND cg.id = #{gridId} AND cg.id = #{gridId}
</select> </select>
<select id="getSonGridId" resultType="com.epmet.dto.result.SonOrgResultDTO">
SELECT
ID AS orgId,
pids
FROM customer_grid
WHERE
DEL_FLAG = '0'
AND PID = #{orgId}
</select>
</mapper> </mapper>

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<String> orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate);
} }

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

@ -2917,23 +2917,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());
if (!sonOrgList.success()){
throw new EpmetException(String.format("查询组织{%s}的下级组织失败...",formDTO.getOrgId()));
}
if (CollectionUtils.isEmpty(sonOrgList.getData())){
return result;
}
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)){
Result<List<String>> sonAgencyIdResult = govOrgOpenFeignClient.getSonAgencyId(formDTO.getOrgId()); dtos = baseDao.selectProjectCountByOrg(orgIds.stream().map(m -> m.getOrgId()).collect(Collectors.toList()), formDTO.getStartDate(), formDTO.getEndDate());
if (!sonAgencyIdResult.success()){
throw new EpmetException(String.format("查询组织{%s}的下级组织失败...",formDTO.getOrgId()));
}
List<String> agencyIds = sonAgencyIdResult.getData();
if (CollectionUtils.isNotEmpty(agencyIds)){
orgList = baseDao.selectProjectCountByOrg(agencyIds,formDTO.getStartDate(),formDTO.getEndDate());
}
}else { }else {
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 = projectCountByGrid.getData(); }
} 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;

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

@ -470,15 +470,17 @@
<!-- 查询组织下的项目数 --> <!-- 查询组织下的项目数 -->
<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 "> SELECT
SELECT AGENCY_ID AS orgId,
#{orgId} AS orgId, COUNT(ID) AS count
COUNT(ID) AS count FROM project
FROM project WHERE DEL_FLAG = '0'
WHERE DEL_FLAG = '0' AND AGENCY_ID IN (
AND ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%') <foreach collection="orgIds" item="o" separator=",">
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate} #{o}
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{endDate} </foreach>)
</foreach> AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate}
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{endDate}
GROUP BY AGENCY_ID
</select> </select>
</mapper> </mapper>

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())) {

1
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -522,4 +522,5 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result<RegisterRelationDTO> resiRelationInfo(String userId) { public Result<RegisterRelationDTO> resiRelationInfo(String userId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "resiRelationInfo", userId); return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "resiRelationInfo", userId);
} }
} }

Loading…
Cancel
Save