private string Devolve2DC2(HN_OA2DC oaDev) { string sXml = ""; List<FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", base.TemplateName); FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode(); FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode fl = new HNDC_CFileNode(); //if (String.IsNullOrEmpty(this.id)) return ""; B_HSEdit l_BusReceiveEdit = new B_HSEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(B_ReceiveEdit.GetID(base.TemplateName, this.txtReceiveNo.Text)); //l_BusReceiveEdit.Load(Convert.ToInt32(REGISTER_ID)); B_LetterReceive pEntity = ControlToEntity(false) as B_LetterReceive; #region 开始生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object"); switch (ObjPlatForm) { case "DC": ar.SysFlag = "1"; break; case "FC": ar.SysFlag = "2"; break; default: ar.SysFlag = "1"; break; } #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType; string value = oaDev.PreHandel(l_BusReceiveEdit, sName, sType); if (string.IsNullOrEmpty(value)) { value = oaDev.PreHandel(pEntity, sName, sType); } ar.SetAttribute(skey, value/*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = pEntity.FileList.Count.ToString(); //l_BusReceiveEdit.FileList.Count.ToString(); #endregion sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ar.Ext_1; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = oaDev.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < pEntity.FileList.Count; i++) { HNDC_CAttachmentNode at = new HNDC_CAttachmentNode(); CFuJian file = pEntity.FileList[i]; at.DocumentName = "函件收文";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
private string Devolve2DC(HN_OA2DC oaDev) { string sXml = ""; List<FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", base.TemplateName); M_DJGTSend entity = this.ControlToEntity(false) as M_DJGTSend; entity.FormsData = XmlUtility.SerializeXml(entity); FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode(); FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode fl = new HNDC_CFileNode(); //string sPath = @"E:\QWDMS\Non Baseline Library\Development\03 Code\FounderSoftware.ADIM\FounderSoftware.ADIM.OA\OADevolveLib\DevolveConfig.xml"; #region 开始生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object"); switch (ObjPlatForm) { case "DC": ar.SysFlag = "1"; break; case "FC": ar.SysFlag = "2"; break; default: ar.SysFlag = "1"; break; } #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType; ar.SetAttribute(skey, oaDev.PreHandel(entity, sName, sType)/*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ar.Ext_1; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = oaDev.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { HNDC_CAttachmentNode at = new HNDC_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = "党纪工团发文";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
private string Devolve2DC(HN_OA2DC oaDev) { string sXml = ""; List <FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", base.TemplateName); B_Finance entity = this.ControlToEntity(false) as B_Finance; entity.FormsData = XmlUtility.SerializeXml(entity); FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode(); FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode fl = new HNDC_CFileNode(); //string sPath = @"E:\QWDMS\Non Baseline Library\Development\03 Code\FounderSoftware.ADIM\FounderSoftware.ADIM.OA\OADevolveLib\DevolveConfig.xml"; #region 开始生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object"); switch (ObjPlatForm) { case "DC": ar.SysFlag = "1"; break; case "FC": ar.SysFlag = "2"; break; default: ar.SysFlag = "1"; break; } #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType; ar.SetAttribute(skey, oaDev.PreHandel(entity, sName, sType) /*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ar.Ext_1; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = oaDev.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < ucAttachment.UCDataList.Count; i++) { HNDC_CAttachmentNode at = new HNDC_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = "请示报告";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return(sXml); }
private string Devolve2DC2(HN_OA2DC oaDev, B_PF enProFile, string strDraftDept, string dealUser, string sProcessName) { string sXml = ""; List<FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", sProcessName); FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode(); FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode fl = new HNDC_CFileNode(); #region 开始生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + sProcessName + "']/Object"); switch (ObjPlatForm) { case "DC": ar.SysFlag = "1"; break; case "FC": ar.SysFlag = "2"; break; default: ar.SysFlag = "1"; break; } #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType; ar.SetAttribute(skey, oaDev.PreHandel(enProFile, sName, sType)/*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 // 编制单位-主办部门 ar.FormationDept = strDraftDept; // 功能领域-程序子类 ar.FunctionField = B_ProgramFileInfo.GetProSubTypeName(enProFile.ProgramFileID); //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = enProFile.FileList.Count.ToString(); #endregion sXml = oaDev.GenOAArchiveNode(ar, sProcessName); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ar.Ext_1; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = oaDev.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < enProFile.FileList.Count; i++) { HNDC_CAttachmentNode at = new HNDC_CAttachmentNode(); CFuJian file = enProFile.FileList[i]; at.DocumentName = ProcessConstString.TemplateName.PROGRAM_FILE; //file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return sXml; }
private string Devolve2DC2(HN_OA2DC oaDev) { string sXml = ""; List <FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", base.TemplateName); FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode(); FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode fl = new HNDC_CFileNode(); //if (String.IsNullOrEmpty(this.id)) return ""; B_HSEdit l_BusReceiveEdit = new B_HSEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(B_ReceiveEdit.GetID(base.TemplateName, this.txtReceiveNo.Text)); //l_BusReceiveEdit.Load(Convert.ToInt32(REGISTER_ID)); B_LetterReceive pEntity = ControlToEntity(false) as B_LetterReceive; #region 开始生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object"); switch (ObjPlatForm) { case "DC": ar.SysFlag = "1"; break; case "FC": ar.SysFlag = "2"; break; default: ar.SysFlag = "1"; break; } #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType; string value = oaDev.PreHandel(l_BusReceiveEdit, sName, sType); if (string.IsNullOrEmpty(value)) { value = oaDev.PreHandel(pEntity, sName, sType); } ar.SetAttribute(skey, value /*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = pEntity.FileList.Count.ToString(); //l_BusReceiveEdit.FileList.Count.ToString(); #endregion sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ar.Ext_1; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = oaDev.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < pEntity.FileList.Count; i++) { HNDC_CAttachmentNode at = new HNDC_CAttachmentNode(); CFuJian file = pEntity.FileList[i]; at.DocumentName = "函件收文";//file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return(sXml); }
private string Devolve2DC2(HN_OA2DC oaDev, B_PF enProFile, string strDraftDept, string dealUser, string sProcessName) { string sXml = ""; List <FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", sProcessName); FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode(); FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode fl = new HNDC_CFileNode(); #region 开始生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + sProcessName + "']/Object"); switch (ObjPlatForm) { case "DC": ar.SysFlag = "1"; break; case "FC": ar.SysFlag = "2"; break; default: ar.SysFlag = "1"; break; } #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType; ar.SetAttribute(skey, oaDev.PreHandel(enProFile, sName, sType) /*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 // 编制单位-主办部门 ar.FormationDept = strDraftDept; // 功能领域-程序子类 ar.FunctionField = B_ProgramFileInfo.GetProSubTypeName(enProFile.ProgramFileID); //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = enProFile.FileList.Count.ToString(); #endregion sXml = oaDev.GenOAArchiveNode(ar, sProcessName); /****开始生成File节点************************************************************************/ #region 开始生成File节点 fl.AuthorizeTime = ar.AuthorizeTime; fl.Code = ar.Code; fl.Code19 = ar.Code19; fl.D_FileStatus = ar.D_FileStatus; fl.DocCodesExplain = ""; fl.DocPages = ar.DocPages; fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime; fl.Ext_1 = ar.Ext_1; fl.Ext_2 = ar.Ext_2; fl.Ext_3 = ar.Ext_3; fl.Ext_4 = ar.Ext_4; fl.Ext_5 = ar.Ext_5; fl.Title = ar.Title; fl.FK_ArchiveID = ar.FK_Archive; fl.FK_CategoryID = ar.FK_CategoryID; fl.FormationDept = ar.FormationDept; fl.FormationTime = ar.FormationTime; fl.Importer = ar.Importer; fl.ImporterTime = ar.ImporterTime; fl.OriginalID = ar.OriginalID; fl.OtherTitle = ar.OtherTitle; fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime; fl.RelatedCode = ar.RelatedCode; fl.Revision = ar.Revision; #endregion sXml = oaDev.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb"); //"http://172.29.128.239"; //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName"); for (int i = 0; i < enProFile.FileList.Count; i++) { HNDC_CAttachmentNode at = new HNDC_CAttachmentNode(); CFuJian file = enProFile.FileList[i]; at.DocumentName = ProcessConstString.TemplateName.PROGRAM_FILE; //file.FileName; at.FK_FileID = ""; at.MakeDate = ""; at.MakeUnit = ""; at.PublishedTime = ""; at.Remark = ""; at.ServerWeb = sServerWeb; Double iSize = 0; string sSize = file.Size.ToUpper(); if (sSize.Contains("K")) { sSize = sSize.Replace("K", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024; } if (sSize.Contains("M")) { sSize = sSize.Replace("M", ""); iSize = Convert.ToDouble(sSize); iSize = iSize * 1024 * 1024; } at.Size = ((int)iSize).ToString(); at.TimeSize = ""; at.Title = file.Alias; at.Type = file.Type; at.Url = file.URL; sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return(sXml); }