コード例 #1
0
ファイル: LCStep.cs プロジェクト: yaotion/RunSafty_WebAPI
        public Get_Out SubmitSteps(string data)
        {


            Get_Out OutResult = new Get_Out();
            Datas input = Newtonsoft.Json.JsonConvert.DeserializeObject<Datas>(data);
            Operate oper = OperationFactoty.createOperate(input.stepName,input.nWorkTypeID);
            try
            {
                if (oper != null)
                {
                    oper.GetResult(input.stepEntity, input.nWorkTypeID);
                    //检测是否是特殊步骤
                    oper.CheckIsSpecialStep();
                    OutResult.result = "0";
                    OutResult.resultStr = "执行成功!";
                }
                else
                {
                    OutResult.resultStr = "提交失败:无法找到该步骤,该步骤名称:" + input.stepName;
                }
            }
            catch (Exception ex)
            {
                OutResult.result = "1";
                OutResult.resultStr = "提交失败:" + ex.Message;
            }
            return OutResult;
        }
コード例 #2
0
ファイル: LCStep.cs プロジェクト: yaotion/RunSafty_WebAPI
        public Get_Out End(string data)
        {
            Get_Out OutResult = new Get_Out();
            Get_In_setToWorkOut input = Newtonsoft.Json.JsonConvert.DeserializeObject<Get_In_setToWorkOut>(data);
            try
            {
                DBStep db = new DBStep();

                if (input.nWorkTypeID == 1)
                {
                    db.UpdateToYiChuQin(input.strTrainPlanGUID, input.dtConfirmTime, input.strConfirmBrief, input.strUserName, input.strUserNumber, input.nWorkTypeID);
                }
                else if (input.nWorkTypeID == 2)
                {
                    db.UpdateToYiTuiQin(input.strTrainPlanGUID, input.strSiteGUID, input.dtConfirmTime, input.strConfirmBrief, input.strUserName, input.strUserNumber, 2);
                }

                OutResult.result = "0";
                OutResult.resultStr = "执行成功!";
            }
            catch (Exception ex)
            {
                OutResult.result = "1";
                OutResult.resultStr = "提交失败:" + ex.Message;
            }
            return OutResult;
        }
コード例 #3
0
ファイル: LCStep.cs プロジェクト: yaotion/RunSafty_WebAPI
 public Get_Out CheckIsFinished(string data)
 {
     Get_Out OutResult = new Get_Out();
     Get_In_CheckIsFinished input = Newtonsoft.Json.JsonConvert.DeserializeObject<Get_In_CheckIsFinished>(data);
     try
     {
         DBStep db = new DBStep();
         Get_Out_CheckIsFinished IsFinished = new Get_Out_CheckIsFinished();
         IsFinished.IsFinished = db.CheckIsFinished(input.strTrainPlanGUID, input.strWorkShopGUID,input.nWorkTypeID);
         OutResult.data = IsFinished;
         OutResult.result = "0";
         OutResult.resultStr = "执行成功!";
     }
     catch (Exception ex)
     {
         OutResult.result = "1";
         OutResult.resultStr = "提交失败:" + ex.Message;
     }
     return OutResult;
 }