package com.sinosig.core.module.service.logic.impl;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import com.sinosig.core.module.service.logic.ISYXTBYDGetTBYDKXXLogic;
import com.sinosig.core.module.domain.SYXTBYD;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.KieContainer;

/**
 * 关系型数据实体[GetTBYDKXX] 对象
 */
@Service
public class SYXTBYDGetTBYDKXXLogicImpl implements ISYXTBYDGetTBYDKXXLogic{

    @Autowired
    private KieContainer kieContainer;

    @Autowired
    private com.sinosig.core.module.service.ITBYDKService tbydkservice;

    @Autowired
    private com.sinosig.core.module.service.ISYXTBYDService iBzSysDefaultService;

    public void execute(SYXTBYD et){

          KieSession kieSession = null;
        try{
           kieSession=kieContainer.newKieSession();
           kieSession.insert(et); 
           kieSession.setGlobal("syxtbydgettbydkxxdefault",et);
           com.sinosig.core.module.domain.TBYDK  syxtbydgettbydkxxtbydk =new com.sinosig.core.module.domain.TBYDK();
           kieSession.insert(syxtbydgettbydkxxtbydk); 
           kieSession.setGlobal("syxtbydgettbydkxxtbydk",syxtbydgettbydkxxtbydk);
           kieSession.setGlobal("tbydkservice",tbydkservice);
           kieSession.setGlobal("iBzSysSyxtbydDefaultService",iBzSysDefaultService);
           kieSession.startProcess("com.sinosig.core.module.service.logic.syxtbydgettbydkxx");

        }catch(Exception e){
            System.out.println("执行[获取特别约定库信息]处理逻辑发生异常"+e);
        }finally {
            if(kieSession!=null)
            kieSession.destroy();
        }
    }

}
