公告结构化

This commit is contained in:
zhangqinbin
2023-12-21 16:40:46 +08:00
parent ef53df806d
commit 69de0f39fa
2 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -271,6 +272,13 @@ public class WpsController {
String fileName = fileIdName;
String text = " ";
byte buf[] = text.getBytes();
try {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream("text.doc"));
buf = IOUtils.toByteArray(bis);
}catch (Exception e){
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("模板文件读取异常",true);
}
String fileLength = String.valueOf(buf.length);
if(optional!=null&&optional.get()!=null){

BIN
src/main/resources/text.doc Normal file

Binary file not shown.