| | |
| | | |
| | | namespace WIDESEAWCS_QuartzJob.Service |
| | | { |
| | | /// <summary> |
| | | /// 设备协议明细业务层 |
| | | /// </summary> |
| | | public class DeviceProtocolDetailService : ServiceBase<Dt_DeviceProtocolDetail, IDeviceProtocolDetailRepository>, IDeviceProtocolDetailService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IMapper _mapper; |
| | | |
| | | /// <summary> |
| | | /// 设备协议明细业务层 |
| | | /// </summary> |
| | | 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(); |