Commit f2f70500 by zhouhaibao

[+]新增审批的生成环境的提交审核处理

1 parent c81c9f7f
......@@ -111,12 +111,36 @@ public class StoreShelfOASubmitService implements OASubmitService {
}
log.info("提交审批申请 requestDTO:{}", JSON.toJSONString(dto));
WorkWechatOAApplyEventResponseDTO response = workWechatOARemote.applyEvent(dto).getResult();
String devEnv = OrePropertyConfigurer.getString("dj.service.dev.env");
WorkWechatOAApplyEventResponseDTO response;
if (Objects.equals(devEnv, "dev")) {
log.info("提交审批申请 dev requestDTO:{}", dto);
response = workWechatOARemote.applyEvent(dto).getResult();
log.info("提交审批申请 dev response:{}", response);
} else {
response = applyEvent(dto);
}
log.info("提交审批申请 response:{}", response);
return response != null && response.isSuccess() && response.getErrCode() == 0 && response.getSpNo() != null
? response.getSpNo() : null;
}
public static WorkWechatOAApplyEventResponseDTO applyEvent(WorkWechatOAApplyEventRequestDTO requestDTO) {
JSONObject jsonObject = (JSONObject) JSON.toJSON(requestDTO);
WorkWechatOAApplyEventResponseDTO responseDTO = null;
log.info("提交审批申请 requestDTO:{}", JSONObject.toJSONString(requestDTO));
try {
String baseurl = OrePropertyConfigurer.getString("workwechat.oa.applyEvent.path");
responseDTO = HttpUtil.post(baseurl, jsonObject, WorkWechatOAApplyEventResponseDTO.class);
log.info("提交审批申请 ropResponse:{}", responseDTO);
} catch (Exception e) {
log.error("提交审批申请异常:{}:", e.getMessage(), e);
}
return responseDTO;
}
/**
* 校验审批申请请求
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!