|
@@ -85,7 +85,7 @@ public class ContractFilePaperService {
|
|
|
mapper.updateById(file);
|
|
|
List<WorkAttachmentDto> list = filePaper.getContractProperList();
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
- updateFiles(list, userDTO, file.getId());
|
|
|
+ updateFiles(list, userDTO, file.getId(),filePaper.getContractInfoId());
|
|
|
}else {
|
|
|
//删除文件信息
|
|
|
mapper.deleteFileInfo(file.getId());
|
|
@@ -123,7 +123,7 @@ public class ContractFilePaperService {
|
|
|
* @param id 关联id
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void updateFiles(List<WorkAttachmentDto> list, UserDTO userDTO, String id) {
|
|
|
+ public void updateFiles(List<WorkAttachmentDto> list, UserDTO userDTO, String id,String contractInfoId) {
|
|
|
int j = 1;
|
|
|
String names = new String();
|
|
|
//表中存在,但是传过来不存在,说明已删除,表中数据也要删除
|
|
@@ -142,7 +142,7 @@ public class ContractFilePaperService {
|
|
|
//保存信息
|
|
|
for (WorkAttachmentDto dto : list) {
|
|
|
//判断是否存在
|
|
|
- Integer isExit = mapper.findIsExit(id, dto.getName());
|
|
|
+ Integer isExit = mapper.findIsExit(id, contractInfoId, dto.getName());
|
|
|
if (isExit == 0) {
|
|
|
WorkAttachment i = new WorkAttachment();
|
|
|
//包含了url、size、name
|