Bläddra i källkod

增加异常原因回填

pull/4/head
lcr 5 månader sedan
förälder
incheckning
13fdbffdc6
6 ändrade filer med 115 tillägg och 13 borttagningar
  1. +27
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/JobQueryLogBO.java
  2. +65
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/JobQueryLogVO.java
  3. +7
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/service/IApplyPlanService.java
  4. +2
    -1
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyPlanServiceImpl.java
  5. +14
    -8
      ruoyi-business/src/main/java/com/ruoyi/business/util/YinDaoHttpUtils.java
  6. +0
    -4
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java

+ 27
- 0
ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/JobQueryLogBO.java Visa fil

@@ -0,0 +1,27 @@
package com.ruoyi.business.domain.bo;

import lombok.Data;

/**
* 查询运行日志
*
* @author boyi
* @since 2022/8/26 10:16
*/
@Data
public class JobQueryLogBO {

/**
* 计划uuid
*/
private String scheduleUuid;
/**
* 翻页方向
*/
private String cursorDirection;
/**
* 每页数量
*/
private Integer size;
}


+ 65
- 0
ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/JobQueryLogVO.java Visa fil

@@ -0,0 +1,65 @@
package com.ruoyi.business.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
* 查询job响应
*
* @author boyi
* @since 2022/8/26 10:17
*/
@Data
public class JobQueryLogVO {

/**
* 用于判断继续翻页时是否有数据,可用作翻页按钮置灰操作比如当往下翻页到20页时,第21页没有数据,则在20页时hasData为false,表示不能继续往下翻页,只能往上翻页
*/
private Boolean hasData;


/**
* 往下翻页时,可作为 cursorId 使用,表示从这个id开始往下翻页
*/
private Long nextId;

/**
* 往上翻页时,可作为 cursorId 使用,表示从这个id开始往上翻页
*/
private Long preId;

/**
* 当前的翻页方向 next表示当前往下翻页 pre表示当前往上翻页
*/
private String cursorDirection;

/**
* 日志
*/
private List<DataList> dataList;

/**
* 任务结束运行的时

/**
* 应用运行参数
*/
@Data
public static class DataList {
private String id;
private String jobUuid;
private String status;
private String taskName;
private String robotUuid;
private String robotName;
private String triggerTime;
private String robotClientUuid;
// remark
private String remark;

}

}

+ 7
- 0
ruoyi-business/src/main/java/com/ruoyi/business/service/IApplyPlanService.java Visa fil

@@ -19,19 +19,23 @@ public interface IApplyPlanService extends IService<ApplyPlan> {

/**
* 更新计划应用执行结果
*
* @param
* @return
*/
void queryAppStartResult() throws IllegalAccessException;


/**
* 获取应用执行结果
*
* @return
*/
boolean execPlan(ApplyStartBO applyStartBO) throws IllegalAccessException;

/**
* 定时查询指定时间执行的数据
*
* @return
*/
boolean runAppBySetTime() throws IllegalAccessException;
@@ -43,6 +47,7 @@ public interface IApplyPlanService extends IService<ApplyPlan> {

/**
* 创建计划
*
* @param addApplyPlanBO
* @return
*/
@@ -50,10 +55,12 @@ public interface IApplyPlanService extends IService<ApplyPlan> {

/**
* 修改计划
*
* @param addApplyPlanBO
* @return
*/
boolean update(AddApplyPlanBO addApplyPlanBO);

/**
* 查询应用执行计划管理列表
*


+ 2
- 1
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyPlanServiceImpl.java Visa fil

@@ -12,6 +12,7 @@ import com.ruoyi.business.domain.Apply;
import com.ruoyi.business.domain.Rebot;
import com.ruoyi.business.domain.ResourceLibrary;
import com.ruoyi.business.domain.bo.*;
import com.ruoyi.business.domain.vo.JobQueryLogVO;
import com.ruoyi.business.domain.vo.JobQueryVO;
import com.ruoyi.business.domain.vo.JobStartVO;
import com.ruoyi.business.domain.vo.ListRebotVO;
@@ -307,7 +308,7 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
updateApplyPlan.setOutParam(robotParam.getValue());
}
}
updateApplyPlan.setRemark(jobQueryVO.getRemark());
this.updateById(updateApplyPlan);
}
// 如果是终态改变机器人状态


+ 14
- 8
ruoyi-business/src/main/java/com/ruoyi/business/util/YinDaoHttpUtils.java Visa fil

@@ -2,14 +2,8 @@ package com.ruoyi.business.util;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSON;
import com.ruoyi.business.domain.bo.ApplyStartBO;
import com.ruoyi.business.domain.bo.JobQueryBO;
import com.ruoyi.business.domain.bo.ListApplyBO;
import com.ruoyi.business.domain.bo.ListRebotBO;
import com.ruoyi.business.domain.vo.JobQueryVO;
import com.ruoyi.business.domain.vo.JobStartVO;
import com.ruoyi.business.domain.vo.ListApplyVO;
import com.ruoyi.business.domain.vo.ListRebotVO;
import com.ruoyi.business.domain.bo.*;
import com.ruoyi.business.domain.vo.*;
import com.ruoyi.business.yddoman.BaseDTO;
import com.ruoyi.business.yddoman.CreateTokenDTO;
import com.ruoyi.common.exception.ServiceException;
@@ -44,6 +38,8 @@ public class YinDaoHttpUtils {
private static final String APP_START = REQUEST_PREFIX + "/dispatch/v2/job/start";
// 查询应用运行结果
private static final String QUERY_APP_START_RESULT = REQUEST_PREFIX + "/dispatch/v2/job/query";
// 查询应用运行日志(异常时可以查询原因)
private static final String QUERY_APP_START_RESULT_LOG = REQUEST_PREFIX + "/dispatch/v2/job/list";


/**
@@ -66,6 +62,16 @@ public class YinDaoHttpUtils {
return JSON.parseObject(baseDTO.getData().toString(), JobQueryVO.class);
}

/**
* 查询应用运行结果
*/
public static JobQueryLogVO queryAppStartResultLog(JobQueryLogBO jobQueryLogBO) throws IllegalAccessException {
// 实体类转map
Map<String, Object> data = BeanToMapUtil.convertEntityToMap(jobQueryLogBO);
BaseDTO baseDTO = sendPost(QUERY_APP_START_RESULT_LOG, data);
return JSON.parseObject(baseDTO.getData().toString(), JobQueryLogVO.class);
}

/**
* 查询应用列表
*/


+ 0
- 4
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java Visa fil

@@ -71,8 +71,4 @@ public class RyTask {







}

Laddar…
Avbryt
Spara