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(); } }
private static PropArchiveRelation GetPropArchiveRelation(ArchiveIndex archiveIndex, Certificate certificate) { PropArchiveRelation propArchiveRelation = new PropArchiveRelation(); propArchiveRelation.RelationID = CreateGuid(32); propArchiveRelation.ArchiveId = archiveIndex.ArchiveId; propArchiveRelation.CertificateID = certificate.CertificateID; return(propArchiveRelation); }
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); }
private static Certificate GetCertificate(ArchiveIndex archiveIndex, HouseInfo houseInfo, PageParams pageParams) { //GetDJB(pageParams.PrjId); Certificate cer = new Certificate(); cer.ArchiveId = archiveIndex.ArchiveId; cer.CertificateID = CreateGuid(32); cer.HouseInfo_ID = houseInfo.HouseInfo_ID; cer.Prop = GetBDCZH(pageParams.PrjId); cer.CertificateType = GetCertificateType(cer.Prop); return(cer); }
private void Insert(ArchiveIndex archiveInfo) { string sql = "insert into ArchiveIndex(ArchiveId,ArchiveType,BusiNO,IsHistoray,ArchiveDate,Source,ReqType,HousePropertyType,FmBusiNo,IsOld) values(@ArchiveId,@ArchiveType,@BusiNO,@IsHistoray,@ArchiveDate,@Source,@ReqType,@HousePropertyType,@FmBusiNo,@IsOld)"; List <DbParameter> list = new List <DbParameter>(); ListAdd(list, "@ArchiveId", archiveInfo.ArchiveId); ListAdd(list, "@ArchiveType", archiveInfo.ArchiveType); ListAdd(list, "@BusiNO", archiveInfo.BusiNO); ListAdd(list, "@IsHistoray", archiveInfo.IsHistoray); ListAdd(list, "@ArchiveDate", archiveInfo.ArchiveDate); ListAdd(list, "@Source", archiveInfo.Source); ListAdd(list, "@ReqType", archiveInfo.ReqType); ListAdd(list, "@HousePropertyType", archiveInfo.HousePropertyType); ListAdd(list, "@FmBusiNo", archiveInfo.FmBusiNo); ListAdd(list, "@IsOld", archiveInfo.IsOld); int i = dbHelper.ExecuteNonQuery(MyDBType.Sql, trans, System.Data.CommandType.Text, sql, list.ToArray()); }
private static ArchiveIndex GetArchiveIndex(PageParams pageParams) { DJ_XGDJGL xgdjgl = GetXGDJGL(pageParams.PrjId); DJ_TSGL tsgl = GetTSGL(pageParams.PrjId); ArchiveIndex archiveIndex = new ArchiveIndex(); archiveIndex.ArchiveId = CreateGuid(32); //archiveIndex.DaCode = archiveIndex.ArchiveId.ToString(); archiveIndex.ArchiveType = GetArchiveType(tsgl.DJZL); archiveIndex.BusiNO = pageParams.PrjId; archiveIndex.IsHistoray = GetHistry(tsgl.LIFECYCLE); archiveIndex.ArchiveDate = DateTime.Now.ToString("yyyy-MM-dd").Replace("-", ""); archiveIndex.ReqType = tsgl.DJZL; if (null != xgdjgl) { archiveIndex.FmBusiNo = xgdjgl.FSLBH; } return(archiveIndex); }
public static int Insert_ArchiveIndex(ArchiveIndex archiveIndex) { string sql = "insert into ArchiveIndex(ArchiveId,ArchiveType,BusiNO,IsHistoray,ArchiveDate,Source,ReqType,HousePropertyType,FmBusiNo) values(@ArchiveId,@ArchiveType,@BusiNO,@IsHistoray,@ArchiveDate,@Source,@ReqType,@HousePropertyType,@FmBusiNo)"; List <DbParameter> list = new List <DbParameter>(); ListAdd(list, "@ArchiveId", archiveIndex.ArchiveId); //list.Add(new SqlParameter); //ListAdd(list,"@DaCode", archiveIndex.DaCode); ListAdd(list, "@ArchiveType", archiveIndex.ArchiveType); ListAdd(list, "@BusiNO", archiveIndex.BusiNO); ListAdd(list, "@IsHistoray", archiveIndex.IsHistoray); ListAdd(list, "@ArchiveDate", archiveIndex.ArchiveDate); ListAdd(list, "@Source", archiveIndex.Source); ListAdd(list, "@ReqType", archiveIndex.ReqType); ListAdd(list, "@HousePropertyType", archiveIndex.HousePropertyType); ListAdd(list, "@FmBusiNo", archiveIndex.FmBusiNo); DbHelper.SetProvider(MyDBType.Sql); return(DbHelper.ExecuteNonQuery(MyDBType.Sql, System.Data.CommandType.Text, sql, list.ToArray())); }
private static List <VolEleArc> GetVolEleArc(ArchiveIndex archiveIndex, PageParams pageParams) { List <VolEleArc> list = new List <VolEleArc>(); List <WFM_ATTACHLST> wfm_ATTACHLST_list = GetWFM_ATTACHLST_list(pageParams); foreach (WFM_ATTACHLST doc in wfm_ATTACHLST_list) { if (doc.CNAME == "流程附件") { continue; } VolEleArc volEleArc = new VolEleArc(); volEleArc.ArchiveId = archiveIndex.ArchiveId; volEleArc.EleArcVol_ID = CreateGuid(32); volEleArc.EleArcName = doc.CNAME; list.Add(volEleArc); } return(list); }
private static List <Person> GetPerson(ArchiveIndex archiveIndex, PageParams pageParams) { List <Person> list = new List <Person>(); List <DJ_QLR> qlr_list = GetQlr(pageParams.PrjId); if (null != qlr_list && qlr_list.Count > 0) { foreach (DJ_QLR qlr in qlr_list) { Person person = new Person(); person.ArchiveId = archiveIndex.ArchiveId; person.PersonID = CreateGuid(32); person.PersonType = GetPersonType(qlr.QLRID, pageParams.PrjId); person.Name = qlr.QLRMC; person.CardNO = qlr.ZJHM; person.Sex = qlr.XB; list.Add(person); } } return(list); }
private void ArchiveIndices() { CreateDirectory(IndicesFolder); var archiveIndexPath = new FileInfo($@"{IndicesFolder}\{"archiveIndex.xml"}"); var archiveIndex = new ArchiveIndex(DataSource, archiveIndexPath, _fileIndex); archiveIndex.Persist(); var contextDocumentationIndexPath = new FileInfo($@"{IndicesFolder}\{"contextDocumentationIndex.xml"}"); var contextDocumentationIndex = new ContextDocumentationIndex(DataSource.ContextDocuments, contextDocumentationIndexPath, _fileIndex); contextDocumentationIndex.Persist(); var tableIndexPath = new FileInfo($@"{IndicesFolder}\{"tableIndex.xml"}"); _tableIndex = new TableIndex(DataSource, tableIndexPath, _fileIndex); _tableIndex.Persist(); // TODO NiceToHave - Add and build docIndex if present //ArchiveEmbededResource("Schemas.standard.docIndex.xsd", new FileInfo(String.Format(@"{0}\{1}", SchemasStandardFolder, "docIndex.xsd"))); _fileIndex.Persist(); }
/// <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); }