Exemplo n.º 1
0
        public JsonResult PostParChanges()
        {
            var        request = System.Web.HttpContext.Current.Request;
            DtResponse dt      = new DtResponse();

            var list = ParsePostForm(request.Form);
            var http = DtRequest.HttpData(list);

            if (http.ContainsKey("action"))
            {
                string action = http["action"] as string;
                if (action == "edit")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        Dictionary <string, object> m_kv = new Dictionary <string, object>();
                        m_kv["par_name"] = d.Key;
                        foreach (var dd in d.Value as Dictionary <string, object> )
                        {
                            m_kv[dd.Key] = dd.Value;
                        }

                        dt.data.Add(m_kv);
                    }
                }
            }
            return(Json(dt));
        }
Exemplo n.º 2
0
        private DtResponse ProcessRequest(List <KeyValuePair <string, string> > data)
        {
            DtResponse dt     = new DtResponse();
            var        http   = DtRequest.HttpData(data);
            var        Data   = http["data"] as Dictionary <string, object>;
            int        wfe_id = -1;

            foreach (var d in Data)
            {
                wfe_id = Convert.ToInt32(d.Key);
            }
            string jx_reason    = "";
            string E_code       = "";
            string job_order    = "";
            string notice_order = "";

            foreach (var d in Data)
            {
                int id = Convert.ToInt32(d.Key);
                foreach (var dd in d.Value as Dictionary <string, object> )
                {
                    ERPInfoManagement erp = new ERPInfoManagement();

                    //sb_code、jxreason与设备绑定在一起传过来,当通知单号工单号填完后满足向A8.2跳转条件
                    if (dd.Key == "sb_code")
                    {
                        E_code = dd.Value.ToString();
                    }
                    if (dd.Key == "jxreason")
                    {
                        jx_reason = dd.Value.ToString();
                    }
                    if (dd.Key == "notice_order2")
                    {
                        if (dd.Value.ToString() == "")
                        {
                            continue;
                        }
                        notice_order = "00" + dd.Value.ToString();
                        GD_InfoModal res = erp.getGD_Modal_Notice(notice_order);
                        if (res != null)
                        {
                            job_order = res.GD_Id;
                        }
                    }
                    if (dd.Key == "job_order2")
                    {
                        if (dd.Value.ToString() == "")
                        {
                            continue;
                        }
                        job_order = "00" + dd.Value.ToString();
                        GD_InfoModal res = erp.getGD_Modal_GDId(job_order);
                        if (res != null)
                        {
                            notice_order = res.GD_Notice_Id;
                        }
                    }
                    //if (dd.Key == "JumpA8dot2DR")
                    //{
                    //    string Equip_Code = E_code;
                    //    string Jx_Reason = jx_reason;
                    //    string flowname = "A8dot2";
                    //    UI_WorkFlow_Entity wfe = CWFEngine.CreateAWFEntityByName(flowname);
                    //    if (wfe != null)
                    //    {
                    //        EquipManagment em = new EquipManagment();
                    //        Equip_Info eqinfo = em.getEquip_Info(Equip_Code);
                    //        List<Equip_Archi> Equip_ZzBelong = em.getEquip_ZzBelong(eqinfo.Equip_Id);
                    //        Dictionary<string, string> record = wfe.GetRecordItems();
                    //        record["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                    //        record["time"] = DateTime.Now.ToString();
                    //        wfe.Start(record);
                    //        int flow_id = wfe.EntityID;
                    //        //paras
                    //        Dictionary<string, string> signal = new Dictionary<string, string>();
                    //        signal["JxSubmit_done"] = "true";
                    //        signal["Cj_Name"] = Equip_ZzBelong[1].EA_Name; //Cj_Name
                    //        signal["Zz_Name"] = Equip_ZzBelong[0].EA_Name; //Zz_Name
                    //        signal["Equip_GyCode"] = eqinfo.Equip_GyCode;
                    //        signal["Equip_Code"] = eqinfo.Equip_Code;
                    //        signal["Equip_Type"] = eqinfo.Equip_Type;
                    //        signal["Zy_Type"] = eqinfo.Equip_Specialty;
                    //        signal["Zy_SubType"] = eqinfo.Equip_PhaseB;
                    //        signal["Equip_ABCMark"] = eqinfo.Equip_ABCmark;
                    //        signal["Jx_Reason"] = Jx_Reason;//计划检修原因 PM?
                    //        signal["Job_Name"] = "来自DRBPM";
                    //        signal["Job_Order"] = job_order;
                    //        //record
                    //        record["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                    //        record["time"] = DateTime.Now.ToString();
                    //        //submit
                    //        CWFEngine.SubmitSignal(flow_id, signal, record);

                    //    }
                    //}
                }
            }


            Dictionary <string, object> m_kv   = new Dictionary <string, object>();
            EquipManagment     em1             = new EquipManagment();
            Equip_Info         eqinfo1         = em1.getEquip_Info(E_code);
            List <Equip_Archi> Equip_ZzBelong1 = em1.getEquip_ZzBelong(eqinfo1.Equip_Id);


            int             UserId = (Session["User"] as EquipModel.Entities.Person_Info).Person_Id;
            PersonManagment pm     = new PersonManagment();

            EquipBLL.AdminManagment.PersonManagment.P_viewModal pv = pm.Get_PersonModal(UserId);

            m_kv["index_Id"]      = wfe_id;
            m_kv["zz_name"]       = Equip_ZzBelong1[0].EA_Name; //Zz_Name
            m_kv["sb_gycode"]     = eqinfo1.Equip_GyCode;
            m_kv["sb_code"]       = E_code;
            m_kv["sb_type"]       = eqinfo1.Equip_Type;
            m_kv["sb_ABCMark"]    = eqinfo1.Equip_ABCmark;
            m_kv["plan_name"]     = "来自DRBPM";
            m_kv["jxreason"]      = jx_reason;
            m_kv["kkconfirm2"]    = "同意";
            m_kv["zytdconfirm2"]  = "同意";
            m_kv["job_order2"]    = job_order;
            m_kv["notice_order2"] = notice_order;
            m_kv["missionname"]   = "完善工单与通知单后跳转";
            m_kv["role"]          = pv.Role_Names;
            dt.data.Add(m_kv);


            return(dt);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 处理datatables请求
        /// </summary>
        /// <param name="data"></param>
        private DtResponse ProcessRequest(List <KeyValuePair <string, string> > data, string wfe_id)
        {
            DtResponse dt = new DtResponse();

            var http = DtRequest.HttpData(data);

            if (http.ContainsKey("action"))
            {
                string action = http["action"] as string;
                if (action == "edit")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        int           id   = Convert.ToInt32(d.Key);
                        List <string> pros = new List <string>();
                        List <object> vals = new List <object>();
                        Dictionary <string, object> m_kv = new Dictionary <string, object>();
                        foreach (var dd in d.Value as Dictionary <string, object> )
                        {
                            pros.Add(dd.Key);
                            vals.Add(dd.Value);
                        }
                        A6dot2Managment AM = new A6dot2Managment();

                        A6dot2LsTaskTab m = AM.UpdateA6dot2LsTask(id, pros, vals);


                        m_kv["ID"]          = m.Id;
                        m_kv["Zz_Name"]     = m.Zz_Name;
                        m_kv["Equip_Gybh"]  = m.Equip_Gybh;
                        m_kv["Equip_Code"]  = m.Equip_Code;
                        m_kv["Last_HY"]     = m.lastOilTime;
                        m_kv["HY_ZQ"]       = m.oilInterval;
                        m_kv["Next_HY"]     = m.NextOilTime;
                        m_kv["Problem_Cur"] = m.cur_problem;
                        m_kv["ZG_status"]   = m.cur_status;
                        m_kv["Wfe_id"]      = m.wfd_id;

                        dt.data.Add(m_kv);
                    }
                }
                else if (action == "create") //新建工作流
                {
                    A6dot2Managment AM = new A6dot2Managment();
                    A6dot2LsTaskTab rt = new A6dot2LsTaskTab();
                    rt.wfd_id = wfe_id;

                    A6dot2LsTaskTab m = AM.AddA6dot2LsTask(rt);

                    Dictionary <string, object> m_kv = new Dictionary <string, object>();
                    m_kv["ID"]          = m.Id;
                    m_kv["Zz_Name"]     = m.Zz_Name;
                    m_kv["Equip_Gybh"]  = m.Equip_Gybh;
                    m_kv["Equip_Code"]  = m.Equip_Code;
                    m_kv["Last_HY"]     = m.lastOilTime;
                    m_kv["HY_ZQ"]       = m.oilInterval;
                    m_kv["Next_HY"]     = m.NextOilTime;
                    m_kv["Problem_Cur"] = m.cur_problem;
                    m_kv["ZG_status"]   = m.cur_status;
                    m_kv["Wfe_id"]      = m.wfd_id;
                    dt.data.Add(m_kv);
                }
                else if (action == "remove")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        int id = Convert.ToInt32(d.Key);

                        A6dot2Managment AM = new A6dot2Managment();


                        AM.RemoveA6dot2LsTask(id);
                    }
                }
            }
            return(dt);
        }
Exemplo n.º 4
0
        private DtResponse ProcessRequest(List <KeyValuePair <string, string> > data)
        {
            DtResponse dt     = new DtResponse();
            var        http   = DtRequest.HttpData(data);
            var        Data   = http["data"] as Dictionary <string, object>;
            int        wfe_id = -1;

            foreach (var d in Data)
            {
                wfe_id = Convert.ToInt32(d.Key);
            }
            foreach (var d in Data)
            {
                int id = Convert.ToInt32(d.Key);
                foreach (var dd in d.Value as Dictionary <string, object> )
                {
                    ERPInfoManagement           erp    = new ERPInfoManagement();
                    Dictionary <string, string> signal = new Dictionary <string, string>();
                    if (dd.Key == "plan_name")
                    {
                        signal["Plan_Name"] = dd.Value.ToString();

                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    if (dd.Key == "jxreason")
                    {
                        signal["JxCauseDesc"]             = dd.Value.ToString();
                        signal["CompleteNameReason_Done"] = "true";
                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    if (dd.Key == "xcconfirm")
                    {
                        string[] result = dd.Value.ToString().Split(new char[] { '$' });
                        signal["XcConfirm_Result"] = result[0];
                        if (result.Length > 1)
                        {
                            signal["XcConfirm_Reason"] = result[1];
                        }
                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    if (dd.Key == "kkconfirm")
                    {
                        if (dd.Value.ToString() == "")
                        {
                            continue;
                        }
                        string[] result = dd.Value.ToString().Split(new char[] { '$' });
                        signal["KkConfirm_Result"] = result[0];
                        if (result.Length > 1)
                        {
                            signal["KkConfirm_Reason"] = result[1];
                        }
                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    if (dd.Key == "zytdconfirm")
                    {
                        if (dd.Value.ToString() == "")
                        {
                            continue;
                        }
                        string[] result = dd.Value.ToString().Split(new char[] { '$' });
                        signal["ZytdConfirm_Result"] = result[0];
                        if (result.Length > 1)
                        {
                            signal["ZytdConfirm_Reason"] = result[1];
                        }


                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    if (dd.Key == "notice_order")
                    {
                        if (dd.Value.ToString() == "")
                        {
                            continue;
                        }
                        signal["NoticeOrder"] = "00" + dd.Value.ToString();
                        GD_InfoModal res = erp.getGD_Modal_Notice("00" + dd.Value.ToString());
                        if (res != null)
                        {
                            signal["JobOrder"] = res.GD_Id;
                        }

                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    if (dd.Key == "job_order")
                    {
                        if (dd.Value.ToString() == "")
                        {
                            continue;
                        }
                        signal["JobOrder"] = "00" + dd.Value.ToString();
                        GD_InfoModal res = erp.getGD_Modal_GDId("00" + dd.Value.ToString());
                        if (res != null)
                        {
                            signal["NoticeOrder"] = res.GD_Notice_Id;
                        }

                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                    //if (dd.Key == "JumpA8dot2T")
                    //{
                    //    //补充跳转A8dot2的变量,Cj_Name,Zy_Type,Zy_SubType
                    //    Dictionary<string, object> paras1 = new Dictionary<string, object>();
                    //    paras1["Zz_Name"] = null;
                    //    paras1["Equip_GyCode"] = null;
                    //    paras1["Equip_Code"] = null;
                    //    paras1["Plan_Name"] = null;
                    //    UI_WFEntity_Info wfei = CWFEngine.GetWorkFlowEntityWithParams(id, paras1);
                    //    //获取设备专业类别和子类别及设备所属车间
                    //    EquipManagment tm = new EquipManagment();
                    //    Equip_Info getZy = tm.getEquip_ByGyCode(paras1["Equip_GyCode"].ToString());
                    //    signal["Zy_Type"] = getZy.Equip_Specialty;
                    //    signal["Zy_SubType"] = getZy.Equip_PhaseB;
                    //    signal["Equip_Type"] = getZy.Equip_Type;
                    //    //EA_Name_EA_Id= tm.getEquip(paras1["Zz_Name"].ToString()).EA_Parent.EA_Id;
                    //    signal["Cj_Name"] = tm.getEquip(paras1["Zz_Name"].ToString());
                    //    signal["Plan_Name"] = paras1["Plan_Name"].ToString();
                    //    signal["JxdwAttachPlanOrder_Done"] = dd.Value.ToString();
                    //    //record
                    //    Dictionary<string, string> record1 = new Dictionary<string, string>();
                    //    record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                    //    record1["time"] = DateTime.Now.ToString();
                    //    //submit
                    //    CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    //}
                }
            }


            Dictionary <string, object> paras = new Dictionary <string, object>();

            paras["Zz_Name"]            = null;
            paras["Equip_GyCode"]       = null;
            paras["Equip_Code"]         = null;
            paras["Equip_Type"]         = null;
            paras["Equip_ABCMark"]      = null;
            paras["Plan_Name"]          = null;
            paras["JxCauseDesc"]        = null;
            paras["XcConfirm_Result"]   = null;
            paras["KkConfirm_Result"]   = null;
            paras["ZytdConfirm_Result"] = null;
            paras["JobOrder"]           = null;
            paras["NoticeOrder"]        = null;
            if (wfe_id != -1)
            {
                WorkFlows                   wfsd = new WorkFlows();
                UI_WFEntity_Info            wfei = CWFEngine.GetWorkFlowEntityWithParams(wfe_id, paras);
                Dictionary <string, object> m_kv = new Dictionary <string, object>();
                Mission         db_miss          = wfsd.GetWFEntityMissions(wfe_id).Last();//获取该实体最后一个任务
                int             UserId           = (Session["User"] as EquipModel.Entities.Person_Info).Person_Id;
                PersonManagment pm = new PersonManagment();
                EquipBLL.AdminManagment.PersonManagment.P_viewModal pv = pm.Get_PersonModal(UserId);

                m_kv["index_Id"]     = wfe_id;
                m_kv["zz_name"]      = paras["Zz_Name"].ToString();
                m_kv["sb_gycode"]    = paras["Equip_GyCode"].ToString();
                m_kv["sb_code"]      = paras["Equip_Code"].ToString();
                m_kv["sb_type"]      = paras["Equip_Type"].ToString();
                m_kv["sb_ABCMark"]   = paras["Equip_ABCMark"].ToString();
                m_kv["plan_name"]    = paras["Plan_Name"].ToString();
                m_kv["jxreason"]     = paras["JxCauseDesc"].ToString();
                m_kv["xcconfirm"]    = paras["XcConfirm_Result"].ToString();
                m_kv["kkconfirm"]    = paras["KkConfirm_Result"].ToString();
                m_kv["zytdconfirm"]  = paras["ZytdConfirm_Result"].ToString();
                m_kv["job_order"]    = paras["JobOrder"].ToString();
                m_kv["notice_order"] = paras["NoticeOrder"].ToString();
                m_kv["missionname"]  = db_miss.Miss_Desc;
                m_kv["role"]         = pv.Role_Names;
                dt.data.Add(m_kv);
            }
            return(dt);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 处理datatables请求
        /// </summary>
        /// <param name="data"></param>
        private DtResponse ProcessRequest(List <KeyValuePair <string, string> > data)
        {
            DtResponse dt = new DtResponse();

            var http = DtRequest.HttpData(data);

            if (http.ContainsKey("action"))
            {
                string action = http["action"] as string;
                if (action == "edit")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        int           id   = Convert.ToInt32(d.Key);
                        List <string> pros = new List <string>();
                        List <object> vals = new List <object>();
                        Dictionary <string, object> m_kv = new Dictionary <string, object>();
                        foreach (var dd in d.Value as Dictionary <string, object> )
                        {
                            pros.Add(dd.Key);
                            if (dd.Key == "job_type")
                            {
                                switch (dd.Value as string)
                                {
                                case "CreateWorkFlow":
                                    vals.Add(TIMER_JOB_TYPE.CREATE_WORKFLOW);
                                    break;

                                default:
                                case "Empty":
                                    vals.Add(TIMER_JOB_TYPE.EMPTY);
                                    break;
                                }
                            }
                            else if (dd.Key == "workflow")
                            {
                                JObject obj = JObject.Parse((string)dd.Value);
                                vals.Add(Convert.ToInt32(obj["id"]));
                            }
                            else
                            {
                                vals.Add(dd.Value);
                            }
                        }
                        CTimerMission m = CTimerManage.UpdateTimerMission(id, pros, vals);


                        m_kv["ID"]       = m.ID;
                        m_kv["job_name"] = m.mission_name;
                        m_kv["job_type"] = m.type;
                        CWorkFlow wf = m.GetAttachWorkFlow();

                        m_kv["workflow"]     = wf == null ? null : "{ \"id\" : " + wf.DefineID + ", \"name\" : \"" + wf.name + "\", \"desc\" : \"" + wf.description + "\"}";
                        m_kv["status"]       = m.status;
                        m_kv["pretime"]      = m.PerTime.ToString();
                        m_kv["corn_express"] = m.GetTriggerTimmingString();
                        m_kv["create_time"]  = m.CreateTime.ToString();
                        dt.data.Add(m_kv);
                    }
                }
                else if (action == "create") //新建工作流
                {
                    CTimerMission m = CTimerManage.CreateAEmptyMission();
                    m.mission_name = "新建任务";
                    m.SetTriggerTiming("0 0 0 * * ?");
                    m.Save();

                    Dictionary <string, object> m_kv = new Dictionary <string, object>();
                    m_kv["ID"]         = m.ID;
                    m_kv["order_item"] = 1;
                    m_kv["job_name"]   = m.mission_name;
                    m_kv["job_type"]   = m.type;
                    CWorkFlow wf = m.GetAttachWorkFlow();

                    m_kv["workflow"]     = wf == null ? null : "{ \"id\" : " + wf.DefineID + ", \"name\" : \"" + wf.name + "\", \"desc\" : \"" + wf.description + "\"}";
                    m_kv["status"]       = m.status;
                    m_kv["pretime"]      = m.PerTime.ToString();
                    m_kv["corn_express"] = m.GetTriggerTimmingString();
                    m_kv["create_time"]  = m.CreateTime.ToString();
                    dt.data.Add(m_kv);
                }
                else if (action == "remove")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        int id = Convert.ToInt32(d.Key);

                        CTimerMission m = CTimerManage.DeleteTimerJob(id);
                    }
                }
            }
            return(dt);
        }
Exemplo n.º 6
0
        //A11dot2临时任务在线编辑部分
        private DtResponse ProcessRequest(List <KeyValuePair <string, string> > data)
        {
            DtResponse dt     = new DtResponse();
            var        http   = DtRequest.HttpData(data);
            var        Data   = http["data"] as Dictionary <string, object>;
            int        wfe_id = -1;

            foreach (var d in Data)
            {
                wfe_id = Convert.ToInt32(d.Key);
            }
            foreach (var d in Data)
            {
                int id = Convert.ToInt32(d.Key);
                foreach (var dd in d.Value as Dictionary <string, object> )
                {
                    Dictionary <string, string> signal = new Dictionary <string, string>();
                    if (dd.Key == "problem_desc")
                    {
                        signal["Problem_Desc"]  = dd.Value.ToString();
                        signal["ZzSubmit_done"] = "true";//提报标志

                        //record
                        Dictionary <string, string> record1 = new Dictionary <string, string>();
                        record1["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                        record1["time"]     = DateTime.Now.ToString();
                        //submit
                        CWFEngine.SubmitSignal(Convert.ToInt32(id), signal, record1);
                    }
                }
            }


            Dictionary <string, object> paras = new Dictionary <string, object>();

            paras["Zz_Name"]            = null;
            paras["Equip_GyCode"]       = null;
            paras["Equip_Code"]         = null;
            paras["Problem_Desc"]       = null; //隐患问题描述
            paras["RiskMatrix_Color"]   = null; //隐患评估结果
            paras["Supervise_done"]     = null; //片区监督实施是否完成
            paras["ImplementPlan_done"] = null; //黄色、措施实施是否完成



            if (wfe_id != -1)
            {
                WorkFlows                   wfsd = new WorkFlows();
                UI_WFEntity_Info            wfei = CWFEngine.GetWorkFlowEntityWithParams(wfe_id, paras);
                Dictionary <string, object> m_kv = new Dictionary <string, object>();
                Mission db_miss = wfsd.GetWFEntityMissions(wfe_id).Last();//获取该实体最后一个任务
                m_kv["index_Id"]         = wfe_id;
                m_kv["zz_name"]          = paras["Zz_Name"].ToString();
                m_kv["sb_gycode"]        = paras["Equip_GyCode"].ToString();
                m_kv["sb_code"]          = paras["Equip_Code"].ToString();
                m_kv["problem_desc"]     = paras["Problem_Desc"].ToString();
                m_kv["riskMatrix_color"] = paras["RiskMatrix_Color"].ToString();



                m_kv["missionname"] = db_miss.Miss_Desc;
                dt.data.Add(m_kv);
            }
            return(dt);
        }
Exemplo n.º 7
0
        private DtResponse A5ProcessRequest(List <KeyValuePair <string, string> > data)
        {
            DtResponse dt = new DtResponse();

            var http = DtRequest.HttpData(data);

            if (http.ContainsKey("action"))
            {
                string action = http["action"] as string;
                if (action == "edit")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        int           id   = Convert.ToInt32(d.Key);
                        List <string> pros = new List <string>();
                        List <object> vals = new List <object>();
                        Dictionary <string, object> m_kv = new Dictionary <string, object>();
                        foreach (var dd in d.Value as Dictionary <string, object> )
                        {
                            pros.Add(dd.Key);

                            vals.Add(dd.Value);
                        }
                        //   CTimerMission m = CTimerManage.UpdateTimerMission(id, pros, vals);

                        m_kv["ID"]               = "12345";
                        m_kv["zz_name"]          = "2#催化装置";
                        m_kv["jz_name"]          = "2#催化主风机K101";
                        m_kv["sb_code"]          = "210023808";
                        m_kv["last_check_month"] = "4";
                        m_kv["check_result"]     = "5";
                        m_kv["zz_file"]          = "";



                        dt.data.Add(m_kv);
                    }
                }
                else if (action == "create") //新建工作流
                {
                    //CTimerMission m = CTimerManage.CreateAEmptyMission();

                    Dictionary <string, object> m_kv = new Dictionary <string, object>();
                    m_kv["ID"]               = "123";
                    m_kv["zz_name"]          = "选择装置";
                    m_kv["jz_name"]          = "选择机组";
                    m_kv["sb_code"]          = " ";
                    m_kv["last_check_month"] = " ";
                    m_kv["check_result"]     = "";
                    m_kv["zz_file"]          = "";

                    dt.data.Add(m_kv);
                }
                else if (action == "remove")
                {
                    var Data = http["data"] as Dictionary <string, object>;
                    foreach (var d in Data)
                    {
                        int id = Convert.ToInt32(d.Key);

                        //CTimerMission m = CTimerManage.DeleteTimerJob(id);
                    }
                }
            }
            return(dt);
        }