上个版本补漏
This commit is contained in:
@@ -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("暂态波形下载")
|
||||
|
||||
Reference in New Issue
Block a user