| | |
| | | import com.ruoyi.common.config.MinioConfig; |
| | | import com.ruoyi.common.utils.file.MinioUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 针对表【work_shop_file(车间附件名称)】的数据库操作Service实现 |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<WorkShopFile> fileListById(Integer workShopId) { |
| | | List<WorkShopFile> workShopFiles = workShopFileMapper.selectList(new LambdaQueryWrapper<WorkShopFile>().eq(WorkShopFile::getWorkShopId, workShopId)); |
| | | return removeSuffixFromList(workShopFiles); |
| | | } |
| | | |
| | | public static List<WorkShopFile> removeSuffixFromList(List<WorkShopFile> list) { |
| | | for (WorkShopFile file : list) { |
| | | int dotIndex = file.getFileName().lastIndexOf('.'); |
| | | if (dotIndex != -1) { |
| | | file.setFileName(file.getFileName().substring(0, dotIndex)); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private StructureTestObject findStructureTestObjectByPartNo(String partNo) { |
| | | ProductPart productPart = productPartMapper.selectOne(new LambdaQueryWrapper<ProductPart>().eq(ProductPart::getPartNo, partNo)); |
| | | if (productPart != null) { |