|
|
@ -183,6 +183,7 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
//审核版本
|
|
|
|
CodeCustomerDTO audit = codeCustomerService.getAuditInfo(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
|
if(null != audit) { |
|
|
|
CodeAuditResultDTO auditResult = codeAuditResultService.getAuditResultByCodeId(audit.getId()); |
|
|
|
CodeVersionInfoResultDTO.AuditBean auditBean = new CodeVersionInfoResultDTO.AuditBean(); |
|
|
|
auditBean.setCodeId(audit.getId()); |
|
|
|
auditBean.setVersion(audit.getUserVersion()); |
|
|
@ -191,7 +192,6 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
//获取小程序调用令牌
|
|
|
|
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); |
|
|
|
//获取审核结果信息
|
|
|
|
CodeAuditResultDTO auditResult = codeAuditResultService.getAuditResultByCodeId(audit.getId()); |
|
|
|
//调用微信API获取最新审核状态
|
|
|
|
WxMaCodeAuditStatusReq request = new WxMaCodeAuditStatusReq(); |
|
|
|
request.setAuditId(auditResult.getAuditId()); |
|
|
@ -222,6 +222,7 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
} |
|
|
|
} |
|
|
|
auditBean.setStatus(audit.getStatus()); |
|
|
|
auditBean.setIsSpeed(auditResult.getIsSpeed()); |
|
|
|
auditBean.setCommitTime(DateUtils.format(audit.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); |
|
|
|
auditBean.setAuditTime(DateUtils.format(audit.getAuditTime(), DateUtils.DATE_TIME_PATTERN)); |
|
|
|
resultDTO.setAudit(auditBean); |
|
|
@ -283,6 +284,7 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxResult.getErrorMsg()); |
|
|
|
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); |
|
|
|
} |
|
|
|
boolean speedSuccess = false; |
|
|
|
if(formDTO.getIsSpeed()) { |
|
|
|
//调用微信API 加急审核
|
|
|
|
WxMaSpeedUpAuditReq speedRequest = new WxMaSpeedUpAuditReq(); |
|
|
@ -291,8 +293,9 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
if (!wxSpeedResult.success()) { |
|
|
|
saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), |
|
|
|
codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxSpeedResult.getErrorMsg()); |
|
|
|
throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg()); |
|
|
|
log.error(wxSpeedResult.getErrorMsg()); |
|
|
|
} |
|
|
|
speedSuccess = wxSpeedResult.success(); |
|
|
|
} |
|
|
|
//获取审核结果信息
|
|
|
|
CodeAuditResultDTO codeAuditResultDTO = codeAuditResultService.getAuditResultByCodeId(formDTO.getCodeId()); |
|
|
@ -302,18 +305,24 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
codeAuditResultDTO.setCustomerId(codeCustomerDTO.getCustomerId()); |
|
|
|
codeAuditResultDTO.setCodeId(codeCustomerDTO.getId()); |
|
|
|
codeAuditResultDTO.setAuditId(wxResult.getData()); |
|
|
|
codeAuditResultDTO.setIsSpeed(speedSuccess); |
|
|
|
codeAuditResultDTO.setResult(CodeConstant.AUDITING); |
|
|
|
codeAuditResultService.save(codeAuditResultDTO); |
|
|
|
} else { |
|
|
|
codeAuditResultDTO.setFeedbackInfo(formDTO.getFeedbackInfo()); |
|
|
|
codeAuditResultDTO.setFeedbackStuff(formDTO.getFeedbackStuff()); |
|
|
|
codeAuditResultService.update(codeAuditResultDTO); |
|
|
|
codeAuditResultService.deleteById(codeAuditResultDTO.getId()); |
|
|
|
codeAuditResultDTO = new CodeAuditResultDTO(); |
|
|
|
codeAuditResultDTO.setFeedbackInfo(formDTO.getFeedbackInfo()); |
|
|
|
codeAuditResultDTO.setFeedbackStuff(formDTO.getFeedbackStuff()); |
|
|
|
codeAuditResultDTO.setCustomerId(codeCustomerDTO.getCustomerId()); |
|
|
|
codeAuditResultDTO.setCodeId(codeCustomerDTO.getId()); |
|
|
|
codeAuditResultDTO.setAuditId(wxResult.getData()); |
|
|
|
codeAuditResultDTO.setResult(CodeConstant.AUDITING); |
|
|
|
if (formDTO.getIsRepeat()) { |
|
|
|
codeAuditResultDTO.setIsSpeed(true); |
|
|
|
} else { |
|
|
|
codeAuditResultDTO.setIsSpeed(speedSuccess); |
|
|
|
} |
|
|
|
codeAuditResultService.save(codeAuditResultDTO); |
|
|
|
} |
|
|
|
//更新代码表状态
|
|
|
@ -656,6 +665,8 @@ public class CodeServiceImpl implements CodeService { |
|
|
|
codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxSpeedResult.getErrorMsg()); |
|
|
|
throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg()); |
|
|
|
} |
|
|
|
codeAuditResultDTO.setIsSpeed(true); |
|
|
|
codeAuditResultService.update(codeAuditResultDTO); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|