You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.3 KiB
C#

using Microsoft.Extensions.Logging;
using SlnMesnac.Business.@base;
using SlnMesnac.Config;
using SlnMesnac.Model.domain;
using SlnMesnac.Plc;
using SlnMesnac.Repository.service;
using SlnMesnac.Rfid;
using System;
using System.Collections.Generic;
using System.Text;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* LAPTOP-E0N2L34V
* SlnMesnac.Business
* d343ce10-9b75-4fa3-9b13-5e8a861f87e1
*
* WenJY
* wenjy@mesnac.com
* 2024-04-15 15:04:44
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.Business
{
public class ConfigInfoBusiness : BaseBusiness
{
private readonly IBaseConfigInfoService _configInfoService;
private List<BaseConfigInfo> _configInfos;
public ConfigInfoBusiness(ILogger<BaseBusiness> logger, AppConfig appConfig, List<PlcAbsractFactory> plcFactories, List<RfidAbsractFactory> rfidFactories, IBaseConfigInfoService configInfoService, List<BaseConfigInfo> configInfos,IServiceProvider serviceProvider) : base(logger, appConfig, plcFactories, rfidFactories, serviceProvider)
{
_configInfoService = configInfoService;
_configInfos = configInfos;
}
public List<BaseConfigInfo> GetConfigInfos()
{
//_configInfoService.GetConfigInfos(ref _configInfos);
return _configInfos;
}
public void SaveConfigInfo(BaseConfigInfo configInfo)
{
_configInfoService.SaveConfigInfo(configInfo);
}
public void UpdateConfigInfo(BaseConfigInfo configInfo)
{
_configInfoService.UpdateConfigInfo(configInfo);
}
public void RefreshConfigInfo()
{
_configInfoService.RefreshConfigInfo();
}
public void DeleteConfigInfo(int configId)
{
_configInfoService.DeleteConfigInfo(configId);
}
}
}