【修改】 pptx读取文件位置
This commit is contained in:
@@ -47,7 +47,7 @@ public class JudgementWpsPptxServiceImpl implements JudgementWpsPptxService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<WpsPptxJudgementDto> judgementWpsPptx(List<JudgementReqVo> judgementReq, String path) throws Exception {
|
public List<WpsPptxJudgementDto> judgementWpsPptx(List<JudgementReqVo> judgementReq, String path) throws Exception {
|
||||||
return JudgementWpsPPT.getValues(judgementReq, path);
|
return JudgementWpsPPT.getValues(judgementReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -97,9 +97,10 @@ public class JudgementWpsPptxServiceImpl implements JudgementWpsPptxService {
|
|||||||
judgementReqVo.setIsText(pptxInfos[5]);
|
judgementReqVo.setIsText(pptxInfos[5]);
|
||||||
judgementReqVo.setIsTrue(pptxInfos[6]);
|
judgementReqVo.setIsTrue(pptxInfos[6]);
|
||||||
judgementReqVo.setIsParameter(pptxInfos[7]);
|
judgementReqVo.setIsParameter(pptxInfos[7]);
|
||||||
|
judgementReqVo.setPath(path);
|
||||||
judgementReq.add(judgementReqVo);
|
judgementReq.add(judgementReqVo);
|
||||||
}
|
}
|
||||||
List<WpsPptxJudgementDto> judgementDtos = JudgementWpsPPT.getValues(judgementReq, path);
|
List<WpsPptxJudgementDto> judgementDtos = JudgementWpsPPT.getValues(judgementReq);
|
||||||
// 4、进行关联判断
|
// 4、进行关联判断
|
||||||
for (ExamQuestionAnswer examQuestionAnswer : answerList) {
|
for (ExamQuestionAnswer examQuestionAnswer : answerList) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
@@ -30,7 +30,7 @@ import java.util.*;
|
|||||||
* @author REN
|
* @author REN
|
||||||
*/
|
*/
|
||||||
public class JudgementWpsPPT {
|
public class JudgementWpsPPT {
|
||||||
public static List<WpsPptxJudgementDto> getValues(List<JudgementReqVo> judgementReq, String path) throws InvalidFormatException, IOException, ParserConfigurationException, SAXException {
|
public static List<WpsPptxJudgementDto> getValues(List<JudgementReqVo> judgementReq) throws InvalidFormatException, IOException, ParserConfigurationException, SAXException {
|
||||||
// 1、文件路径或者文件的属性
|
// 1、文件路径或者文件的属性
|
||||||
// 2、查找文件的属性其中字段为:name firstFunction SecondFunction ThirdFunction FourthFunction isboo betong 转换
|
// 2、查找文件的属性其中字段为:name firstFunction SecondFunction ThirdFunction FourthFunction isboo betong 转换
|
||||||
// 3、名称 标签 标签段落 值标签 关联关系 关联文件名称 )
|
// 3、名称 标签 标签段落 值标签 关联关系 关联文件名称 )
|
||||||
@@ -43,6 +43,7 @@ public class JudgementWpsPPT {
|
|||||||
List<WpsPptxJudgementDto> judgementList = new ArrayList<>();
|
List<WpsPptxJudgementDto> judgementList = new ArrayList<>();
|
||||||
|
|
||||||
for (JudgementReqVo reqVo : judgementReq) {
|
for (JudgementReqVo reqVo : judgementReq) {
|
||||||
|
String path = reqVo.getPath();
|
||||||
String chineseName = reqVo.getChineseName();
|
String chineseName = reqVo.getChineseName();
|
||||||
String fileNama = reqVo.getFileNama();
|
String fileNama = reqVo.getFileNama();
|
||||||
String paragraph = reqVo.getParagraph();
|
String paragraph = reqVo.getParagraph();
|
||||||
|
@@ -7,6 +7,7 @@ import lombok.Data;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class JudgementReqVo {
|
public class JudgementReqVo {
|
||||||
|
private String path;
|
||||||
|
|
||||||
// 中文考点
|
// 中文考点
|
||||||
private String chineseName;
|
private String chineseName;
|
||||||
|
Reference in New Issue
Block a user