1、同步待办 bugfix
This commit is contained in:
@@ -16,6 +16,7 @@ import com.sdm.project.service.ITaskService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -257,4 +258,10 @@ public class SimulationTaskController implements ISimulationTaskFeignClient {
|
||||
return taskService.deleteTask(req);
|
||||
}
|
||||
|
||||
@GetMapping("/queryTaskByProjectCodeForEp")
|
||||
@Operation(summary = "通过项目code查询任务(EP系统使用)", description = "通过项目code查询任务(EP系统使用)")
|
||||
public SdmResponse queryTaskByProjectCodeForEp(@RequestParam @NotBlank String projectCode) {
|
||||
return taskService.queryTaskByProjectCodeForEp(projectCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,4 +34,11 @@ public class SimulationWorkController {
|
||||
return simulationWorkService.updateWork(req);
|
||||
}
|
||||
|
||||
// @SysLog("查询报工")
|
||||
// @PostMapping("/queryWork")
|
||||
// @Operation(summary = "查询报工", description = "查询报工")
|
||||
// public SdmResponse queryWork(@RequestBody SpdmWorkReq req) {
|
||||
// return simulationWorkService.queryWork(req);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.sdm.project.model.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Data
|
||||
public class SpdmWorkListReq {
|
||||
|
||||
@NotNull(message = "current不能为空")
|
||||
private Integer current;
|
||||
|
||||
@NotNull(message = "size不能为空")
|
||||
private Integer size;
|
||||
|
||||
/**
|
||||
* 本地应用名称
|
||||
*/
|
||||
private String localAppName;
|
||||
|
||||
/**
|
||||
* 本地应用版本
|
||||
*/
|
||||
private String localAppVersion;
|
||||
|
||||
|
||||
/**
|
||||
* 计算任务所属算力名称
|
||||
*/
|
||||
private String runName;
|
||||
|
||||
/**
|
||||
* 计算任务所属任务名称
|
||||
*/
|
||||
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 String errMsg;
|
||||
|
||||
}
|
||||
@@ -79,4 +79,6 @@ public interface ITaskService {
|
||||
|
||||
SdmResponse deleteTask(SpdmDeleteTaskReq req);
|
||||
|
||||
SdmResponse queryTaskByProjectCodeForEp(String projectCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
SpdmAddDemandReq spdmAddDemandReq = new SpdmAddDemandReq();
|
||||
uuid = RandomUtil.generateString(32);
|
||||
spdmAddDemandReq.setUuid(uuid);
|
||||
spdmAddDemandReq.setDemandName(emulation.getEmulationDemand());
|
||||
spdmAddDemandReq.setDemandName(emulation.getSubject());
|
||||
if (ObjectUtils.isNotEmpty(emulation.getTodoId())) {
|
||||
spdmAddDemandReq.setDemandCode(String.valueOf(emulation.getTodoId()));
|
||||
}
|
||||
@@ -280,11 +280,11 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
extraReq15.setPropertyName("requiredTime");
|
||||
extraReq15.setPropertyValue(emulation.getRequiredTime());
|
||||
extras.add(extraReq15);
|
||||
SpdmDemandExtraReq extraReq20 = new SpdmDemandExtraReq();
|
||||
extraReq20.setDemandId(uuid);
|
||||
extraReq20.setPropertyName("subject");
|
||||
extraReq20.setPropertyValue(emulation.getSubject());
|
||||
extras.add(extraReq20);
|
||||
// SpdmDemandExtraReq extraReq20 = new SpdmDemandExtraReq();
|
||||
// extraReq20.setDemandId(uuid);
|
||||
// extraReq20.setPropertyName("subject");
|
||||
// extraReq20.setPropertyValue(emulation.getSubject());
|
||||
// extras.add(extraReq20);
|
||||
SpdmDemandExtraReq extraReq21 = new SpdmDemandExtraReq();
|
||||
extraReq21.setDemandId(uuid);
|
||||
extraReq21.setPropertyName("todoNum");
|
||||
|
||||
@@ -2757,4 +2757,18 @@ public class TaskServiceImpl implements ITaskService {
|
||||
return SdmResponse.success("删除任务成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse queryTaskByProjectCodeForEp(String projectCode) {
|
||||
// 通过projectCode查询项目
|
||||
SimulationNode simulationNode = nodeService.lambdaQuery()
|
||||
.eq(SimulationNode::getNodeCode, projectCode)
|
||||
.eq(SimulationNode::getNodeType, NodeTypeEnum.PROJECT.getValue())
|
||||
.one();
|
||||
if (ObjectUtils.isEmpty(simulationNode)) {
|
||||
return SdmResponse.failed("未查询到项目信息");
|
||||
}
|
||||
List<SimulationTask> taskList = simulationTaskService.lambdaQuery().eq(SimulationTask::getTag1, simulationNode.getUuid()).list();
|
||||
return SdmResponse.success(taskList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user