public void Go()
        {
            SapLinksQueueEntity sapLinksQueue = new SapLinksQueueEntity("BPMDB".ToConnectionString(), "update BPMSysUsers set Password='******' where Account='asdasdasdasdads'");

            SAPLinks.Helper.SaveFile.ISaveFileProvider saveFileProvider = SapSaveFileProviderFactory.CreateSaveProvider(sapLinksQueue);
            saveFileProvider.AddFileInfo(new SapSaveFileInfo("D:\\", "JJ.txt", new StringBuilder().AppendLine("奥术大师大三大所多")));
            saveFileProvider.SaveFile();
        }
示例#2
0
        public void Start()
        {
            //T_SAP_COMPANYFUNDS_LINKS_QUEUE queue = new T_SAP_COMPANYFUNDS_LINKS_QUEUE();
            Dictionary <string, List <RecList> > dic = new Dictionary <string, List <RecList> >();
            Dictionary <string, T_SAP_COMPANYFUNDS_LINKS_QUEUE> dicQ = new Dictionary <string, T_SAP_COMPANYFUNDS_LINKS_QUEUE>();

            //MLog.Log.Info("aaa").Info("11111");
            try
            {
                LogInfo.Log.Info("职工机购买-收据开具SAP连携");
                RecEntity recEntity = new RecEntity();
                recEntity.GetSqlByList(ref dic, ref dicQ);
            }
            catch (Exception ex) {
                LogInfo.Log.Info("职工机购买-收据开具SAP连携——异常:" + ex.Message);
            }
            try
            {
                LogInfo.Log.Info("限时特卖-收据开具SAP连携");
                SpecialSaleEntity sse = new SpecialSaleEntity();
                sse.SyncSap(ref dic, ref dicQ);
            }
            catch (Exception ex)
            {
                LogInfo.Log.Info("限时特卖-收据开具SAP连携——异常:" + ex.Message);
            }

            try
            {
                LogInfo.Log.Info("解限SAP连携");
                JXBatchListEntity jx = new JXBatchListEntity();
                jx.SyncSap(ref dic, ref dicQ);
            }
            catch (Exception ex)
            {
                LogInfo.Log.Info("解限SAP连携——异常:" + ex.Message);
            }

            foreach (var item in dic)
            {
                string         filePath = "DICS_Path_Rec".ToAppSetting();
                string         fileName = "DICS_Name_Rec".ToAppSetting() + "_" + item.Key + "_" + DateTime.Now.ToString("yyyyMMdd");
                string         fileExt  = "DICS_Ext_Rec".ToAppSetting();
                List <RecList> recList  = dic[item.Key];
                T_SAP_COMPANYFUNDS_LINKS_QUEUE         queue = dicQ[item.Key];
                AccvouchEntityConvertStreamBaseManager accvouchEntityConvertStreamBaseManager = new AccvouchEntityConvertStreamBaseManager();
                SapLinksQueueEntity sapLinksQueue = new SapLinksQueueEntity("BPMDB".ToConnectionString(), queue.GetSql_ISLINK1());
                StringBuilder       sb            = new StringBuilder();
                foreach (RecList rl in recList)
                {
                    sb.AppendLine(rl.ToVouchString());
                }

                SAPLinks.Helper.SaveFile.ISaveFileProvider saveFileProvider = SapSaveFileProviderFactory.CreateSaveProvider(sapLinksQueue);
                saveFileProvider.AddFileInfo(new SapSaveFileInfo(filePath, fileName + fileExt, sb));
                saveFileProvider.SaveFile();
            }
        }
示例#3
0
        public void Start()
        {
            string filePath = "DICS_Path_KFSQ".ToAppSetting();
            string fileName = "DICS_Name_KFSQ".ToAppSetting();
            string fileExt  = "DICS_Ext_KFSQ".ToAppSetting();

            LogInfo.Log.Info("DICS执行扩贩申请");
            StringBuilder       fileData      = GetData();
            SapLinksQueueEntity sapLinksQueue = new SapLinksQueueEntity("BPMDB".ToConnectionString(), queue.GetSql_ISLINK1());

            SAPLinks.Helper.SaveFile.ISaveFileProvider saveFileProvider = SapSaveFileProviderFactory.CreateSaveProvider(sapLinksQueue);
            fileName += string.Format("_{0}_{1}", Code, DateTime.Now.ToString("yyyyMMdd"));
            saveFileProvider.AddFileInfo(new SapSaveFileInfo(filePath, fileName + fileExt, fileData));
            saveFileProvider.SaveFile();
            LogInfo.Log.Info("DICS执行扩贩申请成功");
        }