Example #1
0
        /// <summary>
        /// 获取计划最后到达时间
        /// </summary>
        public DateTime GetLastArrvieTime(String TrainPlanGUID)
        {
            DBEndWork db               = new DBEndWork();
            DateTime  ArriveTime       = DateTime.Now;
            string    strArriveTime    = "";
            bool      isLastArrvieTime = db.getGetLastArrvieTime(TrainPlanGUID, ref strArriveTime);

            ArriveTime = DBToDateTime(strArriveTime, Convert.ToDateTime("1899-01-01"));
            return(ArriveTime);
        }
Example #2
0
        public override void GetResult(object data, int nWorkTypeID)
        {
            base._nWorkTypeID = nWorkTypeID;
            input             = Newtonsoft.Json.JsonConvert.DeserializeObject <InFlows_TQZhuanChu>(data.ToString());
            //保存转储数据
            DBEndWork dal = new DBEndWork();

            if (input.runRecordFileMain != null)
            {
                dal.SubMitRunRecordInfo(input.runRecordFileMain);
            }
            else
            {
                LogClass.log("没有转储数据");
            }
            DBStep     db         = new DBStep();
            StepResult StepResult = null;
            int        nStepIndex = db.getIndexOfStep(input.strWorkShopGUID, WorkType.TQZhuanChu, nWorkTypeID);

            if (nStepIndex != 0)
            {
                //保存转储步骤执行数据
                foreach (trainmanList t in input.trainmanList)
                {
                    #region 退勤步骤结果的实体信息
                    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);
                    StepResult.nStepIndex        = nStepIndex;
                    StepResult.strStepBrief      = "运行记录转储";
                    StepResult.strStepName       = WorkType.TQZhuanChu;
                    StepResult.strTrainPlanGUID  = input.strTrainPlanGUID;
                    StepResult.strTrainmanGUID   = t.strTrainmanGUID;
                    StepResult.nStepResult       = input.nStepResult;
                    StepResult.strTrainmanName   = t.strTrainmanName;
                    StepResult.strTrainmanNumber = t.strTrainmanNumber;
                    StepResult.nWorkTypeID       = 2;
                    StepResult.strStepName       = "RS.STEP.ICCARDRUNRECORD";

                    #endregion
                    db.AddStep(null, null, StepResult);
                }

                db.creatMsg("RS.STEP.ICCARDRUNRECORD", input.strTrainPlanGUID, input.cid, nWorkTypeID, input.strWorkShopGUID);
            }
        }