Selaa lähdekoodia

切换数据库

dev-lcr
lcr 3 kuukautta sitten
vanhempi
commit
403b8e75ed
8 muutettua tiedostoa jossa 224 lisäystä ja 154 poistoa
  1. +6
    -6
      ruoyi-admin/src/main/resources/application-prod.yml
  2. +0
    -22
      ruoyi-admin/src/main/resources/application.yml
  3. +1
    -2
      ruoyi-business/src/main/java/com/ruoyi/business/controller/ApplyController.java
  4. +1
    -1
      ruoyi-business/src/main/java/com/ruoyi/business/controller/ApplyRebotController.java
  5. +35
    -21
      ruoyi-business/src/main/java/com/ruoyi/business/domain/ApplyPlanLog.java
  6. +5
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/JobQueryBO.java
  7. +173
    -102
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyPlanServiceImpl.java
  8. +3
    -0
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyServiceImpl.java

+ 6
- 6
ruoyi-admin/src/main/resources/application-prod.yml Näytä tiedosto

@@ -3,13 +3,13 @@ spring:
# redis 配置
redis:
# 地址
host: 192.168.10.136
host: 192.168.10.214
# 端口,默认为6379
port: 6379
# 数据库索引
database: 13
database: 0
# 密码
password: wjcy@123456
password: Aa@123456
# 连接超时时间
timeout: 10s
lettuce:
@@ -28,9 +28,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://192.168.10.136:3306/wjcy_new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: wjcy@123456
url: jdbc:mysql://192.168.10.214:3306/wjcy_new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: wjcy_new
password: PHPKL3p3ME2pGT4j
# 从库数据源
slave:
# 从数据源开关/默认关闭


+ 0
- 22
ruoyi-admin/src/main/resources/application.yml Näytä tiedosto

@@ -65,28 +65,6 @@ spring:
restart:
# 热部署开关
enabled: true
# redis 配置
redis:
# 地址
host: 192.168.10.136
# 端口,默认为6379
port: 6379
# 数据库索引
database: 13
# 密码
password: wjcy@123456
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms

# token配置
token:


+ 1
- 2
ruoyi-business/src/main/java/com/ruoyi/business/controller/ApplyController.java Näytä tiedosto

@@ -97,12 +97,11 @@ public class ApplyController extends BaseController {
List<ApplyPlan> planList = applyPlanService.lambdaQuery().isNotNull(ApplyPlan::getManualTime)
.and(e -> e.in(ApplyPlan::getExcType, "0", "1")
.eq(ApplyPlan::getTaskStatus, PlanRunStatus.FINISH.getKey()).or().eq(ApplyPlan::getExcType, "2"))

.list();
// 只过滤执行计划的id
List<String> planIdList = planList.stream().filter(e -> "2".equals(e.getExcType())).map(ApplyPlan::getId).collect(Collectors.toList());
// 获取所有 设置了时间并且是完成状态的计划记录
LambdaQueryChainWrapper<ApplyPlanLog> qw = applyPlanLogService.lambdaQuery();
LambdaQueryChainWrapper<ApplyPlanLog> qw = applyPlanLogService.lambdaQuery().eq(ApplyPlanLog::getStatus,"0");
List<ApplyPlanLog> planLogList = null;
if (planIdList.isEmpty()) {
planLogList = new ArrayList<>();


+ 1
- 1
ruoyi-business/src/main/java/com/ruoyi/business/controller/ApplyRebotController.java Näytä tiedosto

@@ -56,7 +56,7 @@ public class ApplyRebotController extends BaseController {
@ApiOperation(value = "查询所有应用和机器人绑定列表", httpMethod = "GET", response = Apply.class)
@GetMapping("/listAll")
public AjaxResult listAll(ApplyRebot applyRebot) {
List<ApplyRebot> applyRebotList = applyRebotService.list(applyRebot);
List<String> applyRebotList = applyRebotService.list(applyRebot).stream().map(ApplyRebot::getRebotName).collect(Collectors.toList());
return AjaxResult.success(applyRebotList);
}



+ 35
- 21
ruoyi-business/src/main/java/com/ruoyi/business/domain/ApplyPlanLog.java Näytä tiedosto

@@ -1,6 +1,7 @@
package com.ruoyi.business.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -28,47 +29,60 @@ import com.ruoyi.common.core.domain.BaseEntity;
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="ApplyPlanLog",description = "应用执行结果记录管理")
@ApiModel(value = "ApplyPlanLog", description = "应用执行结果记录管理")
@TableName(value = "ct_apply_plan_log")
public class ApplyPlanLog extends BaseEntity
{
public class ApplyPlanLog extends BaseEntity {
@TableField(exist = false)
private static final long serialVersionUID = 1L;



/** 计划id */
/**
* 计划id
*/
@Excel(name = "计划id")
@ApiModelProperty(name="planId",value = "计划id")
@ApiModelProperty(name = "planId", value = "计划id")
private String planId;

/** 所属应用id */
/**
* 所属应用id
*/
@Excel(name = "所属应用id")
@ApiModelProperty(name="appId",value = "所属应用id")
@ApiModelProperty(name = "appId", value = "所属应用id")
private String appId;

/** 计划job_uuid */
/**
* 计划job_uuid
*/
@Excel(name = "计划job_uuid")
@ApiModelProperty(name="jobUuid",value = "计划job_uuid")
@ApiModelProperty(name = "jobUuid", value = "计划job_uuid")
private String jobUuid;


/** 输出内容 */
/**
* 输出内容
*/
@Excel(name = "输出内容")
@ApiModelProperty(name="outParam",value = "输出内容")
@ApiModelProperty(name = "outParam", value = "输出内容")
private String outParam;

/**
* 执行结果(0成功 1失败)
*/
@Excel(name = "执行结果(0成功 1失败)")
@ApiModelProperty(name = "status", value = "执行结果(0成功 1失败)")
private String status;


@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("deleted", getDeleted())
.toString();
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("deleted", getDeleted())
.toString();
}
}

+ 5
- 0
ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/JobQueryBO.java Näytä tiedosto

@@ -15,5 +15,10 @@ public class JobQueryBO {
* 应用运行的uuid, 由job/start接口返回
*/
private String jobUuid;

/**
* 是否应用新参数
*/
private Boolean newData;
}


+ 173
- 102
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyPlanServiceImpl.java Näytä tiedosto

@@ -98,6 +98,7 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
applyPlan.setNextExecTime(nextDate);
}
}
applyPlan.setCronExpression(entity.getCronExpression());
return this.updateById(applyPlan);
}

@@ -143,6 +144,13 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
applyPlanLog.setJobUuid(yinDaoCallBackBO.getJobUuid());
applyPlanLog.setAppId(applyPlan.getAppId());
applyPlanLog.setOutParam(applyPlan.getOutParam());
if (PlanRunStatus.FINISH.getKey().equals(yinDaoCallBackBO.getStatus())) {
// 成功
applyPlanLog.setStatus("0");
} else {
// 失败
applyPlanLog.setStatus("1");
}
applyPlanLogService.saveOrUpdate(applyPlanLog);
}
applyPlan.setUpdateBy("系统修改");
@@ -186,12 +194,72 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
*/
@Override
public boolean appRetry(JobQueryBO jobQueryBO) throws IllegalAccessException {
BaseDTO baseDTO = YinDaoHttpUtils.appRetry(jobQueryBO);
if (baseDTO.getSuccess()) {
return baseMapper.appRetry(jobQueryBO.getJobUuid()) > 0;
// 状态异常重新创建任务 删除原任务,如果是周期则有任务日志,改变原日志关联id,重新创建的任务绑定新的参数
// 已停止状态重新运行,获取的是旧参数
ApplyPlan plan = applyPlanService.lambdaQuery().eq(ApplyPlan::getTaskUuid, jobQueryBO.getJobUuid()).one();
// 获取应用信息
Apply apply = applyService.lambdaQuery().eq(Apply::getAppId, plan.getAppId()).one();

try {
// 周期,将日志绑定到新计划
if ("2".equals(plan.getExcType())) {
ApplyPlan newApplyPlan = new ApplyPlan();
createApplyPlan(jobQueryBO, plan, apply, newApplyPlan);
// 换绑日志
ApplyPlanLog applyPlanLog = new ApplyPlanLog();
applyPlanLog.setPlanId(newApplyPlan.getId());
applyPlanLogService.lambdaUpdate().eq(ApplyPlanLog::getPlanId, plan.getId()).update(applyPlanLog);
} else {
createApplyPlan(jobQueryBO, plan, apply, new ApplyPlan());
}
} catch (Exception ex) {
ex.printStackTrace();
throw ex;
}
return true;
}

/**
* 创建一个计划
*
* @return
*/
private boolean createApplyPlan(JobQueryBO jobQueryBO, ApplyPlan plan, Apply apply, ApplyPlan newApplyPlan) {
// 创建一个新计划
BeanUtils.copyBeanProp(newApplyPlan, plan);
newApplyPlan.setId(null);
newApplyPlan.setTaskStatus(PlanRunStatus.AWAIT_CREATE.getKey());
newApplyPlan.setNextExecTime(newApplyPlan.getLastExecTime());
if (jobQueryBO.getNewData()) {
if (null != apply.getSupportParam() && apply.getSupportParam() == 1) {
newApplyPlan.setSupportParam(apply.getSupportParam());
// 获取参数列表
List<ResourceLibrary> resourceLibraryList = resourceLibraryService.lambdaQuery().eq(ResourceLibrary::getAppId, plan.getAppId()).list();
// 获取参数 每一次执行计划的参数都是独立的
List<ApplyStartBO.RobotParam> paramList = resourceLibraryList.stream()
.map(item -> {
ApplyStartBO.RobotParam robotParam = new ApplyStartBO.RobotParam();
robotParam.setName(item.getResourceName());
robotParam.setValue(item.getResourceValue());
robotParam.setType(item.getResourceType());
return robotParam;
}).collect(Collectors.toList());
if (paramList.isEmpty()) {
throw new ServiceException("该应用需要参数,没有检测到参数!");
} else {
// json集合转字符串
newApplyPlan.setPlanParams(JSONArray.toJSONString(paramList));
}
}
} else {
return false;
if (null != apply.getSupportParam() && apply.getSupportParam() == 1) {
newApplyPlan.setSupportParam(apply.getSupportParam());
newApplyPlan.setPlanParams(plan.getPlanParams());
}
}
// 先删除 在新增
applyPlanService.removeById(plan.getId());
return applyPlanService.save(newApplyPlan);
}

/**
@@ -239,56 +307,54 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
return false;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos);
if(null == runRebotList){
log.debug("暂无可用空闲机器人");
return false;
}

List<String> ids = new ArrayList<>();
runRebotList.forEach(rebot -> {
applyPlanList.forEach(e -> {
log.debug("指定时间执行 执行时间:" + e.getExcTime());
if (ids.contains(e.getId())) {
return;
}
if (e.getExcTime().getTime() <= System.currentTimeMillis() && PlanRunStatus.AWAIT_CREATE.getKey().equals(e.getTaskStatus())) {
ApplyStartBO applyStartBO = new ApplyStartBO();
applyStartBO.setRobotUuid(e.getAppId());
applyStartBO.setAccountName(rebot.getRobotClientName());
applyStartBO.setManualTime(e.getManualTime());
//high 高 middle 中 low 低
applyStartBO.setPriority("high");
// 如果应用支持参数
if (!Objects.isNull(e.getSupportParam()) && e.getSupportParam() == 1) {
if (StringUtils.isNotEmpty(e.getPlanParams())) {
applyStartBO.setPlanParams(e.getPlanParams());
List<ApplyStartBO.RobotParam> paramList = JSON.parseArray(e.getPlanParams(), ApplyStartBO.RobotParam.class);
applyStartBO.setParams(paramList);
}
applyPlanList.forEach(e -> {
List<ListRebotVO> runRebotList = getRunRebot(listRebotVos, e.getAppId());
if (null == runRebotList) {
log.debug("暂无可用空闲机器人");
return;
}
ListRebotVO rebot = runRebotList.get(0);
log.debug("指定时间执行 执行时间:" + e.getExcTime());
if (ids.contains(e.getId())) {
return;
}
if (e.getExcTime().getTime() <= System.currentTimeMillis() && PlanRunStatus.AWAIT_CREATE.getKey().equals(e.getTaskStatus())) {
ApplyStartBO applyStartBO = new ApplyStartBO();
applyStartBO.setRobotUuid(e.getAppId());
applyStartBO.setAccountName(rebot.getRobotClientName());
applyStartBO.setManualTime(e.getManualTime());
//high 高 middle 中 low 低
applyStartBO.setPriority("high");
// 如果应用支持参数
if (!Objects.isNull(e.getSupportParam()) && e.getSupportParam() == 1) {
if (StringUtils.isNotEmpty(e.getPlanParams())) {
applyStartBO.setPlanParams(e.getPlanParams());
List<ApplyStartBO.RobotParam> paramList = JSON.parseArray(e.getPlanParams(), ApplyStartBO.RobotParam.class);
applyStartBO.setParams(paramList);
}
try {
JobStartVO jobStartVO = YinDaoHttpUtils.appStart(applyStartBO);
ApplyPlan applyPlan = new ApplyPlan();
applyPlan.setId(e.getId());
applyPlan.setUpdateBy("系统修改");
applyPlan.setUpdateTime(new Date());
applyPlan.setTaskUuid(jobStartVO.getJobUuid());
applyPlan.setTaskStatus(PlanRunStatus.CREATED.getKey());
this.updateById(applyPlan);
Rebot updateRebot = new Rebot();
updateRebot.setUpdateBy("系统修改");
updateRebot.setUpdateTime(new Date());
updateRebot.setStatus(RebotStatus.RUNNING.getKey());
if (rebotService.lambdaUpdate().eq(Rebot::getRobotClientName, rebot.getRobotClientName()).update(updateRebot)) {
log.debug("applyPlanList:" + applyPlanList.size());
ids.add(e.getId());
}
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
}
try {
JobStartVO jobStartVO = YinDaoHttpUtils.appStart(applyStartBO);
ApplyPlan applyPlan = new ApplyPlan();
applyPlan.setId(e.getId());
applyPlan.setUpdateBy("系统修改");
applyPlan.setUpdateTime(new Date());
applyPlan.setTaskUuid(jobStartVO.getJobUuid());
applyPlan.setTaskStatus(PlanRunStatus.CREATED.getKey());
this.updateById(applyPlan);
Rebot updateRebot = new Rebot();
updateRebot.setUpdateBy("系统修改");
updateRebot.setUpdateTime(new Date());
updateRebot.setStatus(RebotStatus.RUNNING.getKey());
if (rebotService.lambdaUpdate().eq(Rebot::getRobotClientName, rebot.getRobotClientName()).update(updateRebot)) {
log.debug("applyPlanList:" + applyPlanList.size());
ids.add(e.getId());
}
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
}
});
}
});
}
} catch (InterruptedException e) {
@@ -348,17 +414,19 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
return false;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos);
if(null == runRebotList){
log.debug("暂无可用空闲机器人");
return false;
}

List<String> ids = new ArrayList<>();
execApplyPlan.forEach(e -> {
if (listRebotVos.isEmpty()) {
return;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos, e.getAppId());
if (null == runRebotList) {
log.debug("暂无可用空闲机器人");
return;
}

ListRebotVO rebot = runRebotList.get(0);
log.debug("机器人表达式执行调度日志" + rebot.getRobotClientName() + "调度" + e.getAppName() + "应用,排除的应用id为" + ids.toString());
if (ids.contains(e.getId())) {
@@ -540,6 +608,13 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
applyPlanLog.setJobUuid(jobQueryVO.getJobUuid());
applyPlanLog.setAppId(applyPlan.getAppId());
applyPlanLog.setOutParam(updateApplyPlan.getOutParam());
if (PlanRunStatus.FINISH.getKey().equals(jobQueryVO.getStatus())) {
// 成功
applyPlanLog.setStatus("0");
} else {
// 失败
applyPlanLog.setStatus("1");
}
applyPlanLogService.saveOrUpdate(applyPlanLog);
}
}
@@ -607,12 +682,6 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
return false;
}

List<ListRebotVO> runRebotList = getRunRebot(listRebotVos);
if(null == runRebotList){
log.debug("暂无可用空闲机器人");
return false;
}

// 获取每个部门优先级最高的计划
List<ApplyPlan> applyPlans = new ArrayList<>();
applyPlanMap.forEach((k, v) -> {
@@ -625,20 +694,22 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
}
applyPlans.sort((Comparator.comparingInt(ApplyPlan::getPriority)));

for (ListRebotVO listRebotVO : runRebotList) {
if (applyPlans.isEmpty()) {
log.debug("没有等待执行的计划!");
continue;

for (ApplyPlan runApplyPlan : applyPlans) {
List<ListRebotVO> runRebotList = getRunRebot(listRebotVos, runApplyPlan.getAppId());
if (null == runRebotList) {
log.debug("暂无可用空闲机器人");
return false;
}
applyPlan = applyPlans.get(0);
applyStartBO = new ApplyStartBO();
applyStartBO.setRobotUuid(applyPlan.getAppId());
applyStartBO.setRobotUuid(runApplyPlan.getAppId());
//high 高 middle 中 low 低
applyStartBO.setPriority("high");
applyStartBO.setAccountName(listRebotVO.getRobotClientName());
applyStartBO.setAccountName(runRebotList.get(0).getRobotClientName());
// 如果应用支持参数
if (!Objects.isNull(applyPlan.getSupportParam()) && applyPlan.getSupportParam() == 1) {
List<ResourceLibrary> list = resourceLibraryService.lambdaQuery().eq(ResourceLibrary::getAppId, applyPlan.getAppId()).list();
if (!Objects.isNull(runApplyPlan.getSupportParam()) && runApplyPlan.getSupportParam() == 1) {
List<ResourceLibrary> list = resourceLibraryService.lambdaQuery().eq(ResourceLibrary::getAppId, runApplyPlan.getAppId()).list();
if (!list.isEmpty()) {
List<ApplyStartBO.RobotParam> robotParamList = list.stream().map(e -> {
ApplyStartBO.RobotParam robotParam = new ApplyStartBO.RobotParam();
@@ -655,23 +726,23 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan
}
JobStartVO jobStartVO = YinDaoHttpUtils.appStart(applyStartBO);
ApplyPlan updateApplyPlan = new ApplyPlan();
updateApplyPlan.setId(applyPlan.getId());
updateApplyPlan.setId(runApplyPlan.getId());
updateApplyPlan.setCreateBy("系统创建");
updateApplyPlan.setCreateTime(new Date());
updateApplyPlan.setUpdateBy("系统修改");
updateApplyPlan.setUpdateTime(new Date());
updateApplyPlan.setStartTime(new Date());
updateApplyPlan.setTaskUuid(jobStartVO.getJobUuid());
updateApplyPlan.setPlanName(applyPlan.getPlanName());
updateApplyPlan.setPlanName(runApplyPlan.getPlanName());
updateApplyPlan.setTaskStatus(PlanRunStatus.CREATED.getKey());
updateApplyPlan.setRobotName(listRebotVO.getRobotClientName());
updateApplyPlan.setManualTime(applyPlan.getManualTime());
updateApplyPlan.setRobotName(runRebotList.get(0).getRobotClientName());
updateApplyPlan.setManualTime(runApplyPlan.getManualTime());
updateApplyPlan.setDeptId(applyStartBO.getDeptId());
updateApplyPlan.setPlanParams(applyStartBO.getPlanParams());
applyPlan.setTaskUuid(jobStartVO.getJobUuid());
runApplyPlan.setTaskUuid(jobStartVO.getJobUuid());
if (this.saveOrUpdate(updateApplyPlan)) {
// 移除当前对象,防止重复跑
applyPlans.remove(0);
// 当前机器人已用,移除
runRebotList.remove(0);
i++;
}
}
@@ -689,32 +760,32 @@ public class ApplyPlanServiceImpl extends ServiceImpl<ApplyPlanMapper, ApplyPlan

/**
* 获取可执行机器人
* @return bool 是否可继续执行
*
* @return list 返回可执行的机器人列表 null为无
*/
private List<ListRebotVO> getRunRebot(List<ListRebotVO> listRebotVos){
// 查询应用是否有指定机器人,没有则随机指派
List<String> rebotList = applyRebotService.list(new LambdaQueryWrapper<ApplyRebot>().eq(ApplyRebot::getApplyId, applyStartBO.getRobotUuid())).stream().map(ApplyRebot::getRebotName).collect(Collectors.toList());
// 是否继续执行
List<ListRebotVO> runRebotList = new ArrayList<>();
// 如果查到关系,则该应用指定了机器人
if(!rebotList.isEmpty()){
// 遍历可用机器人
listRebotVos.forEach(e->{
// 如果有指定可用
if(rebotList.contains(e.getRobotClientName())){
runRebotList.add(e);
}
});
}else{
runRebotList.addAll(listRebotVos);
}
if(runRebotList.isEmpty()){
return runRebotList;
}else{
return null;
}
}

private List<ListRebotVO> getRunRebot(List<ListRebotVO> listRebotVos, String appId) {
// 查询应用是否有指定机器人,没有则随机指派
List<String> rebotList = applyRebotService.list(new LambdaQueryWrapper<ApplyRebot>().eq(ApplyRebot::getApplyId, appId)).stream().map(ApplyRebot::getRebotName).collect(Collectors.toList());
// 是否继续执行
List<ListRebotVO> runRebotList = new ArrayList<>();
// 如果查到关系,则该应用指定了机器人
if (!rebotList.isEmpty()) {
// 遍历可用机器人
listRebotVos.forEach(e -> {
// 如果有指定可用
if (rebotList.contains(e.getRobotClientName())) {
runRebotList.add(e);
}
});
} else {
runRebotList.addAll(listRebotVos);
}
if (!runRebotList.isEmpty()) {
return runRebotList;
} else {
return null;
}
}


@Override


+ 3
- 0
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/ApplyServiceImpl.java Näytä tiedosto

@@ -183,6 +183,9 @@ public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, Apply> implements
if ("2".equals(plan.getExcType())) {
// 获取执行日志
List<ApplyPlanLog> applyPlanLogs = planLogMap.get(e.getAppId());
if(null == applyPlanLogs){
return;
}
// 日志总计节约时间
AtomicReference<BigDecimal> logPlanTime = new AtomicReference<>(BigDecimal.ZERO);
applyPlanLogs.forEach(log -> {


Loading…
Peruuta
Tallenna