|  | @@ -146,6 +146,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 | 
	
		
			
				|  |  |              CwProjectReport report = reportMapper.getById(reportData.getId());
 | 
	
		
			
				|  |  |              if (report != null){
 | 
	
		
			
				|  |  |                  reportData.setCreateBy(reportData.getCreateBy());
 | 
	
		
			
				|  |  | +                reportData.setProcInsReview(report.getProcInsReview());
 | 
	
		
			
				|  |  |                  return update(reportData);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -179,6 +180,8 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 | 
	
		
			
				|  |  |          infoData.setUpdateTime(new Date());
 | 
	
		
			
				|  |  |          infoMapper.updateCwProjectInfoDataById(infoData);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        createSignatureContractId(reportData);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          //对上传的文件数据进行持久化操作
 | 
	
		
			
				|  |  |          List<ProjectReportWorkAttachmentDTO> cwFileInfoList = report.getCwFileInfoList();
 | 
	
		
			
				|  |  |          List<WorkAttachmentInfo> cwFileInfoList2 = report.getCwFileInfoList2();
 | 
	
	
		
			
				|  | @@ -196,19 +199,13 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 | 
	
		
			
				|  |  |              map.put("currentToken",TokenProvider.getCurrentToken ( ));
 | 
	
		
			
				|  |  |              SpringUtil.getBean ( IWorkAttachmentApi.class ).saveOrUpdateFileList(map);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        } else if (CollectionUtils.isNotEmpty(cwFileInfoList)) {
 | 
	
		
			
				|  |  | -            updateFiles(cwFileInfoList, userDTO, report.getId());
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -            //删除所有的文件信息
 | 
	
		
			
				|  |  | -            List<String> ids = attachmentMapper.getIdByAttachmentId(report.getId());
 | 
	
		
			
				|  |  | -            ids.forEach(id->{
 | 
	
		
			
				|  |  | -                List<String> fileId = attachmentMapper.getFileId(id);
 | 
	
		
			
				|  |  | -                fileId.forEach(fidId->{
 | 
	
		
			
				|  |  | -                    attachmentMapper.deleteById(fidId);
 | 
	
		
			
				|  |  | -                });
 | 
	
		
			
				|  |  | -                SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteById(id);
 | 
	
		
			
				|  |  | -//                ossServiceMapper.deleteById(id);
 | 
	
		
			
				|  |  | -            });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (null != cwFileInfoList && cwFileInfoList.size()>0 ) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            updateSignatureFiles(cwFileInfoList, userDTO, report.getId());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          return report.getId();
 | 
	
	
		
			
				|  | @@ -362,7 +359,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 | 
	
		
			
				|  |  |          if ( null !=report.getCwFileInfoList()){
 | 
	
		
			
				|  |  |              fileInfoList = report.getCwFileInfoList();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -//        ossServiceMapper.delete(new QueryWrapper<WorkAttachmentInfo>().lambda().eq(WorkAttachmentInfo::getAttachmentId, report.getId()));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          AtomicInteger j = new AtomicInteger(1);
 | 
	
		
			
				|  |  |          if (fileInfoList != null){
 | 
	
		
			
				|  |  |              fileInfoList.forEach(item -> {
 | 
	
	
		
			
				|  | @@ -2418,16 +2415,14 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          //查询保存的附件信息
 | 
	
		
			
				|  |  |          List<WorkAttachmentInfo> infoList = reportMapper.findFileList(id);
 | 
	
		
			
				|  |  | -        if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(infoList)) {
 | 
	
		
			
				|  |  | +        if (CollectionUtils.isNotEmpty(infoList)) {
 | 
	
		
			
				|  |  |              for (WorkAttachmentInfo i : infoList) {
 | 
	
		
			
				|  |  |                  if (!names.contains(i.getUrl())) {
 | 
	
		
			
				|  |  | -//                    ossServiceMapper.deleteById(i.getId());
 | 
	
		
			
				|  |  |                      SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteById(i.getId());
 | 
	
		
			
				|  |  |                      List<String> fileId = attachmentMapper.getFileId(i.getId());
 | 
	
		
			
				|  |  |                      fileId.forEach(fid->{
 | 
	
		
			
				|  |  |                          attachmentMapper.deleteById(fid);
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -2470,8 +2465,6 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
 | 
	
		
			
				|  |  |                  attachmentMapper.insert(reportFile);
 | 
	
		
			
				|  |  |                  j++;
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  | -//                CwProjectReportFile reportFile = new CwProjectReportFile();
 | 
	
		
			
				|  |  | -//                BeanUtils.copyProperties(dto, reportFile);
 | 
	
		
			
				|  |  |                  attachmentMapper.updateFileInfo(dto);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |