Browse Source

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

# Conflicts:
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
master
yinzuomei 3 years ago
parent
commit
cff75b7a8d
  1. 26
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java
  2. 31
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java
  3. 55
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java
  4. 39
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java
  5. 22
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java
  6. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  7. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  8. 4
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
  9. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  10. 7
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
  11. 38
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  12. 43
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

26
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/9 16:52
* @DESC
*/
@Data
public class AllIssueListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -9150357859854770833L;
private String startTime;
private String endTime;
private String issueStatus;
private String issueTitle;
private String orgId;
private String orgType;
private String customerId;
private String userId;
}

31
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/9 17:07
* @DESC
*/
@Data
public class AuditListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 5924913199706972596L;
private String startTime;
private String endTime;
private String issueTitle;
private String orgId;
private String orgType;
/**
* under_auditing:待审核rejected:驳回;
*/
private String applyStatus;
private String customerId;
private String userId;
}

55
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java

@ -0,0 +1,55 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/9 16:49
* @DESC
*/
@Data
public class AllIssueListResultDTO implements Serializable {
private static final long serialVersionUID = -3447913619727610107L;
/**
* 所属网格
*/
private String gridName;
private String gridId;
private String orgId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 议题建议
*/
private String suggestion;
/**
* 议题创建时间
*/
private String createdTime;
/**
* 支持数
*/
private Integer supportCount;
/**
* 反对数
*/
private Integer oppositionCount;
/**
* 议题状态
*/
private String issueStatus;
private String issueStatusName;
private String issueId;
}

39
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java

@ -0,0 +1,39 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/9 17:04
* @DESC
*/
@Data
public class AuditListResultDTO implements Serializable {
private static final long serialVersionUID = -9143726703244316997L;
/**
* 所属网格
*/
private String gridName;
/**
* 议题标题
*/
private String issueTitle;
/**
* 议题建议
*/
private String suggestion;
private String applyStatus;
private String applyStatusName;
private String applyTime;
private String issueApplicationId;
}

22
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java

@ -2,16 +2,15 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IssueConstant;
import com.epmet.dto.form.*;
import com.epmet.dto.result.ApplicationDetailWorkResultDTO;
import com.epmet.dto.result.ApplicationHistoryResDTO;
import com.epmet.dto.result.ApplicationHistoryWorkResultDTO;
import com.epmet.dto.result.IssueApplicationResDTO;
import com.epmet.dto.result.*;
import com.epmet.service.IssueApplicationHistoryService;
import com.epmet.service.IssueApplicationService;
import com.epmet.service.IssueService;
@ -130,4 +129,19 @@ public class IssueAuditController {
public Result<String> audit(@LoginUser TokenDto token, @RequestBody IssueAuditionFormDTO param){
return new Result<String>().ok(issueService.audit(token,param));
}
/**
* Desc: 审核列表
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/10/9 17:11
*/
@PostMapping("auditList")
public Result<PageData<AuditListResultDTO>> auditList(@RequestBody AuditListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData<AuditListResultDTO>>().ok(issueApplicationService.auditList(formDTO));
}
}

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

@ -1,6 +1,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -365,6 +367,21 @@ public class IssueController {
}
return new Result<List<IssueProfileDTO>>().ok(issueService.getIssueProfile(issueIds));
}
/**
* Desc: 查询所有议题
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/10/9 16:59
*/
@PostMapping("allIssueList")
public Result<PageData<AllIssueListResultDTO>> allIssueList(@RequestBody AllIssueListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData<AllIssueListResultDTO>>().ok(issueService.allIssueList(formDTO));
}
/**
* 发布议题
* 事件转议题

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

@ -314,4 +314,6 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @return
*/
List<IssueProfileDTO> selectIssueProfile(@Param("issueIds") List<String> issueIds);
List<AllIssueListResultDTO> allIssueList(AllIssueListFormDTO formDTO);
}

4
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java

@ -20,8 +20,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.form.AuditListFormDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.dto.form.UserPubAuditingIssueFormDTO;
import com.epmet.dto.result.AuditListResultDTO;
import com.epmet.dto.result.IssueApplicationResDTO;
import com.epmet.dto.result.UserPubAuditingIssueResDTO;
import com.epmet.entity.IssueApplicationEntity;
@ -150,4 +152,6 @@ public interface IssueApplicationService extends BaseService<IssueApplicationEnt
* @author sun
*/
List<String> notIssueToTopicIds(List<String> topicIdList);
PageData<AuditListResultDTO> auditList(AuditListFormDTO formDTO);
}

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

@ -13,6 +13,7 @@ import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO;
import com.github.pagehelper.Page;
import java.util.List;
import java.util.Map;
@ -400,6 +401,14 @@ public interface IssueService extends BaseService<IssueEntity> {
*/
List<IssueProfileDTO> getIssueProfile(List<String> issueIds);
/**
* Desc: 查询所有议题
* @param formDTO
* @author zxc
* @date 2022/10/9 16:58
*/
PageData<AllIssueListResultDTO> allIssueList(AllIssueListFormDTO formDTO);
/**
* 发布议题
* 事件转议题

7
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java

@ -25,8 +25,10 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IssueApplicationDao;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.form.AuditListFormDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.dto.form.UserPubAuditingIssueFormDTO;
import com.epmet.dto.result.AuditListResultDTO;
import com.epmet.dto.result.IssueApplicationResDTO;
import com.epmet.dto.result.UserPubAuditingIssueResDTO;
import com.epmet.entity.IssueApplicationEntity;
@ -186,4 +188,9 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl<IssueApplicatio
return idList;
}
@Override
public PageData<AuditListResultDTO> auditList(AuditListFormDTO formDTO) {
return null;
}
}

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

@ -1956,6 +1956,44 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return baseDao.selectIssueProfile(issueIds);
}
/**
* Desc: 查询所有议题
* @param formDTO
* @author zxc
* @date 2022/10/9 16:58
*/
@Override
public PageData<AllIssueListResultDTO> allIssueList(AllIssueListFormDTO formDTO) {
if (org.apache.commons.lang3.StringUtils.isBlank(formDTO.getOrgId())){
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo){
throw new EpmetException("查询工作人员信息失败:"+formDTO.getUserId());
}
formDTO.setOrgId(staffInfo.getAgencyId());
formDTO.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_AGENCY);
}
PageData<AllIssueListResultDTO> result = new PageData<>(new ArrayList(),NumConstant.ZERO_L);
if (formDTO.getIsPage()){
PageInfo<AllIssueListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.allIssueList(formDTO));
result.setList(pageInfo.getList());
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}else {
List<AllIssueListResultDTO> allIssueListResultDTOS = baseDao.allIssueList(formDTO);
result.setList(allIssueListResultDTOS);
result.setTotal(allIssueListResultDTOS.size());
}
if (CollectionUtils.isNotEmpty(result.getList())){
result.getList().forEach(l -> {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(l.getGridId());
if(null == gridInfo){
throw new EpmetException("查询网格信息失败:"+l.getGridId());
}
l.setGridName(gridInfo.getGridNamePath());
});
}
return result;
}
/**
* 发布议题
* 事件转议题

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

@ -872,4 +872,47 @@
i.ID = #{issueId}
</foreach>
</select>
<!-- 查询所有议题 -->
<select id="allIssueList" resultType="com.epmet.dto.result.AllIssueListResultDTO">
SELECT
i.ID AS issueId,
i.ISSUE_STATUS,
i.SOURCE_TYPE,
(CASE WHEN i.ISSUE_STATUS = 'shift_project' THEN '已转项目'
WHEN i.ISSUE_STATUS = 'voting' THEN '表决中'
WHEN i.ISSUE_STATUS = 'closed' THEN '已关闭'
ELSE '已关闭' END) AS issueStatusName,
i.ISSUE_TITLE,
i.GRID_ID,
i.ORG_ID,
i.CREATED_TIME,
i.suggestion,
vs.support_count,
vs.OPPOSITION_COUNT
FROM issue i
LEFT JOIN issue_vote_statistical vs ON vs.ISSUE_ID = i.ID AND vs.DEL_FLAG = '0'
WHERE i.DEL_FLAG = '0'
<if test='null != startTime and startTime != "" '>
AND DATE_FORMAT(i.CREATED_TIME,'%Y%m%d') >= #{startTime}
</if>
<if test='null != endTime and endTime != "" '>
AND DATE_FORMAT(i.CREATED_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endTime}
</if>
<if test='null != issueStatus and issueStatus != "" '>
AND i.ISSUE_STATUS = #{issueStatus}
</if>
<if test='null != issueTitle and issueTitle != "" '>
AND i.ISSUE_TITLE LIKE CONCAT('%',#{issueTitle},'%')
</if>
<choose>
<when test='orgType == "agency"'>
AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</when>
<otherwise>
AND i.GRID_ID = #{orgId}
</otherwise>
</choose>
ORDER BY i.CREATED_TIME DESC
</select>
</mapper>
Loading…
Cancel
Save