/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.yifu.cloud.plus.v1.yifu.salary.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryZero;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryZeroSearchVo;

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

/**
 * 0申报
 *
 * @author hgw
 * @date 2026-03-18 14:47:00
 */
public interface TSalaryZeroService extends IService<TSalaryZero> {

    /**
     * 0申报简单分页查询
     * @param searchVo 0申报
     * @return
     */
    IPage<TSalaryZero> getTSalaryZeroPage(Page<TSalaryZero> page, TSalaryZeroSearchVo searchVo);

	TSalaryZero getTSalaryZeroById(String id);

	// 单个删除
	boolean deleteTSalaryZeroById(String id);

	// 批量删除
	boolean deleteTSalaryZeroByIdList(List<String> idList);

	// 批量更新状态(deleteFlag0,1,2：0：正常；1：已删除；2存在报账假删除)
    int updateDeleteFlagByIdList(String invoiceTitle, String settleMonth, String year, Integer deleteFlag, String salaryId);

    R<List<ErrorMessage>> importSalaryZero(InputStream inputStream, String settleMonth, String invoiceTitle);

    void listExport(HttpServletResponse response, TSalaryZeroSearchVo searchVo);

	// 每月1日1点生成0申报
	void createZeroByMonth();
	// 每日23点生成增量0申报
	void createZeroByDay();

}
