优化展示

优化后的展示图

在这里插入图片描述

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: 16px;
	letter-spacing: 2px;
}
</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: 20px;
	letter-spacing: 2px;
}
</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'>"+data.mteList[i].mt_NAME+"</a>";
   	    				 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;
			                //返回序号,注意index是从0开始的,所以要加上1
			                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'
	                 })
	              });
	 			//4.把后台的数据push进初始化好的column 中
	             $('#init').bootstrapTable({
	            	method: 'get',
	                contentType: "application/x-www-form-urlencoded",
	             	url : '<%=basePath%>realTimeMonitorTwo/initRealTimeMonitorTwo.te',
							cache : false,
							pagination : true,
							paginationHAlign : 'right',
							queryParamsType : '', //默认值为 'limit' ,在默认情况下 传给服务端的参数为:offset,limit,sort
							// 设置为 ''  在这种情况下传给服务器的参数为:pageSize,pageNumber
							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);
		
//		List<MonitorTypeEntity> monitorList = dataAnalysisService.monitorList();
//		model.addAttribute("monitorList", monitorList);
		//下拉列表服务企业名称
		Object obj = EhcacheMapUtil.getObject("btn"+userInfo.getUI_FID());
		if(obj!=null){
			List<FunctionButtonInfoModel> tempList = (List<FunctionButtonInfoModel>)obj;
			//获取一级按钮的信息start
			List<FunctionButtonInfoModel> resultList = new ArrayList<FunctionButtonInfoModel>();
			AllLimitUtil.getButtonListInfoFromFid(noChangeFid, tempList, resultList);
			model.addAttribute("allPollutantDeliveryBtn",resultList);
			//获取一级按钮的信息end
			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";
	}
	
	
	/**
	 * 查询及分页
	 * @throws Exception 
	 * initRealTimeMonitor
	 */
	@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(","));
			//  大类 的MT , 小类的 MT    根据这两个字段去 	 查询有多少设备 取到设备标号
			//  通过设备编号查询  实时数据表中的数据 。 返回到页面   转义
			
//			String fid =realTimeMonitor.getRSM_FID();
//			if (fid!=null && fid.length()>0) {
//				List<String> fidList = Arrays.asList(fid.split(","));
//				realTimeMonitor.setRSM_FID(CommonUtil.getString("",fidList));
//			}
			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,in查询shaix
				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);//设备编号list
				realTimeMonitor.setEI_NUMBER_List(string);
				//获取历史数据表名list
//				List<String> list = new ArrayList<>();
//				list.add("REAL_TIME_MONITOR");
//				DataAnalysis.setList(list);
//				String randomNum = CommonUtil.getRandomNum("RSM");//自动生成FID
//				realTimeMonitor.setRSM_FID(randomNum);
//				realTimeMonitor.setRSM_ESTABLISH_PEOPLE(userInfo.getUI_FID());
				
				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;
	}
	
	/**
	 * 创建用户下面有多少设备
	 * @param session
	 * @param model
	 * @return
	 * @throws Exception
	 */
	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;
	}
	
	
	
//	public realTimeMonitorInfo(){
//		
//	}
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于YOLOv9实现工业布匹缺陷(破洞、污渍)检测系统python源码+详细运行教程+训练好的模型+评估 【使用教程】 一、环境配置 1、建议下载anaconda和pycharm 在anaconda中配置好环境,然后直接导入到pycharm中,在pycharm中运行项目 anaconda和pycharm安装及环境配置参考网上博客,有很多博主介绍 2、在anacodna中安装requirements.txt中的软件包 命令为:pip install -r requirements.txt 或者改成清华源后再执行以上命令,这样安装要快一些 软件包都安装成功后才算成功 3、安装好软件包后,把anaconda中对应的python导入到pycharm中即可(不难,参考网上博客) 二、环境配置好后,开始训练(也可以训练自己数据集) 1、数据集准备 需要准备yolo格式的目标检测数据集,如果不清楚yolo数据集格式,或者有其他数据训练需求,请看博主yolo格式各种数据集集合链接:https://blog.csdn.net/DeepLearning_/article/details/127276492 里面涵盖了上百种yolo数据集,且在不断更新,基本都是实际项目使用。来自于网上收集、实际场景采集制作等,自己使用labelimg标注工具标注的。数据集质量绝对有保证! 本项目所使用的数据集,见csdn该资源下载页面中的介绍栏,里面有对应的下载链接,下载后可直接使用。 2、数据准备好,开始修改配置文件 参考代码中data文件夹下的banana_ripe.yaml,可以自己新建一个不同名称的yaml文件 train:训练集的图片路径 val:验证集的图片路径 names: 0: very-ripe 类别1 1: immature 类别2 2: mid-ripe 类别3 格式按照banana_ripe.yaml照葫芦画瓢就行,不需要过多参考网上的 3、修改train_dual.py中的配置参数,开始训练模型 方式一: 修改点: a.--weights参数,填入'yolov9-s.pt',博主训练的是yolov9-s,根据自己需求可自定义 b.--cfg参数,填入 models/detect/yolov9-c.yaml c.--data参数,填入data/banana_ripe.yaml,可自定义自己的yaml路径 d.--hyp参数,填入hyp.scratch-high.yaml e.--epochs参数,填入100或者200都行,根据自己的数据集可改 f.--batch-size参数,根据自己的电脑性能(显存大小)自定义修改 g.--device参数,一张显卡的话,就填0。没显卡,使用cpu训练,就填cpu h.--close-mosaic参数,填入15 以上修改好,直接pycharm中运行train_dual.py开始训练 方式二: 命令行方式,在pycharm中的终端窗口输入如下命令,可根据自己情况修改参数 官方示例:python train_dual.py --workers 8 --device 0 --batch 16 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15 训练完会在runs/train文件下生成对应的训练文件及模型,后续测试可以拿来用。 三、测试 1、训练完,测试 修改detect_dual.py中的参数 --weights,改成上面训练得到的best.pt对应的路径 --source,需要测试的数据图片存放的位置,代码中的test_imgs --conf-thres,置信度阈值,自定义修改 --iou-thres,iou阈值,自定义修改 其他默认即可 pycharm中运行detect_dual.py 在runs/detect文件夹下存放检测结果图片或者视频 【特别说明】 *项目内容完全原创,请勿对项目进行外传,或者进行违法等商业行为! 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值