1、添加 仿真任务置信度统计、仿真任务难度系数统计的feign接口
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
package com.sdm.common.feign.impl.project;
|
||||||
|
|
||||||
|
import com.sdm.common.common.SdmResponse;
|
||||||
|
import com.sdm.common.feign.inter.project.ISimulationTaskFeignClient;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class SimulationTaskFeignClientImpl implements ISimulationTaskFeignClient {
|
||||||
|
@Autowired
|
||||||
|
ISimulationTaskFeignClient simulationTaskFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SdmResponse getTaskConfidenceStatistics() {
|
||||||
|
try {
|
||||||
|
simulationTaskFeignClient.getTaskConfidenceStatistics();
|
||||||
|
return SdmResponse.success();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("内部调用仿真任务置信度统计失败", e);
|
||||||
|
return SdmResponse.failed("内部调用仿真任务置信度统计失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SdmResponse getTaskDifficultStatistics() {
|
||||||
|
try {
|
||||||
|
simulationTaskFeignClient.getTaskDifficultStatistics();
|
||||||
|
return SdmResponse.success();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("内部调用仿真任务难度系数统计统计失败", e);
|
||||||
|
return SdmResponse.failed("内部调用仿真任务难度系数统计统计失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.sdm.common.feign.inter.project;
|
||||||
|
|
||||||
|
import com.sdm.common.common.SdmResponse;
|
||||||
|
import com.sdm.common.entity.req.project.SpdmReportReq;
|
||||||
|
import com.sdm.common.entity.req.system.LaunchApproveReq;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@FeignClient(name = "project",contextId = "taskFeignClient")
|
||||||
|
public interface ISimulationTaskFeignClient {
|
||||||
|
|
||||||
|
@GetMapping("/task/getTaskConfidenceStatistics")
|
||||||
|
SdmResponse getTaskConfidenceStatistics();
|
||||||
|
|
||||||
|
@GetMapping(value = "/task/getTaskDifficultStatistics")
|
||||||
|
SdmResponse getTaskDifficultStatistics();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.sdm.project.controller;
|
|||||||
|
|
||||||
import com.sdm.common.common.SdmResponse;
|
import com.sdm.common.common.SdmResponse;
|
||||||
import com.sdm.common.entity.req.task.TaskExportExcelFormat;
|
import com.sdm.common.entity.req.task.TaskExportExcelFormat;
|
||||||
|
import com.sdm.common.feign.inter.project.ISimulationTaskFeignClient;
|
||||||
import com.sdm.common.log.annotation.SysLog;
|
import com.sdm.common.log.annotation.SysLog;
|
||||||
import com.sdm.project.model.bo.ModifyTaskNode;
|
import com.sdm.project.model.bo.ModifyTaskNode;
|
||||||
import com.sdm.project.model.req.*;
|
import com.sdm.project.model.req.*;
|
||||||
@@ -23,7 +24,7 @@ import java.util.List;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/task")
|
@RequestMapping("/task")
|
||||||
@Tag(name = "仿真任务管理", description = "仿真任务管理")
|
@Tag(name = "仿真任务管理", description = "仿真任务管理")
|
||||||
public class SimulationTaskController {
|
public class SimulationTaskController implements ISimulationTaskFeignClient {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ITaskService taskService;
|
private ITaskService taskService;
|
||||||
|
|||||||
Reference in New Issue
Block a user