@SuppressWarnings("unchecked")
public String listRiskList(){
String whereCondition = "where t.f_inspection_result='不正常' ";
/*查询条件*/
/*网元名称*/
String netElementName = (String) this.getParameter("q_netElementName", String.class);
if(netElementName != null && !"".equals(netElementName)){
String netElementSql = "select f_id from t_net_element t where t.f_net_element_name like '%"+netElementName.trim()+"%'";
List<Map> netElementIdList = manager.findByNativeSqlAsMap(netElementSql, null);
if(netElementIdList.size()==1) whereCondition+=" and r.f_net_element_id = "+netElementIdList.get(0).get("f_id");
if(netElementIdList.size() > 1){
whereCondition+=" and(r.f_net_element_id = "+netElementIdList.get(0).get("f_id");
for (int i = 1; i < netElementIdList.size(); i++) {
whereCondition+=" or r.f_net_element_id = "+netElementIdList.get(i).get("f_id");
}
whereCondition+=")";
}
}
/*巡检人*/
String inspectionPerson = (String) this.getParameter("q_inspectionPerson", String.class);
if(inspectionPerson != null && !"".equals(inspectionPerson)){
String userSql = "select f_id from app_user u where u.f_username like '%"+inspectionPerson.trim()+"%'";
List<Map> userIdList = manager.findByNativeSqlAsMap(userSql, null);
if(userIdList.size()==1) whereCondition+=" and r.f_user_id = "+userIdList.get(0).get("f_id");
if(userIdList.size() > 1){
whereCondition+=" and(r.f_user_id = "+userIdList.get(0).get("f_id");
for (int i = 1; i < userIdList.size(); i++) {
whereCondition+=" or r.f_user_id = "+userIdList.get(i).get("f_id");
}
whereCondition+=")";
}
}
/*巡检时间*/
String inspectionTime = (String) this.getParameter("q_inspectionTime", String.class);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(inspectionTime != null && !"".equals(inspectionTime)){
inspectionTime += " 00:00:00";
Date date1 = null;
try {
date1 = sdf.parse(inspectionTime);
whereCondition+=" and r.f_inspection_time = '"+new Timestamp(date1.getTime())+"'";
} catch (ParseException e) {
e.printStackTrace();
}
}
String sql = "SELECT t.f_inspection_record_id,r.f_inspection_time,r.f_user_id,f_net_element_id,count(*) as cnt "
+ "FROM njupt.t_inspec_record_detail t "
+ "left join t_inspection_record r on r.f_id=t.f_inspection_record_id "
+ whereCondition
+ " group by t.f_inspection_record_id";
int startIndex = pageNo * pageSize - pageSize;
riskListPagination = manager.paginateAsMapByNativeSql(sql, null, startIndex, pageSize);
return "riskList";
}
<%@page pageEncoding="UTF-8" import="java.io.*"%>
<%@include file="/common/taglibs.jsp" %>
<c:set var="riskList" value="${ riskListPagination.items}"/>
<!DOCTYPE html>
<html>
<head>
<title>风险列表</title>
<%@ include file="/common/meta_ace.jsp"%>
<link rel="stylesheet" href="${ctx}/assets_ace/css/jquery-ui.min.css"/>
</head>
<body class="no-skin">
<form action="${ ctx }/njupt/inspectionRecordDetail.action" method="post" class="form-horizontal" role="form">
<div class="main-container" id="main-container">
<!-- <div class="sidebar responsive" id="sidebar"> -->
<!-- </div> -->
<div class="main-content">
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<font color="red">${ msg}</font>
<div class="widget-box widget-color-blue">
<div class="widget-header">
<h5 class="widget-title">风险列表</h5>
<div class="widget-toolbar">
</div>
</div>
<div class="form-group">
<!----项目创建/查询的表单--->
<table >
<tr>
<td>网元名称 :</td>
<td>
<input type="text" name="q_netElementName" id="q_netElementName" value="${ param.q_netElementName}" class="input-small-z"/>
</td>
</tr>
<tr>
<td>巡检人 :</td>
<td>
<input type="text" name="q_inspectionPerson" id="q_inspectionPerson" value="${ param.q_inspectionPerson}" class="input-small-z"/>
</td>
</tr>
<tr>
<td>巡检时间 :</td>
<td>
<input type="text" name="q_inspectionTime" id="q_inspectionTime" value="${ param.q_inspectionTime}" class="input-small-z"/>
</td>
</tr>
</table>
<button name="method:listRiskList" class="btn btn-primary btn-sm" id="btn_search">查询</button>
<!----项目创建/查询的表单 ENDS--->
</div>
<div id="main">
<div class='blog_main_title' style="font-size: 15px;">
<!----项目列表的表格--->
<c:set var="pagination" value="${projectPagination}" />
<table id="sample-table-1" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>巡检人</th>
<th>巡检时间</th>
<th>网元名称</th>
<th>不正常巡检项数量</th>
</tr>
</thead>
<tbody>
<c:set var="pagination" value="${ riskListPagination}"/>
<c:set var="searchMethod" value="listRiskList"/>
<c:forEach var="risk" items="${ riskList}" varStatus="status">
<td><!-- 巡检人 -->
<nativeSql:sqlQueryForUnique sql="select f_username from app_user where f_id = ${ risk.f_user_id}" id="user"/>
${ user.f_username}
</td>
<td><!-- 巡检时间 -->
<fmt:formatDate value="${ risk.f_inspection_time}" pattern="yyyy-MM-dd"/>
</td>
<td><!-- 网元名称 -->
<nativeSql:sqlQueryForUnique sql="select f_net_element_name from t_net_element where f_id = ${ risk.f_net_element_id}" id="netElementName"/>
${ netElementName.f_net_element_name}
</td>
<td><!-- 巡检记录 -->
<a href="${ ctx}/njupt/inspectionRecord.action?method:editFormForRisk&inspectionRecord.id=${ risk.f_inspection_record_id}">${ risk.cnt}</a>
</td>
</tr>
</c:forEach>
</tbody>
<tr class="group_row">
<td colspan="100" style="border-top: 1px solid #CCCCCC;">
<%@ include file="/common/pagination_ace.jsp"%>
</td>
</tr>
</table>
<!----项目列表的表格 ENDS--->
</div>
</div>
<!-- PAGE CONTENT ENDS -->
</div>
</div>
<!-- page-content ENDS -->
</div>
<!-- main-content ENDS -->
</div>
<div class="footer">
<%@ include file="/common/footer_ace.jsp"%>
</div>
<!-- footer -->
</div>
<!-- /.main-container -->
</form>
<!-- ace scripts -->
<script src="${ ctx }/ace/js/ace-elements.min.js"></script>
<script src="${ ctx }/ace/js/ace.min.js"></script>
<script type="text/javascript">
$((function($){
$.datepicker.regional['zh-CN'] = {
clearText: '清除',
clearStatus: '清除已选日期',
closeText: '关闭',
closeStatus: '不改变当前选择',
prevText: '上月',
prevStatus: '显示上月',
prevBigText: '<<',
prevBigStatus: '显示上一年',
nextText: '下月',
nextStatus: '显示下月',
nextBigText: '>>',
nextBigStatus: '显示下一年',
currentText: '今天',
currentStatus: '显示本月',
monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'],
monthNamesShort: ['一','二','三','四','五','六', '七','八','九','十','十一','十二'],
monthStatus: '选择月份',
yearStatus: '选择年份',
weekHeader: '周',
weekStatus: '年内周次',
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesMin: ['日','一','二','三','四','五','六'],
dayStatus: '设置 DD 为一周起始',
dateStatus: '选择 m月 d日, DD',
dateFormat: 'yy-mm-dd',
firstDay: 1,
initStatus: '请选择日期',
isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
})(jQuery));
jQuery(function($) {
$( "#q_inspectionTime" ).datepicker({
dateFormat:'yy-mm-dd',
showOtherMonths: true,
selectOtherMonths: true,
changeMonth: true,
changeYear: true
});
})
</script>
</body>
</html>
分享到:
相关推荐
qtz40塔式起重机总体及塔身有限元分析法设计().zip
Elasticsearch是一个基于Lucene的搜索服务器
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
美国纽约HVAC(暖通空调)数据示例,谷歌地图数据包括:时间戳、名称、类别、地址、描述、开放网站、电话号码、开放时间、更新开放时间、评论计数、评级、主图像、评论、url、纬度、经度、地点id、国家等。 在地理位置服务(LBS)中,谷歌地图数据采集尤其受到关注,因为它提供了关于各种商业实体的详尽信息,这对于消费者和企业都有极大的价值。本篇文章将详细介绍美国纽约地区的HVAC(暖通空调)系统相关数据示例,此示例数据是通过谷歌地图抓取得到的,展示了此技术在商业和消费者领域的应用潜力。 无需外网,无需任何软件抓取谷歌地图数据:wmhuoke.com
2023-04-06-项目笔记-第四百五十五阶段-课前小分享_小分享1.坚持提交gitee 小分享2.作业中提交代码 小分享3.写代码注意代码风格 4.3.1变量的使用 4.4变量的作用域与生命周期 4.4.1局部变量的作用域 4.4.2全局变量的作用域 4.4.2.1全局变量的作用域_1 4.4.2.453局变量的作用域_453- 2025-04-01
1_实验三 扰码、卷积编码及交织.ppt
北京交通大学901软件工程导论必备知识点.pdf
内容概要:本文档总结了 MyBatis 的常见面试题,涵盖了 MyBatis 的基本概念、优缺点、适用场合、SQL 语句编写技巧、分页机制、主键生成、参数传递方式、动态 SQL、缓存机制、关联查询及接口绑定等内容。通过对这些问题的解答,帮助开发者深入理解 MyBatis 的工作原理及其在实际项目中的应用。文档不仅介绍了 MyBatis 的核心功能,还详细解释了其在不同场景下的具体实现方法,如通过 XML 或注解配置 SQL 语句、处理复杂查询、优化性能等。 适合人群:具备一定 Java 开发经验,尤其是对 MyBatis 有初步了解的研发人员,以及希望深入了解 MyBatis 框架原理和最佳实践的开发人员。 使用场景及目标:①理解 MyBatis 的核心概念和工作原理,如 SQL 映射、参数传递、结果映射等;②掌握 MyBatis 在实际项目中的应用技巧,包括 SQL 编写、分页、主键生成、关联查询等;③学习如何通过 XML 和注解配置 SQL 语句,优化 MyBatis 性能,解决实际开发中的问题。 其他说明:文档内容详尽,涵盖面广,适合用于面试准备和技术学习。建议读者在学习过程中结合实际项目进行练习,以更好地掌握 MyBatis 的使用方法和技巧。此外,文档还提供了丰富的示例代码和配置细节,帮助读者加深理解和应用。
《基于YOLOv8的智能电网设备锈蚀评估系统》(包含源码、可视化界面、完整数据集、部署教程)简单部署即可运行。功能完善、操作简单,适合毕设或课程设计
插头模具 CAD图纸.zip
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
《基于YOLOv8的智慧农业水肥一体化控制系统》(包含源码、可视化界面、完整数据集、部署教程)简单部署即可运行。功能完善、操作简单,适合毕设或课程设计
python爬虫;智能切换策略,反爬检测机制
台区终端电科院送检文档
e235d-main.zip
丁祖昱:疫情对中国房地产市场影响分析及未来展望
MCP快速入门实战,详细的实战教程
YD5141SYZ后压缩式垃圾车的上装箱体设计.zip
IMG_20250401_195352.jpg
DeepSeek系列专题 DeepSeek技术溯源及前沿探索.pdf