Browse Source

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

master
yinzuomei 4 years ago
parent
commit
47559f3715
  1. 30
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/ResiEventAutoAuditTask.java
  2. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CommonIssueListFormDTO.java
  3. 26
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  4. 4
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  5. 6
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridBaseInfoResultDTO.java
  6. 1
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  7. 100
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ResiEventScanTaskDTO.java
  8. 9
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java
  9. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java
  10. 23
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java
  11. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java
  12. 3
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java
  13. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java
  14. 7
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  15. 9
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  16. 21
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java
  17. 11
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  18. 40
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventScanTaskController.java
  19. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  20. 33
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventScanTaskDao.java
  21. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java
  22. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java
  23. 71
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventScanTaskEntity.java
  24. 38
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventScanTaskService.java
  25. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
  26. 28
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  27. 53
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventScanTaskServiceImpl.java
  28. 201
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  29. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  30. 9
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml
  31. 8
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventScanTaskDao.xml
  32. 3
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicDetailResultDTO.java
  33. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  34. 2
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/CommonIssueListFormDTO.java
  35. 2
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java
  36. 3
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java
  37. 22
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

30
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/ResiEventAutoAuditTask.java

@ -0,0 +1,30 @@
package com.epmet.task;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.GovProjectOpenFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author sun
* @dscription 事件语音附件自动审核任务没两分钟执行一次
*/
@Slf4j
@Component("resiEventAutoAuditTask")
public class ResiEventAutoAuditTask implements ITask {
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Override
public void run(String params) {
log.info("ResiEventAutoAuditTask定时任务正在执行,参数为:{}", params);
Result result = govProjectOpenFeignClient.autoAudit();
if (result.success()) {
log.info("ResiEventAutoAuditTask定时任务执行成功");
} else {
log.error("ResiEventAutoAuditTask定时任务执行失败:" + result.getMsg());
}
}
}

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CommonIssueListFormDTO.java

@ -32,4 +32,6 @@ public class CommonIssueListFormDTO implements Serializable {
* 每页多少条
* */
private Integer pageSize = 20;
private Boolean isPage = true;
}

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

@ -587,9 +587,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
**/
@Override
public List<VotingIssueListResultDTO> votingList(CommonIssueListFormDTO issueListForm) {
issueListForm.setPageNo(null == issueListForm.getPageNo() ? NumConstant.ZERO :
(issueListForm.getPageNo() - NumConstant.ONE)*issueListForm.getPageSize()
);
PageHelper.startPage(issueListForm.getPageNo(), issueListForm.getPageSize(), issueListForm.getIsPage());
return baseDao.selectVotingList(issueListForm);
}
@ -602,9 +600,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
**/
@Override
public List<ClosedIssueListResultDTO> closedList(CommonIssueListFormDTO issueListForm) {
issueListForm.setPageNo(null == issueListForm.getPageNo() ? NumConstant.ZERO :
(issueListForm.getPageNo() - NumConstant.ONE)*issueListForm.getPageSize()
);
PageHelper.startPage(issueListForm.getPageNo(), issueListForm.getPageSize(), issueListForm.getIsPage());
return baseDao.selectClosedList(issueListForm);
}
@ -1555,15 +1551,17 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
}
if (CollectionUtils.isNotEmpty(resultList)) {
resultList = resultList.stream().sorted(Comparator.comparing(UnResolvedResultDTO::getClosedTime).reversed()).collect(Collectors.toList());
int fromIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
int toIndex = fromDTO.getPageNo() * fromDTO.getPageSize();
if (fromIndex >= resultList.size()) {
return new ArrayList<>();
}
if (toIndex > resultList.size()) {
toIndex = resultList.size();
if (fromDTO.getIsPage()) {
int fromIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
int toIndex = fromDTO.getPageNo() * fromDTO.getPageSize();
if (fromIndex >= resultList.size()) {
return new ArrayList<>();
}
if (toIndex > resultList.size()) {
toIndex = resultList.size();
}
resultList = resultList.subList(fromIndex, toIndex);
}
resultList = resultList.subList(fromIndex, toIndex);
}
return resultList;
}

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

@ -218,8 +218,6 @@
AND ISSUE_STATUS = 'voting'
ORDER BY
created_time DESC
LIMIT #{pageNo},
#{pageSize}
</select>
<!-- 查询已关闭议题列表 -->
@ -239,8 +237,6 @@
AND RESOLVE_TYPE = 'resolved'
ORDER BY
created_time DESC
LIMIT #{pageNo},
#{pageSize}
</select>
<!-- 查询已关闭议题列表 政府端 -->
<select id="selectClosedListGov" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultType="com.epmet.dto.result.ClosedIssueListGovResultDTO">

6
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridBaseInfoResultDTO.java

@ -32,7 +32,11 @@ public class GridBaseInfoResultDTO implements Serializable {
/**
* 编码
*/
private String code;
private String code = "";
/**
* 编码
*/
private String gridType = "";
/**
* 负责人
*/

1
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -285,6 +285,7 @@
IFNULL(grid_name,"") AS gridName,
total_user,
code,
grid_type,
contacts,
mobile
FROM

100
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ResiEventScanTaskDTO.java

@ -0,0 +1,100 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-22
*/
@Data
public class ResiEventScanTaskDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 事件Id关联resi_event的id
*/
private String resiEventId;
/**
* 事件附件表主键对应dataId
*/
private String resiEventAttachmentId;
/**
* 阿里云审核任务Id
*/
private String taskId;
/**
* 审核状态auditing: 审核中
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
*/
private String status;
/**
* 附件类型视频 - video 语音 - voice 文件 - doc
*/
private String attachmentType;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

9
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java

@ -54,9 +54,9 @@ public class ResiEventFormDTO implements Serializable {
private String address;
/**
* 附件列表
* 图片附件列表
*/
private List<FileCommonDTO> attachmentList;
private List<FileCommonDTO> attachmentList;
/**
* @的人
*/
@ -82,4 +82,9 @@ public class ResiEventFormDTO implements Serializable {
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
/**
* 语音附件列表
*/
private List<FileCommonDTO> voiceList;
}

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java

@ -25,4 +25,6 @@ public class ShiftProjectListFromDTO implements Serializable {
* 每页记录数
*/
private Integer pageSize;
private Boolean isPage = true;
}

23
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java

@ -76,6 +76,16 @@ public class EventDetailResultDTO implements Serializable {
*/
private String eventPeopleName;
/**
* 语音附件url集合
*/
private List<String> voiceList;
/**
* 报事图片
*/
@JsonIgnore
private List<Attachment> attachmentList;
@JsonIgnore
private String eventUserId;
@ -105,4 +115,17 @@ public class EventDetailResultDTO implements Serializable {
this.eventPerson = new ArrayList<>();
this.projectInfo = new EventProjectInfoDTO();
}
@Data
public static class Attachment {
/**
* url
*/
private String url;
/**
* 附件类型
*/
private String type;
}
}

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java

@ -28,4 +28,6 @@ public class PendingResultDTO implements Serializable {
private String sourceId;
@JsonIgnore
private String projectId;
private String longitude;
private String latitude;
}

3
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java

@ -50,4 +50,7 @@ public class ResolvedResultDTO implements Serializable {
* 话题内容
*/
private String topicContent;
private String longitude;
private String latitude;
}

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java

@ -50,4 +50,6 @@ public class UnResolvedResultDTO implements Serializable {
* 话题内容
*/
private String topicContent;
private String longitude;
private String latitude;
}

7
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -134,4 +134,11 @@ public interface GovProjectOpenFeignClient {
*/
@PostMapping("gov/project/resievent/queryResiEventManageRedDot/{agencyId}")
Result<ResiEventManageRedDotRes> queryResiEventManageRedDot(@PathVariable("agencyId") String agencyId);
/**
* @Author sun
* @Description 定时任务调用-事件语音附件自动审核
**/
@PostMapping("gov/project/resievent/autoAudit")
Result autoAudit();
}

9
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -132,4 +132,13 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<ResiEventManageRedDotRes> queryResiEventManageRedDot(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryResiEventManageRedDot", agencyId);
}
/**
* @Author sun
* @Description 定时任务调用-事件语音附件自动审核
**/
@Override
public Result autoAudit() {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "autoAudit");
}
}

21
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java

@ -49,4 +49,25 @@ public interface EventConstant {
*/
String TYPE_GOV = "gov";
String TYPE_RESI = "resi";
/**
* 附件文件类型
* 图片 - image文档 - doc语音 - voice视频 - video
*/
String FILE_IMAGE = "image";
String FILE_DOC = "doc";
String FILE_VOICE = "voice";
String FILE_VIDEO = "video";
String AUDITING = "auditing";
String AUTO_PASSED = "auto_passed";
String REVIEW = "review";
String BLOCK = "block";
String REJECTED = "rejected";
String APPROVED = "approved";
String SUBMIT = "submit";
String IMAGE = "image";
String VIDEO = "video";
String VOICE = "voice";
String DOC = "doc";
}

11
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java

@ -254,4 +254,15 @@ public class ResiEventController {
ValidatorUtils.validateEntity(formDTO,ResiEventResearchAnalysisFormDTO.AddUserInternalGroup.class);
return new Result<ResiEventResearchAnalysisResDTO>().ok(resiEventService.queryResiEventResearchAnalysis(formDTO));
}
/**
* @Author sun
* @Description 定时任务调用-事件语音附件自动审核
**/
@PostMapping("autoAudit")
public Result autoAudit() {
resiEventService.autoAudit();
return new Result();
}
}

40
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventScanTaskController.java

@ -0,0 +1,40 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.service.ResiEventScanTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-22
*/
@RestController
@RequestMapping("resieventscantask")
public class ResiEventScanTaskController {
@Autowired
private ResiEventScanTaskService resiEventScanTaskService;
}

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

@ -180,24 +180,18 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @author zhaoqifeng
* @date 2021/7/27 10:28
* @param gridId
* @param pageNo
* @param pageSize
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<PendingResultDTO> selectPendingListByGrid(@Param("gridId")String gridId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize);
List<PendingResultDTO> selectPendingListByGrid(@Param("gridId")String gridId);
/**
* 获取党建声音已结案列表
* @author zhaoqifeng
* @date 2021/7/27 10:28
* @param gridId
* @param pageNo
* @param pageSize
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<ResolvedResultDTO> selectResolvedListByGrid(@Param("gridId")String gridId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize);
List<ResolvedResultDTO> selectResolvedListByGrid(@Param("gridId")String gridId);
/**
* 无需解决列表

33
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventScanTaskDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.ResiEventScanTaskEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-22
*/
@Mapper
public interface ResiEventScanTaskDao extends BaseDao<ResiEventScanTaskEntity> {
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java

@ -73,4 +73,20 @@ public class ResiEventAttachmentEntity extends BaseEpmetEntity {
*/
private Integer sort;
/**
* 附件状态审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
*/
private String status;
/**
* 审核失败原因
*/
private String reason;
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java

@ -143,4 +143,20 @@ public class ResiEventEntity extends BaseEpmetEntity {
*/
private String closeRemark;
/**
* 事件审核状态[涉及附件审核需要加的状态]
* 审核中auditing
* auto_passed: 自动通过
* review结果不确定需要人工审核
* block: 结果违规
* rejected人工审核驳回;
* approved人工审核通过
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
}

71
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventScanTaskEntity.java

@ -0,0 +1,71 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("resi_event_scan_task")
public class ResiEventScanTaskEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 事件Id关联resi_event的id
*/
private String resiEventId;
/**
* 事件附件表主键对应dataId
*/
private String resiEventAttachmentId;
/**
* 阿里云审核任务Id
*/
private String taskId;
/**
* 审核状态auditing: 审核中
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
*/
private String status;
/**
* 附件类型视频 - video 语音 - voice 文件 - doc
*/
private String attachmentType;
}

38
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventScanTaskService.java

@ -0,0 +1,38 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.ResiEventScanTaskEntity;
import java.util.List;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-22
*/
public interface ResiEventScanTaskService extends BaseService<ResiEventScanTaskEntity> {
/**
* @Author sun
* @Description 获取事件附件待审核列表
**/
List<ResiEventScanTaskEntity> getScanTaskList(String draftId, String auditing);
}

6
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java

@ -155,4 +155,10 @@ public interface ResiEventService extends BaseService<ResiEventEntity> {
* @return
*/
ResiEventResearchAnalysisResDTO queryResiEventResearchAnalysis(ResiEventResearchAnalysisFormDTO formDTO);
/**
* @Author sun
* @Description 定时任务调用-事件语音附件自动审核
**/
void autoAudit();
}

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

@ -25,8 +25,8 @@ import com.epmet.commons.rocketmq.messages.ProjectChangedMQMsg;
import com.epmet.commons.tools.constant.*;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
@ -58,11 +58,12 @@ import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.base.Joiner;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.apache.commons.collections4.CollectionUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
@ -76,7 +77,6 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -2810,14 +2810,16 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
*/
@Override
public List<PendingResultDTO> getPendingList(ShiftProjectListFromDTO fromDTO) {
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
List<PendingResultDTO> list = baseDao.selectPendingListByGrid(fromDTO.getGridId(), pageIndex, fromDTO.getPageSize());
list.forEach(item -> {
ProjectDTO dto = new ProjectDTO();
dto.setId(item.getProjectId());
item.setCurrentHandleDepartMent(baseDao.selectDepartmentNameList(dto));
});
return list;
PageInfo<PendingResultDTO> result =
PageHelper.startPage(fromDTO.getPageNo(), fromDTO.getPageSize(), fromDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectPendingListByGrid(fromDTO.getGridId()));
if (CollectionUtils.isNotEmpty(result.getList())) {
result.getList().forEach(item -> {
ProjectDTO dto = new ProjectDTO();
dto.setId(item.getProjectId());
item.setCurrentHandleDepartMent(baseDao.selectDepartmentNameList(dto));
});
}
return result.getList();
}
/**
@ -2830,8 +2832,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
*/
@Override
public List<ResolvedResultDTO> getResolvedListByGrid(ShiftProjectListFromDTO fromDTO) {
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
return baseDao.selectResolvedListByGrid(fromDTO.getGridId(), pageIndex, fromDTO.getPageSize());
PageHelper.startPage(fromDTO.getPageNo(), fromDTO.getPageSize(), fromDTO.getIsPage());
return baseDao.selectResolvedListByGrid(fromDTO.getGridId());
}
/**

53
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventScanTaskServiceImpl.java

@ -0,0 +1,53 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dao.ResiEventScanTaskDao;
import com.epmet.entity.ResiEventScanTaskEntity;
import com.epmet.service.ResiEventScanTaskService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-12-22
*/
@Service
public class ResiEventScanTaskServiceImpl extends BaseServiceImpl<ResiEventScanTaskDao, ResiEventScanTaskEntity> implements ResiEventScanTaskService {
/**
* @Author sun
* @Description 获取事件附件待审核列表
**/
@Override
public List<ResiEventScanTaskEntity> getScanTaskList(String draftId, String status) {
QueryWrapper<ResiEventScanTaskEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(draftId), "RESI_EVENT_ID", draftId);
wrapper.eq(StringUtils.isNotBlank(status),"STATUS", status);
List<ResiEventScanTaskEntity> entityList = baseDao.selectList(wrapper);
return entityList;
}
}

201
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

@ -27,11 +27,11 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
import com.epmet.commons.tools.scan.param.ImgTaskDTO;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.param.*;
import com.epmet.commons.tools.scan.result.AsyncScanResult;
import com.epmet.commons.tools.scan.result.AsyncScanTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.scan.result.VoiceResultDTO;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -48,7 +48,9 @@ import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.resi.group.constant.TopicConstant;
import com.epmet.service.ProjectCategoryService;
import com.epmet.service.ResiEventScanTaskService;
import com.epmet.service.ResiEventService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@ -61,6 +63,8 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 居民报事表
@ -77,6 +81,10 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
private String textSyncScanMethod;
@Value("${openapi.scan.method.imgSyncScan}")
private String imgSyncScanMethod;
@Value("${openapi.scan.method.voiceAsyncScan}")
private String voiceAsyncScanMethod;
@Value("${openapi.scan.method.voiceResults}")
private String voiceResultsMethod;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
@ -99,6 +107,8 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
private GovIssueOpenFeignClient govIssueOpenFeignClient;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired
private ResiEventScanTaskService resiEventScanTaskService;
/**
@ -190,6 +200,19 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
if (null == dto){
return new EventDetailResultDTO();
}
//附件按类型分组【图片、语音】
List<String> eventImgs = new ArrayList<>();
List<String> voiceList = new ArrayList<>();
dto.getAttachmentList().forEach(file->{
if("image".equals(file.getType())){
eventImgs.add(file.getUrl());
}else if("voice".equals(file.getType())){
voiceList.add(file.getUrl());
}
});
dto.setEventImgs(eventImgs);
dto.setVoiceList(voiceList);
// 已转项目
if (dto.getIsProject()){
// 查询项目信息
@ -250,6 +273,14 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
*/
@Override
public ResiEventIdDTO report(ResiEventFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getEventContent()) && org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getVoiceList())) {
//话题内容和语音不能同时为空
log.error("事件内容和语音不能同时为空");
throw new RenException("事件内容和语音不能同时为空");
}
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(formDTO.getVoiceList()) && StringUtils.isBlank(formDTO.getEventContent())) {
formDTO.setEventContent("语音事件");
}
//1、事件内容审核
//2、图片审核
this.scanContent(formDTO.getEventContent(), formDTO.getAttachmentList());
@ -277,13 +308,22 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
resiEventEntity.setLatestOperatedTime(new Date());
resiEventEntity.setCreatedTime(resiEventEntity.getLatestOperatedTime());
resiEventEntity.setUpdatedTime(resiEventEntity.getLatestOperatedTime());
resiEventEntity.setAuditStatus("auto_passed");
if(!org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getVoiceList())) {
resiEventEntity.setAuditStatus("auditing");
}
//4、插入主表resi_event
baseDao.insert(resiEventEntity);
//5、插入附件表
//5-1.插入图片附件
List<ResiEventAttachmentEntity> attachmentEntityList=getAttList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getAttachmentList());
attachmentEntityList.forEach(attachmentEntity->{
resiEventAttachmentDao.insert(attachmentEntity);
});
//5-2.插入语音附件
if(!org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getVoiceList())) {
eventVoiceAttachment(formDTO.getCustomerId(), resiEventEntity.getId(), formDTO.getVoiceList());
}
//6、插入组织表
List<ResiEventReportOrgEntity> orgEntityList=getOrgList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getOrgList());
orgEntityList.forEach(orgEntity->{
@ -367,6 +407,56 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
return list;
}
/**
* @Author sun
* @Description 事件-语音附件处理创建审核任务
**/
private void eventVoiceAttachment(String customerId, String resiEventId, List<FileCommonDTO> voiceList) {
//1.语音附件存入表中
List<VoiceTaskDTO> voiceDTOList = new ArrayList<>();
int sort = 0;
for (FileCommonDTO file : voiceList) {
ResiEventAttachmentEntity entity = new ResiEventAttachmentEntity();
entity.setCustomerId(customerId);
entity.setResiEventId(resiEventId);
entity.setAttachmentName(file.getName());
entity.setAttachmentFormat(file.getFormat());
entity.setAttachmentType(file.getType());
entity.setAttachmentUrl(file.getUrl());
entity.setSort(sort);
sort++;
resiEventAttachmentDao.insert(entity);
VoiceTaskDTO task = new VoiceTaskDTO();
task.setDataId(entity.getId());
task.setUrl(file.getUrl());
voiceDTOList.add(task);
}
//2.语音创建审核任务【定时任务会处理待审核语音后修改数据库数据】
VoiceScanParamDTO voiceScanParamDTO = new VoiceScanParamDTO();
voiceScanParamDTO.setTasks(voiceDTOList);
voiceScanParamDTO.setOpenCallBack(false);
Result<AsyncScanResult> voiceScanResult = ScanContentUtils.voiceAsyncScan(scanApiUrl.concat(voiceAsyncScanMethod), voiceScanParamDTO);
if (!voiceScanResult.success() || !voiceScanResult.getData().isAllSuccess()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
List<AsyncScanTaskDTO> taskList = voiceScanResult.getData().getSuccessTasks();
List<String> taskIds = taskList.stream().map(AsyncScanTaskDTO::getTaskId).collect(Collectors.toList());
//提交记录存入task表
List<ResiEventScanTaskEntity> scanTaskEntityList = taskList.stream().map(item -> {
ResiEventScanTaskEntity taskEntity = new ResiEventScanTaskEntity();
taskEntity.setCustomerId(customerId);
taskEntity.setResiEventId(resiEventId);
taskEntity.setResiEventAttachmentId(item.getDataId());
taskEntity.setTaskId(item.getTaskId());
taskEntity.setStatus(TopicConstant.AUDITING);
taskEntity.setAttachmentType(TopicConstant.VOICE);
return taskEntity;
}).collect(Collectors.toList());
resiEventScanTaskService.insertBatch(scanTaskEntityList);
}
}
private void scanContent(String eventContent, List<FileCommonDTO> attachmentList) {
//事件内容
if (StringUtils.isNotBlank(eventContent)) {
@ -804,5 +894,108 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
return resultDTO;
}
/**
* @Author sun
* @Description 定时任务调用-事件语音附件自动审核
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void autoAudit() {
//1.查询审核中任务列表
List<ResiEventScanTaskEntity> taskList = resiEventScanTaskService.getScanTaskList(null, TopicConstant.AUDITING);
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(taskList)) {
Map<String, ResiEventScanTaskEntity> map = taskList.stream().collect(Collectors.toMap(ResiEventScanTaskEntity::getTaskId, Function.identity()));
List<String> taskIds = taskList.stream().map(ResiEventScanTaskEntity::getTaskId).collect(Collectors.toList());
List<String> draftIds = taskList.stream().map(ResiEventScanTaskEntity::getResiEventId).collect(Collectors.toList());
Result<List<VoiceResultDTO>> voiceResults = ScanContentUtils.voiceResults(scanApiUrl.concat(voiceResultsMethod), taskIds);
if (!voiceResults.success()) {
return;
}
List<VoiceResultDTO> list = voiceResults.getData();
for (VoiceResultDTO item : list) {
ResiEventScanTaskEntity taskEntity = map.get(item.getTaskId());
if (EventConstant.REVIEW.equals(item.getSuggestion())) {
//结果不确定
ResiEventAttachmentEntity entity = new ResiEventAttachmentEntity();
entity.setId(taskEntity.getResiEventAttachmentId());
entity.setStatus(EventConstant.REVIEW);
entity.setReason(item.getLabelDesc());
resiEventAttachmentDao.updateById(entity);
taskEntity.setStatus(EventConstant.REVIEW);
resiEventScanTaskService.updateById(taskEntity);
} else if (EventConstant.BLOCK.equals(item.getSuggestion())) {
//结果违规
ResiEventAttachmentEntity entity = new ResiEventAttachmentEntity();
entity.setId(taskEntity.getResiEventAttachmentId());
entity.setStatus(EventConstant.BLOCK);
entity.setReason(item.getLabelDesc());
resiEventAttachmentDao.updateById(entity);
taskEntity.setStatus(EventConstant.BLOCK);
resiEventScanTaskService.updateById(taskEntity);
} else {
//审核通过
ResiEventAttachmentEntity entity = new ResiEventAttachmentEntity();
entity.setId(taskEntity.getResiEventAttachmentId());
entity.setStatus(EventConstant.AUTO_PASSED);
entity.setReason(item.getLabelDesc());
resiEventAttachmentDao.updateById(entity);
taskEntity.setStatus(EventConstant.AUTO_PASSED);
resiEventScanTaskService.updateById(taskEntity);
}
}
//判断事件对应的所有需要审核的附件是否全部审核完成
draftIds.forEach(draftId -> {
List<ResiEventScanTaskEntity> tasks = resiEventScanTaskService.getScanTaskList(draftId, null);
String status = EventConstant.AUTO_PASSED;
for (ResiEventScanTaskEntity task : tasks) {
if (EventConstant.AUDITING.equals(task.getStatus())) {
status = EventConstant.AUDITING;
break;
} else if (EventConstant.BLOCK.equals(task.getStatus())) {
status = EventConstant.BLOCK;
} else if (EventConstant.REVIEW.equals(task.getStatus())) {
if (!EventConstant.BLOCK.equals(status)) {
status = EventConstant.REVIEW;
}
} else {
if (!EventConstant.BLOCK.equals(status) && !EventConstant.REVIEW.equals(status)) {
status = EventConstant.AUTO_PASSED;
}
}
}
if (EventConstant.BLOCK.equals(status)) {
//草稿状态更新为block
ResiEventEntity draftEntity = new ResiEventEntity();
draftEntity.setId(draftId);
draftEntity.setAuditStatus(EventConstant.BLOCK);
draftEntity.setAuditReason("语音存在违规内容");
baseDao.updateById(draftEntity);
} else if (EventConstant.REVIEW.equals(status)) {
//草稿状态更新为review
ResiEventEntity draftEntity = new ResiEventEntity();
draftEntity.setId(draftId);
draftEntity.setAuditStatus(EventConstant.REVIEW);
draftEntity.setAuditReason("需要人工审核");
baseDao.updateById(draftEntity);
} else if (EventConstant.AUTO_PASSED.equals(status)) {
//草稿状态更新为auto_passed
ResiEventEntity draftEntity = new ResiEventEntity();
draftEntity.setId(draftId);
draftEntity.setAuditStatus(EventConstant.REVIEW);
baseDao.updateById(draftEntity);
}
});
}
}
}

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

@ -333,7 +333,6 @@
AND a.`STATUS` = 'pending'
AND a.ORIGIN = 'issue'
ORDER BY a.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectResolvedListByGrid" resultType="com.epmet.dto.result.ResolvedResultDTO">
SELECT
@ -355,7 +354,6 @@
AND a.ORIGIN = 'issue'
AND a.CLOSED_STATUS = 'resolved'
ORDER BY a.UPDATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectUnResolvedListByGrid" resultType="com.epmet.dto.result.UnResolvedResultDTO">
SELECT

9
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml

@ -121,8 +121,12 @@
<result property="projectId" column="projectId"/>
<result property="gridId" column="gridId"/>
<result property="eventUserId" column="eventUserId"/>
<collection property="eventImgs" ofType="java.lang.String">
<!--<collection property="eventImgs" ofType="java.lang.String">
<result column="eventImg"/>
</collection>-->
<collection property="attachmentList" ofType="com.epmet.dto.result.EventDetailResultDTO$Attachment">
<result column="url" property="url"/>
<result column="type" property="type"/>
</collection>
<collection property="eventPerson" ofType="java.lang.String">
<result column="person"/>
@ -141,7 +145,8 @@
(CASE WHEN re.READ_FLAG = 1 THEN FALSE ELSE TRUE END) AS isRollback,
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject,
IFNULL(re.project_id,'') AS projectId,
ea.ATTACHMENT_URL AS eventImg,
ea.ATTACHMENT_URL AS url,
ea.ATTACHMENT_TYPE AS type,
IF(ISNULL(em.USER_SHOW_NAME),NULL,concat('人大代表-',em.USER_SHOW_NAME)) AS person,
re.GRID_ID AS gridId,
re.CREATED_BY AS eventUserId,

8
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventScanTaskDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.ResiEventScanTaskDao">
</mapper>

3
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicDetailResultDTO.java

@ -65,6 +65,7 @@ public class ResiTopicDetailResultDTO implements Serializable {
*/
private List<String> topicVoices;
private String longitude;
private String latitude;
}

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -2850,6 +2850,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
topicDTO.setTopicStatus(topic.getStatus());
topicDTO.setTopicImgs(getTopicAttachmentUrls(topic.getId(), "image"));
topicDTO.setTopicVoices(getTopicAttachmentUrls(topic.getId(), "voice"));
topicDTO.setLongitude(topic.getLongitude());
topicDTO.setLatitude(topic.getDimension());
topicListDTOS.add(topicDTO);
});

2
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/CommonIssueListFormDTO.java

@ -32,4 +32,6 @@ public class CommonIssueListFormDTO implements Serializable {
* 每页多少条
* */
private Integer pageSize = 20;
private Boolean isPage = true;
}

2
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java

@ -54,4 +54,6 @@ public class ClosedIssueListResultDTO implements Serializable {
*
*/
private String topicContent;
private String longitude;
private String latitude;
}

3
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java

@ -54,4 +54,7 @@ public class VotingIssueListResultDTO implements Serializable {
* 话题内容
*/
private String topicContent;
private String longitude;
private String latitude;
}

22
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -363,11 +363,11 @@ public class IssueServiceImpl implements IssueService {
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.stream().forEach(vi -> {
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? null : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? null : rr.getTopicImgs());
vi.setTopicContent(rr.getTopicContent());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
@ -421,11 +421,13 @@ public class IssueServiceImpl implements IssueService {
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
votingIssueList.stream().forEach(vi -> {
votingIssueList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? null : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? null : rr.getTopicImgs());
vi.setTopicContent(rr.getTopicContent());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
vi.setLongitude(rr == null ? "" : rr.getLongitude());
vi.setLatitude(rr == null ? "" : rr.getLatitude());
});
}
}
@ -459,11 +461,13 @@ public class IssueServiceImpl implements IssueService {
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
issueList.stream().forEach(vi -> {
issueList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? null : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? null : rr.getTopicImgs());
vi.setTopicContent(rr.getTopicContent());
vi.setTopicContent(rr == null ? "" :rr.getTopicContent());
vi.setLongitude(rr == null ? "" : rr.getLongitude());
vi.setLatitude(rr == null ? "" : rr.getLatitude());
});
}
}
@ -500,6 +504,8 @@ public class IssueServiceImpl implements IssueService {
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
vi.setLongitude(rr == null ? "" : rr.getLongitude());
vi.setLatitude(rr == null ? "" : rr.getLatitude());
});
}
@ -535,6 +541,8 @@ public class IssueServiceImpl implements IssueService {
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
vi.setLongitude(rr == null ? "" : rr.getLongitude());
vi.setLatitude(rr == null ? "" : rr.getLatitude());
});
}
@ -570,6 +578,8 @@ public class IssueServiceImpl implements IssueService {
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
vi.setLongitude(rr == null ? "" : rr.getLongitude());
vi.setLatitude(rr == null ? "" : rr.getLatitude());
});
}

Loading…
Cancel
Save