|
|
|
@ -27,10 +27,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.TreeSet;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Author xuhx
|
|
|
|
@ -126,7 +123,7 @@ public class methodForEmrMedical {
|
|
|
|
|
if (password != null && !"".equals(password)) {
|
|
|
|
|
String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
//加密(此部分代码来自FontController的getToken方法,用来获取token及相关操作)
|
|
|
|
|
String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
String token = UUID.randomUUID().toString();
|
|
|
|
|
List<Power_Menu> list = null;
|
|
|
|
|
List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
Set<String> menus = new TreeSet<>();
|
|
|
|
@ -165,7 +162,7 @@ public class methodForEmrMedical {
|
|
|
|
|
user.setRemark(power_depts.toString());
|
|
|
|
|
//移除缓存
|
|
|
|
|
CacheManager.removeCacheByObject(user);
|
|
|
|
|
CacheManager.putCache(date, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
CacheManager.putCache(token, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
if (!"".equals(token) && token != null) {
|
|
|
|
|
//返回跳转url
|
|
|
|
|
result = "http://" + ip + ":" + port + "/emr_medical_record/login?token=" + token + "&userName=" + userName;
|
|
|
|
@ -221,7 +218,7 @@ public class methodForEmrMedical {
|
|
|
|
|
if (password != null && !"".equals(password)) {
|
|
|
|
|
String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
//加密(此部分代码来自FontController的getToken方法,用来获取token及相关操作)
|
|
|
|
|
String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
String token = UUID.randomUUID().toString();
|
|
|
|
|
List<Power_Menu> list = null;
|
|
|
|
|
List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
Set<String> menus = new TreeSet<>();
|
|
|
|
@ -260,7 +257,7 @@ public class methodForEmrMedical {
|
|
|
|
|
user.setRemark(power_depts.toString());
|
|
|
|
|
//移除缓存
|
|
|
|
|
CacheManager.removeCacheByObject(user);
|
|
|
|
|
CacheManager.putCache(date, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
CacheManager.putCache(token, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
if (!"".equals(token) && token != null) {
|
|
|
|
|
//返回跳转url
|
|
|
|
|
result = "http://" + ip2 + ":" + port2 + "/emr_record/login?token=" + token + "&userName=" + userName;
|
|
|
|
@ -299,7 +296,7 @@ public class methodForEmrMedical {
|
|
|
|
|
if (password != null && !"".equals(password)) {
|
|
|
|
|
String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
//加密(此部分代码来自FontController的getToken方法,用来获取token及相关操作)
|
|
|
|
|
String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
String token = UUID.randomUUID().toString();
|
|
|
|
|
List<Power_Menu> list = null;
|
|
|
|
|
List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
Set<String> menus = new TreeSet<>();
|
|
|
|
@ -337,7 +334,7 @@ public class methodForEmrMedical {
|
|
|
|
|
user.setRemark(power_depts.toString());
|
|
|
|
|
//移除缓存
|
|
|
|
|
CacheManager.removeCacheByObject(user);
|
|
|
|
|
CacheManager.putCache(date, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
CacheManager.putCache(token, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
if (!"".equals(token) && token != null) {
|
|
|
|
|
//返回跳转url
|
|
|
|
|
result = "http://" + ip + ":" + port + "/emr_medical_record/login?token=" + token + "&userName=" + userName;
|
|
|
|
@ -374,7 +371,7 @@ public class methodForEmrMedical {
|
|
|
|
|
if (password != null && !"".equals(password)) {
|
|
|
|
|
String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
//加密(此部分代码来自FontController的getToken方法,用来获取token及相关操作)
|
|
|
|
|
String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
String token = UUID.randomUUID().toString();
|
|
|
|
|
List<Power_Menu> list = null;
|
|
|
|
|
List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
Set<String> menus = new TreeSet<>();
|
|
|
|
@ -412,7 +409,7 @@ public class methodForEmrMedical {
|
|
|
|
|
user.setRemark(power_depts.toString());
|
|
|
|
|
//移除缓存
|
|
|
|
|
CacheManager.removeCacheByObject(user);
|
|
|
|
|
CacheManager.putCache(date, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
CacheManager.putCache(token, new Cache(date, user, TOKEN_EXPIRE_TIME));
|
|
|
|
|
if (!"".equals(token) && token != null) {
|
|
|
|
|
//返回跳转url
|
|
|
|
|
result = "http://" + ip2 + ":" + port2 + "/emr_record/login?token=" + token + "&userName=" + userName;
|
|
|
|
|