Esempio n. 1
0
        public void GetData()
        {
            #region 获取文件
            ApplyNoBasicEntity applyNoBasicEntity = new ApplyNoBasicEntity();
            applyNoBasicEntity.ApplyNoPrefix = ApplyNoPrefix; //"DSC04";
            applyNoBasicEntity.Company       = Company;       //"DSC";
            applyNoBasicEntity.ConnStr       = ConnStr;
            applyNoBasicEntity.LinksType     = new LinkType(LinkType.LinksFalse);
            //applyNoBasicEntity.FktzsProcessType = new FKTZSProcessType(FKTZSProcessType.FKTZS_YC);
            //applyNoBasicEntity.FktzsYcWcType = new FKTZSYCWCType(FKTZSYCWCType.YC);
            IFKTZSMainStartApp fktzsMainStartApp = new FKTZSMainStartApp();
            List <AccVouch>    listAccvouch      = fktzsMainStartApp.Load(applyNoBasicEntity);
            AccvouchEntityConvertStreamBaseManager accvouchEntityConvertStreamBaseManager = new AccvouchEntityConvertStreamBaseManager();
            StringBuilder sb = new StringBuilder();
            foreach (AccVouch item in listAccvouch)
            {
                sb.AppendLine(accvouchEntityConvertStreamBaseManager.GetVouchString(item));
            }
            #endregion
            #region 文件保存1
            SaveFileEntityCollection saveFileEntityCollection = new SaveFileEntityCollection();
            saveFileEntityCollection.UpdateLinkQueueSql = GetUpdateSapLinkQueue(fktzsMainStartApp.GetApplyNoEntitys());//获取队列applyNo集合
            SaveFileEntity saveFileEntity = new SaveFileEntity();
            saveFileEntity.SetFileNamePrefix(FileNamePrefix).SetFileNameMiddle(string.Format("_{0}_{1}", SapCD, DateTime.Now.ToString("yyyyMMddHHmm")))
            .SetFileNameSuffix(FileNameSuffix).SetFilePath(FilePath).SetContent(sb.ToString());
            saveFileEntityCollection.Add(saveFileEntity);
            ISaveFileProvider iSaveFileProvider = new SaveFileDBProvider(ConnStr);
            iSaveFileProvider.SaveFile(saveFileEntityCollection);
            #endregion
            #region 保存文件2

            #endregion
        }
Esempio n. 2
0
        public List <AccVouch> Load(ApplyNoBasicEntity applyNoBasicEntity)
        {
            List <AccVouch> listAccVouch = new List <AccVouch>();
            ISapLinksQueue  iQueue       = SapLinksQueueFactory.Init();

            applyNos = iQueue.Load(applyNoBasicEntity);
            foreach (ApplyNoEntity item in applyNos)
            {
                //拦截:判断是有偿单据还是无偿单据
                //if (item.BasicEntity.Company + "06" == item.ApplyNo.Substring(0, item.BasicEntity.Company.Length + 2))
                if (item.ApplyNo.StartsWith(ApplyNoConvert(item.BasicEntity.Company + "06")))
                {
                    item.BasicEntity.ApplyNoPrefix    = ApplyNoConvert(item.BasicEntity.Company) + "06";
                    item.BasicEntity.FktzsProcessType = new FKTZSProcessType(FKTZSProcessType.FKTZS_YC);
                    item.BasicEntity.FktzsYcWcType    = new FKTZSYCWCType(FKTZSYCWCType.YC);
                }
                //if (item.BasicEntity.Company + "08" == item.ApplyNo.Substring(0, item.BasicEntity.Company.Length + 2))
                if (item.ApplyNo.StartsWith(ApplyNoConvert(item.BasicEntity.Company + "08")))
                {
                    item.BasicEntity.ApplyNoPrefix    = ApplyNoConvert(item.BasicEntity.Company) + "08";
                    item.BasicEntity.FktzsProcessType = new FKTZSProcessType(FKTZSProcessType.FKTZS_WC);
                    item.BasicEntity.FktzsYcWcType    = new FKTZSYCWCType(FKTZSYCWCType.WC);
                }
                FKTZSServiceEntity fktzsServiceEntity = FKTZSServiceEntity.Load(item);
                List <AccVouch>    list = FKTZSServiceManager.Load(fktzsServiceEntity, InitFKTZSServiceManagerEntity(item));
                list.MergeListAccVouch(listAccVouch);
            }
            return(listAccVouch);
        }
        public static ApplyNoEntityCollection Load(ApplyNoBasicEntity applyNoBasicEntity)
        {
            //ApplyNoBasicEntity applyNoBasicEntity = new ApplyNoBasicEntity();
            //applyNoBasicEntity.ApplyNoPrefix = "DSC04";
            //applyNoBasicEntity.Company = "DSC";
            //applyNoBasicEntity.ConnStr = ConnStr;
            //applyNoBasicEntity.LinksType = new LinkType(LinkType.LinksFalse);
            ISapLinksQueue          iQueue   = SapLinksQueueFactory.Init();
            ApplyNoEntityCollection applyNos = iQueue.Load(applyNoBasicEntity);

            return(applyNos);
        }
Esempio n. 4
0
 public ApplyNoEntityCollection Load(ApplyNoBasicEntity applyNoBasicEntity)
 {
     this._applyNoBasicEntity = applyNoBasicEntity;
     return(AggData(ExecuteQuery(SqlFormat())));
 }