Пример #1
0
        private static int Param_OffLineTime = AppSetting.Param_OffLineTime;   //离线参数(m)

        #region ISysSettingWCFService 成员

        public CommandResultViewModel VehicleOilControl(Guid vehicleCode, string tenantCode, string userCode, EnumOilCommandType commandType)
        {
            CommandResultViewModel vm = new CommandResultViewModel();
            try
            {
                PositionService positionServ = new PositionService();
                IList<EGPSCurrentInfo> ltCurrent = positionServ.GetCurrentInfoList(new Guid[] { vehicleCode }.ToList());
                if (!CheckCommandCondition(ltCurrent, vm, commandType)) return vm;

                InsertBreakOilHistoryRecord(ltCurrent[0], tenantCode, userCode, commandType);
                vm.CommandResult = EnumCommandResult.Success;
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message, ex);
                vm.CommandResult = EnumCommandResult.Failed;
                vm.Msg = ex.Message;
            }
            return vm;
        }
Пример #2
0
        public List<CurrentInfoViewModel> GetCurrentInfoList(PositionRequestViewModel requestVM)
        {

            IPositionService currentInfoServ = new PositionService();
            IList<EGPSCurrentInfo> ltEGPSCurrentInfo = currentInfoServ.GetCurrentInfoList(requestVM.VehicleCodes);
            return ConvertToViewModel(ltEGPSCurrentInfo, requestVM.IsNeedRevise);

        }