BIP单据与获取token公用方法编写

This commit is contained in:
yuqh 2024-05-31 09:37:27 +08:00
parent 6530caac60
commit 7b4a0b5ce7
1 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.hzya.frame.webapp.entrance.controler;
import com.hzya.frame.bip.v3.v2207.service.IBipSsoService;
import com.hzya.frame.sysnew.application.service.ISysApplicationService;
import com.hzya.frame.sys.entity.EsbReturnEntity;
import com.hzya.frame.sys.file.download.entity.FileDownloadEntity;
@ -29,6 +30,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@ -49,6 +51,8 @@ public class EntranceController {
private IEntranceService entranceService;
@Autowired
protected IFileDownloadService filedownloadService;
@Autowired
protected IBipSsoService bipSsoService;
@Resource
protected ISysApplicationService sysApplicationService;
@RequestMapping(value = "/option")
@ -164,5 +168,11 @@ public class EntranceController {
public JsonResultEntity externalCallInterface(ServletRequest servletRequest, ServletResponse servletResponse) throws Exception {
return sysApplicationService.externalCallInterface(servletRequest,servletResponse);
}
@RequestMapping(value = "/erpSso")
@ResponseBody
public JsonResultEntity erpSso(HttpServletResponse response, String ticket) throws Exception {
String indexUrl = bipSsoService.erpSso(ticket);
response.sendRedirect(indexUrl);
return null;
}
}