Merge branch 'develop_3' into 'develop_master'

Develop 3

See merge request !68
This commit is contained in:
super_liu
2021-07-28 08:16:16 +00:00
3 changed files with 14 additions and 20 deletions
@@ -158,18 +158,6 @@ public class SarStandAttrInfo extends BaseEntity {
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private String ssrq;
@ApiModelProperty(value = "实施日期(国际)")
@TableField("SSRQGJ")
private String ssrqgj;
@ApiModelProperty(value = "新车型实施日期(国家)")
@TableField("XCXSSRQGJ")
private String xcxssrqgj;
@ApiModelProperty(value = "在产车实施日期(国家)")
@TableField("ZCCSSRQGJ")
private String zccssrqgj;
@ApiModelProperty(value = "修改单")
@TableField("XGD")
private String xgd;
@@ -620,8 +620,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());
@@ -652,6 +652,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) {
@@ -276,13 +276,14 @@ public class AttFileEOController {
TsUser tsUser = userDao.selectById(userId);
if (tsUser != null) {
userMsg = tsUser.getUname() + ",";
if (StringUtils.isNotEmpty(tsUser.getWorkNum())) {
userMsg += tsUser.getWorkNum() + ",";
}
//2021/7/28水印内容取消工号
// if (StringUtils.isNotEmpty(tsUser.getWorkNum())) {
// userMsg += tsUser.getWorkNum() + ",";
// }
}
// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");//设置日期格式
// String date = df.format(new Date());
String waterContent = userMsg ;
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm");//设置日期格式
String date = df.format(new Date());
String waterContent = userMsg+date ;
//2020年9月5日 去掉水印处理
//2021年7月25日要求下载生成水印
WaterMarkUtil.waterMark(oldFilePath,waterFilePath,waterContent);