生成报告脚本
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package com.sdm.common.entity.req.project;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ProjecInfoReq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
private String department;
|
||||
|
||||
private String applicants;
|
||||
|
||||
private String date;
|
||||
|
||||
private String projectNum;
|
||||
|
||||
private String workspaceNum;
|
||||
|
||||
private String workspace;
|
||||
|
||||
private String taskType;
|
||||
|
||||
private String reportVer;
|
||||
|
||||
private String fileNum;
|
||||
|
||||
private String formulateTime;
|
||||
|
||||
private String checkTime;
|
||||
|
||||
private String approveTime;
|
||||
|
||||
private Boolean isBatch = false;
|
||||
|
||||
private String loadcaseName;
|
||||
|
||||
private String reportCommand;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.sdm.common.entity.req.project;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2025-11-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("simulation_performance")
|
||||
@ApiModel(value="SimulationPerformance对象", description="")
|
||||
public class SimulationPerformance implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@TableField("uuid")
|
||||
private String uuid;
|
||||
|
||||
@TableField("nodeId")
|
||||
private String nodeId;
|
||||
|
||||
@TableField("taskId")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty(value = "算列runId")
|
||||
@TableField("runId")
|
||||
private String runId;
|
||||
|
||||
@TableField("performanceName")
|
||||
private String performanceName;
|
||||
|
||||
@TableField("nodeName")
|
||||
private String nodeName;
|
||||
|
||||
@TableField("englishName")
|
||||
private String englishName;
|
||||
|
||||
@TableField("nodeCode")
|
||||
private String nodeCode;
|
||||
|
||||
@TableField("poolName")
|
||||
private String poolName;
|
||||
|
||||
@TableField("performanceType")
|
||||
private String performanceType;
|
||||
|
||||
@TableField("unit")
|
||||
private String unit;
|
||||
|
||||
@TableField("targetValue")
|
||||
private String targetValue;
|
||||
|
||||
@TableField("lowValue")
|
||||
private String lowValue;
|
||||
|
||||
@TableField("highValue")
|
||||
private String highValue;
|
||||
|
||||
@TableField("method")
|
||||
private String method;
|
||||
|
||||
@ApiModelProperty(value = "指标完成情况 未完成 不合格 风险可控 未分析 合格")
|
||||
@TableField("completeStatus")
|
||||
private String completeStatus;
|
||||
|
||||
@ApiModelProperty(value = "计算及结果值")
|
||||
@TableField("resultValue")
|
||||
private String resultValue;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
@TableField("taskName")
|
||||
private String taskName;
|
||||
|
||||
@TableField("standard")
|
||||
private String standard;
|
||||
|
||||
@TableField("tenantId")
|
||||
private String tenantId;
|
||||
|
||||
@TableField("createTime")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
@TableField("pid")
|
||||
private Integer pid;
|
||||
|
||||
@TableField("tag1")
|
||||
private String tag1;
|
||||
|
||||
@TableField("tag2")
|
||||
private String tag2;
|
||||
|
||||
@TableField("tag3")
|
||||
private String tag3;
|
||||
|
||||
@TableField("tag4")
|
||||
private String tag4;
|
||||
|
||||
@TableField("tag5")
|
||||
private String tag5;
|
||||
|
||||
@TableField("tag6")
|
||||
private String tag6;
|
||||
|
||||
@TableField("tag7")
|
||||
private String tag7;
|
||||
|
||||
@TableField("tag8")
|
||||
private String tag8;
|
||||
|
||||
@TableField("tag9")
|
||||
private String tag9;
|
||||
|
||||
@TableField("tag10")
|
||||
private String tag10;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.sdm.common.entity.req.project;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SpdmReportReq {
|
||||
|
||||
/**
|
||||
* 任务执行————关键结果————图片结果的文件id集合
|
||||
*/
|
||||
private List<Long> imageFileIdList;
|
||||
|
||||
/**
|
||||
* 性能指标集合
|
||||
*/
|
||||
private List<SimulationPerformance> performanceList;
|
||||
|
||||
/**
|
||||
* 算例父节点信息
|
||||
*/
|
||||
private ProjecInfoReq projecInfoReq;
|
||||
|
||||
/**
|
||||
* 报告复制路径地址
|
||||
*/
|
||||
private String outPutDirPath;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.sdm.common.feign.impl.project;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.req.project.SpdmReportReq;
|
||||
import com.sdm.common.entity.req.system.LaunchApproveReq;
|
||||
import com.sdm.common.entity.resp.AllNodeByProjectIdAndTypeResp;
|
||||
import com.sdm.common.feign.inter.project.ISimulationRunFeignClient;
|
||||
@@ -39,4 +40,15 @@ public class SimulationRunFeignClientImpl implements ISimulationRunFeignClient {
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse<Void> generateReportInternal(SpdmReportReq req) {
|
||||
try {
|
||||
simulationRunFeignClient.generateReportInternal(req);
|
||||
return SdmResponse.success();
|
||||
}catch (Exception e){
|
||||
log.error("内部调用生成自动化报告失败", e);
|
||||
return SdmResponse.failed("内部调用生成自动化报告失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@FeignClient(name = "project",contextId = "runFeignClient")
|
||||
public interface ISimulationRunFeignClient {
|
||||
|
||||
@@ -19,5 +16,14 @@ public interface ISimulationRunFeignClient {
|
||||
|
||||
@GetMapping(value = "/run/getSimulationKeyResultFileIds")
|
||||
SdmResponse<List<Long>> getSimulationKeyResultFileIds(@RequestParam String runId);
|
||||
|
||||
/**
|
||||
* 内部调用生成报告
|
||||
*
|
||||
* @param req 报告请求参数
|
||||
* @return SdmResponse<Void>
|
||||
*/
|
||||
@PostMapping("/run/generateReportInternal")
|
||||
SdmResponse<Void> generateReportInternal(@RequestBody SpdmReportReq req);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user