|
@@ -195,29 +195,32 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
//对上传的文件数据进行持久化操作
|
|
|
List<ProjectReportWorkAttachmentDTO> cwFileInfoList = report.getCwFileInfoList();
|
|
|
List<WorkAttachmentInfo> cwFileInfoList2 = report.getCwFileInfoList2();
|
|
|
- if (CollectionUtils.isNotEmpty(cwFileInfoList2)) {
|
|
|
+ //判断当前登陆人与报告创建人是否是同一人
|
|
|
+ CwProjectReportData cwProjectReportData = reportMapper.queryById(report.getId());
|
|
|
+ if(userDTO.getId().equals(cwProjectReportData.getCreateById())){
|
|
|
+ if (CollectionUtils.isNotEmpty(cwFileInfoList2)) {
|
|
|
// updateFiles2(cwFileInfoList2, userDTO, report.getId());
|
|
|
// ossService.saveOrUpdateFileList(cwFileInfoList2,report.getId(),"cwWorkContract");
|
|
|
|
|
|
- Map<String,String> map = new HashMap<>();
|
|
|
- String fileList = JSON.toJSONString((cwFileInfoList2));
|
|
|
- String attachmentId = report.getId();
|
|
|
- String attachmentFlag = "cwWorkContract";
|
|
|
- map.put("fileList",fileList);
|
|
|
- map.put("attachmentId",attachmentId);
|
|
|
- map.put("attachmentFlag",attachmentFlag);
|
|
|
- map.put("currentToken",TokenProvider.getCurrentToken ( ));
|
|
|
- SpringUtil.getBean ( IWorkAttachmentApi.class ).saveOrUpdateFileList(map);
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
+ String fileList = JSON.toJSONString((cwFileInfoList2));
|
|
|
+ String attachmentId = report.getId();
|
|
|
+ String attachmentFlag = "cwWorkContract";
|
|
|
+ map.put("fileList",fileList);
|
|
|
+ map.put("attachmentId",attachmentId);
|
|
|
+ map.put("attachmentFlag",attachmentFlag);
|
|
|
+ map.put("currentToken",TokenProvider.getCurrentToken ( ));
|
|
|
+ SpringUtil.getBean ( IWorkAttachmentApi.class ).saveOrUpdateFileList(map);
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- if (null != cwFileInfoList && cwFileInfoList.size()>0 ) {
|
|
|
+ if (null != cwFileInfoList && cwFileInfoList.size()>0 ) {
|
|
|
|
|
|
- updateSignatureFiles(cwFileInfoList, userDTO, report.getId());
|
|
|
+ updateSignatureFiles(cwFileInfoList, userDTO, report.getId());
|
|
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
return report.getId();
|
|
|
}
|
|
|
|