package com.friday.custody.service.logicService;

import com.alibaba.fastjson.JSONObject;
import com.friday.custody.dto.*;
import com.friday.custody.entity.ProductDataEntity;
import com.friday.custody.utils.R;
import com.friday.custody.vo.TenantEscrowAuthorizationInfoVO;
import com.friday.custody.vo.TenantInfoVO;
import com.friday.base.common.response.DubboResult;
import com.friday.operation.api.custody.dto.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface LogicInternalService {

    /**
     * 新增租户
     * @param vo
     * @return
     */
    R saveTenant(TenantInfoVO vo);

    /**
     * 定时查询数据接口
     * @return
     */
    R updateDataDaily();

    /**
     * 用户授权托管数据
     * @param tenantName
     * @param accountKey
     * @param vo
     * @return
     */
    R saveEscrowAuthorization(String tenantName, String accountKey, TenantEscrowAuthorizationInfoVO vo);


    /**
     * 查询托管授权信息
     * @param tenantName
     * @param accountKey
     * @return
     */
    R queryAuthorization(String tenantName, String accountKey);

    /**
     * 初始化华泰托管数据
     * @return
     */
    R initHtscDataByScheduled();

    R initGuoAnData();

    R initZhaoShangData(String mouth);

    R updateDataDailyByScheduled();


    R testDic(String type, String trustNo);

    R pullRemoteDataFirstQueueJob();

    R queryOriginData(String tenantName, String accountKey, String type, String trustNo, Integer pageNo, Integer pageSize);

    R initLaterData(String tenantName, String accountKey, String versionStr);

    R initByAppointedTrustNoAndMouth(int mouth,String admin, String trustNo, String appKey);

    R initGtjaDataByOne(int mouth,String admin, String trustNo, String appKey, String type);

    R updateData20min();

    R updateData1h();

    R updateDataCJ(String date,String flag);

    R updateDataDicZxFndBasicInfoCy();

    R initDataZx();

    R updateDataZx();

    R updateNetValueData();

    R updateZhongxTotalAsset(int loopTime);

    R initByMail(String date, String admin, String trustNo, String appKey, String flag);
    List<DataTrustDto> queryTheCustodian(String admin, String trustNo, String appKey);
    List<TrustNoMonitorDto> queryAdministrator(String admin, String trustNo, String appKey);

    R updateSWMgDataDaily();
    List<String> rpaGetAdminNo();
    List<ProductDataEntity> saveProductData(JSONObject jsonObject);

    DubboResult editAuthorization(String admin, String accountKey, AuthorizationDTO dto, MultipartFile file);

    DubboResult queryTrustAuthorization(String admin, String accountKey, AuthorizationQueryDTO queryDTO);

    DubboResult deleteTrustAuthorization(String admin, String accountKey, AuthorizationDeleteDTO deleteDTO);
}

