package com.hzya.frame.sys.businessFile.service;
 import com.alibaba.fastjson.JSONObject;
 import com.hzya.frame.basedao.service.IBaseService;
 import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
 import com.hzya.frame.web.entity.JsonResultEntity;

 import java.util.List;

/**
 * @description: 文件业务关系  service
 * @tableName:   sys_business_file
 * @entityName:  BusinessFileEntity
 * @author: 	 gjh
 * @history:	 1.0
 */
public interface IBusinessFileService extends IBaseService<BusinessFileEntity,Long> {
    /***
     * 保存业务表和文件表的关系
     * @content:
     * @author 👻👻👻👻👻👻👻👻 gjh
     * @date  2023-10-09 8:32
     * @param
     * @return com.hzya.frame.sys.businessFile.entity.BusinessFileEntity
     **/
    BusinessFileEntity saveBusinessFile(BusinessFileEntity requestData);
    /***
     * 保存业务表和文件表的关系
     * @content:
     * @author 👻👻👻👻👻👻👻👻 gjh
     * @date  2023-10-09 8:32
     * @param
     * @return com.hzya.frame.sys.businessFile.entity.BusinessFileEntity
     **/
    JsonResultEntity saveBusinessFileByJsonObj(JSONObject requestData);

    /***
     * 批量保存文件业务相关信息
     * @param entity
     * @return
     */
    BusinessFileEntity saveBatchBusinessFile(BusinessFileEntity entity) throws Exception;


     /***
     * 根据业务条件获取根据单证编号分组的附件列表
     * @param entity
     * @return
     */
    List<BusinessFileEntity> listQueryBusinessFilesByGroup(BusinessFileEntity entity);

    /***
     * 根据服务项类型获取附件列表
     * @param entity
     * @return
     */
    List<BusinessFileEntity> queryBusinessFileByServiceType(BusinessFileEntity entity);

    /***
     * 验证单票是否有附件可以下载
     * @param entity
     * @return
     */
    BusinessFileEntity validateTicketFiles(BusinessFileEntity entity);

    /****
     * @Content: 保存保函附件
     * @Author guojh
     * @Date  2019/5/16 19:16
     * @Param [entity]
     * @return com.hzya.frame.sys.businessFile.entity.BusinessFileEntity
     **/
    BusinessFileEntity saveBusinessFileToGuarantee(BusinessFileEntity entity);
}
