| | |
| | | import com.ard.inspection.domain.NotCould; |
| | | import com.ard.inspection.utils.ZipFileUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ard.inspection.mapper.ArdPointCloudMapper; |
| | | import com.ard.inspection.domain.ArdPointCloud; |
| | |
| | | */ |
| | | @Service |
| | | public class ArdPointCloudServiceImpl implements IArdPointCloudService { |
| | | |
| | | @Value(value = "${pointCloud.folder}") |
| | | private String cloudFolder; |
| | | |
| | | @Autowired |
| | | private ArdPointCloudMapper ardPointCloudMapper; |
| | |
| | | @Override |
| | | public int deleteArdPointCloudByIds(String[] ids) { |
| | | // 删除点云文件 |
| | | String folderPath = "/home/inspection/uploadPath/zip/"; |
| | | int count = 0; |
| | | for (String id : ids) { |
| | | ArdPointCloud ardPointCloud = ardPointCloudMapper.selectArdPointCloudById(id); |
| | | if (zipFileUtils.deleteZipFile(folderPath + ardPointCloud.getFolderName())){ |
| | | if (zipFileUtils.deleteZipFile(cloudFolder + ardPointCloud.getFolderName())){ |
| | | ardPointCloudMapper.deleteArdPointCloudById(id); |
| | | count++; |
| | | } |