/*
 *      Copyright (c) 2018-2028, Chill Zhuang 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 dreamlu.net 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: Chill 庄骞 (smallchill@163.com)
 */
package org.security.trans.securityCommandCenter.service;

import org.security.trans.common.service.FlowableService;
import org.security.trans.dataStatistics.dto.StatisticsDataDTO;
import org.security.trans.dataStatistics.vo.RectificationNoticeDataVO;
import org.security.trans.securityCommandCenter.dto.ContinuedRecDataDTO;
import org.security.trans.securityCommandCenter.dto.SccUnlocaleCheckDTO;
import org.security.trans.securityCommandCenter.dto.SccUnlocaleCheckLineDTO;
import org.security.trans.securityCommandCenter.entity.SccCheck;
import org.security.trans.securityCommandCenter.entity.SccCheckLines;
import org.security.trans.securityCommandCenter.entity.SccUnlocaleCheck;
import org.security.trans.securityCommandCenter.vo.ContinuedRecDataVO;
import org.security.trans.securityCommandCenter.vo.SccUnlocaleCheckLineVO;
import org.security.trans.securityCommandCenter.vo.SccUnlocaleCheckVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.text.ParseException;
import java.util.List;

/**
 * 安保指挥中心-非现场检查整改通知书 服务类
 *
 * @author BladeX
 * @since 2022-07-06
 */
public interface ISccUnlocaleCheckService extends FlowableService<SccUnlocaleCheck> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param sccUnlocaleCheckDTO
	 * @return
	 */
	IPage<SccUnlocaleCheckVO> selectSccUnlocaleCheckPage(IPage<SccUnlocaleCheckVO> page, SccUnlocaleCheckDTO sccUnlocaleCheckDTO);

	/**
	 * 下发非现场检查通知书
	 * @param sccUnlocaleCheckDTO 非现场检查明细
	 * @return
	 */
    boolean saveData(SccUnlocaleCheckDTO sccUnlocaleCheckDTO);

	/**
	 * 非现场检查整改结果暂存或提报
	 * @param sccUnlocaleCheckDTO 整改结果明细
	 * @return
	 */
	boolean handInData(SccUnlocaleCheckDTO sccUnlocaleCheckDTO) throws ParseException;

	/**
	 * 获取非现场检查整改明细信息
	 * @param id id
	 * @return
	 */
	SccUnlocaleCheckVO getData(String id);

	/**
	 * 删除非现场检查整改通知书
	 * @param toLongList 删除目标记录id的集合
	 * @return
	 */
	boolean removeData(List<Long> toLongList);

	/**
	 * 营业网点检查或自助银行检查发现异常项，发起整改通知书
	 * @param sccCheck 异常项
	 * @param collect 异常项明细
	 * @return
	 */
	boolean startRectedNotice(SccCheck sccCheck, List<SccCheckLines> collect);

	/**
	 * 获取持续整改的整改记录
	 * @param page 分页参数
	 * @return
	 */
	IPage<ContinuedRecDataVO> getContinuedPage(IPage<ContinuedRecDataVO> page, ContinuedRecDataDTO continuedRecDataDTO);

	/**
	 * 获取持续整改记录详情
	 * @param id
	 * @return
	 */
	SccUnlocaleCheckLineVO getContinuedDetail(String id);

	/**
	 * 提报持续整改记录结果
	 * @param sccUnlocaleCheckLineDTO 持续整改明细
	 * @return
	 */
	boolean handInContinuedRec(SccUnlocaleCheckLineDTO sccUnlocaleCheckLineDTO) throws ParseException;

	/**
	 * 定时任务获取待整改任务
	 */
	List<SccUnlocaleCheck> getListData(String status);

	/**
	 *数据统计-列表数据获取
	 */
	List<RectificationNoticeDataVO> getStatisticsData(StatisticsDataDTO statisticsDataDTO, List<String> aimDepts);
}
