上个版本补漏

This commit is contained in:
guofeihu
2024-09-12 13:47:30 +08:00
parent 1ec3385f2d
commit 00c5f4c710
10 changed files with 274 additions and 34 deletions

View File

@@ -23,6 +23,9 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.List;
/**
@@ -60,6 +63,24 @@ public class TransientController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, wave, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getTransientAnalyseWaveToByteArray")
@ApiOperation("暂态事件波形分析(转byte数组)")
public HttpResult<byte[]> getTransientAnalyseWaveToByteArray(@RequestBody MonitorTerminalParam param){
byte[] bytes = null;
String methodDescribe = getMethodDescribe("getTransientAnalyseWaveToByteArray");
WaveDataDTO wave = transientService.getTransientAnalyseWave(param);
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(wave);
bytes = baos.toByteArray();
} catch (IOException e) {
e.printStackTrace();
}
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, bytes, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
@PostMapping("/downloadWaveFile")
@ApiOperation("暂态波形下载")