public object GetData(string userid, string caseId, string baid, string actid) { try { if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid); var data = new GetDataModel(); if (caseId == "") { DeptInfoAndUserInfo userData = ComClass.GetDeptAndUserByUserId(userid); data.sendDocBaseInfo = new B_OA_SendDoc_Inner_QuZhan(); data.sendDocBaseInfo.underTakeManId = userData.userinfo.UserID; data.sendDocBaseInfo.undertakeMan = userData.userinfo.CnName; data.sendDocBaseInfo.underTakeDep = userData.deptinfo.DPName; data.sendDocBaseInfo.underTakeDepId = userData.deptinfo.DPID; B_OA_FileType fileType = new B_OA_FileType(); fileType.Condition.Add("flagType = " + "3"); fileType = Utility.Database.QueryObject<B_OA_FileType>(fileType); data.sendDocBaseInfo.fileTypeId = fileType.FileTypeId; } else { B_OA_SendDoc_Inner_QuZhan userData = new B_OA_SendDoc_Inner_QuZhan(); userData.Condition.Add("caseId=" + caseId); userData = Utility.Database.QueryObject<B_OA_SendDoc_Inner_QuZhan>(userData); data.sendDocBaseInfo = userData; } return data; } catch (Exception ex) { ComBase.Logger(ex); throw (new Exception("获取数据失败!", ex)); } }
public object DeleteDoc(string caseId, string userid) { IDbTransaction tran = Utility.Database.BeginDbTransaction(); try { //审核记录表 if (!string.IsNullOrEmpty(caseId)) { B_OA_SendDoc_Inner_QuZhan receiveDoc = new B_OA_SendDoc_Inner_QuZhan(); receiveDoc.Condition.Add("caseId=" + caseId); Utility.Database.Delete(receiveDoc, tran); engineAPI.Delete(caseId, userid, tran); Utility.Database.Commit(tran); } else { throw (new Exception("删除数据失败")); } bool b = true; return new { b = b }; } catch (Exception ex) { ComBase.Logger(ex); throw (new Exception("删除失败!", ex)); } }
private Dictionary<string, Object> CreateWordSendDocData(string caseid, IDbTransaction tran) { B_OA_SendDoc_Inner_QuZhan sendDoc = new B_OA_SendDoc_Inner_QuZhan(); sendDoc.Condition.Add("caseid=" + caseid); sendDoc = Utility.Database.QueryObject<B_OA_SendDoc_Inner_QuZhan>(sendDoc, tran); Dictionary<string, Object> dict = new Dictionary<string, Object>(); dict.Add("code", sendDoc.code == null ? "" : sendDoc.code);//编号 dict.Add("underTakeDep", sendDoc.underTakeDep == null ? "" : sendDoc.underTakeDep);//承办科室 dict.Add("undertakeMan", sendDoc.undertakeMan == null ? "" : sendDoc.undertakeMan);//承办人 dict.Add("content", sendDoc.content == null ? "" : sendDoc.content);//内容 dict.Add("title", sendDoc.title == null ? "" : sendDoc.title);//内容 dict.Add("remark", sendDoc.remark == null ? "" : sendDoc.remark);//备注 if (!string.IsNullOrEmpty(sendDoc.createDate.ToString())) { string createDate = (DateTime.Parse(sendDoc.createDate.ToString())).ToString("yyyy年MM月dd日"); dict.Add("createDate", createDate);//主送 } //获取所有评阅意见 FX_WorkFlowBusAct work = new FX_WorkFlowBusAct(); work.Condition.Add("CaseID = " + caseid); work.OrderInfo = "ReceDate asc"; List<FX_WorkFlowBusAct> listWork = Utility.Database.QueryList<FX_WorkFlowBusAct>(work, tran); //将所有工作流信息格式化 List<B_OA_PrintParagragh> listPara = CommonFunctional.ChangeListToMatch(listWork); //办公室核稿意见 List<B_OA_PrintParagragh> cbksfzryjList = new List<B_OA_PrintParagragh>(); //会办单位意见 List<B_OA_PrintParagragh> hqksyjList = new List<B_OA_PrintParagragh>(); //站领导批示 List<B_OA_PrintParagragh> zldpsList = new List<B_OA_PrintParagragh>(); int k = 0; //承办科室负责人意见 for (k = 0; k < listPara.Count; k++) { if (listPara[k].ActID == "A002") { cbksfzryjList.Add(listPara[k]); } } //承办科室负责人 var imgCbksfzryjList = new OpenXmlHelper.ImageTextArray[cbksfzryjList.Count]; for (k = 0; k < cbksfzryjList.Count; k++) { imgCbksfzryjList[k] = new OpenXmlHelper.ImageTextArray(); imgCbksfzryjList[k].Images = cbksfzryjList[k].Image; imgCbksfzryjList[k].Text = cbksfzryjList[k].Text; imgCbksfzryjList[k].Foots = cbksfzryjList[k].Foots; imgCbksfzryjList[k].FootAlign = DocumentFormat.OpenXml.Wordprocessing.JustificationValues.Right; } dict.Add("cbksfzryj", imgCbksfzryjList); //会办单位意见 for (k = 0; k < listPara.Count; k++) { if (listPara[k].ActID == "A003") { hqksyjList.Add(listPara[k]); } } //承办科室负责人 var imgHqksyjList = new OpenXmlHelper.ImageTextArray[hqksyjList.Count]; for (k = 0; k < hqksyjList.Count; k++) { imgHqksyjList[k] = new OpenXmlHelper.ImageTextArray(); imgHqksyjList[k].Images = hqksyjList[k].Image; imgHqksyjList[k].Text = hqksyjList[k].Text; imgHqksyjList[k].Foots = hqksyjList[k].Foots; imgHqksyjList[k].FootAlign = DocumentFormat.OpenXml.Wordprocessing.JustificationValues.Right; } dict.Add("hqksyj", imgHqksyjList); // for (k = 0; k < listPara.Count; k++) { if (listPara[k].ActID == "A004") { zldpsList.Add(listPara[k]); } } //承办科室负责人 var imgZldpsList = new OpenXmlHelper.ImageTextArray[zldpsList.Count]; for (k = 0; k < zldpsList.Count; k++) { imgZldpsList[k] = new OpenXmlHelper.ImageTextArray(); imgZldpsList[k].Images = zldpsList[k].Image; imgZldpsList[k].Text = zldpsList[k].Text; imgZldpsList[k].Foots = zldpsList[k].Foots; imgZldpsList[k].FootAlign = DocumentFormat.OpenXml.Wordprocessing.JustificationValues.Right; } dict.Add("zldps", imgZldpsList); return dict; }
public bool DeleteCase(string caseid, string userid, Object obj) { IDbTransaction tran = (IDbTransaction)obj; //加入针对不同的业务的删除前处理 FX_WorkFlowCase workFlow = new FX_WorkFlowCase(); workFlow.Condition.Add("ID =" + caseid); workFlow = Utility.Database.QueryObject<FX_WorkFlowCase>(workFlow, tran); if (workFlow != null) { string flowId = workFlow.FlowID; switch (flowId) { case "W000098": //发文 B_OA_SendDoc_QuZhan sendDoc = new B_OA_SendDoc_QuZhan(); sendDoc.Condition.Add("caseid=" + caseid); Utility.Database.Delete(sendDoc, tran); break; case "W000099": //收文 B_OA_ReceiveDoc_QuZhan receiveDoc = new B_OA_ReceiveDoc_QuZhan(); receiveDoc.Condition.Add("caseid=" + caseid); Utility.Database.Delete(receiveDoc, tran); break; case "W000100": //内部事项 B_OA_SendDoc_Inner_QuZhan innderDoc = new B_OA_SendDoc_Inner_QuZhan(); innderDoc.Condition.Add("caseId=" + caseid); Utility.Database.Delete(innderDoc, tran); break; case "W000070": //车辆申请 B_OA_Car car = new B_OA_Car(); car.Condition.Add("workflowcaseid=" + caseid); Utility.Database.Delete(car, tran); break; case "W000071": //会议申请 B_OA_Meeting data = new B_OA_Meeting(); data.Condition.Add("CaseID=" + caseid); Utility.Database.Delete(data, tran); break; case "W000079": //请假申请 B_OA_LeaveList leave = new B_OA_LeaveList(); leave.Condition.Add("caseId=" + caseid); Utility.Database.Delete(leave, tran); break; case "W000080": //出差申请 B_OA_TravelList travel = new B_OA_TravelList(); travel.Condition.Add("caseId=" + caseid); Utility.Database.Delete(travel, tran); break; case "W000089": //通知公告 B_OA_Notice notice = new B_OA_Notice(); notice.Condition.Add("caseid=" + caseid); Utility.Database.Delete(notice, tran); break; } if (!string.IsNullOrEmpty(caseid)) { //删除正文路径 B_Common_CreateDoc createDoc = new B_Common_CreateDoc(); createDoc.Condition.Add("caseid=" + caseid); Utility.Database.Delete(createDoc, tran); //删除附件 FX_AttachMent attach = new FX_AttachMent(); attach.Condition.Add("CaseID="+caseid); Utility.Database.Delete(attach, tran); } } return true; }