|
@@ -9,12 +9,16 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.ruoyi.framework.obs.ObsService;
|
|
|
import com.ruoyi.zdsz.domain.ZEngiineeringPhoto;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZEngiineeringPhotoBo;
|
|
|
+import com.ruoyi.zdsz.domain.bo.ZEngineeringNodeBo;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZHouseBo;
|
|
|
import com.ruoyi.zdsz.domain.vo.ZEngiineeringPhotoVo;
|
|
|
+import com.ruoyi.zdsz.domain.vo.ZEngineeringPipeJackingVo;
|
|
|
import com.ruoyi.zdsz.domain.vo.ZHouseVo;
|
|
|
import com.ruoyi.zdsz.mapper.ZEngiineeringPhotoMapper;
|
|
|
+import com.ruoyi.zdsz.service.IZEngiineeringPhotoService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZComprehensiveBo;
|
|
@@ -42,6 +46,10 @@ public class ZComprehensiveServiceImpl implements IZComprehensiveService {
|
|
|
|
|
|
@Resource
|
|
|
private ZEngiineeringPhotoMapper photoMapper;
|
|
|
+ @Resource
|
|
|
+ private ObsService obsService;
|
|
|
+ @Resource
|
|
|
+ private IZEngiineeringPhotoService photoService;
|
|
|
|
|
|
/**
|
|
|
* 查询开栓|安检|维修
|
|
@@ -113,7 +121,7 @@ public class ZComprehensiveServiceImpl implements IZComprehensiveService {
|
|
|
pic.setUpdateTime(new Date());
|
|
|
list.add(pic);
|
|
|
});
|
|
|
- if (list.size()>0) {
|
|
|
+ if (!list.isEmpty()) {
|
|
|
photoMapper.insertBatch(list);
|
|
|
}
|
|
|
}
|
|
@@ -143,7 +151,7 @@ public class ZComprehensiveServiceImpl implements IZComprehensiveService {
|
|
|
pic.setCreateTime(new Date());
|
|
|
list.add(pic);
|
|
|
});
|
|
|
- if (list.size()>0) {
|
|
|
+ if (!list.isEmpty()) {
|
|
|
photoMapper.insertBatch(list);
|
|
|
}
|
|
|
}
|
|
@@ -167,6 +175,17 @@ public class ZComprehensiveServiceImpl implements IZComprehensiveService {
|
|
|
if(isValid){
|
|
|
//TODO 做一些业务上的校验,判断是否需要校验
|
|
|
}
|
|
|
+ ids.forEach(item -> {
|
|
|
+ ZComprehensiveVo vo = baseMapper.selectVoById(item);
|
|
|
+ ZEngiineeringPhotoBo bo = new ZEngiineeringPhotoBo();
|
|
|
+ bo.setCreateTime(vo.getCreateTime());
|
|
|
+ bo.setParentId(vo.getId());
|
|
|
+ List<ZEngiineeringPhotoVo> queriedList = photoService.queryList(bo);
|
|
|
+ if (!queriedList.isEmpty()) {
|
|
|
+ obsService.deleteFiles(queriedList.stream().map(ZEngiineeringPhotoVo::getPicUrl).collect(Collectors.toList()));
|
|
|
+ photoService.deleteWithValidByIds(queriedList.stream().map(ZEngiineeringPhotoVo::getId).collect(Collectors.toList()),true);
|
|
|
+ }
|
|
|
+ });
|
|
|
return baseMapper.deleteBatchIds(ids) > 0;
|
|
|
}
|
|
|
}
|