public HttpResponseMessage SpecialTaskEnd() { HttpRequestBase request = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request; WorkFlowManagerBLL bll = new WorkFlowManagerBLL(); zxzz_tasks ztmodel = new zxzz_tasks(); WorkFlowClass wf = new WorkFlowClass(); Zxzz_SpecialTaskBLL zpbll = new Zxzz_SpecialTaskBLL(); #region 专项整治流程 wf.FunctionName = "zxzz_tasks"; wf.WFID = "2017041214100001"; wf.WFDID = request["wfdid"]; wf.NextWFDID = "2017041214200004"; wf.NextWFUSERIDS = zpbll.AddSummarizeXZXKK(); wf.WFSAID = request["wfsaid"]; wf.WFSID = request["wfsid"]; wf.DEALCONTENT = ""; wf.IsSendMsg = "false"; wf.WFCreateUserID = Convert.ToInt32(request["userid"]); #endregion string wf_data = bll.WF_Submit(wf, ztmodel); //结束所有wfsu用户的未处理 zpbll.OverAllWFSU(wf.WFSAID, wf_data.Split(',')[1], (int)wf.WFCreateUserID); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent("{\"success\":true,\"wfsaid\":\"" + wf_data.Split(',')[1] + "\"}", Encoding.GetEncoding("UTF-8"), "text/html"); return(response); }
public HttpResponseMessage SpecialTaskSummarize(Zxzz_TaskModel model) { HttpRequestBase request = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request; WorkFlowManagerBLL bll = new WorkFlowManagerBLL(); zxzz_tasks ztmodel = new zxzz_tasks(); WorkFlowClass wf = new WorkFlowClass(); List <FileClass> list = new List <FileClass>(); Zxzz_SpecialTaskBLL ztbll = new Zxzz_SpecialTaskBLL(); string[] fileClass = model.uploadpanelValue; ztmodel.summarytime = model.summarytime; ztmodel.summaryuserid = model.summaryuserid; ztmodel.summary = model.summary; ztmodel.results = model.results; ztmodel.experiences = model.experiences; if (fileClass != null && fileClass.Length > 0) { foreach (var item in fileClass) { FileClass infileClass = new FileClass(); JObject jo = new JObject(); jo = (JObject)JsonConvert.DeserializeObject(item); infileClass.OriginalPath = jo["OriginalPath"] == null ? "" : jo["OriginalPath"].ToString(); infileClass.OriginalName = jo["OriginalName"] == null ? "" : jo["OriginalName"].ToString(); infileClass.OriginalType = jo["OriginalType"] == null ? "" : jo["OriginalType"].ToString(); infileClass.size = jo["size"] == null ? 0 : (double)jo["size"]; list.Add(infileClass); } } #region 专项整治流程 wf.FunctionName = "zxzz_tasks"; wf.WFID = "2017041214100001"; wf.WFDID = "2017041214200004"; wf.NextWFDID = "2017041214200005"; wf.NextWFUSERIDS = ztbll.GetUseridsByUnitids(model.xdzd); wf.WFSAID = model.wfsaid; wf.WFSID = model.wfsid; wf.IsSendMsg = "false"; wf.WFCreateUserID = model.summaryuserid; wf.files = list; #endregion bll.WF_Submit(wf, ztmodel); //结束总结所有wfsu用户的未处理 ztbll.EndAllWFSU(wf.WFSAID); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent("{\"success\":true}", Encoding.GetEncoding("UTF-8"), "text/html"); return(response); }
public HttpResponseMessage SpecialTaskFiring(Zxzz_TaskModel model) { HttpRequestBase request = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request; WorkFlowManagerBLL bll = new WorkFlowManagerBLL(); WorkFlowClass wf = new WorkFlowClass(); List <FileClass> list = new List <FileClass>(); Zxzz_SpecialTaskBLL zpbll = new Zxzz_SpecialTaskBLL(); string[] fileClass = model.uploadpanelValue; zxzz_tasks ztmodel = new zxzz_tasks(); if (fileClass != null && fileClass.Length > 0) { foreach (var item in fileClass) { FileClass infileClass = new FileClass(); JObject jo = new JObject(); jo = (JObject)JsonConvert.DeserializeObject(item); infileClass.OriginalPath = jo["OriginalPath"] == null ? "" : jo["OriginalPath"].ToString(); infileClass.OriginalName = jo["OriginalName"] == null ? "" : jo["OriginalName"].ToString(); infileClass.OriginalType = jo["OriginalType"] == null ? "" : jo["OriginalType"].ToString(); infileClass.size = jo["size"] == null ? 0 : (double)jo["size"]; list.Add(infileClass); } } #region 专项整治流程 wf.FunctionName = "zxzz_tasks"; wf.WFID = "2017041214100001"; wf.WFDID = model.wfdid; wf.NextWFDID = model.nextwfdid; wf.processmode = model.nextwfdid; wf.NextWFUSERIDS = zpbll.GetUseridsByUnitids(model.xdzd); wf.WFSAID = model.wfsaid; wf.WFSID = model.wfsid; wf.DEALCONTENT = model.dealcontent; wf.IsSendMsg = "false"; wf.WFCreateUserID = model.createuserid; wf.files = list; #endregion string wf_data = bll.WF_Submit(wf, ztmodel); //初始化WFSU zpbll.ReloadWFSU(wf_data.Split(',')[1]); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent("{\"success\":true}", Encoding.GetEncoding("UTF-8"), "text/html"); return(response); }
/// <summary> /// 添加总结信息 /// </summary> /// <param name="model"></param> public void UpdateSpecailTask(zxzz_tasks model) { Entities db = new Entities(); zxzz_tasks zxzz = db.zxzz_tasks.FirstOrDefault(t => t.taskid == model.taskid); if (zxzz != null) { zxzz.summarytime = model.summarytime; zxzz.summaryuserid = model.summaryuserid; zxzz.summary = model.summary; zxzz.results = model.results; zxzz.experiences = model.experiences; } db.SaveChanges(); }
/// <summary> /// 专项整治逻辑处理 /// </summary> /// <param name="WFSNAME">流程详细名称</param> /// <param name="WFSID">流程详细ID</param> /// <param name="smsj">要处理的表(smsj)</param> /// <returns></returns> public string function_specialtasks(out string WFSNAME, string WFSID, zxzz_tasks zxzzmodel) { Entities dbsmsj = new Entities(); zxzz_tasks zxzztaskmodel = null; string INDID = string.Empty; wf_workflowspecifics wfsmodel = new WF_WorkFlowSpecificDAL().GetSingle(WFSID); if (wfsmodel != null && !string.IsNullOrEmpty(wfsmodel.tablenameid)) { zxzztaskmodel = dbsmsj.zxzz_tasks.SingleOrDefault(t => t.taskid == wfsmodel.tablenameid); if (zxzztaskmodel == null) { zxzztaskmodel = new zxzz_tasks(); INDID = GetNewId(); } else { zxzztaskmodel.summarytime = zxzzmodel.summarytime; zxzztaskmodel.summaryuserid = zxzzmodel.summaryuserid; zxzztaskmodel.summary = zxzzmodel.summary; zxzztaskmodel.results = zxzzmodel.results; zxzztaskmodel.experiences = zxzzmodel.experiences; new Zxzz_SpecialTaskDAL().UpdateSpecailTask(zxzztaskmodel); } } else { zxzztaskmodel = new zxzz_tasks(); INDID = GetNewId(); } if (!string.IsNullOrEmpty(INDID))//说明不存在 { zxzztaskmodel.taskid = INDID; zxzztaskmodel.title = zxzzmodel.title; zxzztaskmodel.tasktype = zxzzmodel.tasktype; zxzztaskmodel.level = zxzzmodel.level; zxzztaskmodel.term = zxzzmodel.term; zxzztaskmodel.starttime = zxzzmodel.starttime; zxzztaskmodel.endtime = zxzzmodel.endtime; zxzztaskmodel.region = zxzzmodel.region; zxzztaskmodel.taskexplain = zxzzmodel.taskexplain; zxzztaskmodel.grometry = zxzzmodel.grometry; zxzztaskmodel.fqr = zxzzmodel.fqr; zxzztaskmodel.fqtime = zxzzmodel.fqtime; zxzztaskmodel.xdzd = zxzzmodel.xdzd; zxzztaskmodel.leader = zxzzmodel.leader; zxzztaskmodel.createuserid = zxzzmodel.createuserid; zxzztaskmodel.createtime = DateTime.Now; } if (!string.IsNullOrEmpty(INDID)) { //添加 dbsmsj.zxzz_tasks.Add(zxzztaskmodel); dbsmsj.SaveChanges(); } if (string.IsNullOrEmpty(INDID)) { INDID = zxzztaskmodel.taskid; } WFSNAME = zxzzmodel.title; return(INDID); }
public HttpResponseMessage AddSpecialTask(Zxzz_TaskModel model) { HttpRequestBase request = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request; WorkFlowManagerBLL bll = new WorkFlowManagerBLL(); WorkFlowClass wf = new WorkFlowClass(); List <FileClass> list = new List <FileClass>(); zxzz_tasks ztmodel = new zxzz_tasks(); ztmodel.title = model.title; ztmodel.tasktype = model.tasktype; ztmodel.level = model.level; ztmodel.term = model.term; ztmodel.starttime = model.starttime; ztmodel.endtime = model.endtime; ztmodel.region = model.region; ztmodel.taskexplain = model.taskexplain; ztmodel.grometry = model.grometry; ztmodel.fqr = model.fqr; ztmodel.fqtime = model.fqtime; ztmodel.leader = model.leader; ztmodel.createuserid = model.fqr; ztmodel.createtime = DateTime.Now; string[] fileClass = model.uploadpanelValue; string[] fileClassXDZD = model.xdzdValue; foreach (var item in fileClassXDZD) { model.xdzd += item + ","; } ztmodel.xdzd = model.xdzd.Substring(0, model.xdzd.Length - 1); if (fileClass != null && fileClass.Length > 0) { foreach (var item in fileClass) { FileClass infileClass = new FileClass(); JObject jo = new JObject(); jo = (JObject)JsonConvert.DeserializeObject(item); infileClass.OriginalPath = jo["OriginalPath"] == null ? "" : jo["OriginalPath"].ToString(); infileClass.OriginalName = jo["OriginalName"] == null ? "" : jo["OriginalName"].ToString(); infileClass.OriginalType = jo["OriginalType"] == null ? "" : jo["OriginalType"].ToString(); infileClass.size = jo["size"] == null ? 0 : (double)jo["size"]; list.Add(infileClass); } } #region 专项整治流程 wf.FunctionName = "zxzz_tasks"; wf.WFID = "2017041214100001"; wf.WFDID = "2017041214200001"; wf.NextWFDID = "2017041214200002"; wf.NextWFUSERIDS = model.leader.ToString(); wf.IsSendMsg = "false"; wf.WFCreateUserID = model.fqr; wf.files = list; #endregion bll.WF_Submit(wf, ztmodel); #region 添加日志 SystemLogBLL slbll = new SystemLogBLL(); slbll.WriteSystemLog("专项整治", "", (int)model.fqr); #endregion HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent("{\"success\":true}", Encoding.GetEncoding("UTF-8"), "text/html"); return(response); }