Browse Source

Merge remote-tracking branch 'origin/dev_project_branch' into dev_temp

master
zxc 5 years ago
parent
commit
e5b69b8a9c
  1. 3
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueApplicationDao.java
  3. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java
  4. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
  5. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml
  6. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml

3
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java

@ -106,6 +106,9 @@ public class IssueListResultDTO implements Serializable {
@JsonIgnore
private Long operationTime;
@JsonIgnore
private String applyStatus;
public IssueListResultDTO() {
this.issueId = "";
this.issueTitle = "";

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueApplicationDao.java

@ -50,6 +50,6 @@ public interface IssueApplicationDao extends BaseDao<IssueApplicationEntity> {
*/
List<IssueListResultDTO> issueStatusAuditing(@Param("gridIds") List<String> gridIds);
Integer selectApplicationCount(@Param("gridIds") List<String> gridIds);
Integer selectApplicationCount(@Param("gridIds") List<String> gridIds,@Param("status")String status);
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java

@ -74,5 +74,5 @@ public interface IssueDao extends BaseDao<IssueEntity> {
**/
List<ClosedIssueListResultDTO> selectClosedListGov(ClosedIssueListFormDTO fromDTO);
Integer selectIssueCount(@Param("gridIds") List<String> gridIds);
Integer selectIssueCount(@Param("gridIds") List<String> gridIds,@Param("issueType")String issueType);
}

15
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java

@ -70,34 +70,35 @@ public class GovIssueServiceImpl implements GovIssueService {
}
// xx街道-xx网格
List<GridsInfoListResultDTO> gridsInfoList = govOrgService.gridListByIds(formDTO.getGridIdList());
Integer issueCount = issueDao.selectIssueCount(formDTO.getGridIdList());
Integer applicationCount = issueApplicationDao.selectApplicationCount(formDTO.getGridIdList());
Integer all = 0;
if (null != issueCount && null != applicationCount){
all = issueCount+applicationCount;
}
AllIssueResultDTO result = new AllIssueResultDTO();
result.setTotal(all);
switch (formDTO.getIssueType()){
// 审核中议题
case IssueConstant.ISSUE_STATUS_AUDITING:
List<IssueListResultDTO> resultAuditing = issueStatusAuditing(formDTO);
result.setIssueList(resultAuditing);
Integer auditingCount = issueApplicationDao.selectApplicationCount(formDTO.getGridIdList(), formDTO.getIssueType());
result.setTotal(auditingCount);
break;
// 被拒绝的议题
case IssueConstant.ISSUE_STATUS_REJECTED:
List<IssueListResultDTO> resultRejected = issueStatusRejected(formDTO);
result.setIssueList(resultRejected);
Integer rejectedCount = issueApplicationDao.selectApplicationCount(formDTO.getGridIdList(), formDTO.getIssueType());
result.setTotal(rejectedCount);
break;
// 已转项目的议题
case IssueConstant.ISSUE_STATUS_SHIFT_PROJECT:
List<IssueListResultDTO> resultShiftProject = issueStatusShiftProject(formDTO);
result.setIssueList(resultShiftProject);
Integer issueCount = issueDao.selectIssueCount(formDTO.getGridIdList(),formDTO.getIssueType());
result.setTotal(issueCount);
break;
// 已关闭、表决中的议题
default:
List<IssueListResultDTO> resultClosedOrVoting = issueStatusClosedOrVoting(formDTO);
result.setIssueList(resultClosedOrVoting);
Integer closeOrVotingCount = issueDao.selectIssueCount(formDTO.getGridIdList(),formDTO.getIssueType());
result.setTotal(closeOrVotingCount);
}
if (!CollectionUtils.isEmpty(gridsInfoList)){
// 给所属网格 赋值

8
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml

@ -11,12 +11,11 @@
ia.ISSUE_TITLE,
ia.TOPIC_ID,
iah.REASON AS rejectedReason,
ia.grid_id
ia.grid_id,
ia.apply_status
FROM issue_application_history iah
LEFT JOIN issue_application ia ON iah.ISSUE_APPLICATION_ID = ia.ID
LEFT JOIN issue_application ia ON iah.ISSUE_APPLICATION_ID = ia.ID AND ia.APPLY_STATUS = 'rejected'
WHERE ia.DEL_FLAG = 0
AND ia.APPLY_STATUS = 'rejected'
AND iah.ACTION_TYPE = 'rejected'
AND
<foreach collection="gridIds" item="gridId" separator=" OR ">
ia.GRID_ID = #{gridId}
@ -43,6 +42,7 @@
<select id="selectApplicationCount" resultType="java.lang.Integer">
select count(id) from issue_application
where del_flag = '0'
AND apply_status = #{status}
AND(
<foreach collection="gridIds" item="gridId" separator=" OR ">
GRID_ID = #{gridId}

1
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml

@ -99,6 +99,7 @@
<select id="selectIssueCount" resultType="java.lang.Integer">
select count(id) from issue
where del_flag = '0'
AND issue_status = #{issueType}
AND(
<foreach collection="gridIds" item="gridId" separator=" OR ">
GRID_ID = #{gridId}

Loading…
Cancel
Save