/// <summary> /// 复制党纪工团发文 /// </summary> /// <param name="ID"></param> /// <param name="p_strStepName"></param> /// <param name="receiveUserID"></param> /// <param name="p_strProcessID"></param> /// <param name="p_strWorkItemID"></param> /// <returns></returns> private bool CopyDJGTInfo(String ID, String p_strStepName, String p_strUserID, String p_strProcessID, String p_strWorkItemID, String p_strPoolID) { try { M_DJGTSend selectEntity = new M_DJGTSend(); selectEntity.ID = int.Parse(ID); M_DJGTSend newEntity = new M_DJGTSend(); selectEntity.Clone(newEntity); newEntity.WorkItemID = p_strWorkItemID; newEntity.StepName = p_strStepName; newEntity.ReceiveUserID = p_strUserID; newEntity.D_StepStatus = String.IsNullOrEmpty(p_strPoolID) ? "Assign" : "New";//公办:New 其他:Assign return(newEntity.Save()); } catch (Exception ex) { return(false); } }
private string Devovle2DP2(HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); List <FounderSoftware.ADIM.OA.OA2DP.DevKVItem> ls = hn_oa2dp.MapFunction("DP", base.TemplateName); M_DJGTSend entity = this.ControlToEntity(false) as M_DJGTSend; entity.FormsData = XmlUtility.SerializeXml(entity); //ar.SetAttribute("FormationTime"/*配置文件中的归档字段*/, "2009-12-12"/*cEntity.GetValue(配置文件中的实体属性名)*/); //string sValue = ar.GetAttribute("FormationTime"); #region 生成Archive节点 ar.System = "OA_" + base.IdentityID.ToString(); #region 根据DevolveConfig.xml配置参数设置Archive归档节点 for (int i = 0; i < ls.Count; i++) { string skey = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sKey; string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sValue; string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sType; ar.SetAttribute(skey, hn_oa2dp.PreHandel(entity, sName, sType, true) /*(entity.GetVal(sName) as string)*/); } ar.SetOAArchiveNode(); // 其他节点处理应放置在SetOAArchiveNode方法之后 ar.FK_DPID = sDPID; //return Devolve2DP(oaDev, sDPID, ar); #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点 ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成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 = ""; 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 = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.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++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode(); CFuJian file = ucAttachment.UCDataList[i]; at.DocumentName = base.TemplateName;//"公司发文";//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 = hn_oa2dp.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 Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID) { string sXml = ""; M_DJGTSend entity = this.ControlToEntity(false) as M_DJGTSend; #region ArchiveNode FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode(); ar.System = "OA_" + base.IdentityID.ToString(); ar.FK_DPID = sDPID; //ar.Code = entity.DocumentNo; //ar.Authorizer = entity.SignerName; //ar.DistributionTime = entity.FenFaDate.ToShortDateString(); //ar.Countersigner = entity.DeptSigners + entity.LeadSigners; //ar.Auditby = entity.CheckDrafterName; //ar.AuditDate = entity.CheckDate.ToShortDateString(); //ar.FormationDept = entity.HostDeptName; //ar.Author = entity.Drafter; //ar.Title = entity.DocumentTitle; //ar.ThemeWord = entity.SubjectWord; //ar.MainDispenseUnit = entity.MainSenders; //ar.RelatedDespenseUnit = entity.CopySenders; //ar.EffectTime = entity.SendDate.ToShortDateString(); //ar.DocPages = entity.SheetCount.ToString(); ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString(); #endregion sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName); FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode(); /****开始生成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 = ""; 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 = hn_oa2dp.GenOAFileNode(fl); /****完成生成File节点************************************************************************/ #region 始生成Attachment节点 /****开始生成Attachment节点******************************************************************/ string sServerWeb = hn_oa2dp.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++) { FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_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 = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at); } #endregion /****完成生成Attachment节点******************************************************************/ return(sXml); }
/// <summary> /// 复制党纪工团发文 /// </summary> /// <param name="ID"></param> /// <param name="p_strStepName"></param> /// <param name="receiveUserID"></param> /// <param name="p_strProcessID"></param> /// <param name="p_strWorkItemID"></param> /// <returns></returns> private bool CopyDJGTInfo(String ID, String p_strStepName, String p_strUserID, String p_strProcessID, String p_strWorkItemID, String p_strPoolID) { try { M_DJGTSend selectEntity = new M_DJGTSend(); selectEntity.ID = int.Parse(ID); M_DJGTSend newEntity = new M_DJGTSend(); selectEntity.Clone(newEntity); newEntity.WorkItemID = p_strWorkItemID; newEntity.StepName = p_strStepName; newEntity.ReceiveUserID = p_strUserID; newEntity.D_StepStatus = String.IsNullOrEmpty(p_strPoolID) ? "Assign" : "New";//公办:New 其他:Assign return newEntity.Save(); } catch (Exception ex) { return false; } }