|
|
|
@ -1,4 +1,6 @@
|
|
|
|
|
package com.manage.controller;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
|
|
|
|
import com.manage.dao.Power_NoticeMapper;
|
|
|
|
@ -11,12 +13,12 @@ import com.manage.service.cache.Cache;
|
|
|
|
|
import com.manage.service.cache.CacheManager;
|
|
|
|
|
import com.manage.service.ipml.Power_NoticeServiceImpl;
|
|
|
|
|
import com.manage.service.webSocket.WsPool;
|
|
|
|
|
import com.manage.util.ActionScopeUtils;
|
|
|
|
|
import com.manage.util.DateUtils;
|
|
|
|
|
import com.manage.util.ExceptionPrintUtil;
|
|
|
|
|
import com.manage.util.Msg;
|
|
|
|
|
import com.manage.vo.*;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.cxf.endpoint.Client;
|
|
|
|
|
import org.dom4j.Document;
|
|
|
|
|
import org.dom4j.DocumentHelper;
|
|
|
|
|
import org.dom4j.Element;
|
|
|
|
@ -29,6 +31,7 @@ import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.StringReader;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
@ -50,6 +53,8 @@ import java.util.*;
|
|
|
|
|
public class FontController {
|
|
|
|
|
@Value("${STR_SPLIT}")
|
|
|
|
|
private String STR_SPLIT;
|
|
|
|
|
@Value("${EMRRECORD_URLHEAD}")
|
|
|
|
|
private String EMRRECORD_URLHEAD;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PowerService powerService;
|
|
|
|
|
@Autowired
|
|
|
|
@ -397,44 +402,208 @@ public class FontController {
|
|
|
|
|
* @UpdateRemark: 更新说明
|
|
|
|
|
* @Version: 1.0
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "getTokenForHis",method = RequestMethod.POST)
|
|
|
|
|
// @RequestMapping(value = "getTokenForHis",method = RequestMethod.POST)
|
|
|
|
|
// @ResponseBody
|
|
|
|
|
// public Msg getTokenForHis(@RequestParam("username") String userName,@RequestParam("password")String password) throws Exception{
|
|
|
|
|
// if(StringUtils.isBlank(userName)){
|
|
|
|
|
// return Msg.fail("用户名不能为空");
|
|
|
|
|
// }
|
|
|
|
|
// if(StringUtils.isBlank(password)){
|
|
|
|
|
// return Msg.fail("密码不能为空");
|
|
|
|
|
// }
|
|
|
|
|
// //2.根据userName查询我们的用户表是否存在
|
|
|
|
|
// Power_UserVo userVo = new Power_UserVo();
|
|
|
|
|
// // 判断数据库中是否有此用户,如果没有则插入数据库
|
|
|
|
|
// String result = linkHisLogin(userName, password);
|
|
|
|
|
//// if(StringUtils.isBlank(result)){
|
|
|
|
|
//// return Msg.fail("调用第三方认证失败");
|
|
|
|
|
//// }
|
|
|
|
|
// List<Power_User> userList = userMapper.checkUserName(userName);
|
|
|
|
|
// if (CollectionUtils.isEmpty(userList)) {
|
|
|
|
|
// //2.1不存在往用户表新增这条用户
|
|
|
|
|
// userVo.setUserName(userName);
|
|
|
|
|
//// userVo.setUserPwd(Base64.encode(MD5.KL("1C821B22D0402F317E40D93213C66843")));
|
|
|
|
|
// userVo.setUserPwd(Base64.encode(MD5.KL("123456")));
|
|
|
|
|
// //TODO name从应答的xml解析
|
|
|
|
|
//// String name = analysis(result,"Name");
|
|
|
|
|
// userVo.setName(name);
|
|
|
|
|
// userVo.setRoleId(1);
|
|
|
|
|
// userVo.setDeptId("3");
|
|
|
|
|
// userVo.setEffective(1);
|
|
|
|
|
// userVo.setCreater("his");
|
|
|
|
|
// SimpleDateFormat fmt= new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
// userVo.setCreateDate(fmt.format(new Date()));
|
|
|
|
|
// //插入00
|
|
|
|
|
// userMapper.insert(userVo);
|
|
|
|
|
// }
|
|
|
|
|
// String token = setToken(userVo);
|
|
|
|
|
// return Msg.success().add("token",token);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "saveThirdUser",method = RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Msg getTokenForHis(@RequestParam("username") String userName,@RequestParam("password")String password) throws Exception{
|
|
|
|
|
public Msg saveThirdUser(@RequestParam("userName") String userName,@RequestParam("passWord")String passWord) throws Exception{
|
|
|
|
|
if(StringUtils.isBlank(userName)){
|
|
|
|
|
return Msg.fail("用户名不能为空");
|
|
|
|
|
return Msg.fail("用户名不能为空");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isBlank(password)){
|
|
|
|
|
if(StringUtils.isBlank(passWord)){
|
|
|
|
|
return Msg.fail("密码不能为空");
|
|
|
|
|
}
|
|
|
|
|
//2.根据userName查询我们的用户表是否存在
|
|
|
|
|
Power_UserVo userVo = new Power_UserVo();
|
|
|
|
|
// 判断数据库中是否有此用户,如果没有则插入数据库
|
|
|
|
|
String result = linkHisLogin(userName, password);
|
|
|
|
|
if(StringUtils.isBlank(result)){
|
|
|
|
|
return Msg.fail("调用第三方认证失败");
|
|
|
|
|
}
|
|
|
|
|
List<Power_User> userList = userMapper.checkUserName(userName);
|
|
|
|
|
if (CollectionUtils.isEmpty(userList)) {
|
|
|
|
|
//2.1不存在往用户表新增这条用户
|
|
|
|
|
List<Power_UserVo> userInfo = userMapper.getUserInfo(userName, passWord);
|
|
|
|
|
if (CollectionUtils.isEmpty(userInfo)) {
|
|
|
|
|
userVo.setUserName(userName);
|
|
|
|
|
// userVo.setUserPwd(Base64.encode(MD5.KL("1C821B22D0402F317E40D93213C66843")));
|
|
|
|
|
userVo.setUserPwd(Base64.encode(MD5.KL("123456")));
|
|
|
|
|
//TODO name从应答的xml解析
|
|
|
|
|
String name = analysis(result,"Name");
|
|
|
|
|
userVo.setName(name);
|
|
|
|
|
userVo.setRoleId(1);
|
|
|
|
|
userVo.setDeptId("3");
|
|
|
|
|
userVo.setEffective(1);
|
|
|
|
|
userVo.setCreater("his");
|
|
|
|
|
SimpleDateFormat fmt= new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
userVo.setCreateDate(fmt.format(new Date()));
|
|
|
|
|
//插入00
|
|
|
|
|
userMapper.insert(userVo);
|
|
|
|
|
}
|
|
|
|
|
String token = setToken(userVo);
|
|
|
|
|
return Msg.success().add("token",token);
|
|
|
|
|
userVo.setPassWord(passWord);
|
|
|
|
|
userMapper.insertUserInfo(userVo);
|
|
|
|
|
return Msg.fail("同步用户密码成功");
|
|
|
|
|
}else {
|
|
|
|
|
userVo.setUserName(userName);
|
|
|
|
|
userVo.setPassWord(passWord);
|
|
|
|
|
userMapper.updateinsertUserInfo(userVo);
|
|
|
|
|
return Msg.fail("同步用户密码成功");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@RequestMapping(value = "getThirdToken",method = RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Msg getThirdToken(String userName,String passWord) throws Exception {
|
|
|
|
|
if (StringUtils.isBlank(userName)) {
|
|
|
|
|
return Msg.fail("账号不能为空");
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isBlank(passWord)) {
|
|
|
|
|
return Msg.fail("密码不能为空");
|
|
|
|
|
}
|
|
|
|
|
Power_UserVo userVo = new Power_UserVo();
|
|
|
|
|
List<Power_UserVo> userInfo = userMapper.getUserInfoOne(userName, passWord);
|
|
|
|
|
if (!CollectionUtils.isEmpty(userInfo)) {
|
|
|
|
|
String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
ActionScopeUtils.setSessionAttribute("token",token,Integer.valueOf(String.valueOf(TOKEN_EXPIRE_TIME))/1000);
|
|
|
|
|
//设置用户登录次数缓存
|
|
|
|
|
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
CacheManager.addloginUserCount(fmt.format(new Date()),userName);
|
|
|
|
|
CacheManager.addExcCount("noExc");
|
|
|
|
|
List<Power_Menu> list = null;
|
|
|
|
|
List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
Set<String> menus = new LinkedHashSet<>();
|
|
|
|
|
userVo.setRoleId(0);
|
|
|
|
|
if (userVo.getRoleId().equals(0) || userVo.getRoleId().equals(-100)) {
|
|
|
|
|
list = powerMenuService.queryAllPowerMenu(null,userVo.getRoleId());
|
|
|
|
|
} else {
|
|
|
|
|
list = powerMenuService.selectUserAndRoleMenuListPower(userVo.getUserId(),null);
|
|
|
|
|
}
|
|
|
|
|
if(null != list && !list.isEmpty()){
|
|
|
|
|
for (Power_Menu powerMenu : list) {
|
|
|
|
|
User_Dept_Menu deptMenu = new User_Dept_Menu();
|
|
|
|
|
String menuUrl = powerMenu.getMenuUrl();
|
|
|
|
|
if (StringUtils.isNotBlank(menuUrl)) {
|
|
|
|
|
BeanUtils.copyProperties(powerMenu, deptMenu);
|
|
|
|
|
deptMenu.setMethodParent(powerMenu.getParentId());
|
|
|
|
|
menuList.add(deptMenu);
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(powerMenu.getMethod())) {
|
|
|
|
|
menus.add(powerMenu.getMenuUrl());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
userVo.setMenuList(menuList);
|
|
|
|
|
userVo.setMenus(menus);
|
|
|
|
|
userVo.setRemark("HIS科室");
|
|
|
|
|
|
|
|
|
|
//设置进缓存
|
|
|
|
|
CacheManager.putCache(date,new Cache(date,userVo,TOKEN_EXPIRE_TIME));
|
|
|
|
|
ActionScopeUtils.setSessionAttribute("CURRENT_USER",userVo,Integer.valueOf(String.valueOf(TOKEN_EXPIRE_TIME))/1000);
|
|
|
|
|
// UserVo userVo1 =new UserVo();
|
|
|
|
|
//// userVo1.setUserName("admin");
|
|
|
|
|
//// userVo1.setPassWord("123456");
|
|
|
|
|
//// CloseableHttpClient httpClient = HttpClientBuilder.create().build();
|
|
|
|
|
//// // 创建Post请求
|
|
|
|
|
//// HttpPost httpPost = new HttpPost(EMRRECORD_URLHEAD+"/login");
|
|
|
|
|
//// String jsonString = JSON.toJSONString(userVo1);
|
|
|
|
|
//// StringEntity entity = new StringEntity(jsonString, "UTF-8");
|
|
|
|
|
//// // post请求是将参数放在请求体里面传过去的;这里将entity放入post请求体中
|
|
|
|
|
//// httpPost.setEntity(entity);
|
|
|
|
|
//// httpPost.setHeader("Content-Type", "application/json;charset=utf8");
|
|
|
|
|
//// // 响应模型
|
|
|
|
|
//// CloseableHttpResponse response = null;
|
|
|
|
|
//// HttpEntity responseEntity=null;
|
|
|
|
|
//// try {
|
|
|
|
|
//// // 由客户端执行(发送)Post请求
|
|
|
|
|
//// response = httpClient.execute(httpPost);
|
|
|
|
|
//// // 从响应模型中获取响应实体
|
|
|
|
|
//// responseEntity = response.getEntity();
|
|
|
|
|
//// System.out.println("responseEntity::::"+responseEntity);
|
|
|
|
|
//// System.out.println("响应状态为:" + response.getStatusLine());
|
|
|
|
|
//// } catch (ClientProtocolException e) {
|
|
|
|
|
//// e.printStackTrace();
|
|
|
|
|
//// } catch (IOException e) {
|
|
|
|
|
//// e.printStackTrace();
|
|
|
|
|
//// } finally {
|
|
|
|
|
//// try {
|
|
|
|
|
//// // 释放资源
|
|
|
|
|
//// if (httpClient != null) {
|
|
|
|
|
//// httpClient.close();
|
|
|
|
|
//// }
|
|
|
|
|
//// if (response != null) {
|
|
|
|
|
//// response.close();
|
|
|
|
|
//// }
|
|
|
|
|
//// } catch (IOException e) {
|
|
|
|
|
//// e.printStackTrace();
|
|
|
|
|
//// }
|
|
|
|
|
//// }
|
|
|
|
|
//// String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
//// String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
//// ActionScopeUtils.setSessionAttribute("token", token, Integer.valueOf(String.valueOf(TOKEN_EXPIRE_TIME)) / 1000);
|
|
|
|
|
//// SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
//// CacheManager.addloginUserCount(fmt.format(new Date()), userVo.getUserName());
|
|
|
|
|
//// CacheManager.addExcCount("noExc");
|
|
|
|
|
//// List<Power_Menu> list = null;
|
|
|
|
|
//// List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
//// Set<String> menus = new LinkedHashSet<>();
|
|
|
|
|
//// userVo.setRoleId(0);
|
|
|
|
|
//// if (userVo.getRoleId().equals(0) || userVo.getRoleId().equals(-100)) {
|
|
|
|
|
//// list = powerMenuService.queryAllPowerMenu(null, userVo.getRoleId());
|
|
|
|
|
//// } else {
|
|
|
|
|
//// list = powerMenuService.selectUserAndRoleMenuListPower(userVo.getUserId(), null);
|
|
|
|
|
//// }
|
|
|
|
|
//// if (null != list && !list.isEmpty()) {
|
|
|
|
|
//// for (Power_Menu powerMenu : list) {
|
|
|
|
|
//// User_Dept_Menu deptMenu = new User_Dept_Menu();
|
|
|
|
|
//// String menuUrl = powerMenu.getMenuUrl();
|
|
|
|
|
//// if (StringUtils.isNotBlank(menuUrl)) {
|
|
|
|
|
//// BeanUtils.copyProperties(powerMenu, deptMenu);
|
|
|
|
|
//// deptMenu.setMethodParent(powerMenu.getParentId());
|
|
|
|
|
//// menuList.add(deptMenu);
|
|
|
|
|
//// }
|
|
|
|
|
//// if (StringUtils.isNotBlank(powerMenu.getMethod())) {
|
|
|
|
|
//// menus.add(powerMenu.getMenuUrl());
|
|
|
|
|
//// }
|
|
|
|
|
//// }
|
|
|
|
|
//// }
|
|
|
|
|
//// userVo.setMenuList(menuList);
|
|
|
|
|
//// userVo.setMenus(menus);
|
|
|
|
|
////
|
|
|
|
|
//// //设置科室
|
|
|
|
|
////// StringBuilder powerDepts = new StringBuilder();
|
|
|
|
|
////// List<Power_Dept> powerDeptList = power_deptService.selectByPrimaryKeys(user.getDeptId());
|
|
|
|
|
////// for(int j=0;j<powerDeptList.size();j++){
|
|
|
|
|
////// if(j<powerDeptList.size()-1){
|
|
|
|
|
////// powerDepts.append(powerDeptList.get(j).getDeptName()).append(",");
|
|
|
|
|
////// }else{
|
|
|
|
|
////// powerDepts.append(powerDeptList.get(j).getDeptName());
|
|
|
|
|
////// }
|
|
|
|
|
////// }
|
|
|
|
|
//// userVo.setRemark("HIS科室");
|
|
|
|
|
////
|
|
|
|
|
//// //设置进缓存
|
|
|
|
|
//// CacheManager.putCache(date, new Cache(date, userVo, TOKEN_EXPIRE_TIME));
|
|
|
|
|
//// ActionScopeUtils.setSessionAttribute("CURRENT_USER", userVo, Integer.valueOf(String.valueOf(TOKEN_EXPIRE_TIME)) / 1000);
|
|
|
|
|
return Msg.success().add("token", token);
|
|
|
|
|
} else {
|
|
|
|
|
return Msg.fail("用户或密码不正确");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 将xml转换为Map。 支持xml标签多层嵌套,并以"."分隔多级标签(不包括根节点)。 不支持XML标签重复时的情况
|
|
|
|
|
*
|
|
|
|
@ -487,38 +656,38 @@ public class FontController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String linkHisLogin(String userName, String password) {
|
|
|
|
|
|
|
|
|
|
//创建连接工厂
|
|
|
|
|
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
|
|
|
|
|
//创建客户端
|
|
|
|
|
Object[] objects = new Object[0];
|
|
|
|
|
|
|
|
|
|
Client client = dcf.createClient("http://192.168.128.170/csp/hsb/DHC.Published.PUB0025.BS.PUB0025.CLS?WSDL=1");
|
|
|
|
|
try {
|
|
|
|
|
// //医院给的webservice地址
|
|
|
|
|
// String url = "http://192.168.128.170/csp/hsb/DHC.Published.PUB0025.BS.PUB0025.CLS?WSDL=1";
|
|
|
|
|
// client = dcf.createClient(url);
|
|
|
|
|
//动态调用getInfosByUserId方法
|
|
|
|
|
//获取请求参数xml字符串
|
|
|
|
|
String xmlStr = getXml(userName,password);
|
|
|
|
|
objects = client.invoke("HIPManagerInfo","S0110", xmlStr);
|
|
|
|
|
//应答信息
|
|
|
|
|
String result = objects[0].toString();
|
|
|
|
|
System.out.println(result);
|
|
|
|
|
//新用户存到数据库
|
|
|
|
|
if (result.contains("成功")) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
} finally {
|
|
|
|
|
if(null != client) {
|
|
|
|
|
client.destroy();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
// private String linkHisLogin(String userName, String password) {
|
|
|
|
|
//
|
|
|
|
|
// //创建连接工厂
|
|
|
|
|
// JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
|
|
|
|
|
// //创建客户端
|
|
|
|
|
// Object[] objects = new Object[0];
|
|
|
|
|
//
|
|
|
|
|
// Client client = dcf.createClient("http://192.168.128.170/csp/hsb/DHC.Published.PUB0025.BS.PUB0025.CLS?WSDL=1");
|
|
|
|
|
// try {
|
|
|
|
|
//// //医院给的webservice地址
|
|
|
|
|
//// String url = "http://192.168.128.170/csp/hsb/DHC.Published.PUB0025.BS.PUB0025.CLS?WSDL=1";
|
|
|
|
|
//// client = dcf.createClient(url);
|
|
|
|
|
// //动态调用getInfosByUserId方法
|
|
|
|
|
// //获取请求参数xml字符串
|
|
|
|
|
// String xmlStr = getXml(userName,password);
|
|
|
|
|
// objects = client.invoke("HIPManagerInfo","S0110", xmlStr);
|
|
|
|
|
// //应答信息
|
|
|
|
|
// String result = objects[0].toString();
|
|
|
|
|
// System.out.println(result);
|
|
|
|
|
// //新用户存到数据库
|
|
|
|
|
// if (result.contains("成功")) {
|
|
|
|
|
// return result;
|
|
|
|
|
// }
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// } finally {
|
|
|
|
|
// if(null != client) {
|
|
|
|
|
// client.destroy();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return null;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getXml(String userName, String password) {
|
|
|
|
@ -548,7 +717,40 @@ public class FontController {
|
|
|
|
|
|
|
|
|
|
return document.asXML();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// private String setToken1(Power_UserVo userVo){
|
|
|
|
|
// String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
// String token = Base64.encode(MD5.KL(date));
|
|
|
|
|
// List<Power_Menu> list = null;
|
|
|
|
|
// List<User_Dept_Menu> menuList = new ArrayList<>();
|
|
|
|
|
// Set<String> menus = new TreeSet<>();
|
|
|
|
|
// userVo.setRoleId(0);
|
|
|
|
|
// if (userVo.getRoleId().equals(0) || userVo.getRoleId().equals(-100)) {
|
|
|
|
|
// list = powerMenuService.queryAllPowerMenu(null,userVo.getRoleId());
|
|
|
|
|
// } else {
|
|
|
|
|
// list = powerMenuService.selectUserAndRoleMenuListPower(userVo.getUserId(),null);
|
|
|
|
|
// }
|
|
|
|
|
// if(null != list && !list.isEmpty()){
|
|
|
|
|
// for (Power_Menu powerMenu : list) {
|
|
|
|
|
// User_Dept_Menu deptMenu = new User_Dept_Menu();
|
|
|
|
|
// String menuUrl = powerMenu.getMenuUrl();
|
|
|
|
|
// if (StringUtils.isNotBlank(menuUrl)) {
|
|
|
|
|
// BeanUtils.copyProperties(powerMenu, deptMenu);
|
|
|
|
|
// deptMenu.setMethodParent(powerMenu.getParentId());
|
|
|
|
|
// menuList.add(deptMenu);
|
|
|
|
|
// }
|
|
|
|
|
// if (StringUtils.isNotBlank(powerMenu.getMethod())) {
|
|
|
|
|
// menus.add(powerMenu.getMenuUrl());
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// userVo.setMenuList(menuList);
|
|
|
|
|
// userVo.setMenus(menus);
|
|
|
|
|
// userVo.setRemark("HIS科室");
|
|
|
|
|
// //移除缓存
|
|
|
|
|
// CacheManager.removeCacheByObject(userVo);
|
|
|
|
|
// CacheManager.putCache(date,new Cache(date,userVo,TOKEN_EXPIRE_TIME));
|
|
|
|
|
// return token;
|
|
|
|
|
// }
|
|
|
|
|
private String setToken(Power_UserVo userVo){
|
|
|
|
|
String date = String.valueOf(DateUtils.getDate());
|
|
|
|
|
String token = Base64.encode(MD5.KL(date));
|
|
|
|
|