|
@ -20,6 +20,7 @@ package com.epmet.service.impl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
@ -96,7 +97,7 @@ public class IssueSuggestionServiceImpl extends BaseServiceImpl<IssueSuggestionD |
|
|
//是否表决过
|
|
|
//是否表决过
|
|
|
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(dto.getCreatedBy(), dto.getIssueId()); |
|
|
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(dto.getCreatedBy(), dto.getIssueId()); |
|
|
if(null==issueVoteDetailDTO){ |
|
|
if(null==issueVoteDetailDTO){ |
|
|
throw new RenException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode()); |
|
|
throw new EpmetException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode(), EpmetErrorCode.VOTE_ISSUE_PLEASE.getMsg(), EpmetErrorCode.VOTE_ISSUE_PLEASE.getMsg()); |
|
|
} |
|
|
} |
|
|
//校验建议内容
|
|
|
//校验建议内容
|
|
|
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); |
|
|
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); |
|
@ -106,17 +107,16 @@ public class IssueSuggestionServiceImpl extends BaseServiceImpl<IssueSuggestionD |
|
|
textScanParamDTO.getTasks().add(taskDTO); |
|
|
textScanParamDTO.getTasks().add(taskDTO); |
|
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
|
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
|
|
if (!textSyncScanResult.success()) { |
|
|
if (!textSyncScanResult.success()) { |
|
|
log.warn("居民端用户对议题发表建议,内容审核服务返回失败"); |
|
|
throw new EpmetException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); |
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); |
|
|
throw new EpmetException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//赋值网格id
|
|
|
//赋值网格id
|
|
|
IssueDTO issueDTO = issueService.get(dto.getIssueId()); |
|
|
IssueDTO issueDTO = issueService.get(dto.getIssueId()); |
|
|
if (null == issueDTO) { |
|
|
if (null == issueDTO) { |
|
|
throw new RenException(String.format("根据议题id%s,没有找到议题信息", dto.getIssueId())); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),String.format("根据议题id%s,没有找到议题信息", dto.getIssueId()),"议题不存在"); |
|
|
} |
|
|
} |
|
|
dto.setGridId(issueDTO.getGridId()); |
|
|
dto.setGridId(issueDTO.getGridId()); |
|
|
dto.setCustomerId(issueDTO.getCustomerId()); |
|
|
dto.setCustomerId(issueDTO.getCustomerId()); |
|
|