设备状态看板
This commit is contained in:
parent
27f1424158
commit
a823f933ae
@ -24,7 +24,7 @@
|
||||
"DbName": "GXAssembly" //代码生成默认连接数据库,Oracle库是实例的名称
|
||||
},
|
||||
"urls": "http://*.*.*.*:7000", //项目启动url,如果改动端口前端对应devServer也需要进行修改
|
||||
"corsUrls": [ "http://localhost:7001", "http://localhost:7001", "http://*.*.*.*:7001", "http://0.0.0.0:7001", "http://127.0.0.1:7001" ], //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
|
||||
"corsUrls": [ "http://localhost:7001", "http://localhost:7002", "http://*.*.*.*:7001", "http://0.0.0.0:7001", "http://127.0.0.1:7001" ], //跨域地址(前端启动项目,前后端分离单独部署需要设置),多个用","隔开
|
||||
"JwtSettings": {
|
||||
"Issuer": "DOAN.NET", //即token的签发者。
|
||||
"Audience": "DOAN.NET", //指该token是服务于哪个群体的(群体范围)
|
||||
|
||||
@ -26,11 +26,32 @@ namespace ZR.Service.MES.dev
|
||||
/// <returns></returns>
|
||||
public PagedInfo<DeviceAccountDto> GetList(DeviceAccountQueryDto parm)
|
||||
{
|
||||
// 全部设备parm.FkDeviceType == 1
|
||||
// 提取parentId
|
||||
DeviceType typeItem = Context.Queryable<DeviceType>()
|
||||
.Where(it=>it.Id == parm.FkDeviceType)
|
||||
.Where(it=>it.Status==1)
|
||||
.First();
|
||||
int[] typeIds = [];
|
||||
// 二级菜单
|
||||
if (typeItem != null && typeItem.ParentId == 1)
|
||||
{
|
||||
typeIds = Context.Queryable<DeviceType>()
|
||||
.Where(it => it.ParentId == parm.FkDeviceType)
|
||||
.Where(it => it.Status == 1)
|
||||
.Select(it => it.Id)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
// 非全部设备
|
||||
|
||||
|
||||
var predicate = Expressionable.Create<DeviceAccount>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.DeviceName), it => it.DeviceName.Contains(parm.DeviceName))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.DeviceSpecification), it => it.DeviceSpecification.Contains(parm.DeviceSpecification))
|
||||
.AndIF(parm.Status > -1, it => it.Status == parm.Status)
|
||||
.AndIF(parm.FkDeviceType > 0, it => it.FkDeviceType == parm.FkDeviceType)
|
||||
.AndIF(typeItem != null && typeItem.ParentId > 1, it => it.FkDeviceType == parm.FkDeviceType)
|
||||
.AndIF(typeItem != null && typeItem.ParentId == 1, it => typeIds.Contains(it.FkDeviceType))
|
||||
;
|
||||
|
||||
var response = Queryable()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user