jianjun 4 years ago
parent
commit
252d508350
  1. 7
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java
  2. 22
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  3. 51
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  4. 113
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  5. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  6. 59
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  7. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  8. 34
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  9. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java
  10. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

7
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java

@ -37,10 +37,17 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable {
*/
private String color;
@JsonIgnore
private String issueId;
@JsonIgnore
private Boolean status;
public ResiBuzzLeftPieChartResultDTO() {
this.count = NumConstant.ZERO;
this.categoryCode = "";
this.categoryName = "";
this.color = "";
this.status = false;
}
}

22
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -254,6 +254,26 @@ public interface IssueDao extends BaseDao<IssueEntity> {
*/
List<ResiBuzzLeftPieChartResultDTO> resiBuzzLeftPieChart(@Param("orgId")String orgId,@Param("orgType")String orgType,@Param("length")Integer length,@Param("customerId")String customerId);
/**
* @Description
* @param length
* @author zxc
* @date 2021/12/30 9:18 上午
*/
List<ResiBuzzLeftPieChartResultDTO> resiBuzzLeftPieChartByIssueIds(@Param("length")Integer length,@Param("issueIds")List<String> issueIds);
List<ResiBuzzLeftPieChartResultDTO> resiBuzzIssueCategoryByIssueIds(@Param("length")Integer length,@Param("issueIds")List<String> issueIds);
List<ResiBuzzLeftPieChartResultDTO> resiBuzzIssueCategoryNameByIssueIds(List<ResiBuzzLeftPieChartResultDTO> categories,@Param("customerId")String customerId);
/**
* @Description 查询前50名的议题ID
* @param orgId
* @param orgType
* @author zxc
* @date 2021/12/30 9:16 上午
*/
List<String> resiBuzzLeftPieChartIssueIds(@Param("orgId")String orgId,@Param("orgType")String orgType);
/**
* @Description 查询组织下每个网格的项目数
* @param orgId
@ -270,4 +290,6 @@ public interface IssueDao extends BaseDao<IssueEntity> {
*/
List<ResiBuzzIssueCategoryDTO> selectCategoryNameByIssueIds(@Param("issueIds")List<String> issueIds);
List<ResiBuzzIssueCategoryDTO> selectCategoryNameByIssueList(List<ResiBuzzLeftPieChartResultDTO> issueIds,@Param("customerId")String customerId);
}

51
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -1605,7 +1605,22 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
}
List<ResiBuzzDTO> list = allList.stream().skip(formDTO.getPageSize() * (formDTO.getPageNo() - NumConstant.ONE))
.limit(formDTO.getPageSize()).collect(Collectors.toList());
List<ResiBuzzIssueCategoryDTO> names = baseDao.selectCategoryNameByIssueIds(allList.stream().map(m -> m.getIssueId()).collect(Collectors.toList()));
List<ResiBuzzLeftPieChartResultDTO> categories = baseDao.resiBuzzIssueCategoryByIssueIds(length, list.stream().map(m -> m.getIssueId()).collect(Collectors.toList()));
List<ResiBuzzLeftPieChartResultDTO> pieChat = getPieChat(list.stream().map(m -> m.getIssueId()).collect(Collectors.toList()));
Iterator<ResiBuzzLeftPieChartResultDTO> listIterator = pieChat.iterator();
while (listIterator.hasNext()){
ResiBuzzLeftPieChartResultDTO next = listIterator.next();
for (int i = 0; i < categories.size(); i++) {
if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){
next.setStatus(true);
listIterator.remove();
continue;
}
}
}
categories.addAll(pieChat);
// List<ResiBuzzIssueCategoryDTO> names = baseDao.selectCategoryNameByIssueIds(allList.stream().map(m -> m.getIssueId()).collect(Collectors.toList()));
List<ResiBuzzIssueCategoryDTO> names = baseDao.selectCategoryNameByIssueList(categories,tokenDto.getCustomerId());
if (CollectionUtils.isNotEmpty(names)){
list.forEach(l -> names.stream().filter(n -> l.getIssueId().equals(n.getIssueId())).forEach(n -> l.setCategoryName(n.getCn())));
}
@ -1651,13 +1666,43 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
}
// 分类编码长度
Integer length = baseDao.selectOneLevelCategoryLength(tokenDto.getCustomerId());
List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId());
if(CollectionUtils.isEmpty(result)){
// List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId());
List<String> issueIds = baseDao.resiBuzzLeftPieChartIssueIds(formDTO.getOrgId(), formDTO.getOrgType());
if(CollectionUtils.isEmpty(issueIds)){
return new ArrayList<>();
}
List<ResiBuzzLeftPieChartResultDTO> categories = baseDao.resiBuzzIssueCategoryByIssueIds(length, issueIds);
List<ResiBuzzLeftPieChartResultDTO> pieChat = getPieChat(issueIds);
Iterator<ResiBuzzLeftPieChartResultDTO> list = pieChat.iterator();
while (list.hasNext()){
ResiBuzzLeftPieChartResultDTO next = list.next();
for (int i = 0; i < categories.size(); i++) {
if (next.getIssueId().equals(categories.get(i).getIssueId()) && !next.getStatus()){
next.setStatus(true);
list.remove();
continue;
}
}
}
categories.addAll(pieChat);
// List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChartByIssueIds(length, issueIds);
List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzIssueCategoryNameByIssueIds(categories, tokenDto.getCustomerId());
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
}
return result;
}
public List<ResiBuzzLeftPieChartResultDTO> getPieChat(List<String> issueIds){
List<ResiBuzzLeftPieChartResultDTO> resultDTOS = new ArrayList<>();
issueIds.forEach(i -> {
ResiBuzzLeftPieChartResultDTO dto = new ResiBuzzLeftPieChartResultDTO();
dto.setIssueId(i);
resultDTOS.add(dto);
});
return resultDTOS;
}
/**
* @Description 查询组织下每个网格的项目数
* @param formDTO

113
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -621,25 +621,25 @@
<!-- 查询居民热议左侧饼图 -->
<select id="resiBuzzLeftPieChart" resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO">
SELECT COUNT(issueId) AS count,categoryCode,categoryName,color FROM
(SELECT
i.ID AS issueId,
IFNULL(LEFT(ic.CATEGORY_CODE,#{length}),'') AS categoryCode,
IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName,
IFNULL(cd.color,'#0091ed') AS color
FROM issue i
INNER JOIN issue_vote_statistical s ON (s.ISSUE_ID = i.ID AND s.DEL_FLAG = '0')
LEFT JOIN issue_category ic ON (ic.ISSUE_ID = i.ID AND ic.DEL_FLAG = '0' AND ic.CUSTOMER_ID = i.CUSTOMER_ID)
LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID)
WHERE i.DEL_FLAG = '0'
<if test='orgType == "grid" '>
AND i.GRID_ID = #{orgId}
</if>
<if test='orgType == "agency" '>
AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</if>
ORDER BY (s.SUPPORT_COUNT + s.OPPOSITION_COUNT) DESC,i.created_time DESC LIMIT 50)temp
GROUP BY categoryName
SELECT COUNT(t2.issueId) AS count,cd.CATEGORY_CODE,IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName, IFNULL(cd.COLOR,'#0091ed') AS color FROM
(SELECT t1.issueId AS issueId,IFNULL(LEFT(ic.CATEGORY_CODE,#{length}),'') AS categoryCode FROM
(SELECT
i.ID AS issueId
FROM issue i
INNER JOIN issue_vote_statistical s ON (s.ISSUE_ID = i.ID AND s.DEL_FLAG = '0')
WHERE i.DEL_FLAG = '0'
<if test='orgType == "grid" '>
AND i.GRID_ID = #{orgId}
</if>
<if test='orgType == "agency" '>
AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</if>
ORDER BY (s.SUPPORT_COUNT + s.OPPOSITION_COUNT) DESC,i.created_time DESC LIMIT 50)t1
LEFT JOIN issue_category ic ON (t1.issueId = ic.ISSUE_ID AND ic.DEL_FLAG = '0')
GROUP BY t1.issueId,categoryCode)t2
LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t2.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' )
GROUP BY cd.CATEGORY_NAME
</select>
<!-- 查询组织下每个网格的项目数 -->
@ -676,4 +676,79 @@
</foreach>
)
</select>
<!-- 查询前50名的议题ID -->
<select id="resiBuzzLeftPieChartIssueIds" resultType="java.lang.String">
SELECT
i.ID AS issueId
FROM issue i
INNER JOIN issue_vote_statistical s ON (s.ISSUE_ID = i.ID AND s.DEL_FLAG = '0')
WHERE i.DEL_FLAG = '0'
<if test='orgType == "grid" '>
AND i.GRID_ID = #{orgId}
</if>
<if test='orgType == "agency" '>
AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</if>
ORDER BY (s.SUPPORT_COUNT + s.OPPOSITION_COUNT) DESC,i.created_time DESC LIMIT 50
</select>
<select id="resiBuzzLeftPieChartByIssueIds" resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO">
SELECT
COUNT(ic.ISSUE_ID) AS count,
IFNULL(LEFT(ic.CATEGORY_CODE,#{length}),'') AS categoryCode,
IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName,
IFNULL(cd.color,'#0091ed') AS color
FROM issue_category ic
LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID)
AND ic.ISSUE_ID IN (
<foreach collection="issueIds" item="issueId" separator=",">
#{issueId}
</foreach>
) GROUP BY categoryCode
</select>
<select id="resiBuzzIssueCategoryByIssueIds"
resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO">
SELECT
ISSUE_ID ,
IFNULL(LEFT(CATEGORY_CODE,#{length}),'') AS categoryCode
FROM issue_category
WHERE DEL_FLAG = '0'
AND ISSUE_ID IN(
<foreach collection="issueIds" item="issueId" separator=",">
#{issueId}
</foreach>
)
GROUP BY issue_id,categoryCode
</select>
<select id="resiBuzzIssueCategoryNameByIssueIds"
resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO">
select count(t2.issueId) as count , t2.categoryCode,t2.categoryName,t2.color from
(<foreach collection="categories" item="c" separator="UNION ALL">
select
t1.issueId as issueId,
cd.CATEGORY_CODE as categoryCode,
IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName,
IFNULL(cd.COLOR,'#0091ed') AS color
from (select #{c.issueId} as issueId,#{c.categoryCode} as categoryCode) t1
LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.CUSTOMER_ID = #{customerId} AND cd.DEL_FLAG = '0' )
</foreach>)t2
group by t2.categoryName
</select>
<resultMap id="selectCategoryNameByIssueListMap" type="com.epmet.dto.result.ResiBuzzIssueCategoryDTO">
<result property="issueId" column="issueId"/>
<collection property="cn" ofType="java.lang.String">
<result column="categoryName"/>
</collection>
</resultMap>
<select id="selectCategoryNameByIssueList" resultMap="selectCategoryNameByIssueListMap">
<foreach collection="issueIds" item="c" separator="UNION ALL">
SELECT
t1.issueId AS issueId,
IFNULL(cd.CATEGORY_NAME,'其他') as categoryName
FROM ( select #{c.issueId} as issueId,#{c.categoryCode} as categoryCode) t1
LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = #{customerId})
</foreach>
</select>
</mapper>

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

@ -365,8 +365,8 @@ public class CustomerAgencyController {
* @Date 2021/9/8 15:20
*/
@PostMapping("agencygridtree")
public Result<AgencyTreeResultDTO> getOrgTreeData(@LoginUser TokenDto tokenDTO) {
//tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955");
public Result<AgencyTreeResultDTO> getOrgTreeData(/*@LoginUser*/ TokenDto tokenDTO) {
tokenDTO.setUserId("dffe71e021a61b900f9025f4f07f6955");
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId()));
}

59
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);
/**
@ -79,8 +80,8 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
CustomerAgencyEntity getAgencyByStaffId(@Param("staffId") String staffId);
/**
* @Description 根据agencyId查询地区编码
* @param agencyId 所属机关id
* @Description 根据agencyId查询地区编码
* @author zxc
* @date 2020/4/28 15:50
*/
@ -104,6 +105,7 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
/**
* 查询客户根级组织
*
* @param customerId
* @return
*/
@ -111,10 +113,11 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
/**
* 获取所属机关单位名称上级-所属
* @author zhaoqifeng
* @date 2020/5/22 17:53
*
* @param agencyId
* @return java.lang.String
* @author zhaoqifeng
* @date 2020/5/22 17:53
*/
String selectAgencyName(@Param("agencyId") String agencyId);
@ -127,46 +130,48 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
List<ArticleGridResultDTO> selectAllSubAgency(@Param("subAgencyPids") String subAgencyPids);
/**
* @Description 查询一个工作人员最近登录的网格以及机关信息
* @param gridId
* @return
* @Description 查询一个工作人员最近登录的网格以及机关信息
* @author wangc
* @date 2020.08.17 09:50
**/
**/
ExtStaffInfoResultDTO selectAgencyAndGridInfoExt(@Param("gridId") String gridId);
/**
* @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息
* @param staffId
* @return
* @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息
* @author wangc
* @date 2020.08.17 09:50
**/
ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId")String staffId);
ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId") String staffId);
/**
* @Description 根据agencyId查找指定机构的信息直属网格部门
* @param agencyId
* @return
* @Description 根据agencyId查找指定机构的信息直属网格部门
* @author wangc
* @date 2020.08.18 13:41
**/
ExtStaffPermissionResultDTO selectAgencyById(@Param("agencyId")String agencyId);
**/
ExtStaffPermissionResultDTO selectAgencyById(@Param("agencyId") String agencyId);
/**
* @Description 根绝agencyId查找其下属机构的信息
* @param pid
* @return
* @Description 根绝agencyId查找其下属机构的信息
* @author wangc
* @date 2020.08.18 13:42
**/
**/
List<ExtStaffPermissionResultDTO> selectSubAgencyByPid(@Param("pid") String pid);
/**
* @Description 根据agencyId查找指定机构直属的部门将grid与dept分开是因为grid与dept的数量可能不等造成重复数据无法去重
* @param agencyId
* @return
* @Description 根据agencyId查找指定机构直属的部门将grid与dept分开是因为grid与dept的数量可能不等造成重复数据无法去重
* @author wangc
* @date 2020.08.18 13:42
**/
**/
List<ExtDeptResultDTO> selectDeptList(@Param("agencyId") String agencyId);
/**
@ -186,30 +191,33 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
AgencyResultDTO selectAgencyByStaffId(@Param("staffId") String staffId);
/**
* @Description 返回elementTree结构的agency树
* @param customerId
* @param pid
* @return java.util.List<com.epmet.dto.result.AgencyElementTreeResultDTO.Agency>
* @Description 返回elementTree结构的agency树
* @Author liushaowen
* @Date 2020/11/6 14:57
*/
List<AgencyElementTreeResultDTO.Agency> getAgencyElementTree(@Param("customerId") String customerId,@Param("pid") String pid);
List<AgencyElementTreeResultDTO.Agency> getAgencyElementTree(@Param("customerId") String customerId, @Param("pid") String pid);
/**
* @Description 外挂-获取当前组织及部门网格数据递归查询所有下级数据
* @author sun
**/
OrganizeTreeResultDTO selectorganizeTree(@Param("agencyId") String agencyId);
/**
* @Description 外挂-获取当前组织及部门网格数据递归查询所有下级数据
* @author sun
**/
List<OrganizeTreeGridResultDTO> selectAgencyGridList(@Param("agencyId") String agencyId);
/**
* @Description 外挂-获取当前组织及部门网格数据递归查询所有下级数据
* @author sun
**/
List<OrganizeTreeDeptResultDTO> selectAgencyDeptList(@Param("agencyId") String agencyId);
/**
* @Description 外挂-获取当前组织及部门网格数据递归查询所有下级数据
* @author sun
@ -236,6 +244,7 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
/**
* 根据新增人员类型判断查询机关信息
*
* @author sun
*/
OrgResultDTO selectAgencyDetail(@Param("orgId") String orgId, @Param("orgType") String orgType);
@ -247,40 +256,46 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
List<StaffOrgsResultDTO> getStaffOrgListByStaffId(@Param("staffId") String staffId);
/**
* @Description 地图配置删除
* @param orgId
* @param level
* @Description 地图配置删除
* @author zxc
* @date 2021/10/25 9:39 上午
*/
void delMapArea(@Param("orgId") String orgId, @Param("level") String level);
/**
* @Description 地图配置新增
* @param orgId
* @param level
* @param coordinates
* @Description 地图配置新增
* @author zxc
* @date 2021/10/25 9:59 上午
*/
void addMapArea(@Param("orgId") String orgId, @Param("level") String level,@Param("coordinates")String coordinates);
void addMapArea(@Param("orgId") String orgId, @Param("level") String level, @Param("coordinates") String coordinates);
/**
* @Description 地图查询下级组织
* @param pid
* @param type
* @Description 地图查询下级组织
* @author zxc
* @date 2021/10/25 2:30 下午
*/
List<MapSonOrgResultDTO> selectSonOrg(@Param("pid")String pid,@Param("type")String type);
List<MapSonOrgResultDTO> selectSonOrg(@Param("pid") String pid, @Param("type") String type);
/**
* @Description 查询下级agencyId
* @param orgId
* @Description 查询下级agencyId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
List<String> getSonAgencyId(@Param("orgId") String orgId);
/**
* desc:获取组织和网格的数据 树形sql
* @param agencyId
* @return
*/
ExtStaffPermissionResultDTO selectAgencyAndGridById(@Param("agencyId") String agencyId);
}

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

@ -1131,9 +1131,9 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
String orgTreeCacheKey = RedisKeys.getOrgTreeCacheKey(rootAgency.getAgencyId());
Object o = redisUtils.get(orgTreeCacheKey);
if (o == null){
ExtStaffPermissionResultDTO res = baseDao.selectAgencyById(rootAgency.getAgencyId());
ExtStaffPermissionResultDTO res = baseDao.selectAgencyAndGridById(rootAgency.getAgencyId());
convert2AgencyTreeResult(result,res.getSubAgencyList(),res.getGridList());
redisUtils.set(orgTreeCacheKey,result, RedisUtils.MINUTE_THIRTY_EXPIRE);
redisUtils.set(orgTreeCacheKey,result, 60 * 60 * 24L);
}else {
result = (AgencyTreeResultDTO) o;
}

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

@ -308,6 +308,26 @@
</collection>
</resultMap>
<resultMap id="agencyAndGridMap" type="com.epmet.dto.result.ExtStaffPermissionResultDTO">
<id column="agencyId" property="agencyId" />
<result column="agencyName" property="agencyName"/>
<result column="level" property="level" />
<result column="longitude" property="longitude" />
<result column="latitude" property="latitude" />
<result column="customerId" property="customerId"/>
<collection property="gridList" column="agencyId" ofType="com.epmet.dto.result.ExtGridResultDTO" select="selectGridList">
<id column="gridId" property="gridId" />
<result column="gridName" property="gridName" />
<result column="customerId" property="customerId"/>
<result column="longitude" property="longitude" />
<result column="latitude" property="latitude" />
</collection>
<collection property="subAgencyList" column="agencyId"
ofType="com.epmet.dto.result.ExtStaffPermissionResultDTO" select="selectSubAgencyByPid">
</collection>
</resultMap>
<select id="selectAgencyById" resultMap="treeMap">
SELECT
@ -677,5 +697,19 @@
DEL_FLAG = '0'
AND PID = #{orgId}
</select>
<select id="selectAgencyAndGridById" resultMap="agencyAndGridMap">
SELECT
agency.ID AS agencyId,
agency.ORGANIZATION_NAME AS agencyName,
agency.LEVEL AS level,
agency.CUSTOMER_ID as customerId,
agency.longitude,
agency.latitude
FROM
CUSTOMER_AGENCY agency
WHERE
agency.DEL_FLAG = '0'
AND agency.ID = #{agencyId}
</select>
</mapper>

18
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java

@ -16,6 +16,8 @@ import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.VolunteerService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -96,7 +98,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve
// 1.分页查询出所有志愿者列表
int pageNo = 1;
int pageSize = 100;
int pageSize = 200;
// 志愿者epmet user id
List<String> volunteerEpmetUserIds = new ArrayList<>();
@ -142,11 +144,17 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve
for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) {
// 将志愿者类型列表字符串,切割放到set中
Set<String> volunteerTypes = new HashSet();
String[] vTypes = icResiInfo.getVolunteerCategoriesStr().split(",");
if (vTypes != null && vTypes.length > 0) {
volunteerTypes.addAll(Arrays.asList(vTypes));
String volunteerCategoriesStr = icResiInfo.getVolunteerCategoriesStr();
if (StringUtils.isNotEmpty(volunteerCategoriesStr)) {
String[] vTypes = volunteerCategoriesStr.split(",");
if (vTypes != null && vTypes.length > 0) {
volunteerTypes.addAll(Arrays.asList(vTypes));
}
icResiInfo.setVolunteerCategories(volunteerTypes);
} else {
icResiInfo.setVolunteerCategories(new HashSet<>());
}
icResiInfo.setVolunteerCategories(volunteerTypes);
// 填充建筑坐标
String msg = "【志愿者分布】查询楼栋信息失败";

2
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -498,7 +498,7 @@
icvol.VOLUNTEER_CATEGORY as volunteerCategoriesStr
from user_base_info userbaseinfo
inner join ic_resi_user icuser on (userbaseinfo.ID_NUM = icuser.ID_CARD and icuser.DEL_FLAG = '0')
inner join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0')
left join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0')
where userbaseinfo.DEL_FLAG = '0'
and userbaseinfo.ID_NUM is not null
and userbaseinfo.USER_ID in

Loading…
Cancel
Save