package com.yunfeiyun.agmp.fms.service;

import com.yunfeiyun.agmp.fms.domain.TssTracecodetpl;
import com.yunfeiyun.agmp.fms.domain.reqvo.TssTraceCodeGenerateReqVo;
import com.yunfeiyun.agmp.fms.domain.reqvo.TssTracecodetplEditReqVo;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


/**
 * 溯源码模板Service接口
 * 
 * @author 杨晓辉
 * @date 2023-07-04
 */
public interface ITssTracecodetplService 
{
    /**
     * 查询溯源码模板
     * 
     * @param tracecodetplId 溯源码模板主键
     * @return 溯源码模板
     */
    public TssTracecodetpl selectTssTracecodetplByTracecodetplId(String tracecodetplId);

    /**
     * 查询溯源码模板列表
     * 
     * @param tssTracecodetpl 溯源码模板
     * @return 溯源码模板集合
     */
    public List<TssTracecodetpl> selectTssTracecodetplList(TssTracecodetpl tssTracecodetpl);

    /**
     * 新增溯源码模板
     * 
     * @param tssTracecodetpl 溯源码模板
     * @return 结果
     */
    public int insertTssTracecodetpl(TssTracecodetpl tssTracecodetpl);

    /**
     * 修改溯源码模板
     * 
     * @param tssTracecodetpl 溯源码模板
     * @return 结果
     */
    public int updateTssTracecodetpl(TssTracecodetpl tssTracecodetpl);

    /**
     * 批量删除溯源码模板
     * 
     * @param tracecodetplIds 需要删除的溯源码模板主键集合
     * @return 结果
     */
    public int deleteTssTracecodetplByTracecodetplIds(String[] tracecodetplIds);

    /**
     * 删除溯源码模板信息
     * 
     * @param tracecodetplId 溯源码模板主键
     * @return 结果
     */
    public int deleteTssTracecodetplByTracecodetplId(String tracecodetplId);

    /**
     * 绘制溯源码，并以base64返回
     * @param param 溯源码模板参数
     * @return base64
     * */
    public String drawTraceCode(TssTracecodetpl tssTracecodetpl);

    public boolean updateTssTraceCodeTplBackgroundAndLogo(TssTracecodetplEditReqVo tssTracecodetplEditReqVo);

    public boolean generate(TssTraceCodeGenerateReqVo tssTraceCodeGenerateReqVo);
    public ResponseEntity<InputStreamResource> downLand(String tarcecodeapplyBatchno) throws Exception;

    public ResponseEntity<InputStreamResource> downLand(String[] tarcecodeapplynos) throws Exception;
    public void export(HttpServletResponse response, String tarcecodeapplyBatchno);
}
