优化后的展示图
showRealTimeMonitorTwo.jsp
< % @ page language= "java" contentType= "text/html; charset=UTF-8"
pageEncoding= "UTF-8" % >
< ! DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
< %
String path = request. getContextPath ( ) ;
String basePath = request. getScheme ( ) + "://"
+ request. getServerName ( ) + ":" + request. getServerPort ( )
+ path + "/" ;
% >
< % @ taglib prefix= "c" uri= "http://java.sun.com/jsp/jstl/core" % >
< % @ taglib prefix= "fn" uri= "http://java.sun.com/jsp/jstl/functions" % >
< html>
< head>
< meta charset= "utf-8" / >
< meta http- equiv= "Content-Type" content= "text/html; charset=utf-8" >
< title> 实时监测< / title>
< meta http- equiv= "X-UA-Compatible" content= "IE=edge" >
< meta content= "width=device-width, initial-scale=1" name= "viewport" / >
< meta content= "" name= "description" / >
< meta content= "" name= "author" / >
< link rel= "stylesheet" type= "text/css"
href= "<%=basePath%>easyui/themes/icon.css" >
< ! -- BEGIN GLOBAL MANDATORY STYLES -- >
< link rel= "stylesheet" type= "text/css"
href= "<%=basePath%>easyui/themes/default/easyui.css" >
< link
href= "<%=basePath%>assets/global/plugins/font-awesome/css/font-awesome.min.css"
rel= "stylesheet" type= "text/css" / >
< link
href= "<%=basePath%>assets/global/plugins/simple-line-icons/simple-line-icons.min.css"
rel= "stylesheet" type= "text/css" / >
< link
href= "<%=basePath%>assets/global/plugins/bootstrap/css/bootstrap.min.css"
rel= "stylesheet" type= "text/css" / >
< link
href= "<%=basePath%>assets/global/plugins/uniform/css/uniform.default.css"
rel= "stylesheet" type= "text/css" / >
< link
< % -- href= "<%=basePath%>assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" -- % >
rel= "stylesheet"
type= "text/css" / >
< ! -- END GLOBAL MANDATORY STYLES -- >
< ! -- BEGIN THEME GLOBAL STYLES -- >
< link href= "<%=basePath%>assets/global/css/components.min.css"
rel= "stylesheet" id= "style_components" type= "text/css" / >
< link href= "<%=basePath%>assets/global/css/plugins.min.css"
rel= "stylesheet" type= "text/css" / >
< ! -- END THEME GLOBAL STYLES -- >
< ! -- BEGIN PAGE LEVEL STYLES -- >
< link href= "<%=basePath%>assets/apps/css/inbox.min.css" rel= "stylesheet"
type= "text/css" / >
< ! -- END PAGE LEVEL STYLES -- >
< ! -- BEGIN THEME LAYOUT STYLES -- >
< link href= "<%=basePath%>assets/layouts/layout4/css/layout.min.css"
rel= "stylesheet" type= "text/css" / >
< link
href= "<%=basePath%>assets/layouts/layout4/css/themes/light.min.css"
rel= "stylesheet" type= "text/css" id= "style_color" / >
< link href= "<%=basePath%>assets/layouts/layout4/css/custom.min.css"
rel= "stylesheet" type= "text/css" / >
< ! -- END THEME LAYOUT STYLES -- >
< link rel= "shortcut icon" href= "favicon.ico" / >
< ! -- END HEAD -- >
< ! -- BEGIN PAGE LEVEL PLUGINS -- >
< ! -- 表格的样式信息lxy -- >
< link rel= "stylesheet"
href= "<%=basePath%>css/bootstrap/bootstrap-table.min.css" / >
< ! -- 图标和默认样式-- >
< ! -- < link rel= "stylesheet" type= "text/css" href= "http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css" > -- >
< ! -- < link rel= "stylesheet" type= "text/css" href= "http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css" > -- >
< ! -- 核心样式-- >
< link href= "<%=basePath%>css/ySelect.css" rel= "stylesheet"
type= "text/css" >
< script src= "<%=basePath%>js/jquery-1.11.3.min.js" > < / script>
< script src= "<%=basePath%>js/bootstrap.min.js" > < / script>
< script src= "<%=basePath%>js/ySelect.js" > < / script>
< link rel= "stylesheet" type= "text/css"
href= "<%=basePath%>easyui/themes/default/easyui.css" >
< % -- < script src= "<%=basePath%>easyui/jquery.easyui.min.js" > < / script> -- % >
< link type= "text/css" rel= "stylesheet"
href= "<%=basePath%>jeDate/skin/jedate.css" >
< script type= "text/javascript" src= "<%=basePath%>jeDate/src/jedate.js" > < / script>
< script src= "<%=basePath%>js/bootstrap/center-loader.js" > < / script>
< script src= "<%=basePath%>js/bootstrap/bootstrap-table.min.js" > < / script>
< script src= "<%=basePath%>js/bootstrap/bootstrap-table-zh-CN.min.js" > < / script>
< / head>
< style>
* {
font- family: "微软雅黑" ;
font- size: 16 px;
letter- spacing: 2 px;
}
< / style>
< style>
{
color: #fff;
border- color: #b1b0b0;
background: #b1b0b0;
border: none;
}
. start {
cursor: pointer;
}
. end {
cursor: pointer;
color: #fff;
background: #b1b0b0;
border: none;
font- family: "微软雅黑" ;
font- size: 20 px;
letter- spacing: 2 px;
}
< / style>
< body>
< div class = "page-content" >
< div class = "row" >
< div class = "col-md-12" >
< div class = "row clearfix" style= "font-size: 20px; margin-left: 5px" >
< input type= "hidden" value= "${list[0].MT_FID}" id= "mtfidCount" >
< c: forEach items= "${list }" var = "list" varStatus= "status" >
< button type= "button" class = "flag ${list.MT_DELFLAG}"
onclick= "dj(this,'${list.MT_FID}');"
id= "searchBtn${status.index+1}" > ${ list. MT_NAME } < / button>
< / c: forEach>
< / div>
< div class = "tabbable-line" id= "mteSta"
style= "font-size: 20px; margin-left: 5px" > < / div>
< / div>
< div class = "tab-pane fade active in" id= "tab_1_1"
style= "margin-top: 10px;" >
< div class = "row" >
< div class = "col-md-12" >
< div class = "portlet light bordered" style= "height: 714px" >
< div class = "nav nav-tabs" style= "font-size: 18px;"
id= "levelDispla" > < / div>
< div class = "table-scrollable table-responsive" >
< input type= "hidden" id= "mofid" > < input type= "hidden"
id= "typeInfo" > < input type= "hidden" id= "mofirstid"
value= "" > < input type= "hidden" id= "typeInfoCount" >
< table id= "init"
class = "table table-striped table-bordered table-hover table-checkable order-column table text-nowrap" >
< / table>
< / div>
< / div>
< / div>
< / div>
< / div>
< / div>
< / div>
< script type= "text/javascript" >
function dj ( dom, mtfid) {
var collection = $ ( ".flag" ) ;
$. each ( collection, function ( ) {
$ ( this ) . removeClass ( "end" ) ;
$ ( this ) . addClass ( "start" ) ;
} ) ;
$ ( dom) . removeClass ( "start" ) ;
$ ( dom) . addClass ( "end" ) ;
if ( mtfid!= null && mtfid. length> 0 ) {
$ ( '#mteSta' ) . html ( "" ) ;
$. ajax ( {
type: "POST" ,
url: "<%=basePath%>realTimeMonitorTwo/mtTypeInfo.te" ,
dataType: "json" ,
data : { mtfid: mtfid} ,
success: function ( data) {
if ( data. mteList!= null ) {
var mteStaInfo = "" ;
mteStaInfo += "<ul class='nav nav-tabs' style='display: block;'>" ;
var oneShowInfo = "" ;
for ( var i = 0 ; i < data. mteList. length; i++ ) {
var mtfid = "'" + data. mteList[ i] . mt_FID+ "'" ;
if ( i== 0 ) {
oneShowInfo = data. mteList[ i] . mt_FID;
mteStaInfo += "<li class='active'>"
} else {
mteStaInfo += "<li>" ;
}
mteStaInfo += "<a data-toggle='tab' style='font-size: 16px;' οnclick=\"level(" + mtfid+ ")\" >" + data. mteList[ i] . mt_NAME+ "</a>" ;
mteStaInfo += "</li>" ;
}
mteStaInfo += "</ul>" ;
$ ( "#mteSta" ) . append ( mteStaInfo) ;
level ( oneShowInfo) ;
}
}
} ) ;
}
}
function level ( mtfidCount) {
if ( mtfidCount!= null && mtfidCount. length> 0 ) {
$ ( '#levelDispla' ) . html ( "" ) ;
$. ajax ( {
type: "POST" ,
url: "<%=basePath%>realTimeMonitorTwo/mtTypeInfo.te" ,
dataType: "json" ,
data : { mtfid: mtfidCount} ,
success: function ( data) {
if ( data. mteList!= null && data. mteList. length> 0 ) {
var mteStaInfo = "" ;
mteStaInfo += "<ul class='nav nav-tabs' style='margin-left: 13px;'>"
var mtCo = "" ;
for ( var i = 0 ; i < data. mteList. length; i++ ) {
var mtfid = "'" + data. mteList[ i] . mt_FID+ "'" ;
if ( i== 0 ) {
mtCo = data. mteList[ i] . mt_FID;
mteStaInfo += "<li class='active'>"
} else {
mteStaInfo += "<li>" ;
}
mteStaInfo += "<a data-toggle='tab' lang='0' οnclick=\"getColumns(" + mtfid+ ",3)\" >" + data. mteList[ i] . mt_NAME+ "</a>" ;
mteStaInfo += "</li>" ;
}
mteStaInfo += "</ul>"
$ ( "#levelDispla" ) . append ( mteStaInfo) ;
getColumns ( mtCo, 3 ) ;
} else {
getColumns ( mtfidCount, 2 ) ;
}
}
} ) ;
}
}
function getColumns ( mtfid, type) {
$ ( "#typeInfoCount" ) . val ( type) ;
$ ( 'body' ) . loader ( 'show' , '<img src="<%=basePath%>images/loading1.gif">' ) ;
$. ajax ( {
type: "POST" ,
url : "<%=basePath%>realTimeMonitorTwo/initDataAnaly.te" ,
dataType : "json" ,
data : { mtfid: mtfid} ,
success: function ( res) {
$ ( '#init' ) . bootstrapTable ( 'destroy' ) ;
$ ( "#typeInfo" ) . val ( mtfid) ;
var returnValue = res. returnValue
ouclosdf = [
{
field: 'rownum_' ,
title: '序号' ,
valign: 'middle' ,
align: 'center' ,
formatter: function ( value, row, index) {
var pageSize= $ ( '#init' ) . bootstrapTable ( 'getOptions' ) . pageSize;
var pageNumber= $ ( '#init' ) . bootstrapTable ( 'getOptions' ) . pageNumber;
return pageSize * ( pageNumber - 1 ) + index + 1 ;
}
} ,
{
field: 'mi_FID' ,
title: '测点' ,
valign: 'middle' ,
align: 'center' ,
} ,
{
field: 'rh_EM_FID' ,
title: '设备编号' ,
valign: 'middle' ,
align: 'center' ,
} ,
{
field: 'rsm_FIRST_TYPE' ,
title: '设备类型' ,
valign: 'middle' ,
align: 'center' ,
} ,
{
field: 'rh_EI_MODEL' ,
title: '设备型号' ,
valign: 'middle' ,
align: 'center' ,
}
]
$. each ( returnValue, function ( i, item) {
ouclosdf. push ( {
field: item. sdd_DICTIONARY_REMARK,
title: item. sdd_DICTIONARY_CNAME,
valign: 'middle' ,
align: 'center'
} )
} ) ;
$ ( '#init' ) . bootstrapTable ( {
method: 'get' ,
contentType: "application/x-www-form-urlencoded" ,
url : '<%=basePath%>realTimeMonitorTwo/initRealTimeMonitorTwo.te' ,
cache : false ,
pagination : true ,
paginationHAlign : 'right' ,
queryParamsType : '' ,
queryParams : queryParams1,
singleSelect : false ,
pageSize : 10 ,
pageList : [ 10 , 20 , 30 ] ,
search : false ,
showColumns : false ,
sidePagination : "server" ,
striped : true ,
clickToSelect : true ,
showExport : false ,
buttonsAlign : "right" ,
exportTypes : [ 'excel' ] ,
Icons : 'glyphicon-export' ,
uniqueId : 'rownum_' ,
columns : ouclosdf,
} ) ;
$ ( 'body' ) . loader ( 'hide' ) ;
}
} ) ;
}
function queryParams1 ( params) {
var typeInfo = $ ( "#typeInfo" ) . val ( ) ;
var typeInfoCount = $ ( "#typeInfoCount" ) . val ( ) ;
var erji = "" ;
var xiaji = "" ;
if ( typeInfoCount == '2' ) {
erji = typeInfo;
} else {
xiaji = typeInfo;
}
var temp = {
RSM_FIRST_TYPE : erji,
RSM_SECOND_TYPE : xiaji,
pageSize : params. pageSize,
pageNumber : params. pageNumber,
} ;
return temp;
}
$ ( function ( ) {
var mtfidCount = $ ( "#mtfidCount" ) . val ( ) ;
dj ( null , mtfidCount) ;
var collection = $ ( ".flag" ) ;
$. each ( collection, function ( ) {
$ ( this ) . addClass ( "start" ) ;
$ ( "#searchBtn1" ) . removeClass ( "start" ) ;
$ ( "#searchBtn1" ) . addClass ( "end" ) ;
} ) ;
} ) ;
< / script>
< / body>
< / html>
RealTimeMonitorControllerTwo.java
package enytek. com. cn. controller. realTimeMonitor;
import java. math. BigDecimal;
import java. text. SimpleDateFormat;
import java. util. ArrayList;
import java. util. Arrays;
import java. util. Calendar;
import java. util. Date;
import java. util. HashMap;
import java. util. List;
import java. util. Map;
import javax. servlet. http. HttpSession;
import org. springframework. beans. factory. annotation. Autowired;
import org. springframework. stereotype. Controller;
import org. springframework. ui. Model;
import org. springframework. web. bind. annotation. RequestMapping;
import org. springframework. web. bind. annotation. RequestParam;
import org. springframework. web. bind. annotation. ResponseBody;
import enytek. com. cn. annotation. LogRecord;
import enytek. com. cn. exception. dealwithallex. RealInsertLog;
import enytek. com. cn. model. dataAnalysis. DataAnalysisEntity;
import enytek. com. cn. model. equipmentInfo. EquipmentInfoEntity;
import enytek. com. cn. model. functionbuttoninfo. FunctionButtonInfoModel;
import enytek. com. cn. model. holdingcopany. HoldingCompanyModel;
import enytek. com. cn. model. ltemType. ItemTypeEntity;
import enytek. com. cn. model. menuinfo. MenuInfoModel;
import enytek. com. cn. model. monitorType. MonitorTypeEntity;
import enytek. com. cn. model. realTimeMonitor. RealTimeMonitorEntity;
import enytek. com. cn. model. sysDataDictionary. SysDataDictionayModel;
import enytek. com. cn. model. termMeasurePoinks. TermMeasurePoinksEntity;
import enytek. com. cn. model. termWorkPoinks. TermWorkPoinks;
import enytek. com. cn. model. userInfo. UserInfoEntity;
import enytek. com. cn. service. Userinfo. UserInfoService;
import enytek. com. cn. service. dataAnalysis. DataAnalysisService;
import enytek. com. cn. service. equipmentInfo. EquipmentInfoService;
import enytek. com. cn. service. ltemType. ItemTypeService;
import enytek. com. cn. service. monitorType. MonitorTypeService;
import enytek. com. cn. service. realTimeMonitor. RealTimeMonitorService;
import enytek. com. cn. service. sysDataDictionary. SysDataDictionaryService;
import enytek. com. cn. service. warning. DataWarningService;
import enytek. com. cn. util. CommonUtil;
import enytek. com. cn. util. LogType;
import enytek. com. cn. util. echecomap. EhcacheMapUtil;
import enytek. com. cn. util. userlimit. AllLimitUtil;
@Controller
@RequestMapping ( "realTimeMonitorTwo" )
public class RealTimeMonitorControllerTwo {
@Autowired
private RealTimeMonitorService realTimeMonitorService;
@Autowired
private UserInfoService userInfoService;
@Autowired
private MonitorTypeService monitorTypeService;
@Autowired
private DataAnalysisService dataAnalysisService;
@Autowired
private ItemTypeService itemTypeService;
@Autowired
private EquipmentInfoService equipmentInfoService;
@Autowired
private DataWarningService dataWarningService;
@Autowired
private SysDataDictionaryService sysDataDictionaryService;
@RequestMapping ( "mtTypeInfo" )
@ResponseBody
public Map< String, Object> mtTypeInfo ( HttpSession session, Model model, String mtfid) {
Map< String, Object> map = new HashMap < > ( ) ;
MonitorTypeEntity mte = new MonitorTypeEntity ( ) ;
mte. setMT_SUPERIOR ( mtfid) ;
List< MonitorTypeEntity> mteList = monitorTypeService. findTreeMonTypeINfo ( mte) ;
map. put ( "mteList" , mteList) ;
return map;
}
@RequestMapping ( "initDataAnaly" )
@ResponseBody
public Map< String, Object> initDataAnaly ( String mtfid, HttpSession session) throws Exception{
Map< String, Object> result = new HashMap < String, Object> ( ) ;
SysDataDictionayModel sysData = new SysDataDictionayModel ( ) ;
sysData. setSDD_DICTIONARY ( "1233" ) ;
sysData. setSDD_DICTIONARY_CODE ( mtfid) ;
List< SysDataDictionayModel> sysDataList = sysDataDictionaryService. findDicInfo ( sysData) ;
result. put ( "returnValue" , sysDataList) ;
return result;
}
@RequestMapping ( "shownoChangeFidInfoTwo" )
public String shownoChangeFidInfo ( HttpSession session, String noChangeFid, Model model, String auditFid) {
UserInfoEntity userInfo = ( UserInfoEntity) session. getAttribute ( "LoginUserInfo" ) ;
String[ ] aaa= { "btn blue" , "btn yellow" , "btn green" , "btn white" } ;
MonitorTypeEntity mte = new MonitorTypeEntity ( ) ;
mte. setMT_GRADE_TYPE ( "0" ) ;
List< MonitorTypeEntity> mteList = monitorTypeService. selectMonitorTypeInfo ( mte) ;
MonitorTypeEntity mte1 = new MonitorTypeEntity ( ) ;
List< MonitorTypeEntity> selectMonitorTypeInfo = monitorTypeService. selectMonitorTypeInfo ( mte1) ;
List< MonitorTypeEntity> allMteList = AllLimitUtil. findMonitorTypeInfo ( mteList, selectMonitorTypeInfo) ;
if ( allMteList!= null && allMteList. size ( ) > 0 && aaa. length>= allMteList. size ( ) ) {
for ( int i = 0 ; i < allMteList. size ( ) ; i++ ) {
allMteList. get ( i) . setMT_DELFLAG ( aaa[ i] ) ;
}
}
model. addAttribute ( "list" , allMteList) ;
Object obj = EhcacheMapUtil. getObject ( "btn" + userInfo. getUI_FID ( ) ) ;
if ( obj!= null) {
List< FunctionButtonInfoModel> tempList = ( List< FunctionButtonInfoModel> ) obj;
List< FunctionButtonInfoModel> resultList = new ArrayList < FunctionButtonInfoModel> ( ) ;
AllLimitUtil. getButtonListInfoFromFid ( noChangeFid, tempList, resultList) ;
model. addAttribute ( "allPollutantDeliveryBtn" , resultList) ;
if ( resultList!= null && resultList. size ( ) > 0 ) {
for ( int j = 0 ; j < resultList. size ( ) ; j++ ) {
List< FunctionButtonInfoModel> resultListErJi = new ArrayList < FunctionButtonInfoModel> ( ) ;
FunctionButtonInfoModel tempFunctionButtonInfoModel= resultList. get ( j) ;
String erJiFId = tempFunctionButtonInfoModel. getFBI_FID ( ) ;
AllLimitUtil. getButtonListInfoFromFid ( erJiFId, tempList, resultListErJi) ;
model. addAttribute ( "pollutantDeliverySecond" + resultList. get ( j) . getFBI_URL ( ) , resultListErJi) ;
}
}
model. addAttribute ( "auditFid" , auditFid) ;
} else {
return "permissionDenied" ;
}
return "realTimeMonitor/showRealTimeMonitorTwo" ;
}
@RequestMapping ( "initRealTimeMonitorTwo" )
@ResponseBody
public Map< String, Object> initRealTimeMonitor ( RealTimeMonitorEntity realTimeMonitor, DataAnalysisEntity DataAnalysis, HttpSession session, @RequestParam Integer pageSize, @RequestParam Integer pageNumber, Model model) throws Exception{
UserInfoEntity userInfo = ( UserInfoEntity) session. getAttribute ( "LoginUserInfo" ) ;
Map< String, Object> result = new HashMap < String, Object> ( ) ;
MenuInfoModel menuInfo = ( MenuInfoModel) session. getAttribute ( "LtInfo" ) ;
String projeceEquipFid = menuInfo. getProjeceEquipFid ( ) ;
if ( projeceEquipFid != null && projeceEquipFid. length ( ) > 0 ) {
List< String> list_num2 = Arrays. asList ( projeceEquipFid. split ( "," ) ) ;
if ( realTimeMonitor. getRSM_EM_FID ( ) == null || realTimeMonitor. getRSM_EM_FID ( ) == "" ) {
realTimeMonitor. setEI_NUMBER_List ( CommonUtil. getString ( "RSM_EM_FID" , userInfo. getCompanyList ( ) ) ) ;
}
List< EquipmentInfoEntity> equipmentList = dataAnalysisService. equipmentList ( DataAnalysis) ;
List< String> list_num1 = new ArrayList < String> ( ) ;
for ( int i = 0 ; i < equipmentList. size ( ) ; i++ ) {
list_num1. add ( equipmentList. get ( i) . getEMI_FID ( ) ) ;
}
List< String> list_num = new ArrayList < > ( ) ;
for ( int i = 0 ; i < list_num2. size ( ) ; i++ ) {
if ( list_num1. contains ( list_num2. get ( i) ) ) {
list_num. add ( list_num2. get ( i) ) ;
}
}
if ( list_num. size ( ) > 0 ) {
String string = CommonUtil. getString ( "RSM_EM_FID" , list_num) ;
realTimeMonitor. setEI_NUMBER_List ( string) ;
List< RealTimeMonitorEntity> selectRealTimeMonitorPaging = realTimeMonitorService. selectRealTimeMonitorPaging ( realTimeMonitor, pageNumber, pageSize) ;
for ( int i = 0 ; i < selectRealTimeMonitorPaging. size ( ) ; i++ ) {
if ( selectRealTimeMonitorPaging. get ( i) . getRSM_PRESENT ( ) != null && ! "" . equals ( selectRealTimeMonitorPaging. get ( i) . getRSM_PRESENT ( ) ) ) {
RealTimeMonitorEntity realTimeMonitorEntity = selectRealTimeMonitorPaging. get ( i) ;
BigDecimal RSM_PRESENT = new BigDecimal ( realTimeMonitorEntity. getRSM_PRESENT ( ) ) ;
BigDecimal RSM_FIRST_VALUE = new BigDecimal ( realTimeMonitorEntity. getRSM_FIRST_VALUE ( ) ) ;
double RSM_RELATIVE = RSM_PRESENT. subtract ( RSM_FIRST_VALUE) . doubleValue ( ) ;
realTimeMonitorEntity. setRSM_RELATIVE ( String. valueOf ( RSM_RELATIVE) ) ;
realTimeMonitorEntity. setRSM_CURRENT_SOILRESSURE ( String. valueOf ( RSM_RELATIVE) ) ;
realTimeMonitorEntity. setRSM_ACCUMU ( String. valueOf ( RSM_RELATIVE) ) ;
} else {
realTimeMonitor. getRSM_RELATIVE ( ) ;
realTimeMonitor. getRSM_ACCUMU ( ) ;
}
}
Integer selectRealTimeMonitorCount = realTimeMonitorService. selectRealTimeMonitorCount ( realTimeMonitor) ;
result. put ( "total" , selectRealTimeMonitorCount) ;
result. put ( "rows" , selectRealTimeMonitorPaging) ;
} else {
result. put ( "total" , 0 ) ;
result. put ( "rows" , null) ;
}
} else {
result. put ( "total" , 0 ) ;
result. put ( "rows" , null) ;
}
return result;
}
public Map< String, Object> userEquipment ( HttpSession session, Model model) throws Exception{
UserInfoEntity userInfo = ( UserInfoEntity) session. getAttribute ( "LoginUserInfo" ) ;
Map< String, Object> result = new HashMap < String, Object> ( ) ;
EquipmentInfoEntity equipmentInfo = new EquipmentInfoEntity ( ) ;
equipmentInfo. setEMI_ESTABLISH_PEOPLE ( userInfo. getUI_FID ( ) ) ;
List< EquipmentInfoEntity> findAllUserInfo = equipmentInfoService. selectEquipInfo ( equipmentInfo) ;
if ( findAllUserInfo!= null && findAllUserInfo. size ( ) > 0 ) {
List< String> sti = new ArrayList < String> ( ) ;
for ( int j = 0 ; j < findAllUserInfo. size ( ) ; j++ ) {
sti. add ( findAllUserInfo. get ( j) . getEMI_FID ( ) ) ;
}
String companyFid = CommonUtil. getString ( "EMI_ESTABLISH_PEOPLE" , sti) ;
equipmentInfo. setEMI_ESTABLISH_PEOPLE_LIST ( companyFid) ;
} else {
equipmentInfo. setEMI_ESTABLISH_PEOPLE_LIST ( "" ) ;
}
return result;
}
}