Fancy
2024-09-04 994e1784f49e189210e08ccc093db0cfca23fbf5
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -524,27 +524,27 @@
        ins.extName = file.extName;
    }
    private PltProduct addWebUrl(PltProduct pro) {
        if (pro != null) {
            if (pro.image != null) {
                String filePathWithWebUrl = getFilePathWithWebUrl(pro.image);
                pro.imageWebPath = filePathWithWebUrl;
                pro.imageWebPathZip = fileOperate.getImgFileZipPath(filePathWithWebUrl);
            }
            pro.proFiles.stream().forEach(doc -> {
                OthFile file = othFileMapper.selectByPrimaryKey(doc.fileId);
                if (file == null) {
                    return;
                }
                FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
                doc.webUrl = fileRestVo.fileSysRestUrl + fileRestVo.fileWebDownloadPath + doc.fileId;
                doc.orgName = file.orgName;
                doc.extName = file.extName;
            });
        }
        return pro;
    }
//    private PltProduct addWebUrl(PltProduct pro) {
//        if (pro != null) {
//            if (pro.image != null) {
//                String filePathWithWebUrl = getFilePathWithWebUrl(pro.image);
//                pro.imageWebPath = filePathWithWebUrl;
//                pro.imageWebPathZip = fileOperate.getImgFileZipPath(filePathWithWebUrl);
//            }
//
//            pro.proFiles.stream().forEach(doc -> {
//                OthFile file = othFileMapper.selectByPrimaryKey(doc.fileId);
//                if (file == null) {
//                    return;
//                }
//                FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
//                doc.webUrl = fileRestVo.fileWebDownloadPath + doc.fileId;
//                doc.orgName = file.orgName;
//                doc.extName = file.extName;
//            });
//        }
//        return pro;
//    }
    private String getFilePathWithWebUrl(Long fileId) {
        OthFile file = othFileMapper.selectByPrimaryKey(fileId);