|
@@ -197,7 +197,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
List<WorkAttachmentInfo> cwFileInfoList2 = report.getCwFileInfoList2();
|
|
|
//判断当前登陆人与报告创建人是否是同一人
|
|
|
CwProjectReportData cwProjectReportData = reportMapper.queryById(report.getId());
|
|
|
- if(userDTO.getId().equals(cwProjectReportData.getCreateById())){
|
|
|
+ String currentTaskName = flowTaskService.getCurrentTaskName(cwProjectReportData.getProcInsId3());
|
|
|
+ //当前节点为空时,说明为第一次发起,则可以修改附件
|
|
|
+ if (StringUtils.isBlank(currentTaskName)){
|
|
|
if (CollectionUtils.isNotEmpty(cwFileInfoList2)) {
|
|
|
// updateFiles2(cwFileInfoList2, userDTO, report.getId());
|
|
|
// ossService.saveOrUpdateFileList(cwFileInfoList2,report.getId(),"cwWorkContract");
|
|
@@ -218,9 +220,37 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
|
|
|
updateSignatureFiles(cwFileInfoList, userDTO, report.getId());
|
|
|
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ //否则的话判断当前节点
|
|
|
+ //当为驳回调整,撤回时 也可以对附件进行修改
|
|
|
+ if ("发起人重新申请".equals(currentTaskName) || cwProjectReportData.getReviewStatus().equals("3")){
|
|
|
+ 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);
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ if (null != cwFileInfoList && cwFileInfoList.size()>0 ) {
|
|
|
+
|
|
|
+ updateSignatureFiles(cwFileInfoList, userDTO, report.getId());
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return report.getId();
|
|
|
}
|
|
|
|