/*
 *    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.insurances.service.insurance;

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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchListVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.BatchIgnoreVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAutoParam;

import java.util.List;

/**
 * 商险续签待办
 *
 * @author hgw
 * @date 2025-11-11 16:33:49
 */
public interface TInsurancePreRenewDetailService extends IService<TInsurancePreRenewDetail> {
	/**
	 * 商险续签待办简单分页查询
	 *
	 * @param tInsurancePreRenewDetail 商险续签待办
	 * @return
	 */
	IPage<TInsurancePreRenewDetail> getTInsurancePreRenewDetailPage(Page<TInsurancePreRenewDetail> page, TInsurancePreRenewDetail tInsurancePreRenewDetail);

	// 单个编辑
	R<String> doEdit(TInsurancePreRenewDetail tInsurancePreRenewDetail);

	// 单个确认（含编辑功能）
	R<String> doSure(TInsurancePreRenewDetail tInsurancePreRenewDetail);

	// 批量确认（不含编辑）
	R<String> doSureBatch(BatchIgnoreVo vo);

	// 每天下午三点、三点二十推送续保待派单数据
	void autoDoInsurancePreRenew();

	void autoDoWxSureMessage();

	// 批量派单
	// pushQiWeiFlag : 是否推送企微 true:推送（当前仅下午3点与3点20的定时任务，需要推送企微），false：不推送
	R<List<InsuranceAutoParam>> batchDoInsurancePreRenew(List<String> idList, String sameFlag, boolean pushQiWeiFlag);

	boolean isWorkDayTest();

	// 离职待办确认后，更新为商险续签待办为已离职
	void updateInsurancePreRenewToIsLeave(BaseSearchVO paramVo);

	void updateInsurancePreRenewToIsLeaveList(BaseSearchListVO paramVoList);
}
