Browse Source

/issue/unreslovedlist

master
yinzuomei 3 years ago
parent
commit
3f58cb310b
  1. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java
  2. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  3. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  4. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  5. 49
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  6. 23
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java
  7. 25
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  8. 17
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java

@ -13,6 +13,8 @@ import java.util.List;
public class IssueProfileDTO {
private String issueId;
private String sourceId;
private String longitude;
private String latitude;
/**
* 来源类型 话题resi_topic直接立议题issue
*/

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -281,7 +281,11 @@ public class IssueController {
return new Result<List<CanEvaluateProjectCountBatchResultDTO>>().ok(issueService.canEvaluateProjectCountBatch(issueIds));
}
/**
* 无需解决结案选择无需解决的项目关闭选择无需解决的议题
* @param formDTO
* @return
*/
@PostMapping("unresolvedlist")
public Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(formDTO));

1
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

@ -343,6 +343,7 @@ public interface IssueService extends BaseService<IssueEntity> {
/**
* 无需解决解决列表
* 无需解决结案选择无需解决的项目关闭选择无需解决的议题
* @author zhaoqifeng
* @date 2021/7/27 16:58
* @param fromDTO

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

@ -1592,7 +1592,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
/**
* 无需解决解决列表
*
* 无需解决结案选择无需解决的项目关闭选择无需解决的议题
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
* @author zhaoqifeng

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

@ -608,20 +608,43 @@
GROUP BY
temp.gridId
</select>
<select id="selectUnResolvedList" resultType="com.epmet.dto.result.UnResolvedResultDTO">
<resultMap id="UnResolvedResultDTOMap" type="com.epmet.dto.result.UnResolvedResultDTO">
<id column="issueId" property="issueId" />
<result column="issueTitle" property="issueTitle"/>
<result column="solution" property="solution"/>
<result column="closedTime" property="closedTime"/>
<result column="sourceId" property="sourceId"/>
<result column="issueSourceType" property="issueSourceType"/>
<result column="LONGITUDE" property="longitude"/>
<result column="LATITUDE" property="latitude"/>
<result column="topicId" property="topicId"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
</resultMap>
<select id="selectUnResolvedList" resultMap="UnResolvedResultDTOMap">
SELECT
ID AS issueId,
IFNULL(ISSUE_TITLE,'') AS issueTitle,
IFNULL(CLOSE_REASON,'') AS solution,
UNIX_TIMESTAMP( CLOSED_TIME ) AS closedTime,
SOURCE_ID AS sourceId
i.ID AS issueId,
IFNULL(i.ISSUE_TITLE,'') AS issueTitle,
IFNULL(i.CLOSE_REASON,'') AS solution,
UNIX_TIMESTAMP( i.CLOSED_TIME ) AS closedTime,
i.SOURCE_ID AS sourceId,
i.SOURCE_TYPE as issueSourceType,
i.LONGITUDE,
i.LATITUDE,
i.SOURCE_ID as topicId,
ia.url
FROM
issue
issue i
left join issue_attachment ia
on(i.id=ia.BUSINESS_ID and ia.del_flag='0')
WHERE
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND ISSUE_STATUS = 'closed'
AND RESOLVE_TYPE = 'unresolved'
i.DEL_FLAG = '0'
AND i.GRID_ID = #{gridId}
AND i.ISSUE_STATUS = 'closed'
AND i.RESOLVE_TYPE = 'unresolved'
</select>
<!-- 查询表决前50名 -->
@ -824,6 +847,8 @@
<id column="issueId" property="issueId" />
<result column="issueSourceType" property="issueSourceType"/>
<result column="sourceId" property="sourceId"/>
<result column="LONGITUDE" property="longitude"/>
<result column="LATITUDE" property="latitude"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
@ -834,6 +859,8 @@
i.id AS issueId,
i.SOURCE_TYPE AS issueSourceType,
IFNULL( i.SOURCE_ID, '' ) AS sourceId,
i.LONGITUDE,
i.LATITUDE,
ia.url
FROM
issue i

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

@ -52,4 +52,27 @@ public class UnResolvedResultDTO implements Serializable {
private String topicContent;
private String longitude;
private String latitude;
/**
* 项目来源
* 来源议题 issue
* 项目立项 agency
* 旧版事件上报 resi_event
* 工作人员上报(巡查) work_event
* 新版事件上报 ic_event
*/
private String projectOrigin;
/**
* 话题id
*/
private String topicId;
/**
* 来源类型 话题resi_topic直接立议题issue
*/
private String issueSourceType;
/**
* 发布议题的图片
*/
private List<String> issueImgs;
private String projectId;
}

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

@ -373,9 +373,10 @@
a.ORIGIN as projectOrigin
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'issue'
AND b.GRID_ID = #{gridId}
INNER JOIN project_related_personnel b ON (a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'issue'
AND b.GRID_ID = #{gridId}
)
LEFT JOIN project_process c ON a.ID = c.PROJECT_ID
AND c.OPERATION = 'close'
WHERE
@ -385,20 +386,28 @@
AND a.CLOSED_STATUS = 'resolved'
ORDER BY a.UPDATED_TIME DESC
</select>
<select id="selectUnResolvedListByGrid" resultType="com.epmet.dto.result.UnResolvedResultDTO">
SELECT
a.ID AS projectId,
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
c.PUBLIC_REPLY AS solution,
UNIX_TIMESTAMP(a.UPDATED_TIME) AS closedTime,
b.SOURCE_ID AS sourceId
b.SOURCE_ID AS sourceId,
a.ORIGIN as projectOrigin,
a.LOCATE_LONGITUDE as longitude,
a.LOCATE_DIMENSION as latitude
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
INNER JOIN project_related_personnel b
ON (a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'issue'
AND b.GRID_ID = #{gridId}
LEFT JOIN project_process c ON a.ID = c.PROJECT_ID
AND c.OPERATION = 'close'
)
LEFT JOIN project_process c
ON (a.ID = c.PROJECT_ID
AND c.OPERATION = 'close')
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'closed'

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

@ -548,6 +548,10 @@ public class IssueServiceImpl implements IssueService {
IssueProfileDTO issue = issueMap.get(vi.getIssueId());
vi.setIssueSourceType(null != issue ? issue.getIssueSourceType() : StrConstant.EPMETY_STR);
vi.setIssueImgs(null != issue ? issue.getIssueImgs() : new ArrayList<>());
if(StringUtils.isBlank(vi.getLatitude())||StringUtils.isBlank(vi.getLongitude())){
vi.setLatitude(issue.getLatitude());
vi.setLongitude(issue.getLongitude());
}
});
}
return resultList;
@ -611,6 +615,10 @@ public class IssueServiceImpl implements IssueService {
IssueProfileDTO issue = issueMap.get(vi.getIssueId());
vi.setIssueSourceType(null != issue ? issue.getIssueSourceType() : StrConstant.EPMETY_STR);
vi.setIssueImgs(null != issue ? issue.getIssueImgs() : new ArrayList<>());
if(StringUtils.isBlank(vi.getLatitude())||StringUtils.isBlank(vi.getLongitude())){
vi.setLatitude(issue.getLatitude());
vi.setLongitude(issue.getLongitude());
}
});
}
return resultList;
@ -630,14 +638,12 @@ public class IssueServiceImpl implements IssueService {
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(UnResolvedResultDTO::getSourceId).collect(Collectors.toList());
//补充话题信息
List<String> topicIds = resultList.stream().map(UnResolvedResultDTO::getTopicId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
if (topicDetailsResult.success()) {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
@ -649,7 +655,6 @@ public class IssueServiceImpl implements IssueService {
vi.setLatitude(rr == null ? "" : rr.getLatitude());
});
}
return resultList;
}
}

Loading…
Cancel
Save