|
@@ -335,6 +335,7 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
ZEngineeringIndustry update = BeanUtil.toBean(bo, ZEngineeringIndustry.class);
|
|
ZEngineeringIndustry update = BeanUtil.toBean(bo, ZEngineeringIndustry.class);
|
|
validEntityBeforeSave(update);
|
|
validEntityBeforeSave(update);
|
|
boolean flag = baseMapper.updateById(update) > 0;
|
|
boolean flag = baseMapper.updateById(update) > 0;
|
|
|
|
+ bo.setCreateTime(baseMapper.selectVoById(bo.getId()).getCreateTime());
|
|
if (flag) {
|
|
if (flag) {
|
|
List<ZEngiineeringPhoto> list = new ArrayList<>();
|
|
List<ZEngiineeringPhoto> list = new ArrayList<>();
|
|
// 查询数据库中已存在的文件列表
|
|
// 查询数据库中已存在的文件列表
|
|
@@ -488,12 +489,13 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
public Boolean updateNodeByBo(ZEngineeringIndustryBo bo) {
|
|
public Boolean updateNodeByBo(ZEngineeringIndustryBo bo) {
|
|
ZEngineeringIndustry update = BeanUtil.toBean(bo, ZEngineeringIndustry.class);
|
|
ZEngineeringIndustry update = BeanUtil.toBean(bo, ZEngineeringIndustry.class);
|
|
boolean flag = baseMapper.updateById(update) > 0;
|
|
boolean flag = baseMapper.updateById(update) > 0;
|
|
|
|
+ bo.setCreateTime(baseMapper.selectVoById(bo.getId()).getCreateTime());
|
|
if (flag) {
|
|
if (flag) {
|
|
if (!ObjectUtils.isEmpty(bo.getFiles())) {
|
|
if (!ObjectUtils.isEmpty(bo.getFiles())) {
|
|
List<ZEngiineeringPhoto> list = new ArrayList<>();
|
|
List<ZEngiineeringPhoto> list = new ArrayList<>();
|
|
// 查询数据库中已存在的文件列表
|
|
// 查询数据库中已存在的文件列表
|
|
ZEngiineeringPhotoBo zEngiineeringPhotoBo = new ZEngiineeringPhotoBo();
|
|
ZEngiineeringPhotoBo zEngiineeringPhotoBo = new ZEngiineeringPhotoBo();
|
|
- zEngiineeringPhotoBo.setCreateTime(update.getCreateTime());
|
|
|
|
|
|
+ zEngiineeringPhotoBo.setCreateTime(bo.getCreateTime());
|
|
zEngiineeringPhotoBo.setParentId(update.getId());
|
|
zEngiineeringPhotoBo.setParentId(update.getId());
|
|
List<String> existingPhotos = photoService.queryList(zEngiineeringPhotoBo).stream().map(ZEngiineeringPhotoVo::getPicUrl).collect(Collectors.toList());
|
|
List<String> existingPhotos = photoService.queryList(zEngiineeringPhotoBo).stream().map(ZEngiineeringPhotoVo::getPicUrl).collect(Collectors.toList());
|
|
// 插入前端传来的新文件
|
|
// 插入前端传来的新文件
|
|
@@ -581,9 +583,11 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) {
|
|
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) {
|
|
|
|
|
|
ids.forEach(item -> {
|
|
ids.forEach(item -> {
|
|
|
|
+ ZEngineeringIndustryVo vo = baseMapper.selectVoById(item);
|
|
// 查询数据库中已存在的文件列表
|
|
// 查询数据库中已存在的文件列表
|
|
ZEngiineeringPhotoBo zEngiineeringPhotoBo = new ZEngiineeringPhotoBo();
|
|
ZEngiineeringPhotoBo zEngiineeringPhotoBo = new ZEngiineeringPhotoBo();
|
|
zEngiineeringPhotoBo.setParentId(item);
|
|
zEngiineeringPhotoBo.setParentId(item);
|
|
|
|
+ zEngiineeringPhotoBo.setCreateTime(vo.getCreateTime());
|
|
// 将查询出的url放入existingPhotos
|
|
// 将查询出的url放入existingPhotos
|
|
List<String> existingPhotos = photoService.queryList(zEngiineeringPhotoBo).stream().map(ZEngiineeringPhotoVo::getPicUrl).collect(Collectors.toList());
|
|
List<String> existingPhotos = photoService.queryList(zEngiineeringPhotoBo).stream().map(ZEngiineeringPhotoVo::getPicUrl).collect(Collectors.toList());
|
|
// 若存在 则进行删除
|
|
// 若存在 则进行删除
|
|
@@ -593,7 +597,7 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
});
|
|
});
|
|
}
|
|
}
|
|
// 初始化工程节点对象
|
|
// 初始化工程节点对象
|
|
- ZEngineeringIndustryVo vo = baseMapper.selectVoById(item);
|
|
|
|
|
|
+
|
|
ZEngineeringNodeBo zEngineeringNodeBo = new ZEngineeringNodeBo();
|
|
ZEngineeringNodeBo zEngineeringNodeBo = new ZEngineeringNodeBo();
|
|
zEngineeringNodeBo.setCreateTime(vo.getCreateTime());
|
|
zEngineeringNodeBo.setCreateTime(vo.getCreateTime());
|
|
zEngineeringNodeBo.setCivliId(vo.getId());
|
|
zEngineeringNodeBo.setCivliId(vo.getId());
|