You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using BPA.Models;
- using HKCardOUT.Helper;
- using HKCardOUT.Logic;
- using HKCardOUT.Logic.Model;
- using HKCardOUT.Logic.Service;
- using HKLib.Dto;
- using HKLib.RabbitMQ.Config;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using XExten.Advance.LinqFramework;
- using BPA.Helper;
- namespace HKCardOUT
- {
- public class CardHandle : IAccept
- {
- public void AcceptMQ<T>(string msg)
- {
-
- var res = msg.FromJSON<CardStutasDto>();
- if (res == null)
- {
- if (msg.Contains("add"))
- RemoteService.GetFoodMenus();
- return;
- }
-
- //var dto = msg.ToModel<CardStutasDto>();
- DbContext.Context.Updateable<CardStutas>().SetColumns(t => t.Stutas == res.Stutas).Where(t => t.CardNo == res.CardNo).ExecuteCommand();
-
- new HKCore().GetAllCardStatus();
- }
- }
-
- public class NewCardHandle : IAccept
- {
- public void AcceptMQ<T>(string msg)
- {
- var res = msg.FromJSON<CardStutas>();
- if (res == null)
- {
- if (msg.Contains("add"))
- RemoteService.GetFoodMenus();
- return;
- }
- var data = msg.ToModel<CardStutas>();
- HKCore.AddCard(new List<CardStutas> { data });
- }
- }
-
- public class TimeHandle : IAccept
- {
- public void AcceptMQ<T>(string msg)
- {
- var res = msg.FromJSON<TimeSpilte>();
- if (res == null)
- {
- if (msg.Contains("add"))
- RemoteService.GetFoodMenus();
- return;
- }
- DataBus.Times = res;
- //DataBus.Times = msg.ToModel<TimeSpilte>();
- //RemoteService.SyncTime();
- }
- }
- public class FoodHandle : IAccept
- {
- public void AcceptMQ<T>(string msg)
- {
- RemoteService.GetFoodMenus();
- }
- }
-
- public class RangeHandle : IAccept
- {
- public void AcceptMQ<T>(string msg)
- {
- RemoteService.GetRangeCtrl();
- }
- }
- }
|