package com.brilliance.isc.common.sysmod;


import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.bo.Pty;
import com.brilliance.isc.bo.Spt;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.mda.runtime.mda.impl.Argument;

import java.util.List;

public interface SysmodService {

    String internalSetObjNam(Object recObj, BaseTransactionVo baseTransactionVo);

    String evtWrite(String argTyp, String argInr, String argRtn, String argTxt);

    /**
     * 获取实际的记账机构
     **/
    String getProcessBranch();

    void getxxdfields(String xxd, String infileds, String inr, String flg, Argument<String> fields);

    boolean sptIsAnyLoaded(String sta);

    /**
     * 判断 “EXE” 是否包含 入参sta
     **/
    boolean sptIsExeLoaded(String sta);

    boolean sptIsRimLoaded(String sptState);

    boolean sptIsIncLoaded(String sptState);

    boolean sptIsLoaded(String arg, String sptState);

    void sptSaveEntry(Spt argSpt, Object rec, String argSta, Object storeObj, String objName);

    void sptSaveEntryForBgService(Spt argSpt, Object rec, String argSta, Object storeObj, String objName);

    void sptDeleteEntry(Spt argSpt);

    String getProcessBranchinr();

    void sdbInsert(Object argRec);

    void sdbDeleteWithLog(Object argRec);

    void sdbUpdateWithLog(Object obj);

    void sdbUpdateWithLog2(Object argRec);

    void sdbInsertWithLog(Object obj);

    void sdbUndeleteWithLog(Object obj);

    void sdbSlgWrite(Object logMod, String fct);

    Pty getPtyobj(String rol, List<PtsptaVo> ptsList);

    String getOwnRef(Bch wrkBch, String businessType, String tbl);

    void sweSaveEntry(Trn trn, Spt spt, String argSta, String sptinr, String trninr);

    void msgSaveEntry(Trn trn, Spt spt, String argSta, String sptinr, String trninr);

    void sptUpdateInDb(Spt spt, String sta);

    boolean isSwtRelNov2018Active();

    boolean isSwtRelNov2020Active();

    boolean isDomesticLC();

    boolean isRamSptLoaded();

    String checkAllowCN(String attributeValue);

    void sptWriteLog(Spt argSpt, String argFu);

    void setRecBchInfo(Object rec, Bch bch, Bch wrkbch);

    int callInterface(String facename, String trninr, String itfInr, Argument<String> errtxt);

    void queUpdate(String argOBJTYP, String argOBJINR, String argOBJSUBID, String argHLDFLG);

    String getReferenceOfRol(List<PtsptaVo> ptsptas, String rol, Object rec);

    String getzmq(String branchinr);

    <T> T sptLoadData(Class<T> clazz, String sptinr);

    <T> T streamGetNameInSubDir(Class<T> clazz, String argInr);

    <T> T streamGetDataFromDir(Class<T> clazz, String prefix, String argInr);

    boolean existSptFile(String argDir, String argFil);

    <T> T streamLoadInSubDir(Class<T> clazz, String argDir, String argFil);

    <T> T streamLoadInDir(Class<T> clazz, String argDir, String argFil);

    void streamSaveInSubDir(Object storeObj, String argDir, String argFil);

    void streamSaveInDir(Object storeObj, String argDir, String argFil);

    void saveObjectJson(String argDir, String filePath, String json);

    String loadObjectJson(String argDir, String fileName);

    void saveSprData(Spt spt, BaseTransactionVo storeObj);


    boolean isCenterTaken();

    boolean isSdhBusiness();

    boolean isSdhBusiness(String inifrm);

    boolean isSdhBusiness(String inifrm, String branch);

    String getChannelFromSta(String sta);

    String getChannelFromSta(Spt spt);

    boolean isIncomingSptsta(String sta);

    void sptQueUpdate(Spt argSpt);

    void sdbUpdate(Object argRec);

    Object sdbRead(Object argRec);

    Bch getUpperBch(Bch argBch);

    String getNextFrame(String inifrm);

    String getPreFrame(String inifrm, String branch);

    String midObjinr(String objInr);

    boolean isInterfaceOpen(String srv);

    boolean isInterfaceSyOpen(String srv);

    boolean isBusinessOpen(String switchCod);

    boolean isStartBusiness();

    boolean checkFinStatus(String objTyp, String objInr);

    String buildElcMsgDownloadPath(String instg, String msgId);

    boolean isShangYun(String tbl);

    boolean sptIsPenLoaded(String sptState);

    boolean sptIsCorLoaded(String sptState);
}
