Пример #1
0
        public Paging <List <Zxzz_TaskModel> > GetAllSpecialTaskList(string filter, int start, int limit)
        {
            List <Filter>       filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            Zxzz_SpecialTaskBLL bll     = new Zxzz_SpecialTaskBLL();

            return(bll.GetAllSpecialTaskList(filters, start, limit));
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        public HttpResponseMessage ExportExcel()
        {
            HttpRequestBase request    = ((HttpContextWrapper)this.Request.Properties["MS_HttpContext"]).Request;
            string          excelname  = request["excelname"];
            string          exceltitle = request["exceltitle"];
            string          exceldata  = request["exceldata"];
            string          filter     = request["filter"];
            int             status     = string.IsNullOrEmpty(request["status"]) ? 0 : Convert.ToInt32(request["status"]);
            int             userid     = Convert.ToInt32(request["userid"]);

            List <Filter> filters = null;

            if (filter != "[]")
            {
                filters = JsonConvert.DeserializeObject <List <Filter> >(filter);
            }

            Zxzz_SpecialTaskBLL   bll  = new Zxzz_SpecialTaskBLL();
            List <Zxzz_TaskModel> list = bll.GetSpecialTaskListExcel(userid, status, filters);

            CommonFunctionBLL <Zxzz_TaskModel> cfBll = new CommonFunctionBLL <Zxzz_TaskModel>(exceldata);

            return(cfBll.saveExcel(list, excelname, exceltitle));
        }
Пример #6
0
        public Paging <List <Zxzz_TaskWorkFlowModel> > GetSpecialTaskWFInfo(int start, int limit, string taskid, string wfdid)
        {
            Zxzz_SpecialTaskBLL bll = new Zxzz_SpecialTaskBLL();

            return(bll.GetSpecialTaskWFInfo(start, limit, taskid, wfdid));
        }
Пример #7
0
        public List <FileClass> GetSpecialTaskReportImages(string wfsuid)
        {
            Zxzz_SpecialTaskBLL bll = new Zxzz_SpecialTaskBLL();

            return(bll.GetSpecialTaskReportImages(wfsuid));
        }
Пример #8
0
        public List <FileClass> GetSpecialTaskImages(string taskid, string wfdid)
        {
            Zxzz_SpecialTaskBLL bll = new Zxzz_SpecialTaskBLL();

            return(bll.GetSpecialTaskImages(taskid, wfdid));
        }
Пример #9
0
        public Zxzz_TaskModel GetSpecialTaskModel(string taskid)
        {
            Zxzz_SpecialTaskBLL bll = new Zxzz_SpecialTaskBLL();

            return(bll.GetSpecialTaskModel(taskid));
        }
Пример #10
0
        public Paging <List <Zxzz_TaskModel> > GetAllSpecialTaskList(int start, int limit)
        {
            Zxzz_SpecialTaskBLL bll = new Zxzz_SpecialTaskBLL();

            return(bll.GetAllSpecialTaskList(null, start, limit));
        }
Пример #11
0
        public Paging <List <Zxzz_TaskModel> > GetAlreadySpecialTaskList(int start, int limit, int userid)
        {
            Zxzz_SpecialTaskBLL bll = new Zxzz_SpecialTaskBLL();

            return(bll.GetSpecialTaskList(null, start, limit, userid, 2));
        }