feat:编辑算例关键结果属性

This commit is contained in:
2025-12-09 17:44:55 +08:00
parent 5dfe3e58a5
commit 4358007220
4 changed files with 20 additions and 0 deletions

View File

@@ -132,6 +132,12 @@ public class SimulationRunController implements ISimulationRunFeignClient {
return runService.addSimulationKeyResult(req);
}
@SysLog("编辑算例关键结果属性")
@PostMapping(value = "/editSimulationKeyResult")
public SdmResponse editSimulationKeyResult(@RequestBody KeyResultReq req) {
return runService.editSimulationKeyResult(req);
}
/**
* 上传交付物-第一步 文件信息和关键结果信息批量入库
*

View File

@@ -10,6 +10,7 @@ import java.util.List;
@Data
public class KeyResultReq extends BaseReq {
private Long id;
private String uuid;

View File

@@ -51,6 +51,8 @@ public interface ISimulationRunService extends IService<SimulationRun> {
SdmResponse addSimulationKeyResult(KeyResultReq req);
SdmResponse editSimulationKeyResult(KeyResultReq req);
SdmResponse<List<BatchAddFileInfoResp>> batchAddSimulationKeyResult(KeyResultReq req);
SdmResponse deliverableApprove(DeliverableApproveReq req);

View File

@@ -779,6 +779,17 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
return SdmResponse.success(simulationRunKeyResult.getUuid());
}
@Override
@Transactional(rollbackFor = Exception.class)
public SdmResponse editSimulationKeyResult(KeyResultReq req) {
SimulationRunKeyResult simulationRunKeyResult = new SimulationRunKeyResult();
BeanUtils.copyProperties(req, simulationRunKeyResult);
if (!simulationKeyResultService.updateById(simulationRunKeyResult)) {
return SdmResponse.failed("更新关键结果失败");
}
return SdmResponse.success();
}
/**
* 保存上传的文件到临时目录
*/