优化userTask任务错误展示
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.sdm.common.entity.req.flowable;
|
||||
|
||||
import com.sdm.common.entity.req.project.SimulationLocalJobReq;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -25,4 +26,6 @@ public class AsyncCallbackRequest implements Serializable {
|
||||
* 任务执行结果状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private SimulationLocalJobReq simulationLocalJobReq;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.sdm.common.entity.req.project;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class SimulationLocalJobReq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID,自增
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 本地应用名称
|
||||
*/
|
||||
private String localAppName;
|
||||
|
||||
/**
|
||||
* 本地应用版本
|
||||
*/
|
||||
private String localAppVersion;
|
||||
|
||||
/**
|
||||
* 计算任务所属算力ID
|
||||
*/
|
||||
private String runId;
|
||||
|
||||
/**
|
||||
* 计算任务所属算力名称
|
||||
*/
|
||||
private String runName;
|
||||
|
||||
/**
|
||||
* 计算任务所属任务ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 计算任务所属任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 任务开始时间(建议格式:yyyy-MM-dd HH:mm:ss)
|
||||
*/
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 任务结束时间(建议格式:yyyy-MM-dd HH:mm:ss)
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 任务状态,Running,Finished,Failed
|
||||
*/
|
||||
private String jobStatus;
|
||||
|
||||
/**
|
||||
* 作业耗费总秒数(单位:秒)
|
||||
*/
|
||||
private Long totalElapsedTime;
|
||||
|
||||
/**
|
||||
* 创建者ID(关联用户表主键)
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者ID(关联用户表主键)
|
||||
*/
|
||||
private Long updaterId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
private String errMsg;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.sdm.common.feign.impl.project;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.req.project.SimulationLocalJobReq;
|
||||
import com.sdm.common.feign.inter.project.ISimulationLocalJobFeignClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ISimulationLocalJobFeignClientImpl implements ISimulationLocalJobFeignClient {
|
||||
|
||||
@Autowired
|
||||
private ISimulationLocalJobFeignClient simulationLocalJobService;
|
||||
|
||||
@Override
|
||||
public SdmResponse add(SimulationLocalJobReq req) {
|
||||
try {
|
||||
return simulationLocalJobService.add(req);
|
||||
} catch (Exception e) {
|
||||
log.error("新增本地应用任务失败",e);
|
||||
return SdmResponse.failed("新增本地应用任务失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.sdm.common.feign.inter.project;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.req.project.SimulationLocalJobReq;
|
||||
import com.sdm.common.log.annotation.SysLog;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(name = "project",contextId = "localJobFeignClient")
|
||||
public interface ISimulationLocalJobFeignClient {
|
||||
/**
|
||||
* 新增本地应用任务
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
SdmResponse add(@RequestBody SimulationLocalJobReq req);
|
||||
}
|
||||
Reference in New Issue
Block a user