解决历史页面跳转问题和修改查看流程接口

master
zengwh 5 years ago
parent 729d72dc62
commit 29dae59643

@ -12,6 +12,7 @@ import com.emr.service.ipml.ZdAssortService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import com.emr.vo.ArchiveFlowInfoVo;
import com.emr.vo.User;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
@ -435,8 +436,8 @@ public class FontController {
*/
@RequestMapping("toShowFlowInfo")
@ResponseBody
public Msg toShowFlowInfo(String masterId) throws Exception{
List<ArchiveFlowInfoVo> list = archiveFlowInfoService.selectFlowInfoByMasterId(masterId);
public Msg toShowFlowInfo(String masterId, String userName) throws Exception{
List<ArchiveFlowInfoVo> list = archiveFlowInfoService.selectFlowInfoByMasterId(masterId,userName);
return Msg.success().add("list",list);
}
}

@ -13,13 +13,16 @@ import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.ipml.ArchiveFlowInfoService;
import com.emr.service.ipml.StatisticsService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
import com.emr.util.OracleConnect;
import com.emr.vo.ArchiveFlowInfoVo;
import com.emr.vo.User;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@ -46,6 +49,8 @@ public class beHospitaledController {
private ArchiveFlowRoleMapper flowRoleMapper;
@Autowired
private ArchiveFlowInfoService flowInfoService;
@Autowired
private StatisticsService statisticsService;
@RequestMapping(value = "/beHosps")
public String inHospitals(){
return "beHospitaledDir/beHospList";
@ -230,7 +235,9 @@ public class beHospitaledController {
//查询流程信息集合
List<ArchiveFlowInfoVo> list = null;
try {
list = flowInfoService.selectFlowInfoByMasterId(master.getId());
//获取登录时输入的用户名
String userName = (String) SecurityUtils.getSubject().getSession().getAttribute("userSession");
list = flowInfoService.selectFlowInfoByMasterId(master.getId(),userName);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();

@ -261,14 +261,14 @@ public class ArchiveFlowInfoService {
* @param id
* @return
*/
public List<ArchiveFlowInfoVo> selectFlowInfoByMasterId(String id) throws Exception{
public List<ArchiveFlowInfoVo> selectFlowInfoByMasterId(String id,String userNameTemp) throws Exception{
List<ArchiveFlowInfoVo> list = flowInfoMapper.selectFlowInfoByMasterId(id);
if(!CollectionUtils.isEmpty(list)) {
//获取缺陷类别列表
Emr_Fault_Type obj = new Emr_Fault_Type();
obj.setEffective(1);
List<Emr_Fault_Type> typeList = faultTypeService.selectByCol(obj);
List<User> userList = statisticsService.getUserList();
List<User> userList = statisticsService.getUserList(userNameTemp);
//替换姓名
if (!CollectionUtils.isEmpty(userList)) {
for (ArchiveFlowInfoVo infoVo : list) {

@ -204,6 +204,30 @@ public class StatisticsService {
return userList;
}
public List<User> getUserList(String userName) throws Exception{
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
List<User> userList = (List<User>)request.getSession().getAttribute("USER_LIST");
if(null == userList || userList.isEmpty()){
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
userList = JSON.parseArray(userList1,User.class);
//设置进session
request.getSession().setAttribute("USER_LIST",userList);
}
return userList;
}
/**
*
* @param recordStatistics

@ -323,7 +323,7 @@
</div>
<div class="row">
<div class="form-inline">
<div class="form-group divCss8" style="margin:0">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="title" maxlength="25"
placeholder="请输入标题">

@ -262,7 +262,7 @@
</div>
<div class="row">
<div class="form-inline">
<div class="form-group divCss8" style="margin:0">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="title" maxlength="25"
placeholder="请输入标题">

@ -62,6 +62,9 @@
padding-bottom: 0;
}
</style>
<script>
var path = "${path}";
</script>
</head>
<script type="text/javascript">
@ -81,8 +84,6 @@
}
return temp;
}
//定义是否有默认选中菜单
var faultModleSelected = false;
$(function () {
function ajaxJsonFun() {
//拥有的功能
@ -155,6 +156,8 @@
for (var j = 0; j < list.length; j++) {
if (list[i].menuId == list[j].methodParent) {
if (list[0].deptId == list[j].deptId) {
//定义是否有默认选中菜单
var faultModleSelected = false;
str = "";
/*功能值*/
for (var x = 0; x < list.length; x++) {
@ -167,15 +170,16 @@
}
if(count > list[j].methodSort){
count = list[j].methodSort;
sysUL = "/emr_medical_record" + list[j].menuUrl + "?num=" + str + "&depts=" + depts;
sysUL = path + list[j].menuUrl + "?num=" + str + "&depts=" + depts;
}
var menuALi = '';
if(i == 1 && !faultModleSelected){
menuALi = newAliFun(list[j].menuName, list[j].menuIcon, "/emr_medical_record" + list[j].menuUrl + "?num=" + str + "&depts=" + depts,true,i,j);
var menuUrl = path + list[j].menuUrl + "?num=" + str + "&depts=" + depts;
if(i == 1){
//默认选中第一个
faultModleSelected = true;
}else{
menuALi = newAliFun(list[j].menuName, list[j].menuIcon, "/emr_medical_record" + list[j].menuUrl + "?num=" + str + "&depts=" + depts,false,i,j);
defaultUrl = menuUrl;
}
menuALi = newAliFun(list[j].menuName, list[j].menuIcon, menuUrl,faultModleSelected,list[i].menuId,list[j].menuId);
menuAUL.append(menuALi);
mulLi.append(menuAUL);
}
@ -350,7 +354,7 @@
</div>
<footer class="main-footer">
<div class="pull-right">
<b>Version</b> 20200911
<b>Version</b> 20200911_1
</div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved.

@ -301,7 +301,7 @@
</div>
<div class="row">
<div class="form-inline">
<div class="form-group divCss8" style="margin:0">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="title" maxlength="25"
placeholder="请输入标题">

@ -319,7 +319,7 @@
</div>
<div class="row">
<div class="form-inline">
<div class="form-group divCss8" style="margin:0">
<div class="form-group divCss8" style="margin:10px 5px">
<label for="name">标题:</label>
<input type="text" class="input-sm form-control" id="title" maxlength="25"
placeholder="请输入标题">

@ -2,6 +2,8 @@
var sysFlag = 'emr_medical_record';
//用户id
var userId = $("#userId").val();
//默认菜单
var defaultUrl = '';
//选中菜单设置进浏览器存储
function setBrowItem(_this){
var flag = sysFlag + '_' + userId;
@ -14,16 +16,26 @@ function getBrowItem(){
//取出a标签id
var flag = sysFlag + '_' + userId;
var hisMenuId = localStorage.getItem(flag);
//选中历史菜单节点
if(hisMenuId != null && hisMenuId != ''){
var dom = $("#"+hisMenuId);
if(dom != undefined && dom != null && dom != '') {
indexSelected(dom);
//取出历史菜单地址跳转历史页面
var hisMenuUrl = localStorage.getItem(flag + "_url");
$("#iFrame1").prop("src", hisMenuUrl);
if(hisMenuId == 'undefined'){
//错误时
$("#iFrame1").prop("src", defaultUrl);
}else{
//选中历史菜单节点
if(hisMenuId != null && hisMenuId != ''){
var dom = $("#"+hisMenuId);
if(dom != undefined && dom != null && dom != '') {
indexSelected(dom);
//取出历史菜单地址跳转历史页面
var hisMenuUrl = localStorage.getItem(flag + "_url");
if(hisMenuUrl == 'undefined'){
//错误时
hisMenuUrl = $("#"+hisMenuId).prop("href");
}
$("#iFrame1").prop("src", hisMenuUrl);
}
}
}
}
//菜单选中方法
function indexSelected(_this){
@ -66,8 +78,8 @@ function newAFun(aName, iconCss,defaultModleSelected){
return newA;
}
function newAliFun(aName,iconCss,menuUrl,defaultMenuSelected,j,i){
var menuId = sysFlag + "Menu_" + j + "_" + i;
function newAliFun(aName,iconCss,menuUrl,defaultMenuSelected,parentId,menuIdTemp){
var menuId = sysFlag + "Menu_" + parentId + "_" + menuIdTemp;
var newli = $("<li></li> ");
var newicon=$("<i></i>");
var newA = '';

Loading…
Cancel
Save