Fancy
2024-08-21 d8c8530752a3f19f082560f767b04471b2dd1085
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java
@@ -177,7 +177,7 @@
                     return;
                 }
                 FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
                 doc.webUrl = fileRestVo.fileSysRestUrl + fileRestVo.fileWebDownloadPath + doc.fileId;
                 doc.webUrl = fileRestVo.fileWebDownloadPath + doc.fileId;
                 doc.orgName = file.orgName;
                 doc.extName = file.extName;
             });
@@ -211,46 +211,48 @@
                    item.qrCode = "data:image/jpeg;base64," + Base64.encode(codes);
                    item = addWebUrl(item);
                } catch (IOException e) {
                    e.printStackTrace();
                    log.error("IOException:",e);
                } catch (WriterException e) {
                    e.printStackTrace();
                    log.error("WriterException:",e);
                }
            });
        }
        return rsVo ;
    }
    /**
     * 添加产品文档关联
     * @param proId 产品id
     * @param fileId 文档id
     * @return 更新数量
     */
    public int addDoc(long proId,long fileId,String fileType){
        PltProductFile pf=new PltProductFile();
        pf.fileId = fileId;
        pf.proId = proId;
        pf.fileType = fileType;
        return pfDao.insertSelective(pf);
    }
//    /**
//     * 添加产品文档关联
//     * @param proId 产品id
//     * @param fileId 文档id
//     * @return 更新数量
//     */
//    public int addDoc(long proId,long fileId,String fileType){
//        PltProductFile pf=new PltProductFile();
//        pf.fileId = fileId;
//        pf.proId = proId;
//        pf.fileType = fileType;
//        return pfDao.insertSelective(pf);
//    }
    /**
     * 查询产品关联文档
     * @param proId 产品id
     * @return 返回关联文档集合
     */
    public List<OthFile> selectDoc(long proId){
        return othFileMapper.selectByProId(proId);
    }
//    /**
//     * 查询产品关联文档
//     * @param proId 产品id
//     * @return 返回关联文档集合
//     */
//    public List<OthFile> selectDoc(long proId){
//        return othFileMapper.selectByProId(proId);
//    }
    public List<PltProduct> selectAll(QueryVo queryVo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        return dao.selectAll(params);
    }
    public void downloadDoc(HttpServletResponse response) {
        PltProduct pro=dao.selectByPrimaryKey(Long.valueOf(1));
    public List<PltProduct> selectByOrderId(Long orderId) {
        return dao.selectByOrderId(orderId);
    }
//    public void downloadDoc(HttpServletResponse response) {
//        PltProduct pro=dao.selectByPrimaryKey(Long.valueOf(1));
//    }
}