package cn.ezhizao.project.business.technologicalProcessDetailDrawing.service;


import cn.ezhizao.project.business.technologicalProcessDetailDrawing.domain.BizTechnologicalProcessDetailDrawing;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException;
import org.apache.pdfbox.exceptions.COSVisitorException;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

/**
 * 电子图纸Service接口
 *
 * @author ezhizao
 * @date 2024-05-30
 */
public interface IBizTechnologicalProcessDetailDrawingService extends IService<BizTechnologicalProcessDetailDrawing>
{
    /**
     * 查询电子图纸列表
     *
     * @param bizTechnologicalProcessDetailDrawing 电子图纸
     * @return 电子图纸集合
     */
    public List<BizTechnologicalProcessDetailDrawing> getList(BizTechnologicalProcessDetailDrawing bizTechnologicalProcessDetailDrawing);

    /**
     * 物理删除
     * @param bizTechnologicalProcessDetailDrawing
     * @return 删除结果
     */
    public int physicalDelete(BizTechnologicalProcessDetailDrawing bizTechnologicalProcessDetailDrawing);

    public int saveData( List<BizTechnologicalProcessDetailDrawing> bizTechnologicalProcessDetailDrawing,String userName, String nickName) throws COSVisitorException, DocumentException, IOException;
    /**
     * 查询电子图纸列表
     *
     * @param bizTechnologicalProcessDetailDrawing 电子图纸
     * @return 电子图纸集合
     */
    public List<BizTechnologicalProcessDetailDrawing> getDrawingList(BizTechnologicalProcessDetailDrawing bizTechnologicalProcessDetailDrawing);


    public List<BizTechnologicalProcessDetailDrawing> getDrawingListByBasics(BizTechnologicalProcessDetailDrawing bizTechnologicalProcessDetailDrawing);

    /**
     * 查询产品在工序的电子图纸
     */
    public Integer getProcuctDrawing();


    public int edit(BizTechnologicalProcessDetailDrawing bizTechnologicalProcessDetailDrawing);

    public int replaceDrawing( BizTechnologicalProcessDetailDrawing processDetailDrawing) throws COSVisitorException, DocumentException, IOException;
    public void addImage(String srcPath,String resultPath,String imgPath,Integer x,Integer y,Integer width,Integer height,Integer rotation,float opacity) throws DocumentException, IOException;
    public void addText(String srcPath,String resultPath,String text,Integer x,Integer y,Integer fontSize,Integer rotation) throws IOException, DocumentException;
    public int drawingRemove(List<BizTechnologicalProcessDetailDrawing> processDetailDrawing,String userName,String nickName) throws DocumentException, IOException;

    public int drawingNG(List<BizTechnologicalProcessDetailDrawing> processDetailDrawing,String userName,String nickName);
}
