feat: logger form projectname for jsp get
parent
bc5a1f6919
commit
b53657dc37
|
|
@ -123,7 +123,8 @@ public class RequestURLIOT {
|
|||
}
|
||||
|
||||
public class TaskRecord {
|
||||
public final static String TASK_RECORD_PAGE = "/page/task-record";
|
||||
public final static String TASK_RECORD_PAGE = "/iot/task_record";
|
||||
public final static String TASK_RECORD_TABLE_PAGE = "/page/task-record-table";
|
||||
}
|
||||
|
||||
public class TriggerInfo {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.lp.controller.iot;
|
||||
|
||||
import com.lp.bo.IotAlarmInfoBO;
|
||||
import com.lp.bo.IotSceneInfoBO;
|
||||
import com.lp.bo.IotTaskRecordBO;
|
||||
import com.lp.bo.UserInfoBO;
|
||||
import com.lp.common.Code;
|
||||
|
|
@ -15,33 +16,59 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Controller
|
||||
public class IotTaskRecordController extends BaseController {
|
||||
|
||||
/**
|
||||
* 检索
|
||||
* @param response
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.POST, value = RequestURLIOT.TaskRecord.TASK_RECORD_PAGE)
|
||||
public ModelAndView selectPage(HttpServletResponse response,
|
||||
@RequestHeader(value = ResultMapUtils.USER_KEY, required = true) String userKey ,
|
||||
@RequestBody IotTaskRecordBO obj,
|
||||
@RequestParam(required=false) Integer pageSize ,
|
||||
@RequestParam Integer paged ) {
|
||||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
obj.setUser_id(user.getId());
|
||||
resultMap = service.selectPageList("IotTaskRecord.selectPage",getPageBean(paged,pageSize), obj);
|
||||
} catch (Exception e) {
|
||||
exception(e,resultMap, obj);
|
||||
}
|
||||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
/**
|
||||
* 执行记录
|
||||
*
|
||||
* @param response
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.GET, value = RequestURLIOT.TaskRecord.TASK_RECORD_PAGE)
|
||||
public ModelAndView selectPage(HttpServletRequest req, HttpServletResponse resp) {
|
||||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
|
||||
resultMap.put("projectList", service.selectPageList("IotSceneInfo.select", getPageBean(1, 200), obj));
|
||||
|
||||
} catch (Exception e) {
|
||||
exception(e, resultMap);
|
||||
}
|
||||
return getModelAndView(resp, resultMap, "/oss/iot/task_record", "info");
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行记录 -> 表格加载
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.POST, value = RequestURLIOT.TaskRecord.TASK_RECORD_TABLE_PAGE)
|
||||
public ModelAndView selectPageTable(HttpServletResponse response,
|
||||
@RequestHeader(value = ResultMapUtils.USER_KEY, required = true) String userKey,
|
||||
@RequestBody IotTaskRecordBO obj,
|
||||
@RequestParam(required = false) Integer pageSize,
|
||||
@RequestParam Integer paged) {
|
||||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
obj.setUser_id(user.getId());
|
||||
resultMap = service.selectPageList("IotTaskRecord.selectPage", getPageBean(paged, pageSize), obj);
|
||||
|
||||
} catch (Exception e) {
|
||||
exception(e, resultMap, obj);
|
||||
}
|
||||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
'NO_DATA':<%=Code.ResponseCode.SystemCode.NO_DATA%>
|
||||
}
|
||||
</script>
|
||||
<title><%=ProConfig.PROJECT_NAME%></title>
|
||||
<title><%=ProConfig.PROJECT_NAME%></title>
|
||||
|
|
@ -26,5 +26,6 @@
|
|||
var vf = [118, 101, 114, 115, 105, 111, 110, 58, 48, 46, 51, 46, 57, 46, 49, 32, 44, 32, 231, 137, 136, 230, 157, 131, 230, 137, 128, 230, 156,
|
||||
137, 239, 188, 154, 233, 184, 191, 229, 144, 141, 231, 137, 169, 232, 129, 148, 239, 188, 155, 232, 129, 148, 231, 179, 187, 230, 150,
|
||||
185, 229, 188, 143, 239, 188, 154, 81, 81, 50, 50, 50, 52, 51, 49, 51, 56, 49, 49];
|
||||
var aa = "<%=ProConfig.PROJECT_NAME%>";
|
||||
</script>
|
||||
<title><%=ProConfig.PROJECT_NAME%></title>
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
<%@ include file="/WEB-INF/oss/iot/common/resource_lib.jsp" %>
|
||||
<link type="text/css" href="<%=basePath%>/css/oss/iot/alarm_manager.css?<%=v%>" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="<%=basePath%>/lib/tailwind/tailwind.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
|
@ -28,16 +29,12 @@
|
|||
<div class="flex flex-row flex-wrap">
|
||||
<div class="flex items-center mr-2 mb-2">
|
||||
<span>项目名称:</span>
|
||||
<%--<select type-name="scene_id" class="input input-select input-self">
|
||||
<select type-name="scene_id" class="input input-select input-self">
|
||||
<option value="">选择项目</option>
|
||||
<c:forEach items="${info.data.getData()}" varStatus="status" var="obj">
|
||||
<c:forEach items="${info.projectList.data.data}" varStatus="index" var="obj">
|
||||
<option value="${obj.id}">${obj.name }</option>
|
||||
</c:forEach>
|
||||
</select>--%>
|
||||
<select type-name="scene_id" type-option="selecter"
|
||||
config-option=" method:'POST','url':'/page/scene-all','key':'id','value':'name',
|
||||
'type':'list' ,init_value:'选择项目' "
|
||||
class="input input-select input-self"></select>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center mr-2 mb-2">
|
||||
|
|
@ -65,10 +62,9 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="init-table" class="jui-table" config-option="url:'/page/task-record',
|
||||
<div id="init-table" class="jui-table" config-option="url:'/page/task-record-table',
|
||||
param:{ start_time:'$.start_time$',end_time:'$.end_time$' },
|
||||
columns:[
|
||||
{name:'执行者','value':'call_name','width':'8%'},
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ function get_table_cb(selector,property,seq){
|
|||
}
|
||||
|
||||
// 外部调用表格(带分页)
|
||||
function out_init_table(selector,param){
|
||||
function c(selector,param){
|
||||
if(! validater.empty(param)){
|
||||
$(selector).data("params", param);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue