|
|
@ -408,20 +408,23 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
@Override |
|
|
|
public List<ReasonResultDTO> reason(CodeCommonFormDTO formDTO) { |
|
|
|
List<ReasonResultDTO> resultList = new ArrayList<>(); |
|
|
|
|
|
|
|
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<CodeAuditResultDTO> codeAuditResultList = codeAuditResultService.getAuditFailedList(codeCustomerDTO.getCustomerId(), |
|
|
|
codeCustomerDTO.getClientType()); |
|
|
|
List<CodeAuditResultDTO> 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<CodeHistoryResultDTO> list = codeOperationHistoryService.getHistoryList(code.getCustomerId(), code.getClientType()); |
|
|
|
List<CodeHistoryResultDTO> list = codeOperationHistoryService.getHistoryList(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
|
PageInfo<CodeHistoryResultDTO> pageInfo = new PageInfo<>(list); |
|
|
|
return new PageData<>(list, pageInfo.getTotal()); |
|
|
|
} |
|
|
|