初始化CRICS

This commit is contained in:
2025-12-11 09:17:16 +08:00
commit 83247ec0a2
2735 changed files with 787765 additions and 0 deletions

625
Service/Config/Service.xml Normal file
View File

@@ -0,0 +1,625 @@
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object id="Manager.HostRCU" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostRCUManager, Service">
<property name="CurrentRepository" ref="Repository.HostRCU" />
</object>
</property>
</object>
<object id="Manager.HotelAirControl" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HotelAirControlManager, Service">
<property name="CurrentRepository" ref="Repository.HotelAirControl" />
</object>
</property>
</object>
<object id="Manager.RoomTypeProgramFiles" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeProgramFilesManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeProgramFiles" />
</object>
</property>
</object>
<object id="Manager.RoomTypeChannels" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeChannelsManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeChannels" />
</object>
</property>
</object>
<object id="Manager.SysProvince" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysProvinceManager, Service">
<property name="CurrentRepository" ref="Repository.SysProvince" />
<property name="SysCityRepository" ref="Repository.SysCity" />
<property name="SysCountyRepository" ref="Repository.SysCounty" />
</object>
</property>
</object>
<object id="Manager.SysHotelGroup" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysHotelGroupManager, Service">
<property name="CurrentRepository" ref="Repository.SysHotelGroup" />
<property name="SysHotelRepository" ref="Repository.SysHotel" />
<property name="SysRoleRepository" ref="Repository.SysRole" />
<property name="SysUserRepository" ref="Repository.SysUser" />
</object>
</property>
</object>
<object id="Manager.SysOauth2" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysOauth2Manager, Service">
<property name="CurrentRepository" ref="Repository.SysOauth2" />
</object>
</property>
</object>
<object id="Manager.HostWordsReport" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostWordsReportManager, Service">
<property name="CurrentRepository" ref="Repository.HostWordsReport" />
</object>
</property>
</object>
<object id="Manager.ManualVisit" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.ManualVisitManager, Service">
<property name="CurrentRepository" ref="Repository.ManualVisit" />
</object>
</property>
</object>
<object id="Manager.HostFaults" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostFaultsManager, Service">
<property name="CurrentRepository" ref="Repository.HostFaults" />
</object>
</property>
</object>
<object id="Manager.HostFaultRecords" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostFaultRecordsManager, Service">
<property name="CurrentRepository" ref="Repository.HostFaultRecords" />
</object>
</property>
</object>
<object id="Manager.HotelSeason" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HotelSeasonManager, Service">
<property name="CurrentRepository" ref="Repository.HotelSeason" />
</object>
</property>
</object>
<object id="Manager.RoomTypeWXMenus" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeWXMenusManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeWXMenus" />
</object>
</property>
</object>
<object id="Manager.WXMenus" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.WXMenusManager, Service">
<property name="CurrentRepository" ref="Repository.WXMenus" />
</object>
</property>
</object>
<object id="Manager.SysActiveUser" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysActiveUserManager, Service">
<property name="CurrentRepository" ref="Repository.SysActiveUser" />
</object>
</property>
</object>
<object id="Manager.EnergyConsumptionStatistics" type="Service.Implement.EnergyConsumptionStatisticsManager, Service">
<property name="CurrentRepository" ref="Repository.EnergyConsumptionStatistics" />
</object>
<object id="Manager.CurtainControl" type="Service.Implement.CurtainControlManager, Service">
<property name="CurtainControlReceiver" ref="RCUHost.CurtainControlReceiver" />
</object>
<object id="Manager.PowerSupplyControl" type="Service.Implement.PowerSupplyControlManager, Service">
<property name="PowerSupplyControlReceiver" ref="RCUHost.PowerSupplyControlReceiver" />
</object>
<object id="Manager.MusicControl" type="Service.Implement.MusicControlManager, Service">
<property name="MusicControlReceiver" ref="RCUHost.MusicControlReceiver" />
</object>
<object id="Manager.TvControl" type="Service.Implement.TvControlManager, Service">
<property name="TVControlReceiver" ref="RCUHost.TVControlReceiver" />
</object>
<object id="Manager.RoomServiceRecord" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomServiceRecordManager, Service">
<property name="CurrentRepository" ref="Repository.RoomServiceRecord" />
</object>
</property>
</object>
<object id="Manager.HostModalRecord" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostModalRecordManager, Service">
<property name="CurrentRepository" ref="Repository.HostModalRecord" />
</object>
</property>
</object>
<object id="Manager.HostAirRecord" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostAirRecordManager, Service">
<property name="CurrentRepository" ref="Repository.HostAirRecord" />
</object>
</property>
</object>
<object id="Manager.AppHotel" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.AppHotelManager, Service">
<property name="CurrentRepository" ref="Repository.AppHotel" />
</object>
</property>
</object>
<object id="Manager.AppMenu" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.AppMenuManager, Service">
<property name="CurrentRepository" ref="Repository.AppMenu" />
</object>
</property>
</object>
<object id="Manager.AppRoom" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.AppRoomManager, Service">
<property name="CurrentRepository" ref="Repository.AppRoom" />
</object>
</property>
</object>
<object id="Manager.ModalType" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.ModalTypeManager, Service">
<property name="CurrentRepository" ref="Repository.ModalType" />
</object>
</property>
</object>
<object id="Manager.RoomTypeAir" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeAirManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeAir" />
</object>
</property>
</object>
<object id="Manager.RoomTypeModal" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeModalManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeModal" />
</object>
</property>
</object>
<object id="Manager.SearchHost" type="Service.Implement.SearchHostManager, Service">
<property name="HostSearchReceiver" ref="RCUHost.HostSearchReceiver" />
<property name="HostRepository" ref="Repository.Host" />
</object>
<object id="Manager.HostRoomCard" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostRoomCardManager, Service">
<property name="CurrentRepository" ref="Repository.HostRoomCard" />
</object>
</property>
</object>
<object id="Manager.RoomCardType" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomCardTypeManager, Service">
<property name="CurrentRepository" ref="Repository.RoomCardType" />
</object>
</property>
</object>
<object id="Manager.RoomCard" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomCardManager, Service">
<property name="CurrentRepository" ref="Repository.RoomCard" />
</object>
</property>
</object>
<object id="Manager.SysHotel" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysHotelManager, Service">
<property name="CurrentRepository" ref="Repository.SysHotel" />
<property name="GroupRepository" ref="Repository.Group" />
<property name="RoomTypeManager" ref="Manager.RoomType" />
<property name="SysUserManager" ref="Manager.SysUser" />
<property name="HostManager" ref="Manager.Host" />
<property name="HotelTimeReceiver" ref="RCUHost.HotelTimeReceiver" />
</object>
</property>
</object>
<object id="Manager.FaultRecords" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.FaultRecordsManager, Service">
<property name="CurrentRepository" ref="Repository.FaultRecords" />
</object>
</property>
</object>
<object id="Manager.FaultType" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.FaultTypeManager, Service">
<property name="CurrentRepository" ref="Repository.FaultType" />
<property name="FaultRecordsRepository" ref="Repository.FaultRecords" />
</object>
</property>
</object>
<object id="Manager.LightControl" type="Service.Implement.LightControlManager, Service">
<property name="RoomTypeSceneModalManager" ref="Manager.RoomTypeSceneModal" />
<property name="DeviceControlReceiver" ref="RCUHost.DeviceControlReceiver" />
</object>
<object id="Manager.UnlockControl" type="Service.Implement.UnlockControlManager, Service">
<property name="UnlockControlReceiver" ref="RCUHost.UnlockControlReceiver" />
</object>
<object id="Manager.RoomTypeSceneModal" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeSceneModalManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeSceneModal" />
</object>
</property>
</object>
<object id="Manager.RoomTypeScene" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeSceneManager, Service">
<property name="CurrentRepository" ref="Repository.RoomTypeScene" />
<property name="RoomTypeModalRepository" ref="Repository.RoomTypeModal" />
</object>
</property>
</object>
<object id="Manager.RoomStatusAid" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomStatusAidManager, Service">
<property name="CurrentRepository" ref="Repository.RoomStatusAid" />
</object>
</property>
</object>
<object id="Manager.Overview" type="Service.Implement.OverviewManager, Service">
<property name="CurrentRepository" ref="Repository.Overview" />
<!--<property name="HostModalRecordRepository" ref="Repository.HostModalRecord" />-->
<property name="RoomTypeModalRepository" ref="Repository.RoomTypeModal" />
</object>
<object id="Manager.HostUpdateStatus" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostUpdateStatusManager, Service">
<property name="CurrentRepository" ref="Repository.HostUpdateStatus" />
</object>
</property>
</object>
<object id="Manager.RoomService" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomServiceManager, Service">
<property name="CurrentRepository" ref="Repository.RoomService" />
<property name="SysUserRepository" ref="Repository.SysUser" />
<property name="GroupRepository" ref="Repository.Group" />
<property name="HostRepository" ref="Repository.Host" />
<property name="AlarmSettingRepository" ref="Repository.AlarmSetting" />
<property name="RoomTypeModalRepository" ref="Repository.RoomTypeModal" />
<property name="ServiceReceiver" ref="RCUHost.ServiceReceiver" />
<property name="HostFaultsRepository" ref="Repository.HostFaults" />
</object>
</property>
</object>
<object id="Manager.HostModal" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostModalManager, Service">
<property name="CurrentRepository" ref="Repository.HostModal" />
<property name="DeviceControlReceiver" ref="RCUHost.DeviceControlReceiver" />
<property name="HostRegisterReceiver" ref="RCUHost.HostRegisterReceiver" />
</object>
</property>
</object>
<object id="Manager.HostScene" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostSceneManager, Service">
<property name="CurrentRepository" ref="Repository.HostScene" />
</object>
</property>
</object>
<object id="Manager.HostAir" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostAirManager, Service">
<property name="CurrentRepository" ref="Repository.HostAir" />
<property name="HostRepository" ref="Repository.Host" />
<property name="AirConditionStatusReceiver" ref="RCUHost.AirConditionStatusReceiver" />
<property name="HotelSeasonRepository" ref="Repository.HotelSeason" />
</object>
</property>
</object>
<object id="Manager.RoomStatus" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomStatusManager, Service">
<property name="CurrentRepository" ref="Repository.RoomStatus" />
</object>
</property>
</object>
<object id="Manager.RoomModal" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomModalManager, Service">
<property name="CurrentRepository" ref="Repository.RoomModal" />
</object>
</property>
</object>
<object id="Manager.SysSetting" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysSettingManager, Service">
<property name="CurrentRepository" ref="Repository.SysSetting" />
</object>
</property>
</object>
<object id="Manager.RoomType" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomTypeManager, Service">
<property name="CurrentRepository" ref="Repository.RoomType" />
<property name="RoomTypeModalRepository" ref="Repository.RoomTypeModal" />
<property name="WXMenusRepository" ref="Repository.WXMenus" />
<property name="RoomTypeWXMenusRepository" ref="Repository.RoomTypeWXMenus" />
<property name="RoomTypeSceneRepository" ref="Repository.RoomTypeScene" />
<property name="RoomTypeSceneModalRepository" ref="Repository.RoomTypeSceneModal" />
<property name="RoomTypeChannelsRepository" ref="Repository.RoomTypeChannels" />
<property name="RoomTypeProgramFilesRepository" ref="Repository.RoomTypeProgramFiles" />
</object>
</property>
</object>
<object id="Manager.SysSystemLogs" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysSystemLogsManager, Service">
<property name="CurrentRepository" ref="Repository.SysSystemLogs" />
</object>
</property>
</object>
<object id="Manager.ModelDetail" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.ModelDetailManager, Service">
<property name="CurrentRepository" ref="Repository.ModelDetail" />
</object>
</property>
</object>
<object id="Manager.Model" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.ModelManager, Service">
<property name="CurrentRepository" ref="Repository.Model" />
<property name="EnergySavingModeReceiver" ref="RCUHost.EnergySavingModeReceiver" />
</object>
</property>
</object>
<object id="Manager.AlarmSetting" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.AlarmSettingManager, Service">
<property name="CurrentRepository" ref="Repository.AlarmSetting" />
</object>
</property>
</object>
<object id="Manager.HostUpdate" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostUpdateManager, Service">
<property name="CurrentRepository" ref="Repository.HostUpdate" />
</object>
</property>
</object>
<object id="Manager.Host" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostManager, Service">
<property name="CurrentRepository" ref="Repository.Host" />
<property name="UpdateHostReceiver" ref="RCUHost.UpdateHostReceiver" />
<property name="UpdateHostFTPReceiver" ref="RCUHost.UpdateHostFTPReceiver" />
<property name="AuthorizationReceiver" ref="RCUHost.AuthorizationReceiver" />
<!--<property name="UpdateConfigReceiver" ref="RCUHost.UpdateConfigReceiver" />-->
<property name="UpdateRCUFileReceiver" ref="RCUHost.UpdateRCUFileReceiver" />
<property name="RoomStatusChangedReceiver" ref="RCUHost.RoomStatusChangedReceiver" />
<!--<property name="ConnectingRoomReceiver" ref="RCUHost.ConnectingRoomReceiver" />-->
<!--<property name="HeartReceiver" ref="RCUHost.HeartReceiver" />-->
<property name="AlarmSettingRepository" ref="Repository.AlarmSetting" />
<property name="GroupRepository" ref="Repository.Group" />
<!--<property name="RoomTypeRepository" ref="Repository.RoomType" />-->
<property name="RoomTypeModalRepository" ref="Repository.RoomTypeModal" />
<property name="RoomTypeAirRepository" ref="Repository.RoomTypeAir" />
<property name="HostAirRepository" ref="Repository.HostAir" />
<property name="HostModalRepository" ref="Repository.HostModal" />
<property name="RoomStatusRepository" ref="Repository.RoomStatus" />
<property name="RoomServiceRepository" ref="Repository.RoomService" />
<property name="SysHotelRepository" ref="Repository.SysHotel" />
<property name="HostWordsReportRepository" ref="Repository.HostWordsReport" />
<property name="HostFaultsRepository" ref="Repository.HostFaults" />
<property name="HostFaultRecordsRepository" ref="Repository.HostFaultRecords" />
<property name="HostSceneRepository" ref="Repository.HostScene" />
<property name="HostRoomCardRepository" ref="Repository.HostRoomCard" />
<property name="SysOauth2Repository" ref="Repository.SysOauth2" />
<property name="NetworkSettingReceiver" ref="RCUHost.NetworkSettingReceiver" />
<property name="DeviceSecretReceiver" ref="RCUHost.DeviceSecretReceiver" />
<property name="HostSecretReceiver" ref="RCUHost.HostSecretReceiver" />
<property name="HostRegisterReceiver" ref="RCUHost.HostRegisterReceiver" />
<property name="HostRegisterSetReceiver" ref="RCUHost.HostRegisterSetReceiver" />
<property name="HotelSeasonRepository" ref="Repository.HotelSeason" />
<property name="HotelAirControlRepository" ref="Repository.HotelAirControl" />
<property name="HostModalManager" ref="Manager.HostModal" />
<!--阿宝添加的-->
<property name="KongTiaoManager" ref="Manager.KongTiaoTimer" />
<property name="RoomNoBodyMananger" ref="Manager.RoomNoBodyKongTiaoHowTo" />
<property name="RoomNoBodyLogMananger" ref="Manager.RoomNoBodyKongTiaoHowToLog" />
<property name="ECO_SettingRepository" ref="Repository.ECO_Setting" />
<property name="ECO_DetailRepository" ref="Repository.ECO_RoomDetail" />
<property name="TFTP_LogReceiver" ref="RCUHost.TFTPReceiver" />
<property name="TFTP_LogSettingReceiver" ref="RCUHost.TFTPSettingReceiver" />
<property name="HostUDPTouChuan" ref="RCUHost.UDPTouChuan" />
<property name="HostRepository" ref="Repository.Host" />
</object>
</property>
</object>
<object id="Manager.Group" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.GroupManager, Service">
<property name="CurrentRepository" ref="Repository.Group" />
<property name="SysUserRepository" ref="Repository.SysUser" />
<property name="HostRepository" ref="Repository.Host" />
</object>
</property>
</object>
<object id="Manager.SysAuthority" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysAuthorityManager, Service">
<property name="CurrentRepository" ref="Repository.SysAuthority" />
</object>
</property>
</object>
<object id="Manager.SysRole" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysRoleManager, Service">
<property name="CurrentRepository" ref="Repository.SysRole"/>
<property name="SysUserRepository" ref="Repository.SysUser"/>
<property name="SysAuthorityRepository" ref="Repository.SysAuthority" />
</object>
</property>
</object>
<object id="Manager.SysUser" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.SysUserManager, Service">
<property name="CurrentRepository" ref="Repository.SysUser"/>
</object>
</property>
</object>
<object id="Manager.HostTimingControl" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.HostTimingControlManager, Service">
<property name="CurrentRepository" ref="Repository.HostTimingControl"/>
</object>
</property>
</object>
<!--阿宝添加的测试-->
<object id="Manager.Test" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.TestManager, Service">
<property name="CurrentRepository" ref="Repository.Test"/>
</object>
</property>
</object>
<!--阿宝添加的功能-->
<object id="Manager.KongTiaoTimer" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.KongTiaoTimerManager, Service">
<property name="CurrentRepository" ref="Repository.KongTiaoTimer"/>
</object>
</property>
</object>
<object id="Manager.RoomNoBodyKongTiaoHowTo" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomNobodyManager, Service">
<property name="CurrentRepository" ref="Repository.RoomNoOneExists"/>
</object>
</property>
</object>
<object id="Manager.RoomNoBodyKongTiaoHowToLog" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.RoomNobodyLogManager, Service">
<property name="CurrentRepository" ref="Repository.RoomNoBodyHowToLog"/>
</object>
</property>
</object>
<object id="Manager.ECO_Setting" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.ECO_SettingManager, Service">
<property name="CurrentRepository" ref="Repository.ECO_Setting"/>
</object>
</property>
</object>
<object id="Manager.ECO_RoomDetail" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.ECO_DetailManager, Service">
<property name="CurrentRepository" ref="Repository.ECO_RoomDetail"/>
</object>
</property>
</object>
<object id="Manager.TFTP_SettingManager" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.TFTP_SettingManager, Service">
<property name="CurrentRepository" ref="Repository.TFTP_SetRepository"/>
</object>
</property>
</object>
<object id="Manager.CarbonVIPManager" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.CarbonVIPManager, Service">
<property name="CurrentRepository" ref="Repository.CarbonScene_SetRepository"/>
</object>
</property>
</object>
<object id="Manager.LieECOManager" parent="BaseTransactionManager">
<property name="Target">
<object type="Service.Implement.LieECOManager, Service">
<property name="CurrentRepository" ref="Repository.LieECORepository"/>
</object>
</property>
</object>
</objects>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<description></description>
<object id="transactionManager"
type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate30">
<property name="DbProvider" ref="DbProvider"/>
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
</object>
<object id="transactionInterceptor" type="Spring.Transaction.Interceptor.TransactionInterceptor, Spring.Data">
<property name="TransactionManager" ref="transactionManager"/>
<property name="TransactionAttributeSource">
<object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource, Spring.Data"/>
</property>
</object>
<!--事物管理器-->
<object id="BaseTransactionManager" type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data" abstract="true">
<property name="PlatformTransactionManager" ref="transactionManager"/>
<property name="TransactionAttributes">
<name-values>
<!--增加-->
<add key="Save*" value="PROPAGATION_REQUIRED"/>
<!--修改-->
<add key="Update*" value="PROPAGATION_REQUIRED"/>
<!--删除-->
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
<!--获取-->
<add key="Get*" value="PROPAGATION_REQUIRED"/>
<!--浏览-->
<add key="Find*" value="PROPAGATION_SUPPORTS,readOnly"/>
<!--检索-->
<add key="Search*" value="PROPAGATION_SUPPORTS,readOnly"/>
<!--报表-->
<add key="Query*" value="PROPAGATION_SUPPORTS,readOnly"/>
<!--载入-->
<add key="Load*" value="PROPAGATION_SUPPORTS,readOnly"/>
<!--报表-->
<add key="Report*" value="PROPAGATION_SUPPORTS,readOnly"/>
<!--其它-->
<add key="*" value="PROPAGATION_REQUIRED"/>
</name-values>
</property>
</object>
</objects>

View File

@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Collections;
namespace Service
{
public abstract class GenericManagerBase<T> : IGenericManager<T> where T : class
{
public Dao.IRepository<T> CurrentRepository { get; set; }
public virtual T Get(object id)
{
if (id == null)
{
return null;
}
return this.CurrentRepository.Get(id);
}
public virtual T Load(object id)
{
if (id == null)
{
return null;
}
return this.CurrentRepository.Load(id);
}
public virtual object Save(T entity)
{
if (entity == null)
{
return null;
}
return this.CurrentRepository.Save(entity);
}
public virtual void Update(T entity)
{
if (entity == null)
{
return;
}
this.CurrentRepository.Update(entity);
}
public void Update(IList<T> entities)
{
if (entities == null || entities.Count == 0)
{
return;
}
this.CurrentRepository.Update(entities);
}
public virtual void Delete(object id)
{
if (id == null)
{
return;
}
this.CurrentRepository.Delete(id);
}
public virtual IList<T> LoadAll()
{
return this.CurrentRepository.LoadAll().ToList();
}
public virtual IList<T> LoadAllWithPage(out long count, int pageIndex, int pageSize)
{
return this.CurrentRepository.LoadAllWithPage(out count, pageIndex, pageSize).ToList();
}
public virtual void Delete(IList<object> idList)
{
if (idList == null || idList.Count == 0)
{
return;
}
this.CurrentRepository.Delete(idList);
}
public virtual void SaveOrUpdate(T entity)
{
if (entity == null)
{
return;
}
this.CurrentRepository.SaveOrUpdate(entity);
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IAlarmSettingManager : IGenericManager<AlarmSetting>
{
IList<AlarmSetting> LoadAll(char type);
AlarmSetting Get(int hotelID, string code);
AlarmSetting Get(int hotelID, char type, string code);
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IAppHotelManager : IGenericManager<AppHotel>
{
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IAppMenuManager : IGenericManager<AppMenu>
{
IList<AppMenu> LoadAllByPage(out long total, int page, int rows, string order, string sort);
/// <summary>
///
/// </summary>
/// <param name="type">0app1微信</param>
/// <returns></returns>
IList<AppMenu> LoadAll(int type, int hotelID);
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IAppRoomManager : IGenericManager<AppRoom>
{
IList<AppRoom> LoadAllByPage(out long total, int page, int rows, string order, string sort);
bool isExistMac(string mac);
AppRoom GetRoomNumber(string mac);
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ICarbonVIPMananger: IGenericManager<CarbonScene>
{
int Add(CarbonScene test);
new void Update(CarbonScene n);
CarbonScene GetByID(int hostid);
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ICurtainControlManager
{
// <summary>
/// 发送窗帘控制
/// </summary>
/// <param name="host">主机</param>
/// <param name="CurtainId">窗帘id</param>
/// <param name="ctrl">窗帘控制</param>
void SendCtrl(Host host, int CurtainId, CurtainCtrl ctrl);
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IECO_RoomDetailManager : IGenericManager<ECO_Detail>
{
int Add(ECO_Detail test);
new void Update(ECO_Detail n);
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IECO_SettingMananger: IGenericManager<ECO_Setting>
{
int Add(ECO_Setting test);
new void Update(ECO_Setting n);
//这里开始
void ECO_Start_Mission(string id, int start_hour, int start_minute, int end_hour,int end_minute, bool IsEnable);
void ECO_Reset_Mission(string id, int end_hour,int end_minute, bool IsEnable);
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
/// <summary>
/// 能耗统计
/// </summary>
public interface IEnergyConsumptionStatisticsManager
{
void StatisticHostModalEnergy();
IList<string> LoadRoomNumbers();
DataTable LoadModals(string roomNumber, DeviceType? deviceType);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IFaultRecordsManager : IGenericManager<FaultRecord>
{
IList<FaultRecord> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
string GenerateFaultNumber();
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IFaultTypeManager : IGenericManager<FaultType>
{
IList<FaultType> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
FaultType Get(string code);
}
}

View File

@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Service
{
public interface IGenericManager<T> where T : class
{
/// <summary>
/// 获取实体
/// </summary>
/// <param name="id">主键</param>
/// <returns>实体</returns>
T Get(object id);
/// <summary>
/// 获取实体
/// </summary>
/// <param name="id">主键</param>
/// <returns>实体</returns>
T Load(object id);
/// <summary>
/// 插入实体
/// </summary>
/// <param name="entity">实体</param>
/// <returns>ID</returns>
object Save(T entity);
/// <summary>
/// 修改实体
/// </summary>
/// <param name="entity">实体</param>
void Update(T entity);
/// <summary>
/// 批量修改实体
/// </summary>
/// <param name="entity">实体</param>
void Update(IList<T> entities);
/// <summary>
/// 修改或保存实体
/// </summary>
/// <param name="entity">实体</param>
void SaveOrUpdate(T entity);
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
void Delete(object id);
/// <summary>
/// 删除实体
/// </summary>
/// <param name="idList">ID集合</param>
void Delete(IList<object> idList);
/// <summary>
/// 获取全部集合
/// </summary>
/// <returns>集合</returns>
IList<T> LoadAll();
/// <summary>
/// 分页获取全部集合
/// </summary>
/// <param name="count">记录总数</param>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页大小</param>
/// <returns>集合</returns>
IList<T> LoadAllWithPage(out long count, int pageIndex, int pageSize);
}
}

64
Service/IGroupManager.cs Normal file
View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IGroupManager : IGenericManager<Group>
{
/// <summary>
/// 获取指定分组及其所属的子组列表
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
IList<Group> GetGroupList(Group group);
/// <summary>
/// 获取指定分组及其所属的子组列表
/// </summary>
/// <param name="hotelID"></param>
/// <returns></returns>
IList<Group> GetGroupList(int hotelID);
/// <summary>
/// 构造楼层树,用于 easyui-tree, easyui-combotree
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
IList<object> CreateGroupTree(Group group, int hotelID);
/// <summary>
/// 构造楼层树,用于 easyui-tree, easyui-combotree
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
object CreateGroupTree2(Group group, int hotelID);
/// <summary>
/// 构造带房号的 easyui-tree 数据格式的分组树,房号附在其所属的结点之下
/// 如果分支上的房号包含在 checkedHosts 则将其选中
/// BLW
/// ├1栋
/// │ └1层
/// │  ├101
/// │ └102
/// └2栋
/// └2层
/// </summary>
/// <param name="group"></param>
/// <param name="checkedHosts"></param>
/// <returns></returns>
IList<object> CreateGroupTreeWithRoom(Group group, IList<Host> checkedHosts, int hotelID);
/// <summary>
/// 按层级构造分组名称
/// 例如:
/// BLW-1栋-1层
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
string BuildGroupName(Group group);
}
}

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostAirManager : IGenericManager<HostAir>
{
HostAir Get(int hostID, int roomTypeAirId);
HostAir GetByModalTypeID(int hostID, int modalTypeId);
IList<HostAir> LoadByHostID(int hostID);
void Delete(int hostID);
void Delete(int hostID, int RoomTypeAirID);
/// <summary>
/// 空调设置整体下发
/// </summary>
/// <param name="entity"></param>
/// <param name="host"></param>
void ApplyAirConditionSetting(HostAir entity, Host host);
/// <summary>
/// 空调单个属性下发
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="property"></param>
/// <param name="status"></param>
/// <param name="seasonData">季节数据</param>
void SetAirProperty(Host host, int airNo, AirProperty property, int status, byte[] seasonData = null);
/// <summary>
/// 设置空调补偿温度
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="compensatoryTemp"></param>
void SetCompensatoryTemp(Host host, int airNo, float compensatoryTemp);
/// <summary>
/// 设置空调锁定温度
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="isLock"></param>
/// <param name="lockTemp"></param>
void SetLockTemp(Host host, int airNo, bool isLock, int lockTemp);
/// <summary>
/// 设置空调睡眠模式
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="sleepFlag"></param>
/// <param name="SleepDevition"></param>
/// <param name="sleepStartTime"></param>
/// <param name="sleepEndTime"></param>
void SetSleepMode(Host host, int airNo, bool sleepFlag, int sleepDevition, string sleepStartTime, string sleepEndTime);
/// <summary>
/// 设置空调定时设置
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="timeFlag"></param>
/// <param name="startTime1"></param>
/// <param name="endTime1"></param>
/// <param name="startTime2"></param>
/// <param name="endTime2"></param>
/// <param name="startTime3"></param>
/// <param name="endTime3"></param>
void SetTimeSetting(Host host, int airNo, bool timeFlag, string startTime1, string endTime1, string startTime2, string endTime2, string startTime3, string endTime3);
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostAirRecordManager : IGenericManager<HostAirRecord>
{
DataTable LoadHostAirRecords(out long total, int page, int rows, string order, string sort, string roomNumber, int airNo, string startTime, string endTime, string tempTypes, int hotelID);
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostFaultRecordsManager : IGenericManager<HostFaultRecords>
{
IList<string> LoadRoomNumbers(int hotelID);
DataTable LoadHostFaultRecords(out long total, int page, int rows, string order, string sort, string roomNumber, string startTime, string endTime, DeviceType? deviceType, string modalIds, int hotelID);
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostFaultsManager : IGenericManager<HostFaults>
{
IList<HostFaults> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
//IList<object[]> LoadCurrentHostFault(int hostID);
IList<object[]> LoadHostFault(int hostID);
//HostFaults Get(int hostID, string address, int type);
void DeleteByAddress(string address, int roomTypeID);
}
}

231
Service/IHostManager.cs Normal file
View File

@@ -0,0 +1,231 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
using CommonEntity;
namespace Service
{
public interface IHostManager : IGenericManager<Host>
{
IList<HostMappingData> LoadAllID_HostNumberMapping();
IList<HostRoomNumberMapping> LoadAll_RoomNumberMapping();
IList<Host> LoadAll(string order, string sort, Group group, string roomNumber);
IList<Host> LoadAll(Group group);
IList<Host> LoadAll(string hotelCode);
IList<Host> LoadAll(int hotelID, string roomNumber = "");
IList<Host> LoadAll(IList<Group> groupList, RoomStatus roomStatus, RoomType roomType);
IList<Host> LoadAllByPage(out long total, int page, int rows, string order, string sort, int groupId, int hotelID, string roomNumber, string mac, string roomType, int isSyncRoomNumber);
DataTable LoadHostWithPage(out long total, int page, int rows, string order, string sort, int groupId, int hotelID, string roomNumber, string mac, string roomType);
/// <summary>
///
/// </summary>
/// <param name="total"></param>
/// <param name="page"></param>
/// <param name="rows"></param>
/// <param name="group">楼层</param>
/// <param name="lang">语言0/中文1/英文</param>
/// <returns></returns>
IList<Room> LoadRooms(out long total, int page, int rows, int? groupId, int lang, int hotelID);
IList<Host> GetByGroup(Group group);
IList<string> LoadRoomNumbers();
DataTable LoadRoomNumbers(Group group, int hotelID);
Host GetByMAC(string mac, int hotelID);
/// <summary>
/// 通过mac地址获取主机列表只限C系列主机
/// </summary>
/// <param name="mac"></param>
/// <returns></returns>
IList<Host> LoadByMac(string mac);
Host GetByXiaoDuCUID(string cuid);
Host GetByTianMaoCUID(string cuid);
Host GetByTCLCUID(string cuid);
Host GetByHuaWeiCUID(string cuid);
Host GetByHiWeiCUID(string cuid);
Host GetByRoomNumberSupply(string roomNumber);
/// <summary>
/// 返回指定房号的主机
/// </summary>
/// <param name="roomNumber"></param>
/// <returns></returns>
Host GetByRoomNumber(string roomNumber, int hotelID);
Host GetByRoomNumber(int roomid, int hotelID);
Host GetByRoomNumber(string roomNumber, string hotelCode);
/// <summary>
/// 返回与指定 host 连通的 Host结果中不包含指定的host。
/// </summary>
/// <param name="host"></param>
/// <returns></returns>
//IList<Host> GetConnectRoomHosts(Host host);
/// <summary>
/// 返回指 HostID 的房号
/// </summary>
/// <param name="hostID"></param>
/// <returns></returns>
string GetRoomNumber(int hostID);
/// <summary>
/// 升级RCU主机
/// </summary>
/// <param name="hostUpdate">升级包</param>
/// <param name="hosts">RCU主机</param>
void UpdateHost(HostUpdate hostUpdate, FileType fileType, string fileHref, string fileMd5, IList<Host> hosts, bool isTFTP);
/// <summary>
/// 针对C主机升级
/// </summary>
/// <param name="hostUpdate">升级包</param>
/// <param name="hosts">RCU主机</param>
void UpdateHostC(HostUpdate hostUpdate, FileType fileType, string fileHref, string fileMd5, IList<Host> hosts);
/// <summary>
/// 更改房态
/// </summary>
/// <param name="host"></param>
/// <param name="roomStatus"></param>
void ChangeRoomStatus(Host host, RoomStatus roomStatus, string wxValidate = "");
/// <summary>
/// 更改房态
/// </summary>
/// <param name="host"></param>
/// <param name="roomStatusID">2出租4待租8退房16空房</param>
void ChangeRoomStatus(Host host, int roomStatusID, string wxValidate = "");
/// <summary>
/// 批量更改主机网络设置
/// </summary>
/// <param name="hostList">RCU主机列表</param>
/// <param name="ip">IP地址</param>
/// <param name="subnetmask">子网掩码</param>
/// <param name="gateway">默认网关</param>
/// <param name="port">通讯端口</param>
void ChangeNetworkSetting(IList<Host> hostList, string ip, string subnetmask, string gateway, ushort port);
/// <summary>
/// 设置或取消连通房
/// </summary>
/// <param name="hosts">主机列表</param>
/// <param name="cancel">false/设置连通房true/取消连通房默认false</param>
//void ConnectRoom(IList<Host> hosts, bool cancel = false);
/// <summary>
/// 主机授权
/// </summary>
/// <param name="hostList"></param>
/// <param name="expires"></param>
void AccreditForHost(IList<Host> hostList, DateTime expires);
/// <summary>
/// 下发设备密钥
/// </summary>
/// <param name="host"></param>
void SetDeviceSecret(Host host);
/// <summary>
/// 获取主机密钥
/// </summary>
/// <param name="host"></param>
void SendForGetHostSecret(Host host);
/// <summary>
/// 同步主机信息
/// </summary>
/// <param name="host"></param>
void SyncHostInfo(Host host);
/// <summary>
/// 下发主机信息
/// </summary>
/// <param name="host"></param>
void PublishHostInfo(Host host);
/// <summary>
/// 下发主机信息
/// </summary>
/// <param name="host"></param>
/// <param name="sendData">指定地址和设置内容</param>
void PublishHostInfo(Host host, byte[] sendData);
/// <summary>
/// 保存智能语音绑定信息
/// </summary>
/// <param name="host"></param>
void SaveSmartVoiceBinding(Host host);
/// <summary>
/// 透传
/// </summary>
/// <param name="hostnumber"></param>
/// <param name="mac"></param>
/// <param name="bbb"></param>
void PublishUDPData(string hostnumber,string mac,byte[] data,byte cmdtype,bool isoriginal=false);
/// <summary>
/// 根据房型获取主机列表C主机升级使用
/// </summary>
/// <param name="hotelID"></param>
/// <param name="roomTypeID"></param>
/// <returns></returns>
IList<Object> LoadHostByRoomType(int hotelID, int roomTypeID);
IList<Object> LoadHostByRoomTypeChengZiHao(int hotelID, int roomTypeID, string roomNumber);
/// <summary>
/// 根据房型获取所有主机列表
/// </summary>
/// <param name="hotelID"></param>
/// <param name="roomTypeID"></param>
/// <returns></returns>
IList<Object> LoadAllHostByRoomType(int hotelID, int roomTypeID);
/// <summary>
/// 凌晨定时
/// </summary>
/// <param name="hotelcode"></param>
/// <param name="sheng_jiang_value"></param>
void TimerECO(string hotelcode, int sheng_jiang_value);
/// <summary>
/// 阿宝添加的
/// 获取所有任务的信息
/// </summary>
List<KongTiaoTimer> GetInitializeKTMission();
/// <summary>
/// 空调定时控制
/// </summary>
void AirConditionTimer_Controller(int hotel_id, string HotelCode,string HotelCreateDate,int host_id, string RoomNo,KongTiaoTimer k);
void LoggerTest();
List<ECO_Setting> Get_ECOList();
void ECO_Execute(string hotelid);
void Zero_Refresh();
//tftp
void Send_Query_Data(byte[] data, string host_number, string mac);
void Send_Setting_Data(byte[] data, string host_number, string mac);
}
}

View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostModalManager : IGenericManager<HostModal>
{
HostModal Get(int hostID, int roomTypeModalId);
HostModal GetByModalAddress(int hostID, string modalAddress);
HostModal GetByModalName(int hostID, string name);
IList<HostModal> Load(int hostID, DeviceType type);
/// <summary>
/// 获取当前主机下所有回路
/// </summary>
/// <param name="hostID"></param>
/// <returns></returns>
IList<HostModal> LoadByHostID(int hostID);
/// <summary>
/// 获取所有含有“灯”字的回路
/// </summary>
/// <param name="hostID"></param>
/// <returns></returns>
IList<HostModal> LoadAllLight(int hostID);
void UpdateHostModalStatus(Host host, string modalAddress, int status);
/// <summary>
/// 设置设备状态
/// host 只需要hostnumber和mac
/// hostmodal只需要 address 和type
/// device.Address = hostModal.Modal.ModalAddress;
/// device.Type = hostModal.Modal.Type;
/// </summary>
/// <param name="host">RCU Host</param>
/// <param name="hostModal"></param>
/// <param name="status">状态1开2关6停</param>
/// <param name="brightness">亮度0~100</param>
/// <param name="temperature">空调温度16~32</param>
/// <param name="fanSpeed">空调风速自动0,低1,中2,高3</param>
/// <param name="mode">空调模式自动0制冷1制热2送风3</param>
/// <param name="valve">空调阀门0不变1开2关</param>
void SetDevice(Host host, HostModal hostModal, int status, int brightness, int temperature = 0, int fanSpeed = 0, int mode = 0, int valve = 0);
/// <summary>
/// 新添加的接口
/// </summary>
/// <param name="hostnumber"></param>
/// <param name="mac"></param>
/// <param name="Data"></param>
void SendData(string hostnumber,string mac, byte[] Data);
void SetDevice_Repeat(string SingleKey,Host host, HostModal hostModal, int status, int brightness, int temperature = 0, int fanSpeed = 0, int mode = 0, int valve = 0);
void DeteleByHostID(int hostID);
void DeteleByRoomTypeModal(int hostID, int roomTypeModal);
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostModalRecordManager : IGenericManager<HostModalRecord>
{
IList<HostModalRecord> LoadByHostID(int hostID, string modalAddress = "");
DataTable LoadHostModalRecords(out long total, int page, int rows, string order, string sort, string roomNumber, string deviceTypes, string deviceSubtypes, string startTime, string endTime, int hotelID);
IList<string> LoadRoomNumbers(int hotelID);
DataTable LoadModals(string roomNumber, int hotelID);
HostModalRecord GetLastHostModalRecord(int hostId, int roomTypeModalId);
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostRCUManager : IGenericManager<HostRCU>
{
IQueryable<HostRCU> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
HostRCU GetByHostID(int hostID);
List<HostRCU> LoadAll(int hotelID);
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using System.Data;
namespace Service
{
public interface IHostRoomCardManager : IGenericManager<HostRoomCard>
{
IList<HostRoomCard> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID, string roomNumber, int roomCardTypeID, string cardNumber, string userName, DateTime startTime, DateTime endTime);
IList<HostRoomCard> LoadAll(int hotelID, string roomNumber, string userName);
void DeleteAll(int hotelID);
DataTable LoadHostRoomCard(out long total, int page, int rows, string order, string sort, int hotelID, string cardType, string roomNumber, string userName, string cardNumber, string startDate, string endDate);
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostSceneManager : IGenericManager<HostScene>
{
HostScene Get(int hostID, int roomTypeSceneID);
IList<HostScene> LoadByHostID(int hostID);
void DeteleByHostID(int hostID);
void DeteleByRoomTypeScene(int roomTypeSceneID);
void DeteleByRoomTypeScene(int hostID, int roomTypeSceneID);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostTimingControlManager : IGenericManager<HostTimingControl>
{
IList<HostTimingControl> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostUpdateManager : IGenericManager<HostUpdate>
{
IList<HostUpdate> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
/// <summary>
/// 根据酒店ID获取第一条记录
/// </summary>
/// <param name="hotelID"></param>
/// <returns></returns>
HostUpdate Get(string md5, int hotelID);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostUpdateStatusManager : IGenericManager<HostUpdateStatus>
{
IList<HostUpdateStatus> LoadAllByHostUpdate(HostUpdate hostUpdate);
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHostWordsReportManager : IGenericManager<HostWordsReport>
{
IList<HostWordsReport> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
//HostWordsReport Get(int hostID, string modalAddress);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHotelAirControlManager : IGenericManager<HotelAirControl>
{
IList<HotelAirControl> LoadAllByPage(out long total, int page, int rows, string order, string sort);
List<HotelAirControl> LoadByHotelID(int hotelID);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IHotelSeasonManager : IGenericManager<HotelSeason>
{
IList<HotelSeason> LoadAllByPage(out long total, int page, int rows, string order, string sort);
HotelSeason LoadByHotelID(int hotelID);
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IKongTiaoTimerManager : IGenericManager<KongTiaoTimer>
{
new void Save(KongTiaoTimer t);
new void Update(KongTiaoTimer t);
List<KongTiaoTimer> Select();
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ILieECOMananger: IGenericManager<LieECO>
{
int Add(LieECO test);
LieECO GetData(string hotelcode);
new void Update(LieECO n);
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ILightControlManager
{
/// <summary>
/// 应用场景到指定主机
/// </summary>
/// <param name="host">主机</param>
/// <param name="scene">场景</param>
/// <param name="takeInverse">是否取反</param>
void ApplyScene(Host host, RoomTypeScene scene, bool takeInverse = false);
/// <summary>
/// 批量控制设备
/// </summary>
/// <param name="host"></param>
/// <param name="devices"></param>
void AllDeviceControl(Host host, List<RCUHost.Protocols.Device> devices);
void ApplyScene_Repeat(string Key,Host host, RoomTypeScene scene, bool takeInverse = false);
void AllDeviceControl_Repeat(string Key,Host host, List<RCUHost.Protocols.Device> devices);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IManualVisitManager : IGenericManager<ManualVisit>
{
IList<ManualVisit> LoadAllByPage(out long total, int page, int rows, string order, string sort, DateTime? startDate, DateTime? endDate);
bool ValidateCode(string phoneNumber, string validateCode);
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IModalTypeManager : IGenericManager<ModalType>
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IModelDetailManager : IGenericManager<ModelDetail>
{
}
}

22
Service/IModelManager.cs Normal file
View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IModelManager : IGenericManager<Model>
{
IList<Model> LoadAllByPage(out long total, int page, int rows, string order, string sort);
Model GetByName(string name);
/// <summary>
/// 应用节能模式
/// </summary>
/// <param name="model"></param>
/// <param name="hosts"></param>
void ApplyModel(Model model, IList<Host> hosts, string user);
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IMusicControlManager
{
/// <summary>
/// 发送音乐按键
/// </summary>
/// <param name="host">主机</param>
/// <param name="key">按键</param>
void SendKey(Host host, MusicKey key);
}
}

View File

@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IOverviewManager
{
object LoadRoomServiceState();
object LoadRoomRentState(int hotelID);
/// <summary>
/// 客房状况
/// </summary>
/// <returns></returns>
object LoadRoomState();
object LoadDoorState(int hotelID);
object LoadSafeBoxState();
/// <summary>
/// 空调状况
/// </summary>
/// <returns></returns>
object LoadAirConditionState(int hotelID);
/// <summary>
/// 回路记录
/// </summary>
/// <param name="total"></param>
/// <param name="page"></param>
/// <param name="rows"></param>
/// <param name="order"></param>
/// <param name="sort"></param>
/// <param name="roomNumber"></param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="deviceType"></param>
/// <param name="modalIds"></param>
/// <param name="hotelID"></param>
/// <returns></returns>
DataTable LoadHostModalRecords(out long total, int page, int rows, string order, string sort, string roomNumber, string startTime, string endTime, DeviceType? deviceType, string modalIds, int hotelID);
/// <summary>
/// 回路异常记录
/// </summary>
/// <param name="type"></param>
/// <param name="hotelID"></param>
/// <returns></returns>
DataTable LoadHostAbnormalRecords(int type, int hotelID);
/// <summary>
/// 获取所有异常客房
/// </summary>
/// <returns></returns>
DataSet LoadHostAbnormalRecordsAll(int type);
/// <summary>
/// 加载能量统计
/// </summary>
/// <returns></returns>
DataTable LoadEnergyStatitics(string roomNumbers, DateTimeUnit dateUnit, string startDate, string endDate, DeviceType? deviceType, string modalIds);
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
/// <summary>
/// 主机电源控制
/// </summary>
public interface IPowerSupplyControlManager
{
/// <summary>
/// 发送主机电源控制
/// </summary>
/// <param name="host">主机</param>
/// <param name="ctrl">电源控制</param>
void SendCtrl(Host host, PowerSupplyCtrl ctrl);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomCardManager : IGenericManager<RoomCard>
{
IList<RoomCard> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
RoomCard GetByCarNumber(string cardNumber, int hotelID);
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomCardTypeManager : IGenericManager<RoomCardType>
{
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomModalManager : IGenericManager<RoomModal>
{
IList<RoomModal> LoadAllByPage(out long total, int page, int rows, string order, string sort);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomNoBodyLogMananger : IGenericManager<RoomNobodyHowToLog>
{
new void Save(RoomNobodyHowToLog test);
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomNoBodyMananger : IGenericManager<RoomNobodyHowTo>
{
int Add(RoomNobodyHowTo test);
new void Update(RoomNobodyHowTo n);
}
}

View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomServiceManager : IGenericManager<RoomService>
{
IList<RoomService> LoadAllByPage(out long total, int page, int rows, string order, string sort, string roomNumber, string startTime, string endTime, string[] services);
IList<object[]> LoadCurrentRoomServices(int hotelID, string user);
IList<object[]> LoadCurrentHostFaultStatistics(int hotelID, string user, int type);
/// <summary>
/// 加载客房当前请求的服务
/// </summary>
/// <param name="hostId"></param>
/// <returns></returns>
IList<RoomService> LoadCurrentRoomServices(int hostId);
DataTable LoadCurrentRoomServicesCount(int hotelID, string user);
/// <summary>
/// 获取当前客房内异常
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
IList<object[]> LoadCurrentRoomAbnormities(int hotelID, string user);
IList<RoomService> LoadCurrentRoomAbnormities(int hostID);
/// <summary>
/// 获取当前客房内异常统计数据
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
//DataTable LoadCurrentRoomAbnormitiesCount(int hotelID, string user);
/// <summary>
/// 设置服务状态
/// </summary>
/// <param name="host"></param>
/// <param name="alarmCode"></param>
/// <param name="status"></param>
void SetService(Host host, string alarmCode, int status);
/// <summary>
/// 清除服务
/// </summary>
/// <param name="host"></param>
/// <param name="service"></param>
/// <param name="user"></param>
void ClearRoomService(Host host, RoomService service, string user);
RoomService Get(int hostID, string alarmCode);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomServiceRecordManager : IGenericManager<RoomServiceRecord>
{
IList<RoomServiceRecord> LoadAllByPage(out long total, int page, int rows, string order, string sort, string roomNumber, string startTime, string endTime, string[] services);
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomStatusAidManager : IGenericManager<RoomStatusAid>
{
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomStatusManager : IGenericManager<RoomStatus>
{
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeAirManager : IGenericManager<RoomTypeAir>
{
IList<RoomTypeAir> LoadAll(RoomType roomType);
RoomTypeAir Load(RoomType roomType, ModalType modalType);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeChannelsManager : IGenericManager<RoomTypeChannels>
{
IList<RoomTypeChannels> LoadAllByPage(out long total, int page, int rows, string order, string sort, int roomTypeId);
IList<RoomTypeChannels> LoadAll(int roomTypeId);
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeManager : IGenericManager<RoomType>
{
IList<RoomType> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
RoomType GetByCode(string code, int hotelID);
/// <summary>
/// 复制房型
/// </summary>
/// <param name="id">原房型ID</param>
/// <returns></returns>
bool Copy(int id);
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeModalManager : IGenericManager<RoomTypeModal>
{
IList<RoomTypeModal> LoadAllByPage(out long total, int page, int rows, string order, string sort, int roomTypeId);
/// <summary>
///
/// </summary>
/// <param name="roomTypeId"></param>
/// <param name="sourceType">-1全部删除0后台1宝易</param>
/// <returns></returns>
IList<RoomTypeModal> LoadAll(int? roomTypeId, int sourceType = -1);
/// <summary>
///
/// </summary>
/// <param name="roomType"></param>
/// <param name="sourceType">-1全部删除0后台1宝易</param>
/// <returns></returns>
IList<RoomTypeModal> LoadAll(RoomType roomType, int sourceType);
/// <summary>
///
/// </summary>
/// <param name="roomType"></param>
/// <param name="deviceType"></param>
/// <param name="sourceType">-1全部删除0后台1宝易</param>
/// <returns></returns>
IList<RoomTypeModal> LoadAll(RoomType roomType, DeviceType deviceType, int sourceType);
/// <summary>
/// 删除房型回路
/// </summary>
/// <param name="roomTypeModal"></param>
void Delete(RoomTypeModal roomTypeModal);
/// <summary>
/// 通过房型删除回路
/// </summary>
/// <param name="roomTypeID"></param>
/// <param name="sourceType">-1全部删除0后台1宝易</param>
void DeleteByRoomTypeID(int roomTypeID, int sourceType);
void DeleteByAddress(int roomTypeID, string address);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeProgramFilesManager : IGenericManager<RoomTypeProgramFiles>
{
IList<RoomTypeProgramFiles> LoadAllByPage(out long total, int page, int rows, string order, string sort, int roomTypeID);
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeSceneManager : IGenericManager<RoomTypeScene>
{
IList<RoomTypeScene> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID);
IList<RoomTypeScene> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID, int roomTypeId);
/// <summary>
/// 加载灯光,包含调光
/// </summary>
/// <param name="roomType"></param>
/// <returns></returns>
IList<RoomTypeModal> LoadLights(RoomType roomType);
/// <summary>
/// 根据房型和中英文名称获取场景
/// </summary>
/// <param name="roomType"></param>
/// <param name="name">中文或英文包含</param>
/// <returns></returns>
RoomTypeScene Get(RoomType roomType, string name);
/// <summary>
/// 根据房型和ID获取场景防止获取不再该房型下的场景
/// </summary>
/// <param name="roomType"></param>
/// <param name="sceneID"></param>
/// <returns></returns>
RoomTypeScene Get(RoomType roomType, int sceneID);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeSceneModalManager : IGenericManager<RoomTypeSceneModal>
{
IList<RoomTypeSceneModal> LoadAll(RoomTypeScene scene);
void DeleteByModal(RoomTypeModal modal);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IRoomTypeWXMenusManager : IGenericManager<RoomTypeWXMenus>
{
IList<RoomTypeWXMenus> LoadAllByPage(out long total, int page, int rows, string order, string sort);
IList<RoomTypeWXMenus> LoadAll(int roomTypeID);
}
}

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISearchHostManager
{
/// <summary>
/// 开始搜索主机
/// </summary>
/// <param name="handler"></param>
void Start(SearchHostResultHandler handler);
/// <summary>
/// 发送搜索主机命令
/// </summary>
void Start();
/// <summary>
/// 当前搜索主机用户
/// </summary>
string User { get; set; }
/// <summary>
/// 是否正在搜索主机
/// </summary>
bool Searching { get; }
/// <summary>
/// 停止搜索主机
/// </summary>
void Stop();
/// <summary>
/// 更新搜索主机网关、子网掩码、版本号等信息
/// </summary>
/// <returns></returns>
bool UpdateHost(SearchHost host, int hotelID);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysActiveUserManager : IGenericManager<SysActiveUser>
{
SysActiveUser Get(string account, string loginIp);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysAuthorityManager : IGenericManager<SysAuthority>
{
IList<SysAuthority> GetAuthorities(int parentId);
}
}

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysHotelGroupManager : IGenericManager<SysHotelGroup>
{
/// <summary>
/// 获取指定分组及其所属的子组列表
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
IList<SysHotelGroup> GetGroupList(SysHotelGroup group);
/// <summary>
/// 构造楼层树,用于 easyui-tree, easyui-combotree
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
IList<object> CreateGroupTree(SysHotelGroup group);
/// <summary>
/// 构造楼层树,用于 easyui-tree, easyui-combotree
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
object CreateGroupTree2(SysHotelGroup group);
/// <summary>
/// 构造带房号的 easyui-tree 数据格式的分组树,房号附在其所属的结点之下
/// 如果分支上的房号包含在 checkedHosts 则将其选中
/// BLW
/// ├1栋
/// │ └1层
/// │  ├101
/// │ └102
/// └2栋
/// └2层
/// </summary>
/// <param name="group"></param>
/// <param name="checkedHosts"></param>
/// <returns></returns>
IList<object> CreateGroupTreeWithHotel(SysHotelGroup group, IList<SysHotel> checkedHotels);
/// <summary>
/// 按层级构造分组名称
/// 例如:
/// BLW-1栋-1层
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
string BuildGroupName(SysHotelGroup group);
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using CommonEntity;
namespace Service
{
public interface ISysHotelManager : IGenericManager<SysHotel>
{
IList<SysHotel> LoadAllByPage(out long total, int page, int rows, string order, string sort, string query, int? groupId);
IList<SysHotel> LoadFCS_PushData();
SysHotel GetByCode(string code);
SysHotel GetByCode(string code, DateTime date);
SysHotel GetByAssociatedAccount(string associatedAccount);
SysHotel GetByDomainUrl(string domainUrl);
void UpdateDayTime(SysHotel entity);
List<CommonEntity.KongQi> GetNeedData();
List<SomeDeviceExistsData> IsExistsSomeDeviceRoomModal(int id, string roomnum, string start_address, string end_address);
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysOauth2Manager : IGenericManager<SysOauth2>
{
IList<SysOauth2> LoadAllByPage(out long total, int page, int rows, string order, string sort);
SysOauth2 Get(string code);
SysOauth2 GetByRefreshToken(string refreshToken);
string GetXiaoDuToken();
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysProvinceManager : IGenericManager<SysProvince>
{
IList<SysCity> LoadAllCity();
IList<SysCity> GetCity(string provinceCoe);
IList<SysCounty> LoadAllCounty();
IList<SysCounty> GetCounty(string cityCoe);
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysRoleManager : IGenericManager<SysRole>
{
IList<SysRole> LoadAllByPage(out long total, int page, int rows, string order, string sort);
void SaveRoleAuthorities(int roleId, IList<int> authorityIdList);
SysRole Get(string name);
IList<SysAuthority> GetAuthorities(SysRole role);
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysSettingManager : IGenericManager<SysSetting>
{
SysSetting Get(string name);
string GetValue(string name);
void SetValue(string name, string value);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysSystemLogsManager : IGenericManager<SysSystemLogs>
{
IList<SysSystemLogs> LoadAllByPage(out long total, int page, int rows, string order, string sort, int? authorityId, DateTime? startDate, DateTime? endDate, string keyword, int currentHotelID);
void DeleteAll(int currentHotelID);
}
}

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ISysUserManager : IGenericManager<SysUsers>
{
IList<SysUsers> LoadAllByPage(out long total, int page, int rows, string order, string sort, int type, int? groupId, int? hotelID);
SysUsers Get(string account);
SysUsers Get(string account, string password);
int GetCount();
void Update(SysUsers entity, string password);
/// <summary>
/// 判断用户是否拥有指定的权限
/// </summary>
/// <param name="account">用户帐号</param>
/// <param name="authorityId">权限ID</param>
/// <returns></returns>
bool HasAuthority(string account, int authorityId);
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ITFTP_SettingMananger: IGenericManager<TFTP_Set>
{
int Add(TFTP_Set test);
TFTP_Set GetData(int hotelid,int hostid);
new void Update(TFTP_Set n);
}
}

13
Service/ITestMananger.cs Normal file
View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ITestManager : IGenericManager<Test>
{
new void Save(Test test);
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface ITvControlManager
{
/// <summary>
/// 发送电视按键
/// </summary>
/// <param name="host">主机</param>
/// <param name="key">按键</param>
void SendKey(Host host, TvKey key);
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IUnlockControlManager
{
/// <summary>
/// 发送开锁命令给指定主机主机
/// </summary>
/// <param name="host"></param>
void Send(Host host);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service
{
public interface IWXMenusManager : IGenericManager<WXMenus>
{
IList<WXMenus> LoadAllByPage(out long total, int page, int rows, string order, string sort);
}
}

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class AlarmSettingManager : GenericManagerBase<AlarmSetting>, IAlarmSettingManager
{
public IList<AlarmSetting> LoadAll(char type)
{
return ((IAlarmSettingRepository)CurrentRepository).LoadAll(type).ToList();
}
public AlarmSetting Get(int hotelID, string code)
{
return ((IAlarmSettingRepository)CurrentRepository).LoadAll().FirstOrDefault(r => r.HotelID == hotelID && r.Code == code);
}
public AlarmSetting Get(int hotelID, char type, string code)
{
return ((IAlarmSettingRepository)CurrentRepository).Get(hotelID, type, code);
}
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class AppHotelManager : GenericManagerBase<AppHotel>, IAppHotelManager
{
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class AppMenuManager : GenericManagerBase<AppMenu>, IAppMenuManager
{
public IList<AppMenu> LoadAllByPage(out long total, int page, int rows, string order, string sort)
{
return ((Dao.IAppMenuRepository)(this.CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort).ToList();
}
public IList<AppMenu> LoadAll(int type, int hotelID)
{
return ((Dao.IAppMenuRepository)(this.CurrentRepository)).LoadAll(type, hotelID).ToList();
}
}
}

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class AppRoomManager : GenericManagerBase<AppRoom>, IAppRoomManager
{
public IList<AppRoom> LoadAllByPage(out long total, int page, int rows, string order, string sort)
{
return ((Dao.IAppRoomRepository)(this.CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort).ToList();
}
public bool isExistMac(string mac)
{
return ((Dao.IAppRoomRepository)(this.CurrentRepository)).isExistMac(mac);
}
public AppRoom GetRoomNumber(string mac)
{
return ((Dao.IAppRoomRepository)(this.CurrentRepository)).GetRoomNumber(mac);
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Domain;
using Dao;
using RestSharp;
namespace Service.Implement
{
public class CarbonVIPManager: GenericManagerBase<CarbonScene>, ICarbonVIPMananger
{
private static log4net.ILog logger = log4net.LogManager.GetLogger(typeof(CarbonVIPManager));
public int Add(CarbonScene test)
{
return ((Dao.ICarbonScene_SetRepository)(this.CurrentRepository)).Add(test);
}
public new void Update(CarbonScene n)
{
((Dao.ICarbonScene_SetRepository)(this.CurrentRepository)).Update(n);
}
public CarbonScene GetByID(int hostid)
{
var CarbonVIP= ((Dao.ICarbonScene_SetRepository)(this.CurrentRepository)).GetDataBy(hostid);
return CarbonVIP;
}
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Domain;
using RCUHost;
namespace Service.Implement
{
public class CurtainControlManager : ICurtainControlManager
{
public ICurtainControlReceiver CurtainControlReceiver { get; set; }
// <summary>
/// 发送窗帘控制
/// </summary>
/// <param name="host">主机</param>
/// <param name="CurtainId">窗帘id</param>
/// <param name="ctrl">窗帘控制</param>
public void SendCtrl(Host host, int CurtainId, CurtainCtrl ctrl)
{
CurtainControlReceiver.SendCtrl(host, CurtainId, ctrl);
}
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class ECO_DetailManager : GenericManagerBase<ECO_Detail>, IECO_RoomDetailManager
{
public int Add(ECO_Detail test)
{
return ((Dao.IECO_DetailRepository)(this.CurrentRepository)).Add(test);
}
public new void Update(ECO_Detail n)
{
((Dao.IECO_DetailRepository)(this.CurrentRepository)).Update(n);
}
public new void UpdateOrSave(ECO_Detail n)
{
((Dao.IECO_DetailRepository)(this.CurrentRepository)).SaveOrUpdate(n);
}
}
}

View File

@@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Domain;
using Dao;
using RestSharp;
namespace Service.Implement
{
public class ECO_SettingManager : GenericManagerBase<ECO_Setting>, IECO_SettingMananger
{
public int Add(ECO_Setting test)
{
return ((Dao.IECO_SettingRepository)(this.CurrentRepository)).Add(test);
}
public new void Update(ECO_Setting n)
{
((Dao.IECO_SettingRepository)(this.CurrentRepository)).Update(n);
}
public new void UpdateOrSave(ECO_Setting n)
{
((Dao.IECO_SettingRepository)(this.CurrentRepository)).SaveOrUpdate(n);
}
private static log4net.ILog logger = log4net.LogManager.GetLogger(typeof(ECO_SettingManager));
public void ECO_Start_Mission(string hotelid, int start_hour, int start_minute, int end_hour, int end_minute, bool IsEnable)
{
var client1 = new RestClient(HostManager.Missionsys_Address);
var request1 = new RestRequest("api/eco_execute", Method.POST);
logger.Error("启动ECO任务" + "api/eco_execute");
request1.AddParameter("hotelid", hotelid);
request1.AddParameter("start_hour", start_hour);
request1.AddParameter("start_minute", start_minute);
request1.AddParameter("end_hour", end_hour);
request1.AddParameter("end_minute", end_minute);
request1.AddParameter("enable_trigger", IsEnable);
client1.ExecuteAsync(request1, (response) =>
{
string result = response.Content;
});
}
/// <summary>
/// 什么时候重置
/// </summary>
/// <param name="id"></param>
/// <param name="end_hour"></param>
/// <param name="end_minute"></param>
/// <param name="IsEnable"></param>
public void ECO_Reset_Mission(string id, int end_hour, int end_minute, bool IsEnable)
{
var client1 = new RestClient(HostManager.Missionsys_Address);
var request1 = new RestRequest("api/eco_reset", Method.POST);
logger.Error("ECO_Reset 任务重置:" + "api/eco_reset");
request1.AddParameter("eco_reset_key", id);
request1.AddParameter("hour", end_hour);
request1.AddParameter("minute", end_minute);
request1.AddParameter("enable_trigger", IsEnable);
client1.ExecuteAsync(request1, (response) =>
{
string result = response.Content;
});
}
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Dao;
using Domain;
namespace Service.Implement
{
public class EnergyConsumptionStatisticsManager : IEnergyConsumptionStatisticsManager
{
public IEnergyConsumptionStatisticsRepository CurrentRepository { get; set; }
public void StatisticHostModalEnergy()
{
}
public IList<string> LoadRoomNumbers()
{
return CurrentRepository.LoadRoomNumbers();
}
public DataTable LoadModals(string roomNumber, DeviceType? deviceType)
{
return CurrentRepository.LoadModals(roomNumber, deviceType);
}
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class FaultRecordsManager : GenericManagerBase<FaultRecord>, IFaultRecordsManager
{
public IList<FaultRecord> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
{
return ((Dao.IFaultRecordsRepository)(this.CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort, hotelID).ToList();
}
public string GenerateFaultNumber()
{
return ((Dao.IFaultRecordsRepository)(this.CurrentRepository)).GenerateFaultNumber();
}
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class FaultTypeManager : GenericManagerBase<FaultType>, IFaultTypeManager
{
public Dao.IFaultRecordsRepository FaultRecordsRepository { get; set; }
public IList<FaultType> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
{
return ((Dao.IFaultTypeRepository)(this.CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort, hotelID).ToList();
}
public FaultType Get(string code)
{
return ((Dao.IFaultTypeRepository)(this.CurrentRepository)).Get(code);
}
public override void Delete(IList<object> idList)
{
if (idList != null && idList.Count > 0)
{
foreach (int id in idList)
{
if (FaultRecordsRepository.GetFaultsCount(id) > 0)
{
FaultType faultType = base.Get(id);
throw new ApplicationException(String.Format("删除失败,请先清空类别为【{0}】的故障。", faultType.Name));
}
}
base.Delete(idList);
}
}
}
}

View File

@@ -0,0 +1,181 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dao;
using Domain;
namespace Service.Implement
{
public class GroupManager : GenericManagerBase<Group>, IGroupManager
{
public ISysUserRepository SysUserRepository { get; set; }
public IHostRepository HostRepository { get; set; }
public IList<Group> GetGroupList(Group group)
{
return ((IGroupRepository)CurrentRepository).GetGroupList(group);
}
public IList<Group> GetGroupList(int hotelID)
{
return ((IGroupRepository)CurrentRepository).GetGroupList(hotelID);
}
public override void Delete(object id)
{
Group group = CurrentRepository.Get(id);
if (group != null)
{
if (SysUserRepository.GetByGroup(group).Count() > 0)
{
throw new ApplicationException("分组【" + group.Name + "】已分配给用户,不能删除!");
}
if (HostRepository.GetByGroup(group).Count() > 0)
{
throw new ApplicationException("分组【" + group.Name + "】已分配给主机,不能删除!");
}
}
base.Delete(id);
}
public IList<object> CreateGroupTree(Group group, int hotelID)
{
return BuildGroupTree(CurrentRepository.LoadAll().Where(r => r.HotelID == hotelID).ToList(), group);
}
public object CreateGroupTree2(Group group, int hotelID)
{
if (group == null)
{
return null;
}
var groupMenu = ((IGroupRepository)CurrentRepository).GetGroupMenu(group.ID, hotelID);
return BuildGroupTree(groupMenu);
}
public IList<object> CreateGroupTreeWithRoom(Group group, IList<Host> checkedHosts, int hotelID)
{
return BuildGroupTreeWithRoom(CurrentRepository.LoadAll().Where(r => r.HotelID == hotelID).ToList(), group, checkedHosts);
}
/// <summary>
/// 按层级构造分组名称
/// 例如:
/// BLW-1栋-1层
/// </summary>
/// <param name="group"></param>
/// <returns></returns>
public string BuildGroupName(Group group)
{
string name = "";
while (group != null)
{
if (name == "")
{
name = group.Name;
}
else
{
name = group.Name + "-" + name;
}
group = group.Parent;
}
return name;
}
#region Private Methods
/// <summary>
/// 构造楼层树,用于 easyui-tree, easyui-combotree
/// </summary>
/// <param name="groups"></param>
/// <param name="parent"></param>
/// <returns></returns>
private IList<object> BuildGroupTree(IList<Group> groups, Group parent)
{
IList<object> groupTree = new List<object>();
IList<Group> subGroups = groups.Where(r => r.Parent == parent).OrderBy(o => o.Sort).ToList();
foreach (Group group in subGroups)
{
IList<object> children = BuildGroupTree(groups, group);
if (children.Count != 0)
{
groupTree.Add(new { id = group.ID, text = group.Name, iconCls = "tree-node-no-icon", children = children });
}
else
{
groupTree.Add(new { id = group.ID, text = group.Name, iconCls = "tree-node-no-icon" });
}
}
return groupTree;
}
private object BuildGroupTree(GroupMenu groupMenu)
{
if (groupMenu == null)
{
return null;
}
if (groupMenu.SubGroupMenus.Count <= 0)
{
return new { id = groupMenu.ID, text = groupMenu.Name, iconCls = "tree-node-no-icon" };
}
IList<object> children = new List<object>();
foreach (GroupMenu subGroupMenu in groupMenu.SubGroupMenus)
{
var subGroupTree = BuildGroupTree(subGroupMenu);
if (subGroupTree != null)
{
children.Add(subGroupTree);
}
}
return new { id = groupMenu.ID, text = groupMenu.Name, iconCls = "tree-node-no-icon", children = children };
}
/// <summary>
/// 构造带房号的 easyui-tree 数据格式的分组树,房号附在其所属的结点之下
/// 如果分支上的房号包含在 checkedHosts 则将其选中
/// </summary>
/// <param name="groups"></param>
/// <param name="parent"></param>
/// <param name="checkedHosts"></param>
/// <returns></returns>
private IList<object> BuildGroupTreeWithRoom(IList<Group> groups, Group parent, IList<Host> checkedHosts)
{
IList<object> groupTree = new List<object>();
IList<Group> subGroups = groups.Where(r => r.Parent == parent).OrderBy(o => o.Sort).ToList();
foreach (Group group in subGroups)
{
IList<object> children = BuildGroupTreeWithRoom(groups, group, checkedHosts);
if (children.Count != 0)
{
groupTree.Add(new { id = group.ID, text = group.Name, iconCls = "tree-node-no-icon", children = children, attributes = new { isHost = false, roomTypeID = 0 } });
}
else
{
groupTree.Add(new { id = group.ID, text = group.Name, iconCls = "tree-node-no-icon", attributes = new { isHost = false, roomTypeID = 0 } });
}
}
var hosts = HostRepository.GetByGroup(parent).OrderBy(r => r.RoomType.ID).ToList();
foreach (Host host in hosts)
{
if (checkedHosts != null && checkedHosts.Contains(host))
{
groupTree.Add(new { id = host.ID, text = host.RoomNumber + "(" + host.RoomType.Name + ")", iconCls = "tree-node-no-icon", @checked = true, attributes = new { isHost = true, roomTypeID = host.RoomType.ID } });
}
else
{
groupTree.Add(new { id = host.ID, text = host.RoomNumber + "(" + host.RoomType.Name + ")", iconCls = "tree-node-no-icon", attributes = new { isHost = true, roomTypeID = host.RoomType.ID } });
}
}
return groupTree;
}
#endregion
}
}

View File

@@ -0,0 +1,250 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
using RCUHost;
namespace Service.Implement
{
public class HostAirManager : GenericManagerBase<HostAir>, IHostAirManager
{
public IHostRepository HostRepository { get; set; }
public IHotelSeasonRepository HotelSeasonRepository { get; set; }
public IAirConditionStatusReceiver AirConditionStatusReceiver { get; set; }
public IList<HostAir> LoadByHostID(int hostID)
{
return ((IHostAirRepository)CurrentRepository).LoadByHostID(hostID).OrderBy(r => r.Modal.Sort).ToList();
}
/// <summary>
/// 空调设置整体下发
/// </summary>
/// <param name="entity"></param>
/// <param name="host"></param>
public void ApplyAirConditionSetting(HostAir entity, Host host)
{
AirConditionStatusReceiver.SendAirConditionSetting(entity, host);
}
/// <summary>
/// 空调单个属性下发
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="property"></param>
/// <param name="status"></param>
/// <param name="seasonData">季节数据</param>
public void SetAirProperty(Host host, int airNo, AirProperty property, int status, byte[] seasonData = null)
{
AirConditionStatusReceiver.SetAirProperty(host, airNo, property, status, seasonData);
if (property == AirProperty.Season)
{
var result = HotelSeasonRepository.LoadByHotelID(host.SysHotel.ID);
if (result == null)
{
result = new HotelSeason();
}
result.SysHotel = host.SysHotel;
result.Month1 = (int)seasonData[0];
result.Month2 = (int)seasonData[1];
result.Month3 = (int)seasonData[2];
result.Month4 = (int)seasonData[3];
result.Month5 = (int)seasonData[4];
result.Month6 = (int)seasonData[5];
result.Month7 = (int)seasonData[6];
result.Month8 = (int)seasonData[7];
result.Month9 = (int)seasonData[8];
result.Month10 = (int)seasonData[9];
result.Month11 = (int)seasonData[10];
result.Month12 = (int)seasonData[11];
HotelSeasonRepository.SaveOrUpdate(result);
}
else
{
var hostAir = Get(host.ID, airNo);
if (hostAir != null)
{
switch (property)
{
case AirProperty.ColdHotMode:
hostAir.ColdHotMode = status;
break;
case AirProperty.Mode:
hostAir.Mode = status;
break;
case AirProperty.SettingTemp:
hostAir.SettingTemp = status;
break;
case AirProperty.Speed:
hostAir.Speed = status;
break;
case AirProperty.KeepTemp:
hostAir.KeepTemp = status;
break;
case AirProperty.InitTemp:
hostAir.InitTemp = status;
break;
case AirProperty.DeadTemp:
hostAir.DeadTemp = status;
break;
case AirProperty.LowerTemp:
hostAir.LowerTemp = status;
break;
case AirProperty.HighTemp:
hostAir.HightTemp = status;
break;
case AirProperty.ColdDevition:
hostAir.ColdDevition = status;
break;
case AirProperty.HotDevition:
hostAir.HotDevition = status;
break;
case AirProperty.ColdHotSwitchDelayTime:
hostAir.ColdHotSwitchDelayTime = status;
break;
case AirProperty.WelcomeTime:
hostAir.WelcomeTime = status;
break;
case AirProperty.RelateDoorContact:
hostAir.RelateDoorContact = (status != 0);
break;
case AirProperty.RelateRoomStatus:
hostAir.RelateRoomStatus = (status != 0);
break;
case AirProperty.FanStop:
hostAir.FanStop = (status != 0);
break;
case AirProperty.DisableFanHighSpeed:
hostAir.DisableFanHighSpeed = (status != 0);
break;
}
CurrentRepository.Update(hostAir);
}
}
}
/// <summary>
/// 设置空调补偿温度
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="compensatoryTemp"></param>
public void SetCompensatoryTemp(Host host, int airNo, float compensatoryTemp)
{
AirConditionStatusReceiver.SetCompensatoryTemp(host, airNo, compensatoryTemp);
var hostAir = GetByModalTypeID(host.ID, airNo);
if (hostAir != null)
{
hostAir.CompensatoryTemp = compensatoryTemp;
CurrentRepository.Update(hostAir);
}
}
/// <summary>
/// 设置空调锁定温度
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="isLock"></param>
/// <param name="lockTemp"></param>
public void SetLockTemp(Host host, int airNo, bool isLock, int lockTemp)
{
AirConditionStatusReceiver.SetLockTemp(host, airNo, isLock, lockTemp);
var hostAir = GetByModalTypeID(host.ID, airNo);
if (hostAir != null)
{
hostAir.IsLockTemp = isLock;
hostAir.LockTemp = lockTemp;
CurrentRepository.Update(hostAir);
}
}
/// <summary>
/// 设置空调睡眠模式
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="sleepFlag"></param>
/// <param name="SleepDevition"></param>
/// <param name="sleepStartTime"></param>
/// <param name="sleepEndTime"></param>
public void SetSleepMode(Host host, int airNo, bool sleepFlag, int sleepDevition, string sleepStartTime, string sleepEndTime)
{
AirConditionStatusReceiver.SetSleepMode(host, airNo, sleepFlag, sleepDevition, sleepStartTime, sleepEndTime);
var hostAir = GetByModalTypeID(host.ID, airNo);
if (hostAir != null)
{
hostAir.SleepFlag = sleepFlag;
hostAir.SleepDevition = sleepDevition;
hostAir.SleepStartTime = sleepStartTime;
hostAir.SleepEndTime = sleepEndTime;
CurrentRepository.Update(hostAir);
}
}
/// <summary>
/// 设置空调定时设置
/// </summary>
/// <param name="host"></param>
/// <param name="airNo"></param>
/// <param name="timeFlag"></param>
/// <param name="startTime1"></param>
/// <param name="endTime1"></param>
/// <param name="startTime2"></param>
/// <param name="endTime2"></param>
/// <param name="startTime3"></param>
/// <param name="endTime3"></param>
public void SetTimeSetting(Host host, int airNo, bool timeFlag, string startTime1, string endTime1, string startTime2, string endTime2, string startTime3, string endTime3)
{
AirConditionStatusReceiver.SetTimeSetting(host, airNo, timeFlag, startTime1, endTime1, startTime2, endTime2, startTime3, endTime3);
var hostAir = GetByModalTypeID(host.ID, airNo);
if (hostAir != null)
{
hostAir.TimeFlag = timeFlag;
hostAir.TimeStartTime1 = startTime1;
hostAir.TimeEndTime1 = endTime1;
hostAir.TimeStartTime2 = startTime2;
hostAir.TimeEndTime2 = endTime2;
hostAir.TimeStartTime3 = startTime3;
hostAir.TimeEndTime3 = endTime3;
CurrentRepository.Update(hostAir);
}
}
#region Override Methods
public override void Update(HostAir entity)
{
base.Update(entity);
AirConditionStatusReceiver.SendAirConditionSetting(entity, HostRepository.Get(entity.HostID));
}
#endregion
public HostAir Get(int hostID, int roomTypeAirId)
{
return CurrentRepository.LoadAll().OrderBy(r => r.Modal.Sort).FirstOrDefault(r => r.HostID == hostID && r.Modal.ID == roomTypeAirId);
}
public HostAir GetByModalTypeID(int hostID, int modalTypeId)
{
return CurrentRepository.LoadAll().OrderBy(r => r.Modal.Sort).FirstOrDefault(r => r.HostID == hostID && r.Modal.ModalType.ID == modalTypeId);
}
public void Delete(int hostID)
{
((IHostAirRepository)CurrentRepository).DeteleByHostID(hostID);
}
public void Delete(int hostID, int roomTypeAirID)
{
((IHostAirRepository)CurrentRepository).DeteleByRoomTypeAirID(hostID, roomTypeAirID);
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class HostAirRecordManager : GenericManagerBase<HostAirRecord>, IHostAirRecordManager
{
public DataTable LoadHostAirRecords(out long total, int page, int rows, string order, string sort, string roomNumber, int airNo, string startTime, string endTime, string tempTypes, int hotelID)
{
return ((Dao.IHostAirRecordRepository)CurrentRepository).LoadHostAirRecords(out total, page, rows, order, sort, roomNumber, airNo, startTime, endTime, tempTypes, hotelID);
}
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class HostFaultRecordsManager : GenericManagerBase<HostFaultRecords>, IHostFaultRecordsManager
{
public IList<string> LoadRoomNumbers(int hotelID)
{
return ((Dao.IHostFaultRecordsRepository)CurrentRepository).LoadRoomNumbers(hotelID);
}
public DataTable LoadHostFaultRecords(out long total, int page, int rows, string order, string sort, string roomNumber, string startTime, string endTime, DeviceType? deviceType, string modalIds, int hotelID)
{
return ((Dao.IHostFaultRecordsRepository)CurrentRepository).LoadHostFaultRecords(out total, page, rows, order, sort, roomNumber, startTime, endTime, deviceType, modalIds, hotelID);
}
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class HostFaultsManager : GenericManagerBase<HostFaults>, IHostFaultsManager
{
public IList<HostFaults> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
{
return ((IHostFaultsRepository)CurrentRepository).LoadAllByPage(out total, page, rows, order, sort, hotelID).ToList();
}
//public IList<object[]> LoadCurrentHostFault(int hostID)
//{
// return ((IHostFaultsRepository)CurrentRepository).LoadCurrentHostFault(hostID);
//}
public IList<object[]> LoadHostFault(int hostID)
{
return ((IHostFaultsRepository)CurrentRepository).LoadHostFault(hostID);
}
public void DeleteByAddress(string address, int roomTypeID)
{
((IHostFaultsRepository)CurrentRepository).DeleteByAddress(address, roomTypeID);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,214 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
using RCUHost;
using RCUHost.Protocols;
using System.Threading.Tasks;
namespace Service.Implement
{
public class HostModalManager : GenericManagerBase<HostModal>, IHostModalManager
{
public IDeviceControlReceiver DeviceControlReceiver { get; set; }
public IHostRegisterReceiver HostRegisterReceiver { get; set; }
public HostModal Get(int hostID, int roomTypeModalId)
{
var QQQ = ((IHostModalRepository)CurrentRepository).Get(hostID, roomTypeModalId);
if (QQQ != null)
{
StatusTran(hostID, QQQ.Modal.ModalAddress, QQQ);
}
return QQQ;
}
public HostModal GetByModalAddress(int hostID, string modalAddress)
{
var QQQ = ((IHostModalRepository)CurrentRepository).Get(hostID, modalAddress);
StatusTran(hostID, modalAddress, QQQ);
return QQQ;
}
public HostModal GetByModalName(int hostID, string name)
{
var QQQ = ((IHostModalRepository)CurrentRepository).LoadAll().Where(r => r.HostID == hostID && r.Modal != null && r.Modal.Name == name).FirstOrDefault();
if (QQQ != null)
{
StatusTran(hostID, QQQ.Modal.ModalAddress, QQQ);
}
return QQQ;
}
public IList<HostModal> Load(int hostID, DeviceType type)
{
var LLL = ((IHostModalRepository)CurrentRepository).LoadAll().Where(r => r.HostID == hostID && r.Modal != null && r.Modal.Type == type).ToList();
foreach (var QQQ in LLL)
{
if (QQQ != null)
{
StatusTran(hostID, QQQ.Modal.ModalAddress, QQQ);
}
}
return LLL;
}
public IList<HostModal> LoadByHostID(int hostID)
{
var LLL = ((IHostModalRepository)CurrentRepository).LoadByHostID(hostID).ToList();
foreach (var QQQ in LLL)
{
if (QQQ != null)
{
StatusTran(hostID, QQQ.Modal.ModalAddress, QQQ);
}
}
return LLL;
}
public IList<HostModal> LoadAllLight(int hostID)
{
var LLL = ((IHostModalRepository)CurrentRepository).LoadAll().Where(r => r.HostID == hostID && r.Modal != null && r.Modal.Name.Contains("灯")).OrderBy(r => r.Modal.Sort).ToList();
foreach (var QQQ in LLL)
{
if (QQQ != null)
{
StatusTran(hostID, QQQ.Modal.ModalAddress, QQQ);
}
}
return LLL;
}
public void DeteleByHostID(int hostID)
{
((IHostModalRepository)CurrentRepository).DeteleByHostID(hostID);
}
public void DeteleByRoomTypeModal(int hostID, int roomTypeModalID)
{
((IHostModalRepository)CurrentRepository).DeteleByRoomTypeModal(hostID, roomTypeModalID);
}
/// <summary>
/// 向某个结点发送数据
/// </summary>
/// <param name="hostnumber"></param>
/// <param name="mac"></param>
/// <param name="Data"></param>
public void SendData(string hostnumber, string mac, byte[] Data)
{
Tuple<string, string> t = new Tuple<string, string>(hostnumber, mac);
System.Threading.Tasks.Task.Factory.StartNew((state) =>
{
Tuple<string, string> t1 = state as Tuple<string, string>;
var host1 = t1.Item1;
var mac1 = t1.Item2;
HostRegisterReceiver.Send(hostnumber, mac);//发送命令
}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
}
public void SetDevice(Host host, HostModal hostModal, int status, int brightness, int temperature, int fanSpeed, int mode, int valve)
{
Device device = new Device();
device.Address = hostModal.Modal.ModalAddress;
device.AddressType = AddressType.DeviceAddress;
device.Type = hostModal.Modal.Type;
device.Status = (byte)status;
device.Brightness = (byte)brightness;
device.Temperature = (byte)temperature;
device.FanSpeed = (byte)fanSpeed;
device.Mode = (byte)mode;
device.Valve = (byte)valve;
device.AirExecMode = (status << 14) + (mode << 12) + (fanSpeed << 10) + (valve << 8) + temperature;//空调执行方式和内容
device.FloorHotExecMode = (status << 12) + (mode << 8) + (valve << 6) + temperature;//地暖执行方式和内容
device.MusicExecMode = status + (brightness << 12) + (mode << 8);//背景音乐执行方式和内容
//device.ColorTempExecMode = status + (brightness << 12) + (temperature << 8);//色温执行方式和内容
var t = new Tuple<Host, Device>(host, device);
System.Threading.Tasks.Task.Factory.StartNew((state) =>
{
var t1 = state as Tuple<Host, Device>;
var host1 = t1.Item1;
var device1 = t1.Item2;
DeviceControlReceiver.Send(host1, device1);//发送命令
}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
}
public void SetDevice_Repeat(string SingleKey, Host host, HostModal hostModal, int status, int brightness, int temperature, int fanSpeed, int mode, int valve)
{
Device device = new Device();
device.Address = hostModal.Modal.ModalAddress;
device.AddressType = AddressType.DeviceAddress;
device.Type = hostModal.Modal.Type;
device.Status = (byte)status;
device.Brightness = (byte)brightness;
device.Temperature = (byte)temperature;
device.FanSpeed = (byte)fanSpeed;
device.Mode = (byte)mode;
device.Valve = (byte)valve;
device.AirExecMode = (status << 14) + (mode << 12) + (fanSpeed << 10) + (valve << 8) + temperature;//空调执行方式和内容
device.FloorHotExecMode = (status << 12) + (mode << 8) + (valve << 6) + temperature;//地暖执行方式和内容
device.MusicExecMode = status + (brightness << 12) + (mode << 8);//背景音乐执行方式和内容
//device.ColorTempExecMode = status + (brightness << 12) + (temperature << 8);//色温执行方式和内容
var t = new Tuple<Host, Device, string>(host, device, SingleKey);
System.Threading.Tasks.Task.Factory.StartNew((state) =>
{
var t1 = state as Tuple<Host, Device, string>;
var host1 = t1.Item1;
var device1 = t1.Item2;
var key = t1.Item3;
DeviceControlReceiver.Send_Repeat(key, host1, device1);//发送命令
}, t);
}
public void UpdateHostModalStatus(Host host1, string modalAddress1, int status1)
{
var t = new Tuple<Host, string, int>(host1, modalAddress1, status1);
System.Threading.Tasks.Task.Factory.StartNew((state) =>
{
var t1 = state as Tuple<Host, string, int>;
var host = t1.Item1;
var modalAddress = t1.Item2;
var status = t1.Item3;
HostModal hostModal = ((IHostModalRepository)CurrentRepository).Get(host.ID, modalAddress);
if (hostModal != null)
{
Device device = new Device();
device.Address = modalAddress;
device.AddressType = AddressType.DeviceAddress;
device.Type = hostModal.Modal.Type;
device.Status = (byte)status;
DeviceControlReceiver.Send(host, device);
}
}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
}
private static void StatusTran(int hostID, string modalAddress, HostModal QQQ)
{
string KKey = CommonEntity.CacheKey.HostModalStatus_Prefix + "_" + hostID + "_" + modalAddress;
var obj = Common.CSRedisCacheHelper.Get_Partition<CommonEntity.HostModal_Cache>(KKey);
if (obj != null)
{
CommonEntity.HostModal_Cache hhh = obj as CommonEntity.HostModal_Cache;
if (QQQ != null)
{
QQQ.Status = hhh.Status;
QQQ.Brightness = hhh.Brightness;
var H = hhh.AirConditionData;
QQQ.CurrentTemp = H.CurrentTemp;
QQQ.SettingTemp = H.SettingTemp;
QQQ.FanSpeed = H.FanSpeed;
QQQ.Valve = H.Valve;
QQQ.Mode = H.Mode;
QQQ.UpdateTime = H.UpdateTime;
}
}
}
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class HostModalRecordManager : GenericManagerBase<HostModalRecord>, IHostModalRecordManager
{
public IList<HostModalRecord> LoadByHostID(int hostID, string modalAddress = "")
{
return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadByHostID(hostID, modalAddress).ToList();
}
public DataTable LoadHostModalRecords(out long total, int page, int rows, string order, string sort, string roomNumber, string deviceTypes, string deviceSubtypes, string startTime, string endTime, int hotelID)
{
CommonEntity.DataTongJi.InvokeCount("LoadHostModalRecords_");
return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadHostModalRecords(out total, page, rows, order, sort, roomNumber, deviceTypes, deviceSubtypes, startTime, endTime, hotelID);
}
public IList<string> LoadRoomNumbers(int hotelID)
{
return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadRoomNumbers(hotelID);
}
public DataTable LoadModals(string roomNumber, int hotelID)
{
return ((Dao.IHostModalRecordRepository)CurrentRepository).LoadModals(roomNumber, hotelID);
}
public HostModalRecord GetLastHostModalRecord(int hostId, int roomTypeModalId)
{
return ((Dao.IHostModalRecordRepository)CurrentRepository).GetLastHostModalRecord(hostId, roomTypeModalId);
}
}
}

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
using RCUHost;
using RCUHost.Protocols;
namespace Service.Implement
{
public class HostRCUManager : GenericManagerBase<HostRCU>, IHostRCUManager
{
public IQueryable<HostRCU> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
{
return ((IHostRCURepository)CurrentRepository).LoadAllByPage(out total, page, rows, order, sort, hotelID);
}
public HostRCU GetByHostID(int hostID)
{
return ((IHostRCURepository)CurrentRepository).GetByHostID(hostID);
}
public List<HostRCU> LoadAll(int hotelID)
{
return ((IHostRCURepository)CurrentRepository).LoadAll(hotelID);
}
}
}

View File

@@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Domain;
using Dao;
using System.Data;
namespace Service.Implement
{
public class HostRoomCardManager : GenericManagerBase<HostRoomCard>, IHostRoomCardManager
{
public IList<HostRoomCard> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID,
string roomNumber, int roomCardTypeID, string cardNumber, string userName, DateTime startTime, DateTime endTime)
{
var list = CurrentRepository.LoadAll();
list = list.Where(r => r.RoomCard.HotelID == hotelID);
if (!String.IsNullOrEmpty(roomNumber))
{
list = list.Where(r => r.RoomNumber == roomNumber);
}
if (roomCardTypeID > -1)
{
list = list.Where(r => r.RoomCard.ID == roomCardTypeID);
}
if (!String.IsNullOrEmpty(cardNumber))
{
list = list.Where(r => r.CardNumber == cardNumber);
}
if (!String.IsNullOrEmpty(userName))
{
list = list.Where(r => r.UserName == userName);
}
list = list.Where(r => r.InCardTime >= startTime && r.InCardTime <= endTime.AddDays(1));
total = list.Count();
list = list.OrderBy(sort + " " + order);
list = list.Skip((page - 1) * rows).Take(rows);
return list.ToList();
}
public IList<HostRoomCard> LoadAll(int hotelID, string roomNumber, string userName)
{
var list = CurrentRepository.LoadAll();
list = list.Where(r => r.HostID == hotelID);
if (!String.IsNullOrEmpty(roomNumber))
{
list = list.Where(r => r.RoomNumber == roomNumber);
}
if (!String.IsNullOrEmpty(userName))
{
list = list.Where(r => r.UserName == userName);
}
return list.ToList();
}
public void DeleteAll(int hotelID)
{
((IHostRoomCardRepository)CurrentRepository).DeleteAll(hotelID);
}
public DataTable LoadHostRoomCard(out long total, int page, int rows, string order, string sort, int hotelID, string cardType, string roomNumber, string userName, string cardNumber, string startDate,string endDate)
{
return ((IHostRoomCardRepository)CurrentRepository).LoadHostRoomCard(out total, page, rows, order, sort, hotelID, cardType, roomNumber, userName, cardNumber, startDate,endDate);
}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
using RCUHost;
using RCUHost.Protocols;
namespace Service.Implement
{
public class HostSceneManager : GenericManagerBase<HostScene>, IHostSceneManager
{
public HostScene Get(int hostID, int roomTypeSceneId)
{
return CurrentRepository.LoadAll().FirstOrDefault(r => r.HostID == hostID && r.Scene != null && r.Scene.ID == roomTypeSceneId);
}
public IList<HostScene> LoadByHostID(int hostID)
{
return ((IHostSceneRepository)CurrentRepository).LoadByHostID(hostID).ToList();
}
public void DeteleByHostID(int hostID)
{
((IHostSceneRepository)CurrentRepository).DeteleByHostID(hostID);
}
public void DeteleByRoomTypeScene(int roomTypeSceneID)
{
((IHostSceneRepository)CurrentRepository).DeteleByRoomTypeScene(roomTypeSceneID);
}
public void DeteleByRoomTypeScene(int hostID, int roomTypeSceneID)
{
((IHostSceneRepository)CurrentRepository).DeteleByRoomTypeScene(hostID, roomTypeSceneID);
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
namespace Service.Implement
{
public class HostTimingControlManager : GenericManagerBase<HostTimingControl>, IHostTimingControlManager
{
public IList<HostTimingControl> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
{
return ((IHostTimingControlRepository)(CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort, hotelID).ToList();
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class HostUpdateManager : GenericManagerBase<HostUpdate>, IHostUpdateManager
{
public IList<HostUpdate> LoadAllByPage(out long total, int page, int rows, string order, string sort, int hotelID)
{
return ((Dao.IHostUpdateRepository)(this.CurrentRepository)).LoadAllByPage(out total, page, rows, order, sort, hotelID).ToList();
}
/// <summary>
/// 根据酒店ID获取第一条记录
/// </summary>
/// <param name="hotelID"></param>
/// <returns></returns>
public HostUpdate Get(string md5, int hotelID)
{
return ((Dao.IHostUpdateRepository)(this.CurrentRepository)).Get(md5, hotelID);
}
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace Service.Implement
{
public class HostUpdateStatusManager : GenericManagerBase<HostUpdateStatus>, IHostUpdateStatusManager
{
public IList<HostUpdateStatus> LoadAllByHostUpdate(HostUpdate hostUpdate)
{
return CurrentRepository.LoadAll().Where(r => r.HostUpdate == hostUpdate).ToList();
}
}
}

Some files were not shown because too many files have changed in this diff Show More