Esempio n. 1
0
        public string ZzSubmit_Bcsignal(string json1)
        {
            try
            {
                JObject    item       = (JObject)JsonConvert.DeserializeObject(json1);
                A5dot1Tab1 a5dot1Tab1 = new A5dot1Tab1();
                DateTime   my         = DateTime.Now;
                int        cjid       = Em.getEA_parentid(Convert.ToInt32(item["Zz_Id"]));
                string     cjname     = Eam.getEa_namebyId(cjid);

                A5dot2Tab1 new_5dot2 = new A5dot2Tab1();
                new_5dot2.cjName             = cjname;
                new_5dot2.zzName             = item["Zz_Name"].ToString();
                new_5dot2.sbGyCode           = item["Equip_GyCode"].ToString();
                new_5dot2.sbCode             = item["Equip_Code"].ToString();
                new_5dot2.sbType             = item["Equip_Type"].ToString();
                new_5dot2.zyType             = item["Zy_Type"].ToString();
                new_5dot2.problemDescription = item["problemDescription"].ToString();
                new_5dot2.jxSubmitTime       = DateTime.Now;
                new_5dot2.jxUserName         = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                new_5dot2.isRectified        = 0;
                new_5dot2.state = 0;
                new_5dot2.temp2 = item["wfe_id"].ToString();
                bool res = Sx.AddSxItem(new_5dot2);



                string wfe_id = item["wfe_id"].ToString();
                //paras
                Dictionary <string, string> signal = new Dictionary <string, string>();
                signal["ZzSubmit_done"] = "true";

                //record
                Dictionary <string, string> record = new Dictionary <string, string>();
                record["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                record["time"]     = DateTime.Now.ToString();
                //submit
                CWFEngine.SubmitSignal(Convert.ToInt32(wfe_id), signal, record);
            }
            catch (Exception e)
            {
                return("");
            }
            return("/A5dot2/Index");
        }
Esempio n. 2
0
        public JsonResult ShuxiangCheck_submitsignal(string json1)
        {
            GetNWorkSerManagment gnm = new GetNWorkSerManagment();
            JObject    item          = (JObject)JsonConvert.DeserializeObject(json1);
            A5dot2Tab1 new_5dot2     = new A5dot2Tab1();

            new_5dot2.cjName             = item["cjName"].ToString();
            new_5dot2.zzName             = item["zzName"].ToString();
            new_5dot2.sbGyCode           = item["sbGyCode"].ToString();
            new_5dot2.sbCode             = item["sbCode"].ToString();
            new_5dot2.sbType             = item["sbType"].ToString();
            new_5dot2.zyType             = item["zyType"].ToString();
            new_5dot2.problemDescription = item["problemDescription"].ToString();
            new_5dot2.jxSubmitTime       = DateTime.Now;
            new_5dot2.jxUserName         = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
            new_5dot2.isRectified        = 0;
            new_5dot2.state = 0;
            new_5dot2.temp2 = gnm.AddNWorkEntity("A5dot2").WE_Ser;;
            bool res = Sx.AddSxItem(new_5dot2);


            return(Json(new { result = res }));
        }
Esempio n. 3
0
        public string ZzSubmit_Bcsignal(string json1)
        {
            try
            {
                JObject item = (JObject)JsonConvert.DeserializeObject(json1);

                CTimerTimeout timeout_job = new CTimerTimeout();
                timeout_job.CreateTime   = DateTime.Now;
                timeout_job.for_using    = TIMER_USING.FOR_SYSTEM;
                timeout_job.mission_name = "";
                timeout_job.status       = TM_STATUS.TM_STATUS_ACTIVE;
                timeout_job.SetActionForWF("INVILID");
                timeout_job.AttachWFEntityID = Convert.ToInt32(item["wfe_id"]);
                timeout_job.CustomAction     = "http://localhost/CallBack/testCallBack";
                timeout_job.EventName        = "PqAessess";
                timeout_job.SetTriggerTiming("0 0 0 20 * ?");
                //保存该定时任务,并将其添加到激活任务列表
                timeout_job.Save();
                int m_timerMissionID = timeout_job.ID;
                CTimerManage.AppendMissionToActiveList(timeout_job);


                //  A5dot1Tab1 a5dot1Tab1 = new A5dot1Tab1();
                DateTime my     = DateTime.Now;
                int      cjid   = Em.getEA_parentid(Convert.ToInt32(item["Zz_Id"]));
                string   cjname = Eam.getEa_namebyId(cjid);

                A5dot2Tab1 new_5dot2 = new A5dot2Tab1();
                new_5dot2.cjName             = cjname;
                new_5dot2.zzName             = item["Zz_Name"].ToString();
                new_5dot2.sbGyCode           = item["Equip_GyCode"].ToString();
                new_5dot2.sbCode             = item["Equip_Code"].ToString();
                new_5dot2.sbType             = item["Equip_Type"].ToString();
                new_5dot2.zyType             = item["Zy_Type"].ToString();
                new_5dot2.problemDescription = item["problemDescription"].ToString();
                new_5dot2.jxSubmitTime       = DateTime.Now;
                new_5dot2.jxUserName         = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                new_5dot2.isRectified        = 0;
                new_5dot2.state = 0;
                new_5dot2.temp2 = item["wfe_id"].ToString();
                new_5dot2.temp3 = m_timerMissionID.ToString();
                bool res = Sx.AddSxItem(new_5dot2);

                string wfe_id = item["wfe_id"].ToString();
                //paras
                Dictionary <string, string> signal = new Dictionary <string, string>();
                signal["ZzSubmit_done"] = "true";

                //record
                Dictionary <string, string> record = new Dictionary <string, string>();
                record["username"] = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
                record["time"]     = DateTime.Now.ToString();
                //submit
                CWFEngine.SubmitSignal(Convert.ToInt32(wfe_id), signal, record);
            }
            catch (Exception e)
            {
                return("");
            }
            return("/A5dot2/Index");
        }