From 260b2023f5825813f5309b5209c95bbaf4d43c7d Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 24 Aug 2020 11:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=AE=A1=E7=90=86=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CodeServiceImpl.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index ce3a43181d..020dcf8782 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -408,20 +408,23 @@ public class CodeServiceImpl implements CodeService { @Override public List reason(CodeCommonFormDTO formDTO) { List resultList = new ArrayList<>(); - - //获取上传代码信息 - CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); + if (StringUtils.isNotBlank(formDTO.getCodeId())) { + //获取上传代码信息 + CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); + formDTO.setCustomerId(codeCustomerDTO.getCustomerId()); + formDTO.setClientType(codeCustomerDTO.getClientType()); + } //是否授权 - if (!customerMpService.getAuthFlag(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType())) { + if (!customerMpService.getAuthFlag(formDTO.getCustomerId(), formDTO.getClientType())) { throw new RenException("未授权"); } - AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType()); + AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); if (null == authInfo) { throw new RenException("未授权"); } //获取审核结果信息 - List codeAuditResultList = codeAuditResultService.getAuditFailedList(codeCustomerDTO.getCustomerId(), - codeCustomerDTO.getClientType()); + List codeAuditResultList = codeAuditResultService.getAuditFailedList(formDTO.getCustomerId(), + formDTO.getClientType()); codeAuditResultList.forEach(dto -> { ReasonResultDTO result = new ReasonResultDTO(); result.setReason(dto.getReason()); @@ -500,9 +503,9 @@ public class CodeServiceImpl implements CodeService { public PageData history(CodeCommonFormDTO formDTO) { PageHelper.startPage(formDTO.getPage(), formDTO.getLimit()); //获取上传代码信息 - CodeCustomerDTO code = codeCustomerService.get(formDTO.getCodeId()); +// CodeCustomerDTO code = codeCustomerService.get(formDTO.getCodeId()); //获取上传代码信息 - List list = codeOperationHistoryService.getHistoryList(code.getCustomerId(), code.getClientType()); + List list = codeOperationHistoryService.getHistoryList(formDTO.getCustomerId(), formDTO.getClientType()); PageInfo pageInfo = new PageInfo<>(list); return new PageData<>(list, pageInfo.getTotal()); }