liding
2025-04-10 a3e0493b2f597e8c49ee80a0c7ab92bc30dc60a3
basic-server/src/main/java/com/ruoyi/basic/service/impl/WorkShopFileServiceImpl.java
@@ -10,10 +10,10 @@
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实现
@@ -77,6 +77,22 @@
        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) {