1、修改导入算例接口
2、调整项目列表接口
This commit is contained in:
@@ -310,8 +310,8 @@ public class SimulationTaskController implements ISimulationTaskFeignClient {
|
||||
*/
|
||||
@PostMapping(value = "/importSimulationPerformance")
|
||||
@ResponseBody
|
||||
SdmResponse importSimulationPerformance(@RequestParam("file") MultipartFile file, @RequestParam("columns")String columns, @RequestParam("taskId") String taskId, @RequestParam("taskName") String taskName) {
|
||||
return taskService.importSimulationPerformance(file,columns,taskId,taskName);
|
||||
SdmResponse importSimulationPerformance(@RequestParam("file") MultipartFile file, @RequestParam("columns")String columns, @RequestParam("taskId") String taskId, @RequestParam("taskName") String taskName, @RequestParam("runId") String runId) {
|
||||
return taskService.importSimulationPerformance(file,columns,taskId,taskName,runId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,6 +106,6 @@ public interface ITaskService {
|
||||
|
||||
SdmResponse batchOperation(SpdmBatchTaskOpr batchTaskOpr);
|
||||
|
||||
SdmResponse importSimulationPerformance(MultipartFile file, String columns,String taskId,String taskName);
|
||||
SdmResponse importSimulationPerformance(MultipartFile file, String columns,String taskId,String taskName,String runId);
|
||||
|
||||
}
|
||||
|
||||
@@ -4189,7 +4189,7 @@ public class TaskServiceImpl implements ITaskService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SdmResponse importSimulationPerformance(MultipartFile file, String columns,String taskId,String taskName) {
|
||||
public SdmResponse importSimulationPerformance(MultipartFile file, String columns,String taskId,String taskName,String runId) {
|
||||
// 通过脚本解析导入的指标excel文件
|
||||
SdmResponse response = exportOperate.parsePerformance(file,columns);
|
||||
if(response.getCode() != ResultCode.SUCCESS.getCode()) {
|
||||
@@ -4212,6 +4212,7 @@ public class TaskServiceImpl implements ITaskService {
|
||||
performance.setUuid(RandomUtil.generateString(32));
|
||||
performance.setNodeId(taskId);
|
||||
performance.setTaskId(taskId);
|
||||
performance.setRunId(runId);
|
||||
performance.setCreateTime(createTime);
|
||||
if (StringUtils.isBlank(performance.getNodeName())) {
|
||||
performance.setNodeName(performance.getPerformanceName());
|
||||
|
||||
@@ -96,7 +96,7 @@ lombok:
|
||||
|
||||
file:
|
||||
rootPath: /data/home/sdm
|
||||
scriptPath : /opt/script
|
||||
scriptPath : D:\scripts
|
||||
|
||||
#logging:
|
||||
# config: ./config/logback.xml
|
||||
@@ -161,7 +161,7 @@ xxl:
|
||||
job:
|
||||
admin:
|
||||
# 调度中心地址列表
|
||||
addresses: http://127.0.0.1:7110/xxl-job-admin
|
||||
addresses: http://192.168.65.161:7110/xxl-job-admin
|
||||
# 调度中心访问令牌
|
||||
accessToken: default_token
|
||||
# xxl-job 超时时间(秒),默认3秒
|
||||
@@ -178,7 +178,7 @@ xxl:
|
||||
# 执行器端口,为了好记,web服务端口+1000
|
||||
port: 8101
|
||||
# 执行器日志路径
|
||||
logpath: D:\xxljob\logs
|
||||
logpath: /home/app/project/xxljob
|
||||
# 执行器日志保留天数
|
||||
logretentiondays: 14
|
||||
# 执行器排除扫描的包,多个用逗号分隔,如 "org.package01" 或 "org.package01,org.package02"
|
||||
|
||||
@@ -781,20 +781,21 @@
|
||||
</select>
|
||||
|
||||
<select id="getNodeListByUserId" resultType="com.sdm.project.model.vo.SpdmNodeVo">
|
||||
SELECT sn.*
|
||||
SELECT distinct sn.*
|
||||
FROM simulation_node sn
|
||||
LEFT JOIN simulation_node_member snm ON sn.uuid = snm.nodeId
|
||||
WHERE snm.user_id = #{userId}
|
||||
and snm.user_id = #{userId}
|
||||
where sn.tenantId = #{tenantId}
|
||||
<choose>
|
||||
<!-- 我关注的 -->
|
||||
<when test="type == 1">
|
||||
AND (snm.type = 1)
|
||||
</when>
|
||||
<!-- 我负责的逻辑待定 -->
|
||||
<!-- 我负责的 -->
|
||||
<when test="type == 2">
|
||||
AND (snm.type = 0)
|
||||
</when>
|
||||
</choose>
|
||||
AND sn.tenantId = #{tenantId}
|
||||
<if test="nodeType != null and nodeType != ''">
|
||||
and sn.nodeType = #{nodeType}
|
||||
</if>
|
||||
@@ -821,20 +822,22 @@
|
||||
</select>
|
||||
|
||||
<select id="getNodeListCountByUserId" resultType="java.lang.Integer">
|
||||
SELECT count(1)
|
||||
SELECT COUNT(DISTINCT sn.id)
|
||||
FROM simulation_node sn
|
||||
LEFT JOIN simulation_node_member snm ON sn.uuid = snm.nodeId
|
||||
WHERE snm.user_id = #{userId}
|
||||
LEFT JOIN simulation_node_member snm
|
||||
ON sn.uuid = snm.nodeId
|
||||
and snm.user_id = #{userId}
|
||||
where sn.tenantId = #{tenantId}
|
||||
<choose>
|
||||
<!-- 我关注的 -->
|
||||
<when test="type == 1">
|
||||
AND snm.type = 1
|
||||
</when>
|
||||
<!-- 我负责的逻辑待定 -->
|
||||
<!-- <when test="type == 2">-->
|
||||
<!-- -->
|
||||
<!-- </when>-->
|
||||
<!-- 我负责的 -->
|
||||
<when test="type == 2">
|
||||
AND (snm.type = 0)
|
||||
</when>
|
||||
</choose>
|
||||
AND sn.tenantId = #{tenantId}
|
||||
<if test="nodeType != null and nodeType != ''">
|
||||
and sn.nodeType = #{nodeType}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user