Beispiel #1
0
        public override void GetResult(object data, int nWorkTypeID)
        {
            InFlows_Base input = Newtonsoft.Json.JsonConvert.DeserializeObject <InFlows_Base>(data.ToString());
            DBStep       db    = new DBStep();

            foreach (trainmanList t in input.trainmanList)
            {
                StepResult StepResult = new StepResult();
                StepResult.dtBeginTime  = ObjectConvertClass.static_ext_date(input.dtBeginTime);
                StepResult.dtCreateTime = ObjectConvertClass.static_ext_date(input.dtCreateTime);
                StepResult.dtEndTime    = ObjectConvertClass.static_ext_date(input.dtEndTime);

                //int nStepIndex = db.getIndexOfStep(input.strWorkShopGUID, input.stepName, nWorkTypeID);
                StepResult.nStepIndex = 1;

                StepResult.strStepBrief     = input.stepChineseName;
                StepResult.strStepName      = input.stepName;
                StepResult.strTrainPlanGUID = input.strTrainPlanGUID;

                //人员没有guid的情况下,从新从人员库中获取
                if (t.strTrainmanGUID == null || t.strTrainmanGUID == "")
                {
                    StepResult.strTrainmanGUID = db.getTrainManGUID(t.strTrainmanNumber);
                }
                else
                {
                    StepResult.strTrainmanGUID = t.strTrainmanGUID;
                }


                StepResult.nStepResult       = input.nStepResult;
                StepResult.strTrainmanName   = t.strTrainmanName;
                StepResult.strTrainmanNumber = t.strTrainmanNumber;
                StepResult.nWorkTypeID       = nWorkTypeID;
                db.AddStep(null, null, StepResult);
            }
        }