|
|
|
@ -12,6 +12,7 @@ import com.emr.dao.recordLock.Emr_LockMapper;
|
|
|
|
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
|
|
|
|
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
|
|
|
|
import com.emr.dto.PatInfoEmrTypeDto;
|
|
|
|
import com.emr.dto.PatInfoEmrTypeDto;
|
|
|
|
import com.emr.entity.Power_User;
|
|
|
|
import com.emr.entity.Power_User;
|
|
|
|
|
|
|
|
import com.emr.entity.ResultUtil;
|
|
|
|
import com.emr.entity.Zd_Assort;
|
|
|
|
import com.emr.entity.Zd_Assort;
|
|
|
|
import com.emr.entity.recordType.Emr_Type;
|
|
|
|
import com.emr.entity.recordType.Emr_Type;
|
|
|
|
import com.emr.service.FontService;
|
|
|
|
import com.emr.service.FontService;
|
|
|
|
@ -655,26 +656,20 @@ public class FontController {
|
|
|
|
* @return String
|
|
|
|
* @return String
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequestMapping(value = "commomListqf", method = RequestMethod.GET)
|
|
|
|
@RequestMapping(value = "commomListqf", method = RequestMethod.GET)
|
|
|
|
public String commomListqf(Model model, HttpServletRequest request,
|
|
|
|
public ResultUtil commomListqf(Model model, HttpServletRequest request,
|
|
|
|
@RequestParam(value="hemodialysisId",required = false) String hemodialysisId,
|
|
|
|
@RequestParam(value="hemodialysisId",required = false) String hemodialysisId,
|
|
|
|
@RequestParam(value="admissId",required = false) String admissId,
|
|
|
|
@RequestParam(value="admissId",required = false) String admissId,
|
|
|
|
@RequestParam(value="outpatientNo",required = false) String outpatientNo) {
|
|
|
|
@RequestParam(value="outpatientNo",required = false) String outpatientNo) {
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("开始跳转接口准备鉴权。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String userName = request.getParameter("userName");
|
|
|
|
String userName = request.getParameter("userName");
|
|
|
|
String dataSource = request.getParameter("dataSource");
|
|
|
|
String dataSource = request.getParameter("dataSource");
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("获取接口传递的参数{}--------------------------用户账号userName为:" + userName + "---------dataSource为:" + dataSource);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ObjectUtils.isEmpty(userName)){
|
|
|
|
if(ObjectUtils.isEmpty(userName)){
|
|
|
|
model.addAttribute("msg", "用户账号不能为空");
|
|
|
|
return ResultUtil.error("用户账号不能为空");
|
|
|
|
return "font/msg";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(ObjectUtils.isEmpty(dataSource)){
|
|
|
|
if(ObjectUtils.isEmpty(dataSource)){
|
|
|
|
model.addAttribute("msg", "数据源(dataSource)不能为空");
|
|
|
|
return ResultUtil.error("数据源(dataSource)不能为空");
|
|
|
|
return "font/msg";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
|
Map<String,String> userParams = new HashMap<>();
|
|
|
|
Map<String,String> userParams = new HashMap<>();
|
|
|
|
@ -689,32 +684,24 @@ public class FontController {
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject userResultJson = JSONObject.parseObject(userResult);
|
|
|
|
JSONObject userResultJson = JSONObject.parseObject(userResult);
|
|
|
|
if(ObjectUtils.isEmpty(userResultJson)){
|
|
|
|
if(ObjectUtils.isEmpty(userResultJson)){
|
|
|
|
model.addAttribute("msg", "用户账号不存在");
|
|
|
|
return ResultUtil.error("用户账号不存在");
|
|
|
|
return "font/msg";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!"1".equals(userResultJson.getString("effective"))){
|
|
|
|
if(!"1".equals(userResultJson.getString("effective"))){
|
|
|
|
model.addAttribute("msg", "用户账号已设置为无效");
|
|
|
|
return ResultUtil.error("用户账号已设置为无效");
|
|
|
|
return "font/msg";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
params.put("userName", userResultJson.getString("userName"));
|
|
|
|
params.put("userName", userResultJson.getString("userName"));
|
|
|
|
params.put("userPwd", userResultJson.getString("userPwd"));
|
|
|
|
params.put("userPwd", userResultJson.getString("userPwd"));
|
|
|
|
params.put("remark", "GZINTERFACE");
|
|
|
|
params.put("remark", "GZINTERFACE");
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("开始模拟登录------------参数为:" + params);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params);
|
|
|
|
String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params);
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("模拟登录成功------------返回结果为:" + jsonObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String token = jsonObject.getString("token");
|
|
|
|
String token = jsonObject.getString("token");
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("登录成功------------token为:" + token);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!ObjectUtils.isEmpty(token)){
|
|
|
|
if(!ObjectUtils.isEmpty(token)){
|
|
|
|
this.getUserInfo(request, token, userName);
|
|
|
|
this.getUserInfo(request, token, userName);
|
|
|
|
//查询表格配置表的数据,根据配置动态显示表格字段
|
|
|
|
//查询表格配置表的数据,根据配置动态显示表格字段
|
|
|
|
Map<String,Object> tableConfigMap = commomMapper.queryTableConfig(dataSource);
|
|
|
|
/*Map<String,Object> tableConfigMap = commomMapper.queryTableConfig(dataSource);
|
|
|
|
if(!ObjectUtils.isEmpty(tableConfigMap)){
|
|
|
|
if(!ObjectUtils.isEmpty(tableConfigMap)){
|
|
|
|
//血透ID 广总血透接口的参数
|
|
|
|
//血透ID 广总血透接口的参数
|
|
|
|
model.addAttribute("hemodialysisId",hemodialysisId);
|
|
|
|
model.addAttribute("hemodialysisId",hemodialysisId);
|
|
|
|
@ -736,12 +723,11 @@ public class FontController {
|
|
|
|
request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField"));
|
|
|
|
request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField"));
|
|
|
|
//获取默认排序字段方式
|
|
|
|
//获取默认排序字段方式
|
|
|
|
request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType"));
|
|
|
|
request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType"));
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
return ResultUtil.ok(token);
|
|
|
|
return "recordManage/commomSearch/commomListqf";
|
|
|
|
//return "recordManage/commomSearch/commomListqf";
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
model.addAttribute("msg", "token获取失败");
|
|
|
|
return ResultUtil.error("token获取失败");
|
|
|
|
return "font/msg";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}catch (Exception e) {
|
|
|
|
}catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
@ -771,8 +757,6 @@ public class FontController {
|
|
|
|
Power_User powerUser = JSON.parseObject(objects[0].toString(), Power_User.class);
|
|
|
|
Power_User powerUser = JSON.parseObject(objects[0].toString(), Power_User.class);
|
|
|
|
powerUser.setUserName(userName);
|
|
|
|
powerUser.setUserName(userName);
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("调用power系统登录成功之后的用户信息为----------------------------------------------------------------" + JSONObject.toJSONString(powerUser));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置进session
|
|
|
|
//设置进session
|
|
|
|
//request.getSession().setAttribute("CURRENT_USER", powerUser);
|
|
|
|
//request.getSession().setAttribute("CURRENT_USER", powerUser);
|
|
|
|
ServletContext context = request.getServletContext();
|
|
|
|
ServletContext context = request.getServletContext();
|
|
|
|
@ -784,8 +768,6 @@ public class FontController {
|
|
|
|
//验证shiro(有shiro才此操作)
|
|
|
|
//验证shiro(有shiro才此操作)
|
|
|
|
UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456");
|
|
|
|
UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456");
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("验证shiro获取userToken为----------------------------------------------------------" + JSONObject.toJSONString(userToken));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Subject subject = SecurityUtils.getSubject();
|
|
|
|
Subject subject = SecurityUtils.getSubject();
|
|
|
|
subject.login(userToken);
|
|
|
|
subject.login(userToken);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|