package com.huimv.manage.eartag.service;

import com.huimv.manage.util.Result;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Date;

public interface IEarmarkService {
    //
    Result listEarmark(int pageSize);
    Result listEarmark(Integer applyId, Integer packageId, Integer earMarkId, Integer earMarkNumber, Integer returnState, Integer writeState, Integer printState, Date startDate, Date endDate, Integer pageSize, Integer pageNo);

    //
    Result getEarmark(int applyId) throws IOException;

    //
    Result setUpdateDownState(String earmarkIDs) throws UnsupportedEncodingException;

    //设置生产状态
    Result setProduceState(String ids,int state);

    //设置写入状态
    Result setWriteState(String ids, int state);

    //设置打码状态
    Result setPrintState(String ids, int state);

    // 通过任务号导出耳标数据
    void exportEarmarkByApply(Integer applyId, Integer printState,Integer quantity, HttpServletResponse response) throws IOException;

    // 通过耳标号导出耳标数据
    void exportEarmarkByEarmark(String ids,Integer printState, Integer quantity, HttpServletResponse response) throws IOException;

    //通过耳标号导出耳标数据到文本文件
    void exportEarmarkByApplyToTxt(Integer applyId, Integer printState, Integer quantity, HttpServletResponse response);

    void exportTest1(Integer applyId, Integer printState, Integer quantity, HttpServletResponse response);

    void exportTest2(Integer applyId, Integer printState, Integer quantity, HttpServletResponse response);
}
