package com.vci.server.bof.server.create; import com.vci.corba.common.data.VCIInvocationInfo; import com.vci.server.base.persistence.dao.HibernateSessionFactory; import com.vci.server.base.utility.LogRecordUtil; import com.vci.server.bof.server.ServiceFacadeExecuteHelper; import com.vci.server.bof.service.BOFactoryServices; import com.vci.corba.common.VCIError; public class BatchCreateBOLOTS extends ServiceFacadeExecuteHelper{ private static ServiceFacadeExecuteHelper instance = null; public static ServiceFacadeExecuteHelper getInstance() { if(instance == null) { instance = new BatchCreateBOLOTS(); } return instance; } @Override protected Object doAction() throws Throwable { try { BOFactoryServices services = BOFactoryServices.getInstance(); services.batchCreateBusinessObjectWithLink(params.getBos(), params.getLos(), params.getTs()); //日志记录 // VCIInvocationInfo info = HibernateSessionFactory.getVciSessionInfo(); // @SuppressWarnings("unused") // String ip = "127.0.0.1"; // if(info!=null){ // ip = info.clientIPInfo == null||"".equals(info.clientIPInfo) ?"127.0.0.1":info.clientIPInfo; // } LogRecordUtil.batchWriteLog(params.getBos(), "创建"); return true; } catch (VCIError e) { throw this.getLocalString(e.code, e); } catch (Exception e) { //e.printStackTrace(); //ServerWithLog4j.logger.error(e); throw this.getLocalString("P0010SOF-00001", e); } catch (Throwable t) { //t.printStackTrace(); //ServerWithLog4j.logger.error(t); throw this.getLocalString("P0010SOF-00001", t); } } }