Exemplo n.º 1
0
 // 删除
 public ResultContent DeleteSmsQuery(ulong smsid)
 {
     ResultContent rc = new ResultContent();
     try
     {
         ISMSQueryVehicleService sqv = new SMSQueryVehicleService();
         sqv.Delete(smsid);
         rc.Result = true;
         rc.Message = "删除成功!";
     }
     catch (Exception ex)
     {
         rc.Result = false;
         rc.Message = ex.Message;
         Logger.Error(ex.Message, ex);
     }
     return rc;
 }
Exemplo n.º 2
0
 public List<object> GetUeslessVehicle(string tenantCode)
 {
     SMSQueryVehicleService sqv = new SMSQueryVehicleService();
     return sqv.GetUeslessVehicle(tenantCode);
 }
Exemplo n.º 3
0
        // 修改
        public ResultContent UpdateSMSQuery(SmsQueryVehicleParam para)
        {
            ResultContent rc = new ResultContent();
            // 要校验
            try
            {
                ISMSQueryVehicleService sqv = new SMSQueryVehicleService();
                IdentityNoService identity = new IdentityNoService();
                EMSMSQueryVehicle entity = sqv.GetSMSQuery(para.smsid);

                //entity.CreateDate = DateTime.Now;
                entity.TenantCode = para.TenantCode;
                entity.CustomerName = para.CustomerName;
                entity.CustomerTelephone = para.Telphone;
                entity.IsProfessional = false;
                entity.SMSVehicle.Clear();
                if (!para.vehicleCodelist.IsNullOrEmpty())
                {
                    for (int i = 0; i < para.vehicleCodelist.Count; i++)
                    {
                        EMSMSVehicle vehicle = new EMSMSVehicle()
                        {
                            smsvehicle_id = identity.GetSMSVehicleID(),
                            VehicleCode = para.vehicleCodelist[i],
                            TenantCode = para.TenantCode,
                            LicenseNumber = para.LicenceNumberlist[i]
                        };
                        entity.SMSVehicle.Add(vehicle);
                    }
                }
                sqv.Modify(entity);
                rc.Result = true;
                rc.Message = "修改成功!";
            }
            catch (Exception ex)
            {
                rc.Result = false;
                rc.Message = ex.Message;
                Logger.Error(ex.Message, ex);
            }
            return rc;
        }
Exemplo n.º 4
0
        // 新增
        public ResultContent AddSMSQuery(SmsQueryVehicleParam para)
        {
            ResultContent rc = new ResultContent();
            try
            {
                // 要校验
                IdentityNoService identity = new IdentityNoService();
                EMSMSQueryVehicle entity = new EMSMSQueryVehicle();
                entity.sms_vehicle_set_id = identity.GetSMSQueryVehicleSettingID();
                entity.CreateDate = DateTime.Now;
                entity.TenantCode = para.TenantCode;
                entity.CustomerName = para.CustomerName;
                entity.CustomerTelephone = para.Telphone;
                entity.IsProfessional = false;
                if (!para.vehicleCodelist.IsNullOrEmpty())
                {
                    entity.SMSVehicle = new List<EMSMSVehicle>();
                    for (int i = 0; i < para.vehicleCodelist.Count; i++)
                    {
                        EMSMSVehicle vehicle = new EMSMSVehicle()
                        {
                            smsvehicle_id = identity.GetSMSVehicleID(),
                            VehicleCode = para.vehicleCodelist[i],
                            TenantCode = para.TenantCode,
                            LicenseNumber = para.LicenceNumberlist[i]
                        };

                        entity.SMSVehicle.Add(vehicle);
                    }
                }

                SMSQueryVehicleService sqv = new SMSQueryVehicleService();
                sqv.Add(entity);
                rc.Message = "新增成功!";
                rc.Result = true;
            }
            catch (Exception ex)
            {
                rc.Result = false;
                rc.Message = ex.Message;
                Logger.Error(ex.Message, ex);
            }
            return rc;
        }
Exemplo n.º 5
0
        public ESMSQueryInfoViewModel GetSMSQueryListViewModel(SmsQueryVehicleParam para)
        {
            IList<Guid> vehicleCodeList = para.vehicleCodelist;
            string customerName = para.CustomerName;
            string telephone = para.Telphone;
            string tenantCode = para.TenantCode;
            int pageIndex = para.PageIndex;
            int pageSize = para.PageSize;
            try
            {
                SMSQueryVehicleService sqv = new SMSQueryVehicleService();
                int rowCount = 0;

                 //IList<EMSMSQueryVehicle> queryList = sqv.GetSMSQueryList(vehicleCodeList, customerName, telephone, tenantCode, pageIndex, pageSize, ref rowCount);
                //代码优化后
                IList<EMSMSQueryVehicle> queryList = sqv.GetNewSMSQueryList(vehicleCodeList, customerName, telephone, tenantCode, pageIndex, pageSize, ref rowCount);
                ESMSQueryInfoViewModel MSmsQuery = new ESMSQueryInfoViewModel();
                if (queryList != null && queryList.Count > 0 && rowCount > 0)
                {
                    List<ESMSQueryViewModel> list = new List<ESMSQueryViewModel>();
                    for (int i = 0; i < queryList.Count; i++)
                    {
                        EMSMSQueryVehicle entity = queryList[i];
                        ESMSQueryViewModel model = new ESMSQueryViewModel();
                        model.Index = i + 1;
                        model.sms_vehicle_set_id = entity.sms_vehicle_set_id;
                        model.CreateDate = entity.CreateDate;
                        model.CustomerName = entity.CustomerName;
                        model.CustomerTelephone = entity.CustomerTelephone;
                        model.IsProfessional = entity.IsProfessional;
                        model.TenantCode = entity.TenantCode;
                        model.LicenseNumberDesc = entity.LicenseNumberDesc;
                        model.VehicleCodeList = entity.VehicleList;
                        list.Add(model);
                    }

                    MSmsQuery.userListViewModel = list;
                    MSmsQuery.RowCount = rowCount;

                }
                return MSmsQuery;
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message, ex);
                return null;
            }
        }
Exemplo n.º 6
0
 /// <summary>
 /// 获取一个车辆被设置短信查车时的记录主键(短信查车编号)
 /// </summary>
 /// <param name="tenantCode"></param>
 /// <param name="vehicleCode"></param>
 /// <returns></returns>
 public List<ulong> GetSmsQuerySmsIDList(string tenantCode, string vehicleCode)
 {
     SMSQueryVehicleService sqv = new SMSQueryVehicleService();
     return sqv.GetSmsQuerySmsIDList(tenantCode, vehicleCode);
 }
Exemplo n.º 7
0
 /// <summary>
 /// 获取短信查询设置
 /// </summary>
 /// <param name="smsid"></param>
 /// <returns></returns>
 public EMSMSQueryVehicle GetSMSQuery(ulong smsid)
 {
     SMSQueryVehicleService service = new SMSQueryVehicleService();
     EMSMSQueryVehicle entity = service.GetSMSQuery(smsid);
     return entity;
 }