Exemplo n.º 1
0
        private List <PlansOfClient> GetPlans(List <TF.RunSafty.Model.VIEW_Plan_Trainman> vPlans)
        {
            List <PlansOfClient> plans = new List <PlansOfClient>();

            TF.RunSafty.Model.InterfaceModel.TrainPlan     tPlan   = null;
            TF.RunSafty.Model.InterfaceModel.PlansOfClient pClient = null;
            if (vPlans != null)
            {
                foreach (VIEW_Plan_Trainman plan in vPlans)
                {
                    tPlan                = new TF.RunSafty.Model.InterfaceModel.TrainPlan();
                    tPlan.dragTypeID     = plan.nDragType.ToString();
                    tPlan.dragTypeName   = plan.nDragTypeName;
                    tPlan.endStationID   = plan.strEndStation;
                    tPlan.endStationName = plan.strEndStationName;
                    tPlan.kehuoID        = plan.nKehuoID.ToString();
                    tPlan.kehuoName      = plan.strKehuoName;
                    tPlan.placeName      = plan.strPlaceName;
                    tPlan.planStateID    = plan.nPlanState.ToString();
                    tPlan.planStateName  = plan.strStateName;

                    tPlan.planTypeID   = plan.nPlanType.ToString();
                    tPlan.planTypeName = plan.strPlanTypeName;

                    tPlan.remarkTypeID   = plan.nRemarkType.ToString();
                    tPlan.remarkTypeName = plan.strRemarkTypeName;

                    tPlan.startStationID   = plan.strStartStation;
                    tPlan.startStationName = plan.strStartStationName;
                    if (plan.dtStartTime.HasValue)
                    {
                        tPlan.startTime = plan.dtStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    tPlan.trainmanTypeID   = plan.nTrainmanTypeID.ToString();
                    tPlan.trainmanTypeName = plan.strTrainmanTypeName;
                    tPlan.trainNo          = plan.strTrainNo;
                    tPlan.trainNumber      = plan.strTrainNumber;
                    tPlan.trainTypeName    = plan.strTrainTypeName;
                    tPlan.planID           = plan.strTrainPlanGUID;
                    tPlan.placeID          = plan.strPlaceID;

                    tPlan.strWaiQinClientGUID   = plan.strWaiQinClientGUID;
                    tPlan.strWaiQinClientNumber = plan.strWaiQinClientNumber;
                    tPlan.strWaiQinClientName   = plan.strWaiQinClientName;

                    NameGroup group = new NameGroup();
                    group.groupID                  = plan.strGroupGUID;
                    group.trainman1                = new Trainman();
                    group.trainman1.trainmanID     = plan.strTrainmanGUID1;
                    group.trainman1.trainmanName   = plan.strTrainmanName1;
                    group.trainman1.trainmanNumber = plan.strTrainmanNumber1;

                    group.trainman2                = new Trainman();
                    group.trainman2.trainmanID     = plan.strTrainmanGUID2;
                    group.trainman2.trainmanName   = plan.strTrainmanName2;
                    group.trainman2.trainmanNumber = plan.strTrainmanNumber2;

                    group.trainman3                = new Trainman();
                    group.trainman3.trainmanID     = plan.strTrainmanGUID3;
                    group.trainman3.trainmanName   = plan.strTrainmanName3;
                    group.trainman3.trainmanNumber = plan.strTrainmanNumber3;

                    group.trainman4                = new Trainman();
                    group.trainman4.trainmanID     = plan.strTrainmanGUID4;
                    group.trainman4.trainmanName   = plan.strTrainmanName4;
                    group.trainman4.trainmanNumber = plan.strTrainmanNumber4;


                    if (plan.dtArriveTime.HasValue)
                    {
                        group.arriveTime = plan.dtArriveTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    group.groupID         = plan.strGroupGUID;
                    group.place           = new ChuqinPlace();
                    group.place.placeID   = plan.strPlaceID;
                    group.place.placeName = plan.strPlaceName;
                    group.station         = new Station();
                    group.trainPlanID     = plan.strTrainPlanGUID;
                    pClient           = new PlansOfClient();
                    pClient.trainPlan = tPlan;
                    pClient.group     = group;

                    plans.Add(pClient);
                }
            }
            return(plans);
        }
        private List <TF.RunSafty.Model.InterfaceModel.mChuqinPlansOfClient> GetPlanList(List <TF.RunSafty.Model.VIEW_Plan_BeginWork> vPlans)
        {
            List <TF.RunSafty.Model.InterfaceModel.mChuqinPlansOfClient> lPlans = new List <Model.InterfaceModel.mChuqinPlansOfClient>();

            TF.RunSafty.Model.InterfaceModel.mChuqinPlansOfClient clientPlan = null;
            if (vPlans != null)
            {
                foreach (TF.RunSafty.Model.VIEW_Plan_BeginWork plan in vPlans)
                {
                    clientPlan = new TF.RunSafty.Model.InterfaceModel.mChuqinPlansOfClient();
                    TF.RunSafty.Model.InterfaceModel.ChuqinGroup chuqinGroup = new TF.RunSafty.Model.InterfaceModel.ChuqinGroup();
                    clientPlan.chuqinGroup = chuqinGroup;
                    clientPlan.nFlowState  = plan.nFlowState;
                    TF.RunSafty.Model.InterfaceModel.ChuqinPlace cPlace = new TF.RunSafty.Model.InterfaceModel.ChuqinPlace();
                    chuqinGroup.group                     = new TF.RunSafty.Model.InterfaceModel.NameGroup();
                    chuqinGroup.group.place               = cPlace;
                    cPlace.placeID                        = plan.strPlaceID;
                    cPlace.placeName                      = plan.strPlaceName;
                    chuqinGroup.group.groupID             = plan.strGroupGUID;
                    chuqinGroup.group.station             = new TF.RunSafty.Model.InterfaceModel.Station();
                    chuqinGroup.group.station.stationID   = plan.strStationGUID;
                    chuqinGroup.group.station.stationName = plan.strStationName;
                    if (plan.strStationNumber.HasValue)
                    {
                        chuqinGroup.group.station.stationNumber = plan.strStationNumber.ToString();
                    }
                    chuqinGroup.group.trainman1      = new TF.RunSafty.Model.InterfaceModel.Trainman();
                    chuqinGroup.group.trainman1.ABCD = plan.strABCD1;
                    if (plan.nDriverType1.HasValue)
                    {
                        chuqinGroup.group.trainman1.driverTypeID = plan.nDriverType1.Value;
                    }
                    if (plan.isKey1.HasValue)
                    {
                        chuqinGroup.group.trainman1.isKey = plan.isKey1.Value;
                    }
                    if (plan.nPostID1.HasValue)
                    {
                        chuqinGroup.group.trainman1.postID = plan.nPostID1.Value;
                    }
                    chuqinGroup.group.trainman1.trainmanID     = plan.strTrainmanGUID1;
                    chuqinGroup.group.trainman1.trainmanName   = plan.strTrainmanName1;
                    chuqinGroup.group.trainman1.trainmanNumber = plan.strTrainmanNumber1;
                    chuqinGroup.group.trainman2      = new TF.RunSafty.Model.InterfaceModel.Trainman();
                    chuqinGroup.group.trainman2.ABCD = plan.strABCD2;
                    if (plan.nDriverType2.HasValue)
                    {
                        chuqinGroup.group.trainman2.driverTypeID = plan.nDriverType2.Value;
                    }
                    if (plan.isKey2.HasValue)
                    {
                        chuqinGroup.group.trainman2.isKey = plan.isKey2.Value;
                    }
                    if (plan.nPostID2.HasValue)
                    {
                        chuqinGroup.group.trainman2.postID = plan.nPostID2.Value;
                    }
                    chuqinGroup.group.trainman2.trainmanID     = plan.strTrainmanGUID2;
                    chuqinGroup.group.trainman2.trainmanName   = plan.strTrainmanName2;
                    chuqinGroup.group.trainman2.trainmanNumber = plan.strTrainmanNumber2;
                    chuqinGroup.group.trainman3      = new TF.RunSafty.Model.InterfaceModel.Trainman();
                    chuqinGroup.group.trainman3.ABCD = plan.strABCD3;
                    if (plan.nDriverType3.HasValue)
                    {
                        chuqinGroup.group.trainman3.driverTypeID = plan.nDriverType3.Value;
                    }
                    if (plan.isKey3.HasValue)
                    {
                        chuqinGroup.group.trainman3.isKey = plan.isKey3.Value;
                    }
                    if (plan.nPostID3.HasValue)
                    {
                        chuqinGroup.group.trainman3.postID = plan.nPostID3.Value;
                    }
                    chuqinGroup.group.trainman3.trainmanID     = plan.strTrainmanGUID3;
                    chuqinGroup.group.trainman3.trainmanName   = plan.strTrainmanName3;
                    chuqinGroup.group.trainman3.trainmanNumber = plan.strTrainmanNumber3;
                    chuqinGroup.group.trainman4      = new TF.RunSafty.Model.InterfaceModel.Trainman();
                    chuqinGroup.group.trainman4.ABCD = plan.strABCD4;
                    if (plan.nDriverType4.HasValue)
                    {
                        chuqinGroup.group.trainman4.driverTypeID = plan.nDriverType4.Value;
                    }
                    if (plan.isKey4.HasValue)
                    {
                        chuqinGroup.group.trainman4.isKey = plan.isKey4.Value;
                    }
                    if (plan.nPostID4.HasValue)
                    {
                        chuqinGroup.group.trainman4.postID = plan.nPostID4.Value;
                    }
                    chuqinGroup.group.trainman4.trainmanID     = plan.strTrainmanGUID4;
                    chuqinGroup.group.trainman4.trainmanName   = plan.strTrainmanName4;
                    chuqinGroup.group.trainman4.trainmanNumber = plan.strTrainmanNumber4;
                    clientPlan.icCheckResult = plan.strICCheckResult;
                    TF.RunSafty.Model.InterfaceModel.TrainPlan trainPlan = new TF.RunSafty.Model.InterfaceModel.TrainPlan();
                    clientPlan.trainPlan = trainPlan;
                    if (plan.dtCreateTime.HasValue)
                    {
                        trainPlan.createTime = plan.dtCreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    trainPlan.createSiteGUID = plan.strCreateSiteGUID;
                    trainPlan.createSiteName = plan.strCreateSiteName;
                    trainPlan.createUserGUID = plan.strCreateUserGUID;
                    trainPlan.createUserName = plan.strCreateUserName;
                    if (plan.nDragType.HasValue)
                    {
                        trainPlan.dragTypeID = plan.nDragType.ToString();
                    }
                    trainPlan.endStationID   = plan.strEndStation;
                    trainPlan.endStationName = plan.strEndStationName;
                    if (plan.nKehuoID.HasValue)
                    {
                        trainPlan.kehuoID = plan.nKehuoID.ToString();
                    }
                    trainPlan.kehuoName    = plan.strKehuoName;
                    trainPlan.mainPlanGUID = plan.strMainPlanGUID;
                    trainPlan.placeID      = plan.strPlaceID;
                    trainPlan.placeName    = plan.strPlaceName;
                    trainPlan.planID       = plan.strTrainPlanGUID;
                    if (plan.nPlanState.HasValue)
                    {
                        trainPlan.planStateID = plan.nPlanState.ToString();
                    }
                    trainPlan.planStateName = plan.strPlanStateName;
                    if (plan.nPlanType.HasValue)
                    {
                        trainPlan.planTypeID = plan.nPlanType.ToString();
                    }
                    trainPlan.planTypeName = plan.strPlanTypeName;
                    if (plan.nRemarkType.HasValue)
                    {
                        trainPlan.remarkTypeID = plan.nRemarkType.ToString();
                    }
                    trainPlan.remarkTypeName = plan.strRemarkTypeName;

                    trainPlan.startStationID   = plan.strStartStation;
                    trainPlan.startStationName = plan.strStartStationName;
                    trainPlan.dragTypeName     = plan.nDragTypeName;
                    trainPlan.planID           = plan.strTrainPlanGUID;
                    trainPlan.trainJiaoluGUID  = plan.strTrainJiaoluGUID;
                    trainPlan.trainJiaoluName  = plan.strTrainJiaoluName;
                    trainPlan.strTrainPlanGUID = plan.strTrainPlanGUID;
                    if (plan.nNeedRest.HasValue)
                    {
                        trainPlan.nNeedRest = plan.nNeedRest.Value;
                    }
                    if (plan.dtArriveTime.HasValue)
                    {
                        trainPlan.dtArriveTime = plan.dtArriveTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtCallTime.HasValue)
                    {
                        trainPlan.dtCallTime = plan.dtCallTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtRealStartTime.HasValue)
                    {
                        trainPlan.realStartTime = plan.dtRealStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtStartTime.HasValue)
                    {
                        trainPlan.startTime = plan.dtStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtFirstStartTime.HasValue)
                    {
                        trainPlan.firstStartTime = plan.dtFirstStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtChuQinTime.HasValue)
                    {
                        clientPlan.beginWorkTime        = plan.dtBeginWorkTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                        clientPlan.trainPlan.kaiCheTime = plan.dtChuQinTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    else
                    {
                    }
                    if (plan.nTrainmanTypeID.HasValue)
                    {
                        trainPlan.trainmanTypeID = plan.nTrainmanTypeID.ToString();
                    }
                    trainPlan.trainNo          = plan.strTrainNo;
                    trainPlan.trainNumber      = plan.strTrainNumber;
                    trainPlan.trainTypeName    = plan.strTrainTypeName;
                    trainPlan.trainmanTypeName = plan.strTrainmanTypeName;
                    if (plan.nVerifyID1.HasValue)
                    {
                        chuqinGroup.verifyID1 = plan.nVerifyID1.Value;
                    }
                    chuqinGroup.testAlcoholInfo1         = new TF.RunSafty.Model.InterfaceModel.TestAlcoholInfo();
                    chuqinGroup.testAlcoholInfo1.picture = "";
                    if (plan.dtTestTime1.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo1.testTime = plan.dtTestTime1.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.nDrinkResult1.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo1.testAlcoholResult = plan.nDrinkResult1.Value;
                    }

                    if (plan.nVerifyID2.HasValue)
                    {
                        chuqinGroup.verifyID2 = plan.nVerifyID2.Value;
                    }
                    chuqinGroup.testAlcoholInfo2         = new TF.RunSafty.Model.InterfaceModel.TestAlcoholInfo();
                    chuqinGroup.testAlcoholInfo2.picture = "";
                    if (plan.dtTestTime2.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo2.testTime = plan.dtTestTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.nDrinkResult2.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo2.testAlcoholResult = plan.nDrinkResult2.Value;
                    }

                    if (plan.nVerifyID3.HasValue)
                    {
                        chuqinGroup.verifyID3 = plan.nVerifyID3.Value;
                    }
                    chuqinGroup.testAlcoholInfo3         = new TF.RunSafty.Model.InterfaceModel.TestAlcoholInfo();
                    chuqinGroup.testAlcoholInfo3.picture = "";
                    if (plan.dtTestTime3.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo3.testTime = plan.dtTestTime3.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.nDrinkResult3.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo3.testAlcoholResult = plan.nDrinkResult3.Value;
                    }

                    if (plan.nVerifyID4.HasValue)
                    {
                        chuqinGroup.verifyID4 = plan.nVerifyID4.Value;
                    }
                    chuqinGroup.testAlcoholInfo4         = new TF.RunSafty.Model.InterfaceModel.TestAlcoholInfo();
                    chuqinGroup.testAlcoholInfo4.picture = "";
                    if (plan.dtTestTime4.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo4.testTime = plan.dtTestTime4.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.nDrinkResult4.HasValue)
                    {
                        chuqinGroup.testAlcoholInfo4.testAlcoholResult = plan.nDrinkResult4.Value;
                    }
                    lPlans.Add(clientPlan);
                }
            }
            return(lPlans);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  BasicMethod
        #region  ExtensionMethod
        //GetPlans函数实际上不应该出现在这个类中,有空的话建议移出去
        /// <summary>
        ///
        /// </summary>
        /// <param name="vPlans"></param>
        /// <returns></returns>
        private List <PlansOfClient> GetPlans(List <TF.RunSafty.Model.VIEW_Plan_Trainman> vPlans)
        {
            List <PlansOfClient> plans = new List <PlansOfClient>();

            TF.RunSafty.Model.InterfaceModel.TrainPlan     tPlan   = null;
            TF.RunSafty.Model.InterfaceModel.PlansOfClient pClient = null;
            if (vPlans != null)
            {
                foreach (TF.RunSafty.Model.VIEW_Plan_Trainman plan in vPlans)
                {
                    tPlan = new TF.RunSafty.Model.InterfaceModel.TrainPlan();
                    if (plan.dtCreateTime.HasValue)
                    {
                        tPlan.createTime = plan.dtCreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    tPlan.createSiteGUID = plan.strCreateSiteGUID;
                    tPlan.createSiteName = plan.strCreateSiteName;
                    tPlan.createUserGUID = plan.strCreateUserGUID;
                    tPlan.createUserName = plan.strCreateUserName;
                    if (plan.nDragType.HasValue)
                    {
                        tPlan.dragTypeID = plan.nDragType.ToString();
                    }
                    tPlan.endStationID          = plan.strEndStation;
                    tPlan.endStationName        = plan.strEndStationName;
                    tPlan.trainJiaoluName       = plan.strTrainJiaoluName;
                    tPlan.trainJiaoluGUID       = plan.strTrainJiaoluGUID;
                    tPlan.kehuoID               = plan.nKehuoID.ToString();
                    tPlan.kehuoName             = plan.strKehuoName;
                    tPlan.mainPlanGUID          = plan.strMainPlanGUID;
                    tPlan.placeID               = plan.strPlaceID;
                    tPlan.placeName             = plan.strPlaceName;
                    tPlan.planID                = plan.strTrainPlanGUID;
                    tPlan.planStateID           = plan.nPlanState.ToString();
                    tPlan.planStateName         = plan.strPlanStateName;
                    tPlan.planTypeID            = plan.nPlanType.ToString();
                    tPlan.planTypeName          = plan.strPlanTypeName;
                    tPlan.remarkTypeID          = plan.nRemarkType.ToString();
                    tPlan.remarkTypeName        = plan.strRemarkTypeName;
                    tPlan.strRemark             = plan.strRemark;
                    tPlan.startStationID        = plan.strStartStation;
                    tPlan.startStationName      = plan.strStartStationName;
                    tPlan.dragTypeName          = plan.nDragTypeName;
                    tPlan.planID                = plan.strTrainPlanGUID;
                    tPlan.strWaiQinClientGUID   = plan.strWaiQinClientGUID;
                    tPlan.strWaiQinClientNumber = plan.strWaiQinClientNumber;
                    tPlan.strWaiQinClientName   = plan.strWaiQinClientName;


                    if (plan.dtStartTime.HasValue)
                    {
                        tPlan.startTime = plan.dtStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtSendTime.HasValue)
                    {
                        tPlan.sendPlanTime = plan.dtSendTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtRecvTime.HasValue)
                    {
                        tPlan.recvPlanTime = plan.dtRecvTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtCreateTime.HasValue)
                    {
                        tPlan.createTime = plan.dtCreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtChuQinTime.HasValue)
                    {
                        tPlan.kaiCheTime = plan.dtChuQinTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    else
                    {
                        //tPlan.kaiCheTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtFirstStartTime.HasValue)
                    {
                        tPlan.firstStartTime = plan.dtFirstStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtRealStartTime.HasValue)
                    {
                        tPlan.realStartTime = plan.dtRealStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtBeginWorkTime.HasValue)
                    {
                        tPlan.beginWorkTime = plan.dtBeginWorkTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    rests rest = new rests();



                    if (plan.dtArriveTime.HasValue)
                    {
                        tPlan.dtArriveTime = plan.dtArriveTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                        rest.dtArriveTime  = plan.dtArriveTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.dtCallTime.HasValue)
                    {
                        tPlan.dtCallTime = plan.dtCallTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                        rest.dtCallTime  = plan.dtCallTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    if (plan.nNeedRest.HasValue)
                    {
                        tPlan.nNeedRest = plan.nNeedRest.Value;
                        rest.nNeedRest  = plan.nNeedRest.ToString();
                    }
                    tPlan.trainmanTypeID   = plan.nTrainmanTypeID.ToString();
                    tPlan.trainNo          = plan.strTrainNo;
                    tPlan.trainNumber      = plan.strTrainNumber;
                    tPlan.trainTypeName    = plan.strTrainTypeName;
                    tPlan.trainmanTypeName = plan.strTrainmanTypeName;
                    NameGroup group = new NameGroup();
                    group.groupID                  = plan.strGroupGUID;
                    group.trainman1                = new Trainman();
                    group.trainman1.trainmanID     = plan.strTrainmanGUID1;
                    group.trainman1.trainmanName   = plan.strTrainmanName1;
                    group.trainman1.trainmanNumber = plan.strTrainmanNumber1;
                    group.trainman1.callWorkState  = plan.nMsgState1.Value;
                    group.trainman1.callWorkID     = plan.strMsgID1;
                    group.trainman1.telNumber      = plan.strMobileNumber1;

                    group.trainman2                = new Trainman();
                    group.trainman2.trainmanID     = plan.strTrainmanGUID2;
                    group.trainman2.trainmanName   = plan.strTrainmanName2;
                    group.trainman2.trainmanNumber = plan.strTrainmanNumber2;
                    group.trainman2.callWorkState  = plan.nMsgState2.Value;
                    group.trainman2.callWorkID     = plan.strMsgID2;
                    group.trainman2.telNumber      = plan.strMobileNumber2;

                    group.trainman3                = new Trainman();
                    group.trainman3.trainmanID     = plan.strTrainmanGUID3;
                    group.trainman3.trainmanName   = plan.strTrainmanName3;
                    group.trainman3.trainmanNumber = plan.strTrainmanNumber3;
                    group.trainman3.callWorkState  = plan.nMsgState3.Value;
                    group.trainman3.callWorkID     = plan.strMsgID3;
                    group.trainman3.telNumber      = plan.strMobileNumber3;

                    group.trainman4                = new Trainman();
                    group.trainman4.trainmanID     = plan.strTrainmanGUID4;
                    group.trainman4.trainmanName   = plan.strTrainmanName4;
                    group.trainman4.trainmanNumber = plan.strTrainmanNumber4;
                    group.trainman4.callWorkState  = plan.nMsgState4.Value;
                    group.trainman4.callWorkID     = plan.strMsgID4;
                    group.trainman4.telNumber      = plan.strMobileNumber4;

                    if (plan.dtArriveTime.HasValue)
                    {
                        group.arriveTime = plan.dtArriveTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    group.groupID         = plan.strGroupGUID;
                    group.place           = new ChuqinPlace();
                    group.place.placeID   = plan.strPlaceID;
                    group.place.placeName = plan.strPlaceName;
                    group.station         = new Station();
                    group.trainPlanID     = plan.strTrainPlanGUID;
                    pClient           = new PlansOfClient();
                    pClient.trainPlan = tPlan;
                    pClient.group     = group;
                    pClient.rest      = rest;

                    plans.Add(pClient);
                }
            }
            return(plans);
        }