Browse Source

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

master
wangchao 5 years ago
parent
commit
1e4590dab6
  1. 22
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailWorkFormDTO.java
  2. 21
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryWorkFormDTO.java
  3. 62
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailWorkResultDTO.java
  4. 53
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryWorkResultDTO.java
  5. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/JoinVoteResultDTO.java
  6. 61
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoWorkResultDTO.java
  7. 6
      epmet-module/gov-issue/gov-issue-server/pom.xml
  8. 14
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java
  9. 66
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java
  10. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java
  11. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationHistoryDao.java
  12. 20
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationHistoryService.java
  13. 63
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationHistoryServiceImpl.java
  14. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCustomerParameterServiceImpl.java
  15. 19
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  16. 2
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
  17. 33
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationHistoryDao.xml
  18. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java
  19. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java
  20. 1
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/CustomerProjectParameterDao.xml
  21. 9
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java
  22. 10
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java
  23. 6
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java
  24. 13
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
  25. 7
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
  26. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java
  27. 5
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueDetailResultDTO.java
  28. 4
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/JoinVoteResultDTO.java
  29. 10
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

22
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailWorkFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/18 下午5:52
*/
@Data
public class ApplicationDetailWorkFormDTO implements Serializable {
private static final long serialVersionUID = 2611468185891863016L;
public interface ApplicationDetailWork{}
@NotBlank(message = "issueApplicationId不能为空",groups = {ApplicationDetailWork.class})
private String issueApplicationId;
}

21
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryWorkFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/19 下午2:05
*/
@Data
public class ApplicationHistoryWorkFormDTO implements Serializable {
private static final long serialVersionUID = -1609931427461117171L;
public interface ApplicationHistoryWork{}
@NotBlank(message = "议题ID不能为空",groups = {ApplicationHistoryWork.class})
private String issueId;
}

62
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailWorkResultDTO.java

@ -0,0 +1,62 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/18 下午5:51
*/
@Data
public class ApplicationDetailWorkResultDTO implements Serializable {
private static final long serialVersionUID = 7351552491300420108L;
/**
* 申请ID
*/
private String issueApplicationId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 所属网格名称
*/
private String gridName;
/**
* 议题发起人
*/
private String issuePublisher;
/**
* 话题相关信息
*/
private TopicInfoWorkResultDTO topicInfo;
/**
* 议题建议
*/
private String issueSuggestion;
/**
* 议题发起人电话
*/
private String issuePublisherMobile;
public ApplicationDetailWorkResultDTO() {
this.issueApplicationId = "";
this.issueTitle = "";
this.gridName = "";
this.issuePublisher = "";
this.topicInfo = new TopicInfoWorkResultDTO();
this.issuePublisherMobile = "";
this.issueSuggestion = "";
}
}

53
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryWorkResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/19 下午2:08
*/
@Data
public class ApplicationHistoryWorkResultDTO implements Serializable {
private static final long serialVersionUID = 6310909348304378438L;
/**
* 审核历史表id
*/
private String historyId;
/**
* under_auditing:待审核 approved:已通过 rejected:已驳回
*/
private String actionType;
/**
* 操作时间戳
*/
private Long operateTime;
/**
* 驳回理由或者审核通过理由
*/
private String reason;
/**
* 工作人员姓名
*/
private String staffName;
@JsonIgnore
private String userId;
public ApplicationHistoryWorkResultDTO() {
this.historyId = "";
this.actionType = "";
this.operateTime = NumConstant.ZERO_L;
this.reason = "";
this.staffName = "";
}
}

4
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/JoinVoteResultDTO.java

@ -17,4 +17,8 @@ public class JoinVoteResultDTO implements Serializable {
*/
private Boolean joinVote;
/**
* 态度 - opposition反对support赞成 如果已投票此列有值
*/
private String attitude;
}

61
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoWorkResultDTO.java

@ -0,0 +1,61 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/17 10:14 上午
*/
@Data
public class TopicInfoWorkResultDTO implements Serializable {
private static final long serialVersionUID = -3445869627210569553L;
/**
* 话题id
*/
private String topicId;
/**
* 话题发表人昵称
*/
private String publishedUser;
/**
* 话题发表时间戳
*/
private Long publishedTime;
/**
* 话题内容
*/
private String topicContent;
/**
* 话题图片集合
*/
private List<String> topicImgs;
/**
* 话题发表人电话
*/
private String topicPublishMobile;
@JsonIgnore
private String topicUserId;
public TopicInfoWorkResultDTO() {
this.topicId = "";
this.publishedUser = "";
this.publishedTime = NumConstant.ZERO_L;
this.topicContent = "";
this.topicImgs = new ArrayList<>();
this.topicPublishMobile = "";
}
}

6
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -90,6 +90,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

14
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java

@ -98,4 +98,18 @@ public interface IssueConstant {
String AUDIT_SWITCH_NAME = "议题发布前经网格员审核";
String GRID = "grid";
/**
* 审核状态:待审核
*/
String UNDER_AUDITING="under_auditing";
/**
* 审核状态:通过
*/
String APPROVED="approved";
/**
* 审核状态:驳回
*/
String REJECTED="rejected";
}

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

@ -1,10 +1,17 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IssueConstant;
import com.epmet.dto.form.ApplicationDetailWorkFormDTO;
import com.epmet.dto.form.ApplicationHistoryWorkFormDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.dto.form.IssueApplicationIdFormDTO;
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.service.IssueApplicationHistoryService;
import com.epmet.service.IssueApplicationService;
@ -34,14 +41,42 @@ public class IssueAuditController {
* @param formDTO
* @author yinzuomei
* @description 待审核|| 已驳回 列表
* @Date 2020/11/18 17:28
* @Date 2020/11/18 17:28
* @description 待审核列表
* @Date 2020/11/18 17:28
**/
@PostMapping("applicationlist")
public Result<List<IssueApplicationResDTO>> queryIssueAppliationList(@RequestBody IssueAppQueryFormDTO formDTO) {
@PostMapping("underauditinglist")
public Result<List<IssueApplicationResDTO>> queryUnderAuditingList(@RequestBody IssueAppQueryFormDTO formDTO) {
formDTO.setApplyStatus(IssueConstant.UNDER_AUDITING);
ValidatorUtils.validateEntity(formDTO,IssueAppQueryFormDTO.Required.class,IssueAppQueryFormDTO.GovFormDTO.class);
return new Result<List<IssueApplicationResDTO>>().ok(issueApplicationService.listIssueApp(formDTO));
}
/**
* @param formDTO
* @author yinzuomei
* @description 已驳回 列表
* @Date 2020/11/18 17:28
**/
@PostMapping("rejectedlist")
public Result<List<IssueApplicationResDTO>> queryRejectedList(@RequestBody IssueAppQueryFormDTO formDTO) {
formDTO.setApplyStatus(IssueConstant.REJECTED);
ValidatorUtils.validateEntity(formDTO,IssueAppQueryFormDTO.Required.class,IssueAppQueryFormDTO.GovFormDTO.class);
return new Result<List<IssueApplicationResDTO>>().ok(issueApplicationService.listIssueApp(formDTO));
}
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.IssueApplicationResDTO>>
* @param formDTO
* @author yinzuomei
* @description 通用查询列表接口对其他服务开放
* @Date 2020/11/19 13:30
**/
@PostMapping("applicationlist")
public Result<List<IssueApplicationResDTO>> queryIssueAppliationList(@RequestBody IssueAppQueryFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO,IssueAppQueryFormDTO.Required.class);
return new Result<List<IssueApplicationResDTO>>().ok(issueApplicationService.listIssueApp(formDTO));
}
/**
* @param formDTO
@ -54,4 +89,29 @@ public class IssueAuditController {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<ApplicationHistoryResDTO>>().ok(issueApplicationHistoryService.queryByIssueApplicationId(formDTO.getIssueApplicationId()));
}
/**
* @Description 待审核||已驳回 申请详情 
* @Param applicationDetailWorkFormDTO
* @author zxc
* @date 2020/11/19 下午2:26
*/
@PostMapping("applicationdetail")
public Result<ApplicationDetailWorkResultDTO> applicationDetailWork(@RequestBody ApplicationDetailWorkFormDTO applicationDetailWorkFormDTO){
ValidatorUtils.validateEntity(applicationDetailWorkFormDTO, ApplicationDetailWorkFormDTO.ApplicationDetailWork.class);
return new Result<ApplicationDetailWorkResultDTO>().ok(issueApplicationHistoryService.applicationDetailWork(applicationDetailWorkFormDTO));
}
/**
* @Description 议题详情- 根据issueId查询审核历史
* @Param applicationHistoryWorkFormDTO
* @author zxc
* @date 2020/11/19 下午2:26
*/
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
@PostMapping("issueaudithistory")
public Result<List<ApplicationHistoryWorkResultDTO>> applicationHistoryWork(@RequestBody ApplicationHistoryWorkFormDTO applicationHistoryWorkFormDTO){
ValidatorUtils.validateEntity(applicationHistoryWorkFormDTO,ApplicationHistoryWorkFormDTO.ApplicationHistoryWork.class);
return new Result<List<ApplicationHistoryWorkResultDTO>>().ok(issueApplicationHistoryService.applicationHistoryWork(applicationHistoryWorkFormDTO));
}
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java

@ -116,7 +116,7 @@ public class IssueCustomerParameterController {
*/
@PostMapping("reviewsave")
public Result reviewSave(@RequestBody ParameterFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class);
ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class);
issueCustomerParameterService.reviewSave(formDTO);
return new Result();
}

10
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationHistoryDao.java

@ -19,8 +19,10 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.ApplicationHistoryResDTO;
import com.epmet.dto.result.ApplicationHistoryWorkResultDTO;
import com.epmet.entity.IssueApplicationHistoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -40,4 +42,12 @@ public interface IssueApplicationHistoryDao extends BaseDao<IssueApplicationHist
* @Date 2020/11/18 16:59
**/
List<ApplicationHistoryResDTO> selectListByIssueApplicationId(String issueApplicationId);
/**
* @Description 查询议题审核历史
* @Param issueId
* @author zxc
* @date 2020/11/20 上午9:39
*/
List<ApplicationHistoryWorkResultDTO> applicationHistoryWork(@Param("issueId")String issueId);
}

20
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationHistoryService.java

@ -20,7 +20,11 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueApplicationHistoryDTO;
import com.epmet.dto.form.ApplicationDetailWorkFormDTO;
import com.epmet.dto.form.ApplicationHistoryWorkFormDTO;
import com.epmet.dto.result.ApplicationDetailWorkResultDTO;
import com.epmet.dto.result.ApplicationHistoryResDTO;
import com.epmet.dto.result.ApplicationHistoryWorkResultDTO;
import com.epmet.entity.IssueApplicationHistoryEntity;
import java.util.List;
@ -101,4 +105,20 @@ public interface IssueApplicationHistoryService extends BaseService<IssueApplica
* @Date 2020/11/18 16:57
**/
List<ApplicationHistoryResDTO> queryByIssueApplicationId(String issueApplicationId);
/**
* @Description 待审核||已驳回 申请详情 
* @Param applicationDetailWorkFormDTO
* @author zxc
* @date 2020/11/19 下午2:26
*/
ApplicationDetailWorkResultDTO applicationDetailWork(ApplicationDetailWorkFormDTO applicationDetailWorkFormDTO);
/**
* @Description 议题详情- 根据issueId查询审核历史
* @Param applicationHistoryWorkFormDTO
* @author zxc
* @date 2020/11/19 下午2:26
*/
List<ApplicationHistoryWorkResultDTO> applicationHistoryWork(ApplicationHistoryWorkFormDTO applicationHistoryWorkFormDTO);
}

63
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationHistoryServiceImpl.java

@ -21,20 +21,32 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IssueApplicationHistoryDao;
import com.epmet.dto.IssueApplicationHistoryDTO;
import com.epmet.dto.result.ApplicationHistoryResDTO;
import com.epmet.dto.form.ApplicationDetailWorkFormDTO;
import com.epmet.dto.form.ApplicationHistoryWorkFormDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.IssueApplicationHistoryEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.service.IssueApplicationHistoryService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 话题转议题审核历史表
@ -45,6 +57,11 @@ import java.util.Map;
@Service
public class IssueApplicationHistoryServiceImpl extends BaseServiceImpl<IssueApplicationHistoryDao, IssueApplicationHistoryEntity> implements IssueApplicationHistoryService {
@Autowired
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public PageData<IssueApplicationHistoryDTO> page(Map<String, Object> params) {
IPage<IssueApplicationHistoryEntity> page = baseDao.selectPage(
@ -108,4 +125,48 @@ public class IssueApplicationHistoryServiceImpl extends BaseServiceImpl<IssueApp
return baseDao.selectListByIssueApplicationId(issueApplicationId);
}
/**
* @Description 待审核||已驳回 申请详情 
* @Param applicationDetailWorkFormDTO
* @author zxc
* @date 2020/11/19 下午2:26
*/
@Override
public ApplicationDetailWorkResultDTO applicationDetailWork(ApplicationDetailWorkFormDTO applicationDetailWorkFormDTO) {
ApplicationDetailFormDTO formDTO = new ApplicationDetailFormDTO();
formDTO.setIssueApplicationId(applicationDetailWorkFormDTO.getIssueApplicationId());
Result<ApplicationDetailCopyResultDTO> result = resiGroupOpenFeignClient.applicationDetail(formDTO);
if (!result.success()){
throw new RenException("工作端查询待审核||已驳回 申请详情失败......");
}
if (null == result.getData()){
return new ApplicationDetailWorkResultDTO();
}
ApplicationDetailWorkResultDTO applicationDetailWorkResultDTO = ConvertUtils.sourceToTarget(result.getData(), ApplicationDetailWorkResultDTO.class);
TopicInfoWorkResultDTO topicInfoWorkResultDTO = ConvertUtils.sourceToTarget(result.getData().getTopicInfo(), TopicInfoWorkResultDTO.class);
applicationDetailWorkResultDTO.setTopicInfo(topicInfoWorkResultDTO);
return applicationDetailWorkResultDTO;
}
/**
* @Description 议题详情- 根据issueId查询审核历史
* @Param applicationHistoryWorkFormDTO
* @author zxc
* @date 2020/11/19 下午2:26
*/
@Override
public List<ApplicationHistoryWorkResultDTO> applicationHistoryWork(ApplicationHistoryWorkFormDTO applicationHistoryWorkFormDTO) {
List<ApplicationHistoryWorkResultDTO> result = baseDao.applicationHistoryWork(applicationHistoryWorkFormDTO.getIssueId());
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
}
List<String> userIds = result.stream().map(m -> m.getUserId()).collect(Collectors.toList());
Result<List<UserBaseInfoResultDTO>> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
if (!listResult.success()){
throw new RenException("议题审核历史查询用户基本信息失败......");
}
result.forEach(r -> listResult.getData().stream().filter(u -> r.getUserId().equals(u.getUserId())).forEach(u -> r.setStaffName(u.getRealName())));
return result;
}
}

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

@ -145,6 +145,7 @@ public class IssueCustomerParameterServiceImpl extends BaseServiceImpl<IssueCust
entity.setParameterKey(IssueConstant.AUDIT_SWITCH);
entity.setParameterName(IssueConstant.AUDIT_SWITCH_NAME);
entity.setParameterValue(formDTO.getAuditSwitch());
entity.setDescription("已开启审核:open; 无需审核:close");
insert(entity);
}

19
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

@ -17,16 +17,16 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.constant.IssueConstant;
import com.epmet.dao.IssueDao;
import com.epmet.dao.IssueVoteDetailDao;
@ -179,11 +179,24 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
checkTopicPublisher.setTopicId(issueDTO.getSourceId());
CheckTopicPublisherResultDTO publisherResult = resiGroupFeignClient.checkTopicPublisher(checkTopicPublisher).getData();
//校验是否投过票
Integer checkoutVoteCount = baseDao.checkoutVote(formDTO);
/*Integer checkoutVoteCount = baseDao.checkoutVote(formDTO);
if (checkoutVoteCount > NumConstant.ZERO || issuePublisher > NumConstant.ZERO || publisherResult.getCheckTopicPublisher() > NumConstant.ZERO){
resultDTO.setJoinVote(true);
}else {
resultDTO.setJoinVote(false);
}*/
IssueVoteDetailDTO issueVoteDetailDTO=baseDao.selectUserIssueDet(checkVoteFormDTO.getUserId(),checkVoteFormDTO.getIssueId());
if(null!=issueVoteDetailDTO){
resultDTO.setJoinVote(true);
resultDTO.setAttitude(issueVoteDetailDTO.getAttitude());
return resultDTO;
}
if (issuePublisher > NumConstant.ZERO || publisherResult.getCheckTopicPublisher() > NumConstant.ZERO){
resultDTO.setJoinVote(true);
resultDTO.setAttitude(StrConstant.EPMETY_STR);
}else {
resultDTO.setJoinVote(false);
resultDTO.setAttitude(StrConstant.EPMETY_STR);
}
return resultDTO;
}

2
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml

@ -20,7 +20,7 @@
SELECT
ia.id AS issueApplicationId,
ia.ISSUE_TITLE,
unix_timestamp( ia.UPDATED_TIME ) AS latestTime
unix_timestamp( ia.UPDATED_TIME ) AS latestTime,
ia.SUGGESTION,
ia.APPLY_STATUS
FROM

33
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationHistoryDao.xml

@ -5,18 +5,33 @@
<!-- 根据issue_application.id查询审核历史 -->
<select id="selectListByIssueApplicationId" resultType="com.epmet.dto.result.ApplicationHistoryResDTO">
SELECT
iah.ID as historyId,
iah.ACTION_TYPE,
unix_timestamp( iah.CREATED_TIME ) AS operateTime,
iah.REASON,
iah.STAFF_NAME
iah.ID as historyId,
iah.ACTION_TYPE,
unix_timestamp( iah.CREATED_TIME ) AS operateTime,
IFNULL(iah.REASON,'')AS REASON,
IFNULL(iah.STAFF_NAME,'')as STAFF_NAME
FROM
issue_application_history iah
issue_application_history iah
WHERE
iah.DEL_FLAG = '0'
AND iah.ISSUE_APPLICATION_ID = #{issueApplicationId}
iah.DEL_FLAG = '0'
AND iah.ISSUE_APPLICATION_ID = #{issueApplicationId}
ORDER BY
iah.CREATED_TIME DESC
iah.CREATED_TIME DESC
</select>
<!-- 查询议题审核历史 -->
<select id="applicationHistoryWork" resultType="com.epmet.dto.result.ApplicationHistoryWorkResultDTO">
SELECT
iah.ID AS historyId,
iah.ACTION_TYPE,
UNIX_TIMESTAMP(iah.CREATED_TIME) AS operateTime,
iah.REASON,
iah.CREATED_BY AS userId
FROM issue_application_history iah
LEFT JOIN issue_application ia ON ia.ID = iah.ISSUE_APPLICATION_ID
WHERE iah.DEL_FLAG = '0'
AND ia.DEL_FLAG = '0'
AND ia.ISSUE_ID = #{issueId}
</select>
</mapper>

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java

@ -116,7 +116,7 @@ public class CustomerProjectParameterController {
*/
@PostMapping("remindsave")
public Result remindSave(@RequestBody ParameterFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class);
ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class);
customerProjectParameterService.remindSave(formDTO);
return new Result();
}

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

@ -230,6 +230,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
detentionDays.setParameterKey(ParameterKeyConstant.DETENTION_DAYS);
detentionDays.setParameterValue(formDTO.getDetentionDays());
detentionDays.setParameterName(ParameterKeyConstant.DETENTION_DAYS_NAME);
detentionDays.setDescription("默5天");
list.add(detentionDays);
//计算方式 工作日work 日历天calendar
CustomerProjectParameterEntity calculation = new CustomerProjectParameterEntity();
@ -237,6 +238,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
calculation.setParameterKey(ParameterKeyConstant.CALCULATION);
calculation.setParameterValue(formDTO.getCalculation());
calculation.setParameterName(ParameterKeyConstant.CALCULATION_NAME);
calculation.setDescription("计算方式 工作日work 日历天calendar");
list.add(calculation);
//即将超期提醒时间
CustomerProjectParameterEntity remindTime = new CustomerProjectParameterEntity();
@ -244,6 +246,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
remindTime.setParameterKey(ParameterKeyConstant.REMIND_TIME);
remindTime.setParameterValue(formDTO.getRemindTime());
remindTime.setParameterName(ParameterKeyConstant.REMIND_TIME_NAME);
remindTime.setDescription("默认 当天");
list.add(remindTime);
//推送时间
CustomerProjectParameterEntity pushTime = new CustomerProjectParameterEntity();
@ -251,6 +254,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
pushTime.setParameterKey(ParameterKeyConstant.PUSH_TIME);
pushTime.setParameterValue(formDTO.getPushTime());
pushTime.setParameterName(ParameterKeyConstant.PUSH_TIME_NAME);
pushTime.setDescription("默认 上午8点");
list.add(pushTime);
//设定核算单位天开始时间
CustomerProjectParameterEntity startTime = new CustomerProjectParameterEntity();
@ -258,6 +262,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
startTime.setParameterKey(ParameterKeyConstant.START_TIME);
startTime.setParameterValue(formDTO.getStartTime());
startTime.setParameterName(ParameterKeyConstant.START_TIME_NAME);
startTime.setDescription("默认 00:00:00");
list.add(startTime);
//设定核算单位天结束时间
CustomerProjectParameterEntity endTime = new CustomerProjectParameterEntity();
@ -265,6 +270,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
endTime.setParameterKey(ParameterKeyConstant.END_TIME);
endTime.setParameterValue(formDTO.getEndTime());
endTime.setParameterName(ParameterKeyConstant.END_TIME_NAME);
endTime.setDescription("默认 23:59:00");
list.add(endTime);
insertBatch(list);

1
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/CustomerProjectParameterDao.xml

@ -31,6 +31,7 @@
</select>
<select id="getParameterByCustomer" resultType="com.epmet.dto.CustomerProjectParameterDTO">
select
PARAMETER_KEY,
PARAMETER_NAME,
PARAMETER_VALUE
from

9
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java

@ -33,8 +33,16 @@ public class ApplicationDetailCopyResultDTO implements Serializable {
*/
private String issuePublisher;
/**
* 议题建议
*/
private String issueSuggestion;
/**
* 议题发起人电话
*/
private String issuePublisherMobile;
/**
* 话题相关信息
*/
@ -47,5 +55,6 @@ public class ApplicationDetailCopyResultDTO implements Serializable {
this.issueSuggestion = "";
this.issuePublisher = "";
this.topicInfo = new TopicInfoResultDTO();
this.issuePublisherMobile = "";
}
}

10
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java

@ -38,8 +38,16 @@ public class ApplicationDetailResultDTO implements Serializable {
*/
private TopicInfoResultDTO topicInfo;
/**
* 议题建议
*/
private String issueSuggestion;
/**
* 议题发起人电话
*/
private String issuePublisherMobile;
private String gridId;
private String topicId;
@ -52,5 +60,7 @@ public class ApplicationDetailResultDTO implements Serializable {
this.gridName = "";
this.issuePublisher = "";
this.topicInfo = new TopicInfoResultDTO();
this.issueSuggestion = "";
this.issuePublisherMobile = "";
}
}

6
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java

@ -42,6 +42,11 @@ public class TopicInfoResultDTO implements Serializable {
*/
private List<String> topicImgs;
/**
* 话题发表人电话
*/
private String topicPublishMobile;
@JsonIgnore
private String topicUserId;
@ -51,5 +56,6 @@ public class TopicInfoResultDTO implements Serializable {
this.publishedTime = NumConstant.ZERO_L;
this.topicContent = "";
this.topicImgs = new ArrayList<>();
this.topicPublishMobile = "";
}
}

13
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

@ -2,7 +2,9 @@ package com.epmet.resi.group.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO;
import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO;
@ -71,4 +73,13 @@ public interface ResiGroupOpenFeignClient {
*/
@PostMapping("resi/group/topic/select-my-create-topic")
Result<List<String>> selectMyCreateTopic(@RequestBody TopicIdListFormDTO topicIdListFormDTO);
}
/**
* @Description 待审核||已驳回 申请详情
* @Param applicationDetailFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("resi/group/groupissue/applicationdetail")
Result<ApplicationDetailCopyResultDTO> applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO);
}

7
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java

@ -3,7 +3,9 @@ package com.epmet.resi.group.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO;
import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO;
@ -49,4 +51,9 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
public Result<List<String>> selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectMyCreateTopic", topicIdListFormDTO);
}
@Override
public Result<ApplicationDetailCopyResultDTO> applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "applicationDetail", applicationDetailFormDTO);
}
}

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

@ -80,9 +80,11 @@ public class GroupIssueServiceImpl implements GroupIssueService {
listResult.getData().forEach(user -> {
if (user.getUserId().equals(data.getUserId())){
data.setIssuePublisher(user.getDistrict().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender())));
data.setIssuePublisherMobile(user.getMobile());
}
if (user.getUserId().equals(topicInfoResultDTO.getTopicUserId())){
topicInfoResultDTO.setPublishedUser(user.getDistrict().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender())));
topicInfoResultDTO.setTopicPublishMobile(user.getMobile());
}
});
List<String> gridIds = new ArrayList<>();

5
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/IssueDetailResultDTO.java

@ -69,4 +69,9 @@ public class IssueDetailResultDTO implements Serializable {
* true已发表过想法false未发表想法
*/
private Boolean publishIdeaFlag;
/**
* 态度 - opposition反对support赞成
*/
private String attitude;
}

4
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/JoinVoteResultDTO.java

@ -17,4 +17,8 @@ public class JoinVoteResultDTO implements Serializable {
*/
private Boolean joinVote;
/**
* 态度 - opposition反对support赞成 如果已投票此列有值
*/
private String attitude;
}

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

@ -87,8 +87,14 @@ public class IssueServiceImpl implements IssueService {
CheckVoteFormDTO formDTO = new CheckVoteFormDTO();
formDTO.setIssueId(issueDetail.getIssueId());
formDTO.setUserId(tokenDto.getUserId());
JoinVoteResultDTO data = govIssueFeignClient.joinVote(formDTO).getData();
issueDetailResult.setJoinVote(data.getJoinVote());
Result<JoinVoteResultDTO> joinVoteResultDTOResult=govIssueFeignClient.joinVote(formDTO);
if(joinVoteResultDTOResult.success()&&null!=joinVoteResultDTOResult.getData()){
issueDetailResult.setJoinVote(joinVoteResultDTOResult.getData().getJoinVote());
issueDetailResult.setAttitude(joinVoteResultDTOResult.getData().getAttitude());
}else{
issueDetailResult.setJoinVote(false);
issueDetailResult.setAttitude(StrConstant.EPMETY_STR);
}
if (issueDetailResult.getIssueStatus().equals(HallConstat.SHIFT_PROJECT)){
//校验项目是否结案
IssueIdFormDTO issueId = new IssueIdFormDTO();

Loading…
Cancel
Save