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()); }