Commit 56a562b4 authored by yzm's avatar yzm

dx界面完善

parent 37a7ec1c
......@@ -136,6 +136,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!--kafka依赖-->
<dependency>
<groupId>org.springframework.kafka</groupId>
......
......@@ -4,10 +4,14 @@ package com.cx.cn.cxquartz.controller;
import com.alibaba.fastjson.JSONObject;
import com.cx.cn.cxquartz.bean.QuartzTaskErrors;
import com.cx.cn.cxquartz.bean.QuartzTaskInformations;
import com.cx.cn.cxquartz.service.quartz.FtpService;
import com.cx.cn.cxquartz.service.quartz.QuartzService;
import com.cx.cn.cxquartz.service.quartz.SbtdspsrService;
import com.cx.cn.cxquartz.util.FTPUtil;
import com.cx.cn.cxquartz.util.FileTransferManager;
import com.cx.cn.cxquartz.util.ResultEnum;
import com.cx.cn.cxquartz.util.ResultUtil;
import com.cx.cn.cxquartz.vo.Ftp;
import com.cx.cn.cxquartz.vo.QuartzTaskRecordsVo;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
......@@ -46,6 +50,9 @@ public class QuartzController {
@Autowired
private RestTemplate restTemplate;
@Autowired
FtpService ftpService;
@RequestMapping(value = "/add/taskpage", method = RequestMethod.GET)
public String addTaskpage() {
return "addtask";
......@@ -55,7 +62,7 @@ public class QuartzController {
@RequestMapping(value = "/add/task", method = RequestMethod.POST)
public String addTask(QuartzTaskInformations taskInformations) {
try {
taskInformations.setSchedulerrule("*/"+taskInformations.getSchedulerrule()+" * * * * ?");
taskInformations.setSchedulerrule("*/" + taskInformations.getSchedulerrule() + " * * * * ?");
String result = quartzService.addTask(taskInformations);
return result;
} catch (Exception e) {
......@@ -67,7 +74,7 @@ public class QuartzController {
@RequestMapping(value = "/edit/taskpage", method = RequestMethod.GET)
public String editTaskpage(Model model, String id) {
QuartzTaskInformations taskInformation = quartzService.getTaskById(id);
taskInformation.setSchedulerrule(taskInformation.getSchedulerrule().replaceAll("\\?","").replaceAll("\\*","").replaceAll("\\/",""));
taskInformation.setSchedulerrule(taskInformation.getSchedulerrule().replaceAll("\\?", "").replaceAll("\\*", "").replaceAll("\\/", ""));
model.addAttribute("taskInformation", taskInformation);
return "updatetask";
}
......@@ -76,11 +83,14 @@ public class QuartzController {
@RequestMapping(value = "/edit/task", method = RequestMethod.POST)
public String editTask(QuartzTaskInformations taskInformations) {
try {
taskInformations.setSchedulerrule("*/"+taskInformations.getSchedulerrule()+" * * * * ?");
taskInformations.setSchedulerrule("*/" + taskInformations.getSchedulerrule() + " * * * * ?");
String result = quartzService.updateTask(taskInformations);
if(null!=taskInformations.getExecuteparamter() && !taskInformations.getExecuteparamter().contains("rtsp:")) {
int upresult = sbtdspsrService.updateRecogByRtsp(taskInformations.getRtsp(), taskInformations.getVideoid());
if (upresult > 0) {
logger.info("更新sbtddspsr squrllj 的值为:"+taskInformations.getExecuteparamter());
logger.info("更新sbtddspsr squrllj 的值为:" + taskInformations.getExecuteparamter());
}
}
return result;
} catch (Exception e) {
......@@ -177,33 +187,42 @@ public class QuartzController {
return "redirect:/";
}
}
@RequestMapping(value = "/getRtsp/{devicecode}", method = RequestMethod.GET)
@RequestMapping(value = "/getRtsp", method = RequestMethod.POST)
@ResponseBody
public String getRTSP(@PathVariable("devicecode") String devicecode) {
public String getRTSP(@RequestBody JSONObject devicecode) {
//判断rtsp 是否过期http://212.129.142.17:8281/gh/device/test?deviceCode=3YSCA44445TFCPX
//判断是否是rtsp 地址
String rtspValue = devicecode.getString("data");
if (!rtspValue.contains("rtsp://")) {
Map<String, String> map = new HashMap<>();
map.put("deviceCode", devicecode);
ResponseEntity<String> responseEntity = restTemplate.getForEntity(getrtspbyurl+"?deviceCode={deviceCode}", String.class, map);
map.put("deviceCode", rtspValue);
ResponseEntity<String> responseEntity = restTemplate.getForEntity(getrtspbyurl + "?deviceCode={deviceCode}", String.class, map);
JSONObject json = JSONObject.parseObject(responseEntity.getBody());
if (null != json.getString("code") && json.getString("code").equals("0")) {
//返回rtsp 地址,更新 sbtdspsr 地址
String rtspValue=String.valueOf( json.get("obj"));
rtspValue = String.valueOf(json.get("obj"));
}
}
//获得抽帧图片
Map maps = new HashMap<>();
maps.put("rtspvalue",rtspValue);
maps.put("refresh",1);
maps.put("rtspvalue", rtspValue);
maps.put("refresh", 1);
try {
ResponseEntity<String> result = restTemplate.exchange(rtspurl + "?url={rtspvalue}&refresh={refresh}",
HttpMethod.GET, null, String.class, maps);
JSONObject jsonresult = JSONObject.parseObject(result.getBody());
if (null != jsonresult.getString("ret") && jsonresult.getString("ret").equals("0")) {
if (null != jsonresult.getString("ret") && jsonresult.getString("ret").equals("0") && !"".equals(jsonresult.getString("url"))) {
//获得图片地址,存放到ftp上面
return ResultUtil.success( ResultEnum.SUCCESS.getCode(),jsonresult.getString("url")+","+json.get("obj"));
//将图片存储到ftp 上去,jsonresult.getString("url")
Ftp ftp = ftpService.reloadFtp();
String ftpfilepath=FileTransferManager.urlTransToFtp(jsonresult.getString("url"),ftp,"gstraff/picturedemo/");
return ResultUtil.success(ResultEnum.SUCCESS.getCode(), jsonresult.getString("url")+ "," + rtspValue);
}
} else {
logger.info("未获取到监控rtsp");
return ResultUtil.fail();
} catch (Exception ex) {
return ResultUtil.fail();
}
return ResultUtil.success();
}
}
......@@ -5,9 +5,11 @@ import com.cx.cn.cxquartz.bean.QuartzTaskErrors;
import com.cx.cn.cxquartz.bean.QuartzTaskInformations;
import com.cx.cn.cxquartz.service.quartz.QuartzService;
import com.cx.cn.cxquartz.service.quartz.QuartzTaskRecordsService;
import com.cx.cn.cxquartz.service.quartz.SbtdspsrService;
import com.cx.cn.cxquartz.util.ResultEnum;
import com.cx.cn.cxquartz.util.ResultUtil;
import com.cx.cn.cxquartz.vo.QuartzTaskRecordsVo;
import com.cx.cn.cxquartz.vo.Sbtdspsr;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -28,7 +30,7 @@ public class SbtdspsrController {
private static final Logger logger = LoggerFactory.getLogger(SbtdspsrController.class);
@Autowired
private QuartzService quartzService;
private SbtdspsrService sbtdspsrService;
......@@ -37,130 +39,11 @@ public class SbtdspsrController {
return "addtask";
}
@ResponseBody
@RequestMapping(value = "/add/task", method = RequestMethod.POST)
public String addTask(QuartzTaskInformations taskInformations) {
try {
String result = quartzService.addTask(taskInformations);
return result;
} catch (Exception e) {
logger.error("/add/task exception={}", e);
return ResultUtil.fail();
}
}
@RequestMapping(value = "/edit/taskpage", method = RequestMethod.GET)
public String editTaskpage(Model model, String id) {
QuartzTaskInformations taskInformation = quartzService.getTaskById(id);
model.addAttribute("taskInformation", taskInformation);
return "updatetask";
}
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
@RequestMapping(value = "/edit/task", method = RequestMethod.POST)
public String editTask(QuartzTaskInformations taskInformations) {
try {
QuartzTaskInformations resultTaskInformations= quartzService.getTaskById(taskInformations.getTaskno());
String result = quartzService.updateTask(taskInformations);
//判断corn 是否改变,改变重新生成任务
if(!resultTaskInformations.getSchedulerrule().equals(taskInformations.getSchedulerrule())) {
//重新启动,重新发布新的任务
quartzService.startJob(taskInformations.getTaskno());
}
return result;
} catch (Exception e) {
logger.error("/edit/task exception={}", e);
return ResultUtil.fail();
}
}
/**
* 启动 或者 暂定定时任务
*
* @param taskNo
* @return
*/
@ResponseBody
@RequestMapping(value = "/list/optionjob", method = RequestMethod.GET)
public String optionJob(String taskNo) {
logger.info("");
if (StringUtils.isEmpty(taskNo)) {
return ResultUtil.success(ResultEnum.PARAM_EMPTY.getCode(), ResultEnum.PARAM_EMPTY.getMessage());
}
try {
return quartzService.startJob(taskNo);
} catch (Exception e) {
logger.error("/list/optionjob exception={}", e);
return ResultUtil.fail();
}
}
public List<Sbtdspsr> list() {
return sbtdspsrService.list();
/**
* 定时任务执行情况
*
* @param taskNo
* @param model
* @return
*/
@RequestMapping(value = "/taskrecords", method = RequestMethod.GET)
public String taskRecordsPage(@RequestParam(value = "taskno", required = false) String taskNo, Model model) {
logger.info("");
try {
if (StringUtils.isEmpty(taskNo)) {
return "redirect:/";
}
List<QuartzTaskRecordsVo> quartzTaskRecords = quartzService.taskRecords(taskNo);
model.addAttribute("quartzTaskRecords", quartzTaskRecords);
} catch (Exception e) {
logger.error("");
return "redirect:/";
}
return "taskrecords";
}
/**
* 立即运行一次定时任务
*
* @param taskNo
* @param model
* @return
*/
@ResponseBody
@RequestMapping(value = "/runtask/rightnow", method = RequestMethod.GET)
public String runTaskRightNow(@RequestParam(value = "taskno", required = false) String taskNo, Model model) {
logger.info("");
try {
if (StringUtils.isEmpty(taskNo)) {
return ResultUtil.success(ResultEnum.PARAM_EMPTY.getCode(), ResultEnum.PARAM_EMPTY.getMessage());
}
return quartzService.runTaskRightNow(taskNo);
} catch (Exception e) {
logger.error("");
return ResultUtil.success(ResultEnum.FAIL.getCode(), ResultEnum.FAIL.getMessage());
}
}
/**
* 定时任务失败详情
*
* @param recordId
* @param model
* @return
*/
@RequestMapping(value = "/task/errors", method = RequestMethod.GET)
public String detailTaskErrors(@RequestParam(value = "recordid", required = false) String recordId, Model model) {
logger.info("");
try {
if (StringUtils.isEmpty(recordId)) {
return ResultUtil.success(ResultEnum.PARAM_EMPTY.getCode(), ResultEnum.PARAM_EMPTY.getMessage());
}
QuartzTaskErrors taskErrors = quartzService.detailTaskErrors(recordId);
model.addAttribute("taskErrors", taskErrors);
return "taskerrors";
} catch (Exception e) {
logger.error("");
return "redirect:/";
}
}
}
......@@ -11,7 +11,7 @@ import java.util.Map;
@Mapper
public interface SbtdspsrMapper {
List<Sbtdspsr> selectByRtsp( String rtsp);
List<Sbtdspsr> list( );
List<Map> selectRecogByRtsp(String rtsp);
int updateRecogByRtsp(Map map);
}
......@@ -9,4 +9,6 @@ public interface SbtdspsrService {
List<Sbtdspsr> selectByRtsp(String videoid);
List<Map> selectRecogByRtsp(String rtsp);
int updateRecogByRtsp(String rtsp,String devicecode);
List<Sbtdspsr> list();
}
......@@ -35,4 +35,9 @@ public class SbtdspsrImpl implements SbtdspsrService {
return sbtdspsrMapper.updateRecogByRtsp(map);
}
@Override
public List<Sbtdspsr> list() {
return sbtdspsrMapper.list();
}
}
......@@ -20,7 +20,7 @@ import java.util.concurrent.TimeUnit;
public class FileTransferManager {
private static CompletionService<TransferResult> completionService = new ExecutorCompletionService<TransferResult>(ThreadPoolUtil.getPool());
private static CompletionService<PictureResult> threadService = new ExecutorCompletionService<PictureResult>(ThreadPoolUtil.getPool());
private static CompletionService<String> threadService = new ExecutorCompletionService<String>(ThreadPoolUtil.getPool());
private static final Logger log = LoggerFactory.getLogger(ExtController.class);
/**
* @param transferRecord
......@@ -168,6 +168,36 @@ public class FileTransferManager {
}
}
public static String urlTransToFtp(String url, final Ftp ftp, final String basePath){
threadService.submit(() -> {
try {
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setReadTimeout(2000); //延迟连接
connection.setConnectTimeout(3000);
connection.setRequestMethod("GET");
if (connection.getResponseCode() == HttpURLConnection.HTTP_OK || connection.getResponseCode()==HttpURLConnection.HTTP_NOT_MODIFIED) {
InputStream inputStream = connection.getInputStream();
String pname = DateUtils.formatCurrDayNoSign() + ".jpg";
String ftputl = FTPUtil.getFtpUrl(ftp) + basePath+pname;
boolean r = FTPUtil.uploadFile(ftp, basePath, pname,inputStream);
if (r) {
return ftputl;
}
} else {
log.error("connection code: " + connection.getResponseCode());
}
} catch (IOException e) {
System.out.println(e.toString());
log.error(e.toString());
}
return url;
});
try {
return threadService.poll(10, TimeUnit.SECONDS).get();
}catch (Exception ex){
return url;
}
}
}
......@@ -16,8 +16,8 @@ public class RestTemplateConfig {
@Bean
public ClientHttpRequestFactory simpleClientHttpRequestFactory(){
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setConnectTimeout(15000);
factory.setReadTimeout(5000);
factory.setConnectTimeout(150000);
factory.setReadTimeout(150000);
return factory;
}
}
......@@ -10,11 +10,12 @@ public class ImageList {
private Long[] Roi;
private Integer RoiPadding;
// private Integer RoiPadding;
private Integer CropObjectImage;
private Integer CropObjectImagePadding;
private Integer CropObjectImageQuality;
@JSONField(name = "Roi")
public Long[] getRoi() {
return Roi;
}
......@@ -23,13 +24,13 @@ public class ImageList {
Roi = roi;
}
public Integer getRoiPadding() {
return RoiPadding;
}
public void setRoiPadding(Integer roiPadding) {
RoiPadding = roiPadding;
}
// public Integer getRoiPadding() {
// return RoiPadding;
// }
//
// public void setRoiPadding(Integer roiPadding) {
// RoiPadding = roiPadding;
// }
public Integer getCropObjectImage() {
return CropObjectImage;
......@@ -68,7 +69,7 @@ public class ImageList {
public ImageList(String imageID, Long[] roi, Integer roiPadding, Integer cropObjectImage, Integer cropObjectImagePadding, Integer cropObjectImageQuality, String data) {
ImageID = imageID;
Roi = roi;
RoiPadding = roiPadding;
// RoiPadding = roiPadding;
CropObjectImage = cropObjectImage;
CropObjectImagePadding = cropObjectImagePadding;
CropObjectImageQuality = cropObjectImageQuality;
......
......@@ -6,22 +6,22 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
public class Output {
private int SubClass;
//最大行人细类输出个数为1
@JsonIgnore
private int MaxHumanSubClassNum;
//最大车辆细类输出个数为输出全部
@JsonIgnore
private int MaxVehicleSubClassNum;
//最大骑行细类输出个数为3
@JsonIgnore
private int MaxBikeSubClassNum;
// //最大行人细类输出个数为1
// @JsonIgnore
// private int MaxHumanSubClassNum;
//
// //最大车辆细类输出个数为输出全部
// @JsonIgnore
// private int MaxVehicleSubClassNum;
// //最大骑行细类输出个数为3
// @JsonIgnore
// private int MaxBikeSubClassNum;
public Output(int subClass, int maxHumanSubClassNum, int maxVehicleSubClassNum, int maxBikeSubClassNum) {
SubClass = subClass;
MaxHumanSubClassNum = maxHumanSubClassNum;
MaxVehicleSubClassNum = maxVehicleSubClassNum;
MaxBikeSubClassNum = maxBikeSubClassNum;
// MaxHumanSubClassNum = maxHumanSubClassNum;
// MaxVehicleSubClassNum = maxVehicleSubClassNum;
// MaxBikeSubClassNum = maxBikeSubClassNum;
}
public void setSubClass(int SubClass) {
......@@ -32,31 +32,31 @@ public class Output {
public int getSubClass() {
return this.SubClass;
}
public void setMaxHumanSubClassNum(int MaxHumanSubClassNum) {
this.MaxHumanSubClassNum = MaxHumanSubClassNum;
}
@JSONField(name = "MaxHumanSubClassNum")
public int getMaxHumanSubClassNum() {
return this.MaxHumanSubClassNum;
}
public void setMaxVehicleSubClassNum(int MaxVehicleSubClassNum) {
this.MaxVehicleSubClassNum = MaxVehicleSubClassNum;
}
@JSONField(name = "MaxVehicleSubClassNum")
public int getMaxVehicleSubClassNum() {
return this.MaxVehicleSubClassNum;
}
public void setMaxBikeSubClassNum(int MaxBikeSubClassNum) {
this.MaxBikeSubClassNum = MaxBikeSubClassNum;
}
@JSONField(name = "MaxBikeSubClassNum")
public int getMaxBikeSubClassNum() {
return this.MaxBikeSubClassNum;
}
//
// public void setMaxHumanSubClassNum(int MaxHumanSubClassNum) {
// this.MaxHumanSubClassNum = MaxHumanSubClassNum;
// }
//
// @JSONField(name = "MaxHumanSubClassNum")
// public int getMaxHumanSubClassNum() {
// return this.MaxHumanSubClassNum;
// }
//
// public void setMaxVehicleSubClassNum(int MaxVehicleSubClassNum) {
// this.MaxVehicleSubClassNum = MaxVehicleSubClassNum;
// }
//
// @JSONField(name = "MaxVehicleSubClassNum")
// public int getMaxVehicleSubClassNum() {
// return this.MaxVehicleSubClassNum;
// }
//
// public void setMaxBikeSubClassNum(int MaxBikeSubClassNum) {
// this.MaxBikeSubClassNum = MaxBikeSubClassNum;
// }
//
// @JSONField(name = "MaxBikeSubClassNum")
// public int getMaxBikeSubClassNum() {
// return this.MaxBikeSubClassNum;
// }
}
......@@ -68,6 +68,16 @@ public class TraffpictureParam extends Traffpicture {
@JsonIgnore
private Integer objh;
private String metatype;
public String getMetatype() {
return metatype;
}
public void setMetatype(String metatype) {
this.metatype = metatype;
}
public Integer getObjx() {
return objx;
}
......
......@@ -38,15 +38,19 @@ spring:
enabled: true
encoding: UTF-8
mode: HTML
redis:
database: 0
host: 172.16.24.29
port: 6379
#logging:
# level:
# root:
# info
logging:
level:
com.cx.cn.cxquartz.dao:
debug
#logging:
# level:
# com.cx.cn.cxquartz.dao:
# debug
......@@ -12,3 +12,4 @@ file.rtspurl=http://172.16.24.29:8081/getrealcamerasnapshot.php
file.recogurl=http://172.16.24.29:9098/images/recog
redis.cachekey.ftplist=gs:traff:global:cache:ftplist
file.getrtspbyurl=http://212.129.142.17:8281/gh/device/test
......@@ -59,7 +59,7 @@
taskName, schedulerRule, frozenStatus,
executorNo, frozenTime, unfrozenTime,
createTime, lastModifyTime, sendType,
url, executeParamter, timeKey,objectx,objecty,pbjectw,objecth,recordtype,metatype,
url, executeParamter, timeKey,objectx,objecty,objectw,objecth,recordtype,metatype,
rtsp,imgsrc,videoid
)
values (#{id,jdbcType=BIGINT}, #{version,jdbcType=INTEGER}, #{taskno,jdbcType=VARCHAR},
......@@ -70,9 +70,10 @@
#{executeparamter,jdbcType=VARCHAR}, #{timekey,jdbcType=VARCHAR}
, #{objectx,jdbcType=BIGINT}
, #{objecty,jdbcType=BIGINT}
, #{pbjectw,jdbcType=BIGINT}
, #{objectw,jdbcType=BIGINT}
, #{objecth,jdbcType=BIGINT}
, #{recordtype,jdbcType=VARCHAR}
, #{metatype,jdbcType=VARCHAR}
, #{rtsp,jdbcType=VARCHAR}
, #{imgsrc,jdbcType=VARCHAR}
, #{videoid,jdbcType=VARCHAR}
......
......@@ -5,18 +5,43 @@
<result column="sbbh" jdbcType="VARCHAR" property="sbbh"/>
<result column="tdbh" jdbcType="INTEGER" property="tdbh"/>
<result column="xzbh" jdbcType="VARCHAR" property="xzbh"/>
<result column="tdmc" jdbcType="VARCHAR" property="tdmc"/>
</resultMap>
<select id="selectByRtsp" parameterType="java.lang.String" resultType="com.cx.cn.cxquartz.vo.Sbtdspsr">
select * from sbtdspsr where sbbh = #{videoid}
select * from sbtdspsr where sbbh = #{videoid} or squrllj =#{rtsp}
</select>
<select id="selectRecogByRtsp" parameterType="java.lang.String" resultType="java.util.HashMap">
select distinct metatype,recordtype ,objectx,objecty,objectw,objecth from quartz_task_informations where videoid=#{rtsp}
SELECT DISTINCT
metatype,
recordtype,
objectx,
objecty,
objectw,
objecth,(
SELECT
concat( sbbh, '_', tdbh )
FROM
sbtdspsr
WHERE squrllj =#{rtsp}
OR (
sbbh = substring_index( #{rtsp}, '_', 1 )
AND tdbh = substring_index( #{rtsp}, '_',- 1 ))) videoid
FROM
quartz_task_informations
WHERE
videoid =#{rtsp}
OR executeParamter =#{rtsp}
</select>
<update id="updateRecogByRtsp" parameterType="java.util.HashMap" >
update sbtdspsr set squrllj= #{rtsp} where sbbh=#{devicecode}
</update>
<select id="list" resultType="com.cx.cn.cxquartz.vo.Sbtdspsr">
select * from sbtdspsr
</select>
</mapper>
......@@ -110,7 +110,7 @@
</select>
<update id="updateTraffpicture">
update traffpicture set objx=#{objx},objy=#{objy},objw=#{objw},objh=#{objh},imagedata=#{imagedata} where id=#{id}
update traffpicture set objx=#{objx},objy=#{objy},objw=#{objw},objh=#{objh},imagedata=#{imagedata},metatype=#{metatype} where id=#{id}
</update>
......
This diff is collapsed.
......@@ -29,14 +29,13 @@
</div>
<div class="col-md-6">
<div class="col-lg-12">
<form action="/index">
<div class="input-group">
<input type="input" class="form-control" aria-label="..." name="name"/>
<input type="input" class="form-control" aria-label="..." id="name"/>
<div class="input-group-btn">
<input type="submit" class="btn btn-3d btn-success" style="box-shadow:none;background-color: #73B18D !important;width:70px;margin-left: 19px;" value="search"/>&nbsp;&nbsp;&nbsp;
<input type="button" id="search" onclick="dosearch()" class="btn btn-3d btn-success" style="box-shadow:none;background-color: #73B18D !important;width:70px;margin-left: 19px;" value="search"/>&nbsp;&nbsp;&nbsp;
</div>
</div>
</form>
</div>
</div>
</div>
......@@ -48,8 +47,7 @@
<th style="text-align:center;vertical-align:middle;">任务名称</th>
<th style="text-align:center;vertical-align:middle;">间隔时间(秒)</th>
<th style="text-align:center;vertical-align:middle;">冻结状态</th>
<th style="text-align:center;vertical-align:middle;">执行方</th>
<th style="text-align:center;vertical-align:middle;">执行方式</th>
<th style="text-align:center;vertical-align:middle;">执行参数</th>
<th style="text-align:center;vertical-align:middle;">创建时间</th>
<th style="text-align:center;vertical-align:middle;">最后修改时间</th>
<th style="text-align:center;vertical-align:middle;">操作</th>
......@@ -66,11 +64,8 @@
<span th:if="${task.frozenstatus eq 'UNFROZEN'}">未冻结</span>
<span th:if="${task.frozenstatus eq 'FROZEN'}" style="color:red;">已冻结</span>
</td>
<td th:text="${task.executorno}"/>
<td>
<span th:if="${task.sendtype eq 'kafka'}">kafka</span>
<span th:if="${task.sendtype eq 'http'}">http</span>
</td>
<td th:text="${task.executeparamter}"/>
<td th:text="${#dates.format(task.createtime,'yyyy-MM-dd HH:mm:ss')}"/>
<td th:text="${#dates.format(task.lastmodifytime,'yyyy-MM-dd HH:mm:ss')}"/>
<td>
......@@ -131,11 +126,12 @@
<script type="text/javascript" th:inline="javascript">
function editpage(id) {
location.href = "/quartz/edit/taskpage?id=" + id;
window.open( "/quartz/edit/taskpage?id=" + id);
}
function addNewTask() {
location.href = "/quartz/add/taskpage/";
window.open( "/quartz/add/taskpage/");
}
function startOrStop(taskNo) {
......@@ -176,6 +172,29 @@
}
});
}
function dosearch(){
$.ajax({
url: "/quartz/list/optionjob?taskNo=" + taskNo,
type: "GET",
dataType: "json",
success: function (result) {
if (result.code == 200) {
alert("success!");
location.href = "/";
} else if (result.code == 6001) {
alert("任务编号为空!");
} else if (result.code == 1003) {
alert("无此定时任务!");
} else {
alert("system error!");
}
}
});
}
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment