feat: 国内外标准 多文档 操作 及 删除 国家属性字段

This commit is contained in:
super_liu
2021-07-28 16:14:52 +08:00
parent f0fd398fee
commit 0b069efd95
2 changed files with 7 additions and 14 deletions
@@ -608,8 +608,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
sarStandFileEO.setFileSuffix(fileInfo.getFileSuffix());
sarStandFileEO.setOriAttId(fileInfo.getId());
standFileList.add(sarStandFileEO);
//文档转换
if ("pdf".equals(fileInfo.getFileSuffix()) || "PDF".equals(fileInfo.getFileSuffix())) {
//多文档转换 PPT|PPTX|ppt|pptx|PDF|pdf|DOC|doc|DOCX|docx
if (verifyFileType(fileInfo.getFileSuffix())) {
SarStandFile newFileEO = new SarStandFile();
newFileEO.setCreationUser(LoginUserUtil.getUserId());
newFileEO.setCreationTime(new Date());
@@ -640,6 +640,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
}
private Boolean verifyFileType(String str){
String verifyType = "^PPT|PPTX|ppt|pptx|PDF|pdf|DOC|doc|DOCX|docx*$";
return Pattern.matches(verifyType,str);
}
public void createStandPutTime(String standId, Map<String, String> multiTimeMap) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (multiTimeMap != null && multiTimeMap.size() > 0) {