| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.StorageBlobVO; |
| | | import com.ruoyi.basic.mapper.StorageAttachmentMapper; |
| | | import com.ruoyi.basic.mapper.StorageBlobMapper; |
| | | import com.ruoyi.basic.pojo.StorageBlob; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.utils.MinioUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper, InspectionTask> implements InspectionTaskService { |
| | | |
| | | |
| | | @Autowired |
| | | private InspectionTaskMapper inspectionTaskMapper; |
| | | private final InspectionTaskMapper inspectionTaskMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentService storageAttachmentService; |
| | | private final StorageAttachmentService storageAttachmentService; |
| | | |
| | | @Autowired |
| | | private StorageBlobMapper storageBlobMapper; |
| | | private final StorageBlobMapper storageBlobMapper; |
| | | |
| | | @Autowired |
| | | private StorageAttachmentMapper storageAttachmentMapper; |
| | | private final StorageAttachmentMapper storageAttachmentMapper; |
| | | |
| | | @Autowired |
| | | private MinioUtils minioUtils; |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | |
| | | @Override |
| | | public IPage<InspectionTaskDto> selectInspectionTaskList(Page<InspectionTask> page, InspectionTaskDto inspectionTaskDto) { |
| | |
| | | BeanUtils.copyProperties(entityPage, resultPage); |
| | | resultPage.setRecords(dtoList); |
| | | return resultPage; |
| | | } |
| | | |
| | | // 提取创建BlobDTO的公共方法 |
| | | private StorageBlobVO createBlobDto(StorageBlob blob) { |
| | | StorageBlobVO dto = new StorageBlobVO(); |
| | | BeanUtils.copyProperties(blob, dto); |
| | | |
| | | // todo fileChange |
| | | // // 设置URL |
| | | // dto.setUrl(minioUtils.getPreviewUrls( |
| | | // blob.getBucketFilename(), |
| | | // blob.getBucketName(), |
| | | // true |
| | | // )); |
| | | // |
| | | // // 设置下载URL |
| | | // dto.setDownloadUrl(minioUtils.getDownloadUrls( |
| | | // blob.getBucketFilename(), |
| | | // blob.getBucketName(), |
| | | // blob.getOriginalFilename(), |
| | | // true |
| | | // )); |
| | | return dto; |
| | | } |
| | | |
| | | @Override |