|
@@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.helper.LoginHelper;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
+import com.ruoyi.framework.handler.MonthTableNameHandler;
|
|
|
import com.ruoyi.zdsz.domain.ZEngiineeringPhoto;
|
|
|
import com.ruoyi.zdsz.domain.ZEngineeringIndustry;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZEngiineeringPhotoBo;
|
|
@@ -153,6 +154,7 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
// 查询数据库中已存在的文件列表
|
|
|
ZEngiineeringPhotoBo zEngiineeringPhotoBo = new ZEngiineeringPhotoBo();
|
|
|
zEngiineeringPhotoBo.setParentId(update.getId());
|
|
|
+ zEngiineeringPhotoBo.setCreateTime(bo.getCreateTime());
|
|
|
List<String> existingPhotos = photoService.queryList(zEngiineeringPhotoBo).stream()
|
|
|
.map(ZEngiineeringPhotoVo::getPicUrl)
|
|
|
.collect(Collectors.toList());
|
|
@@ -165,7 +167,8 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
newPhoto.setPicUrl(pic.getUrl());
|
|
|
newPhoto.setFileName(pic.getName());
|
|
|
newPhoto.setCreateBy(String.valueOf(LoginHelper.getUserId()));
|
|
|
- newPhoto.setCreateTime(new Date());
|
|
|
+ newPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ newPhoto.setUpdateTime(new Date());
|
|
|
list.add(newPhoto);
|
|
|
}
|
|
|
}
|
|
@@ -175,7 +178,10 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
.collect(Collectors.toList());
|
|
|
if (!photosToDelete.isEmpty()) {
|
|
|
photosToDelete.forEach(item->{
|
|
|
- photoService.deleteWithValidByurls(item);
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto=new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ photoService.deleteWithValid(zEngiineeringPhoto);
|
|
|
});
|
|
|
}
|
|
|
// 批量插入新图片
|
|
@@ -222,7 +228,8 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
newPhoto.setPicUrl(pic.getUrl());
|
|
|
newPhoto.setFileName(pic.getName());
|
|
|
newPhoto.setCreateBy(String.valueOf(LoginHelper.getUserId()));
|
|
|
- newPhoto.setCreateTime(new Date());
|
|
|
+ newPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ newPhoto.setUpdateTime(new Date());
|
|
|
list.add(newPhoto);
|
|
|
}
|
|
|
}
|
|
@@ -232,7 +239,10 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
.collect(Collectors.toList());
|
|
|
if (!photosToDelete.isEmpty()) {
|
|
|
photosToDelete.forEach(item->{
|
|
|
- photoService.deleteWithValidByurls(item);
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto=new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ photoService.deleteWithValid(zEngiineeringPhoto);
|
|
|
});
|
|
|
}
|
|
|
// 批量插入新图片
|