コード例 #1
0
        private static HouseArchiveRelation GetHouseArchiveRelation(ArchiveIndex archiveIndex, HouseInfo houseInfo)
        {
            HouseArchiveRelation houseArchiveRelation = new HouseArchiveRelation();

            houseArchiveRelation.RelationID   = CreateGuid(32);
            houseArchiveRelation.ArchiveId    = archiveIndex.ArchiveId;
            houseArchiveRelation.HouseInfo_ID = houseInfo.HouseInfo_ID;

            return(houseArchiveRelation);
        }
コード例 #2
0
ファイル: FCDA_DAL.cs プロジェクト: justseven/FCInterfaceData
        private static int Insert_HouseArchiveRelation(HouseArchiveRelation houseArchiveRelation, DbTransaction trans)
        {
            string sql = "insert into HouseArchiveRelation(RelationID,ArchiveId,HouseInfo_ID,BusiNO) " +
                         "values(@RelationID,@ArchiveId,@HouseInfo_ID,@BusiNO)";
            List <DbParameter> list = new List <DbParameter>();

            ListAdd(list, "@RelationID", houseArchiveRelation.RelationID);
            ListAdd(list, "@ArchiveId", houseArchiveRelation.ArchiveId);
            ListAdd(list, "@HouseInfo_ID", houseArchiveRelation.HouseInfo_ID);
            ListAdd(list, "@BusiNO", houseArchiveRelation.BusiNO);


            DbHelper.SetProvider(MyDBType.Sql);
            return(DbHelper.ExecuteNonQuery(MyDBType.Sql, trans, System.Data.CommandType.Text, sql, list.ToArray()));
        }
コード例 #3
0
 private static List <HouseArchiveRelation> CreateHRList(FCDA da)
 {
     if (null != da.HouseList && da.HouseList.Count > 0 && null != da.archiveInfo)
     {
         List <HouseArchiveRelation> list = new List <HouseArchiveRelation>();
         foreach (HouseInfo h in da.HouseList)
         {
             HouseArchiveRelation hr = new HouseArchiveRelation();
             hr.ArchiveId    = da.archiveInfo.ArchiveId;
             hr.BusiNO       = da.archiveInfo.BusiNO;
             hr.HouseInfo_ID = h.HouseInfo_ID;
             hr.RelationID   = CreateGuid(32);
             list.Add(hr);
         }
         return(list);
     }
     return(null);
 }
コード例 #4
0
ファイル: FCDA_DAL.cs プロジェクト: justseven/FCInterfaceData
        public static void Insert(ArchiveIndex archiveIndex, List <VolEleArc> volEleArc, HouseInfo houseInfo, List <Person> persons, Certificate certificate, HouseArchiveRelation houseArchiveRelation, PropArchiveRelation propArchiveRelation, List <VolEleArcDtl> volEleArcDtl)
        {
            using (TransactionScope ts = new TransactionScope())
            {
                Insert_ArchiveIndex(archiveIndex);
                foreach (VolEleArc item in volEleArc)
                {
                    Insert_VolEleArc(item);
                }

                Insert_HouseInfo(houseInfo);
                foreach (Person person in persons)
                {
                    Insert_Person(person);
                }

                Insert_Certificate(certificate);
                Insert_HouseArchiveRelation(houseArchiveRelation);
                Insert_PropArchiveRelation(propArchiveRelation);

                if (null != volEleArcDtl)
                {
                    foreach (VolEleArcDtl v in volEleArcDtl)
                    {
                        Insert_VolEleArcDtl(v);
                    }
                }

                //trans.Commit();
                ts.Complete();
            }
        }
コード例 #5
0
        /// <summary>
        /// 插入产权处档案库
        /// </summary>
        /// <param name="pageParams"></param>
        /// <returns>1:插入成功;0:宗地业务;异常信息:失败</returns>
        public static BDCFilterResult Insert_FCDA(PageParams pageParams)
        {
            BDCFilterResult res = new BDCFilterResult();

            try
            {
                if (IsFW(pageParams.PrjId))
                {
                    if (CanPush(pageParams.PrjId))
                    {
                        ArchiveIndex archiveIndex = GetArchiveIndex(pageParams);

                        HouseInfo houseInfo = GetHouseInfo(pageParams);

                        Certificate certificate = GetCertificate(archiveIndex, houseInfo, pageParams);

                        List <Person> person_list = GetPerson(archiveIndex, pageParams);

                        List <VolEleArc> volEleArc = GetVolEleArc(archiveIndex, pageParams);
                        //List<VolEleArcDtl> volEleArcDtl_list = GetVolEleArcDtl(volEleArc, pageParams);

                        PropArchiveRelation  propArchiveRelation  = GetPropArchiveRelation(archiveIndex, certificate);
                        HouseArchiveRelation houseArchiveRelation = GetHouseArchiveRelation(archiveIndex, houseInfo);

                        FCDA_DAL.Insert(archiveIndex, volEleArc, houseInfo, person_list, certificate, houseArchiveRelation, propArchiveRelation, null);
                        res.ConfirmType = 0;
                        res.IsSuccess   = true;
                        res.Message     = "成功!业务已经成功推送!";
                    }
                    else
                    {
                        res.ConfirmType = 0;
                        res.IsSuccess   = false;
                        res.Message     = "失败!该业务已经推送!";
                    }
                }
                else
                {
                    res.ConfirmType = 0;
                    res.IsSuccess   = false;
                    res.Message     = "拒绝!未找到业务宗号或非房产业务,暂不推送";
                }
            }
            catch (Exception ex)
            {
                res.ConfirmType = 0;
                res.IsSuccess   = false;
                res.Message     = "失败!" + ex.Message;
            }
            FC_DA_TAG tag = new FC_DA_TAG();

            tag.ID        = Guid.NewGuid().ToString();
            tag.ISSUCCESS = res.IsSuccess?"1":"0";
            tag.MESSAGE   = res.Message;
            tag.PUSHDATE  = DateTime.Now;
            tag.PUSHUSER  = pageParams.UserName;
            tag.SLBH      = pageParams.PrjId;

            InsertLog(tag);
            return(res);
        }