|
|
using SlnMesnac.Business.@base;
|
|
|
using SlnMesnac.Common;
|
|
|
using SlnMesnac.Plc;
|
|
|
using SlnMesnac.Repository;
|
|
|
using SlnMesnac.Repository.service;
|
|
|
using SlnMesnac.Serilog;
|
|
|
using SqlSugar;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq.Expressions;
|
|
|
using System.Text;
|
|
|
|
|
|
#region << 版 本 注 释 >>
|
|
|
/*--------------------------------------------------------------------
|
|
|
* 版权所有 (c) 2024 WenJY 保留所有权利。
|
|
|
* CLR版本:4.0.30319.42000
|
|
|
* 机器名称:T14-GEN3-7895
|
|
|
* 命名空间:SlnMesnac.Business
|
|
|
* 唯一标识:43ede2ff-ca9f-4478-a169-af30b3bc8ec8
|
|
|
*
|
|
|
* 创建者:WenJY
|
|
|
* 电子邮箱:
|
|
|
* 创建时间:2024-11-08 14:35:44
|
|
|
* 版本:V1.0.0
|
|
|
* 描述:
|
|
|
*
|
|
|
*--------------------------------------------------------------------
|
|
|
* 修改人:
|
|
|
* 时间:
|
|
|
* 修改说明:
|
|
|
*
|
|
|
* 版本:V1.0.0
|
|
|
*--------------------------------------------------------------------*/
|
|
|
#endregion << 版 本 注 释 >>
|
|
|
namespace SlnMesnac.Business
|
|
|
{
|
|
|
public class CabinetInfoBusiness
|
|
|
{
|
|
|
|
|
|
private readonly Ibase_cabinet_infoServices _cabinet_infoServices;
|
|
|
|
|
|
public CabinetInfoBusiness(Ibase_cabinet_infoServices cabinet_infoServices)
|
|
|
{
|
|
|
_cabinet_infoServices = cabinet_infoServices;
|
|
|
}
|
|
|
|
|
|
public void QueryCabinetInfo(int cabinetCode,string cabinetAlias,int? isChecked,out List<base_cabinet_info> infos)
|
|
|
{
|
|
|
Expression<Func<base_cabinet_info, bool>> exp = s1 => true;
|
|
|
if (cabinetCode > 0)
|
|
|
{
|
|
|
exp = exp.And(x => x.cabinetCode == cabinetCode);
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(cabinetAlias))
|
|
|
{
|
|
|
exp = exp.And(x => x.cabinetAlias == cabinetAlias);
|
|
|
}
|
|
|
|
|
|
if(isChecked != null)
|
|
|
{
|
|
|
exp = exp.And(x => x.isChecked == isChecked);
|
|
|
}
|
|
|
|
|
|
infos = _cabinet_infoServices.Query(exp);
|
|
|
}
|
|
|
}
|
|
|
}
|