#region << 版 本 注 释 >> 
 | 
/*---------------------------------------------------------------- 
 | 
 * 命名空间:WIDESEAWCS_QuartzJob 
 | 
 * 创建者:胡童庆 
 | 
 * 创建时间:2024/8/2 16:13:36 
 | 
 * 版本:V1.0.0 
 | 
 * 描述:设备协议明细业务实现层 
 | 
 * 
 | 
 * ---------------------------------------------------------------- 
 | 
 * 修改人: 
 | 
 * 修改时间: 
 | 
 * 版本:V1.0.1 
 | 
 * 修改说明: 
 | 
 *  
 | 
 *----------------------------------------------------------------*/ 
 | 
#endregion << 版 本 注 释 >> 
 | 
  
 | 
using AutoMapper; 
 | 
using System; 
 | 
using System.Collections.Generic; 
 | 
using System.Linq; 
 | 
using System.Text; 
 | 
using System.Threading.Tasks; 
 | 
using WIDESEAWCS_Core.BaseRepository; 
 | 
using WIDESEAWCS_Core.BaseServices; 
 | 
  
 | 
using WIDESEAWCS_QuartzJob.DeviceEnum; 
 | 
using WIDESEAWCS_QuartzJob.DTO; 
 | 
using WIDESEAWCS_QuartzJob.Models; 
 | 
using WIDESEAWCS_QuartzJob.Repository; 
 | 
  
 | 
namespace WIDESEAWCS_QuartzJob.Service 
 | 
{ 
 | 
    public class DeviceProtocolDetailService : ServiceBase<Dt_DeviceProtocolDetail, IDeviceProtocolDetailRepository>, IDeviceProtocolDetailService 
 | 
    { 
 | 
        private readonly IUnitOfWorkManage _unitOfWorkManage; 
 | 
        private readonly IMapper _mapper; 
 | 
        public DeviceProtocolDetailService(IDeviceProtocolDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IMapper mapper) : base(BaseDal) 
 | 
        { 
 | 
            _unitOfWorkManage = unitOfWorkManage; 
 | 
            _mapper = mapper; 
 | 
        } 
 | 
  
 | 
        /// <summary> 
 | 
        /// 根据设备类型获取协议明细信息 
 | 
        /// </summary> 
 | 
        /// <param name="deviceType">设备类型</param> 
 | 
        /// <returns>返回设备协议明细DTO集合</returns> 
 | 
        public List<DeviceProtocolDetailDTO> GetDeviceProtocolDetailsByDeviceType(string deviceType) 
 | 
        { 
 | 
            return BaseDal.QueryData(x => x.DeviceType == deviceType).Select(x => new DeviceProtocolDetailDTO { DeviceType = x.DeviceType, DeviceProParamName = x.DeviceProParamName, ProtocalDetailValue = x.ProtocalDetailValue, ProtocolDetailDes = x.ProtocolDetailDes, ProtocolDetailType = x.ProtocolDetailType }).ToList(); 
 | 
        } 
 | 
    } 
 | 
} 
 |