Browse Source

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

dev_shibei_match
wangchao 5 years ago
parent
commit
58f79560be
  1. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
  3. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
  4. 1
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
  5. 32
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  6. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -137,7 +137,8 @@ public enum EpmetErrorCode {
GROUP_EDIT_ERROR(9000,"组信息编辑失败"),
GROUP_NOT_EXISTS(9001,"该组不存在"),
GROUP_IN_AUDITING(9002,"该组已提交编辑,处于待审核状态,完成审核前不可再次提交"),
GROUP_EDIT_NUM_LIMITED(9003,"已达编辑次数上限");
GROUP_EDIT_NUM_LIMITED(9003,"已达编辑次数上限"),
TOPIC_SHIFTED_TO_ISSUE_UNDER_AUDITING(9004,"当前话题正在转议题审核");
private int code;

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

@ -55,7 +55,7 @@ public interface IssueApplicationService extends BaseService<IssueApplicationEnt
/**
* 默认查询
*
* 该方法已被重写因此直接加载XML里的mapper而不进行切面增强因此改写逻辑同selectByTopicId
* @param params
* @return java.util.List<IssueApplicationDTO>
* @author generator

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

@ -65,9 +65,16 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl<IssueApplicatio
return getPageData(page, IssueApplicationDTO.class);
}
/**
* @Description 该方法已被重写因此直接加载XML里的mapper而不进行切面增强因此改写逻辑同selectByTopicId
* @param params
* @return java.util.List<com.epmet.dto.IssueApplicationDTO>
* @author wangc
* @date 2020.11.30 09:53
*/
@Override
public List<IssueApplicationDTO> list(Map<String, Object> params) {
//List<IssueApplicationEntity> entityList = baseDao.selectByTopicId(getWrapper(params));
//List<IssueApplicationEntity> entityList = baseDao.selectList(getWrapper(params));
return baseDao.selectByTopicId((String)params.get(ModuleConstants.FIELD_JAVA_TOPIC_ID));
//return ConvertUtils.sourceToTarget(entityList, IssueApplicationDTO.class);
}

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

@ -70,5 +70,6 @@
FROM issue_application
WHERE DEL_FLAG = '0'
AND TOPIC_ID = #{topicId}
ORDER BY CREATED_TIME DESC
</select>
</mapper>

32
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -498,6 +498,11 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
return verifyError;
}
//1.3检查话题是否在议题审核的状态
if(checkTopicIfUnderAuditing(hiddenFormDTO.getTopicId())){
throw new RenException(EpmetErrorCode.TOPIC_SHIFTED_TO_ISSUE_UNDER_AUDITING.getCode());
}
//2.屏蔽话题
ResiTopicEntity topicForUpdate = new ResiTopicEntity();
topicForUpdate.setId(hiddenFormDTO.getTopicId());
@ -608,6 +613,11 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
return verifyError;
}
//1.3检查话题是否在议题审核的状态
if(checkTopicIfUnderAuditing(closeFormDTO.getTopicId())){
throw new RenException(EpmetErrorCode.TOPIC_SHIFTED_TO_ISSUE_UNDER_AUDITING.getCode());
}
//2.关闭操作
topic.setClosedStatus(closeFormDTO.getClosedStatus());
baseDao.updateById(topic);
@ -1782,6 +1792,28 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
return baseDao.selectTopicIdsByGroup(groupId);
}
/**
* @Description 查看话题是否在议题审核的状态
* @param topicId
* @return boolean
* @author wangc
* @date 2020.11.30 10:05
*/
private boolean checkTopicIfUnderAuditing(String topicId){
Map<String,Object> params = new HashMap<>();
params.put(ModuleConstant.FILED_TOPIC_ID_HUMP,topicId);
Result<List<IssueApplicationDTO>> reply = issueOpenFeignClient.list(params);
if(reply.success()){
if(!CollectionUtils.isEmpty(reply.getData())){
List<IssueApplicationDTO> applications = reply.getData();
return StringUtils.equals(ModuleConstant.TOPIC_SHIFTED_TO_ISSUE_STATUS_UNDER_AUDITING,applications.get(NumConstant.ZERO).getApplyStatus()) ? true : false;
}else return false;
}
log.error("Method [checkTopicIfUnderAuditing] of service gov-issue called failed,topicId is [%s]",topicId);
throw new RenException(reply.getInternalMsg());
}
}

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java

@ -262,6 +262,11 @@ public interface ModuleConstant extends Constant {
* */
String TOPIC_STATUS_DISCUSSING = "discussing";
/**
* 话题转议题正在审核中
*/
String TOPIC_SHIFTED_TO_ISSUE_STATUS_UNDER_AUDITING = "under_auditing";
/**
* 话题操作记录状态- 转议题
* */

Loading…
Cancel
Save