From 30f87ce08cfca4cd989dac741b79d9ce420bfd18 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 4 Jan 2021 18:35:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=80=BB=E6=95=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E8=AE=AE=E9=A2=98=E5=AE=A1=E6=A0=B8=E8=A2=AB?= =?UTF-8?q?=E6=8B=92=E7=BB=9D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/govissue/result/IssueListResultDTO.java | 3 +++ .../dao/govissue/IssueApplicationDao.java | 2 +- .../epmet/dataaggre/dao/govissue/IssueDao.java | 2 +- .../govissue/impl/GovIssueServiceImpl.java | 15 ++++++++------- .../mapper/govissue/IssueApplicationDao.xml | 8 ++++---- .../main/resources/mapper/govissue/IssueDao.xml | 1 + 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java index 950f6f2465..f1561c2a1b 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java +++ b/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 = ""; diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueApplicationDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueApplicationDao.java index 0924e9cdb7..8cda8f76cf 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueApplicationDao.java +++ b/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 { */ List issueStatusAuditing(@Param("gridIds") List gridIds); - Integer selectApplicationCount(@Param("gridIds") List gridIds); + Integer selectApplicationCount(@Param("gridIds") List gridIds,@Param("status")String status); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java index a5b7dd5cf8..2bb40f4c8d 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java +++ b/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 { **/ List selectClosedListGov(ClosedIssueListFormDTO fromDTO); - Integer selectIssueCount(@Param("gridIds") List gridIds); + Integer selectIssueCount(@Param("gridIds") List gridIds,@Param("issueType")String issueType); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java index d39981e446..fbc822f919 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java +++ b/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 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 resultAuditing = issueStatusAuditing(formDTO); result.setIssueList(resultAuditing); + Integer auditingCount = issueApplicationDao.selectApplicationCount(formDTO.getGridIdList(), formDTO.getIssueType()); + result.setTotal(auditingCount); break; // 被拒绝的议题 case IssueConstant.ISSUE_STATUS_REJECTED: List 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 resultShiftProject = issueStatusShiftProject(formDTO); result.setIssueList(resultShiftProject); + Integer issueCount = issueDao.selectIssueCount(formDTO.getGridIdList(),formDTO.getIssueType()); + result.setTotal(issueCount); break; // 已关闭、表决中的议题 default: List resultClosedOrVoting = issueStatusClosedOrVoting(formDTO); result.setIssueList(resultClosedOrVoting); + Integer closeOrVotingCount = issueDao.selectIssueCount(formDTO.getGridIdList(),formDTO.getIssueType()); + result.setTotal(closeOrVotingCount); } if (!CollectionUtils.isEmpty(gridsInfoList)){ // 给所属网格 赋值 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml index ef3e74012d..d5cbda6398 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml +++ b/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 ia.GRID_ID = #{gridId} @@ -43,6 +42,7 @@ select count(id) from issue where del_flag = '0' + AND issue_status = #{issueType} AND( GRID_ID = #{gridId}