fajiao 2 years ago
parent
commit
d6fa7ff262
  1. 6
      Cis.Application/Cb/Service/CbCameraParamsService.cs
  2. 6
      Cis.Application/Cb/Service/CbCameraService.cs
  3. 12
      Cis.Application/Cis.Application.xml
  4. 6
      Cis.Application/Cm/Service/CmMarkGroupService.cs
  5. 6
      Cis.Application/Cm/Service/CmMarkLabelService.cs
  6. 6
      Cis.Application/Sys/Service/SysDictDataService.cs
  7. 6
      Cis.Application/Sys/Service/SysDictTypeService.cs
  8. 2
      Cis.Core/Cis.Core.xml
  9. 6
      Cis.Core/Common/Entity/ServiceBase.cs

6
Cis.Application/Cb/Service/CbCameraParamsService.cs

@ -16,7 +16,7 @@ public class CbCameraParamsService : ServiceBase<CbCameraParams>, ITransient
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:cameraType,isDelete; like:name; between:[startTime,endTime];</param> /// <param name="queryJson">equal:cameraType,id,isDelete; like:name; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<CbCameraParams> GetQ(string queryJson) public override async Task<CbCameraParams> GetQ(string queryJson)
@ -28,6 +28,8 @@ public class CbCameraParamsService : ServiceBase<CbCameraParams>, ITransient
exp.And(it => it.Name.Contains(name.ToString())); exp.And(it => it.Name.Contains(name.ToString()));
if (queryObj.TryGetValue("cameraType", StringComparison.OrdinalIgnoreCase, out JToken cameraType)) if (queryObj.TryGetValue("cameraType", StringComparison.OrdinalIgnoreCase, out JToken cameraType))
exp.And(it => it.CameraType.Equals(cameraType)); exp.And(it => it.CameraType.Equals(cameraType));
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
exp.And(it => it.IsDelete.Equals(isDelete)); exp.And(it => it.IsDelete.Equals(isDelete));
if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime) if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime)
@ -74,7 +76,7 @@ public class CbCameraParamsService : ServiceBase<CbCameraParams>, ITransient
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<List<CbCameraParams>> GetPageList(string queryJson, string pagination) public override async Task<List<CbCameraParams>> GetPageList(string pagination, string queryJson="")
{ {
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();

6
Cis.Application/Cb/Service/CbCameraService.cs

@ -16,7 +16,7 @@ public class CbCameraService : ServiceBase<CbCamera>, ITransient
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:cbCameraParamsId,isDelete; like:ip,name; between:[startTime,endTime];</param> /// <param name="queryJson">equal:cbCameraParamsId,id,isDelete; like:ip,name; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<CbCamera> GetQ(string queryJson) public override async Task<CbCamera> GetQ(string queryJson)
@ -30,6 +30,8 @@ public class CbCameraService : ServiceBase<CbCamera>, ITransient
exp.And(it => it.Name.Contains(name.ToString())); exp.And(it => it.Name.Contains(name.ToString()));
if (queryObj.TryGetValue("ip", StringComparison.OrdinalIgnoreCase, out JToken ip)) if (queryObj.TryGetValue("ip", StringComparison.OrdinalIgnoreCase, out JToken ip))
exp.And(it => it.Ip.Contains(ip.ToString())); exp.And(it => it.Ip.Contains(ip.ToString()));
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
exp.And(it => it.IsDelete.Equals(isDelete)); exp.And(it => it.IsDelete.Equals(isDelete));
if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime) if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime)
@ -78,7 +80,7 @@ public class CbCameraService : ServiceBase<CbCamera>, ITransient
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<List<CbCamera>> GetPageList(string queryJson, string pagination) public override async Task<List<CbCamera>> GetPageList(string pagination, string queryJson = "")
{ {
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();

12
Cis.Application/Cis.Application.xml

@ -118,7 +118,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:cameraType,isDelete; like:name; between:[startTime,endTime];</param> <param name="queryJson">equal:cameraType,id,isDelete; like:name; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Application.Cb.CbCameraParamsService.GetList(System.String)"> <member name="M:Cis.Application.Cb.CbCameraParamsService.GetList(System.String)">
@ -145,7 +145,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:cbCameraParamsId,isDelete; like:ip,name; between:[startTime,endTime];</param> <param name="queryJson">equal:cbCameraParamsId,id,isDelete; like:ip,name; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Application.Cb.CbCameraService.GetList(System.String)"> <member name="M:Cis.Application.Cb.CbCameraService.GetList(System.String)">
@ -292,7 +292,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:isDelete; like:name; between:[startTime,endTime];</param> <param name="queryJson">equal:id,isDelete; like:name; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Application.Cm.CmMarkGroupService.GetList(System.String)"> <member name="M:Cis.Application.Cm.CmMarkGroupService.GetList(System.String)">
@ -319,7 +319,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:cbCameraId,cmMarkGroupId,isDelete; like:name; between:[startTime,endTime];</param> <param name="queryJson">equal:cbCameraId,cmMarkGroupId,id,isDelete; like:name; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Application.Cm.CmMarkLabelService.GetList(System.String)"> <member name="M:Cis.Application.Cm.CmMarkLabelService.GetList(System.String)">
@ -993,7 +993,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:sysDictTypeId,code,isDelete; between:[startTime,endTime];</param> <param name="queryJson">equal:sysDictTypeId,code,id,isDelete; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Application.Sys.SysDictDataService.GetList(System.String)"> <member name="M:Cis.Application.Sys.SysDictDataService.GetList(System.String)">
@ -1020,7 +1020,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:code,isDelete; like:name; between:[startTime,endTime];</param> <param name="queryJson">equal:code,id,isDelete; like:name; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Application.Sys.SysDictTypeService.GetList(System.String)"> <member name="M:Cis.Application.Sys.SysDictTypeService.GetList(System.String)">

6
Cis.Application/Cm/Service/CmMarkGroupService.cs

@ -16,7 +16,7 @@ public class CmMarkGroupService : ServiceBase<CmMarkGroup>, ITransient
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:isDelete; like:name; between:[startTime,endTime];</param> /// <param name="queryJson">equal:id,isDelete; like:name; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<CmMarkGroup> GetQ(string queryJson) public override async Task<CmMarkGroup> GetQ(string queryJson)
@ -51,6 +51,8 @@ public class CmMarkGroupService : ServiceBase<CmMarkGroup>, ITransient
var exp = Expressionable.Create<CmMarkGroup>(); var exp = Expressionable.Create<CmMarkGroup>();
if (queryObj.TryGetValue("name", StringComparison.OrdinalIgnoreCase, out JToken name)) if (queryObj.TryGetValue("name", StringComparison.OrdinalIgnoreCase, out JToken name))
exp.And(it => it.Name.Contains(name.ToString())); exp.And(it => it.Name.Contains(name.ToString()));
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
exp.And(it => it.IsDelete.Equals(isDelete)); exp.And(it => it.IsDelete.Equals(isDelete));
if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime) if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime)
@ -70,7 +72,7 @@ public class CmMarkGroupService : ServiceBase<CmMarkGroup>, ITransient
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<List<CmMarkGroup>> GetPageList(string queryJson, string pagination) public override async Task<List<CmMarkGroup>> GetPageList(string pagination, string queryJson="")
{ {
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();

6
Cis.Application/Cm/Service/CmMarkLabelService.cs

@ -44,7 +44,7 @@ public class CmMarkLabelService : ServiceBase<CmMarkLabel>, ITransient
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:cbCameraId,cmMarkGroupId,isDelete; like:name; between:[startTime,endTime];</param> /// <param name="queryJson">equal:cbCameraId,cmMarkGroupId,id,isDelete; like:name; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<CmMarkLabel> GetQ(string queryJson) public override async Task<CmMarkLabel> GetQ(string queryJson)
@ -87,6 +87,8 @@ public class CmMarkLabelService : ServiceBase<CmMarkLabel>, ITransient
exp.And(it => it.CmMarkGroupId.Equals(cmMarkGroupId)); exp.And(it => it.CmMarkGroupId.Equals(cmMarkGroupId));
if (queryObj.TryGetValue("name", StringComparison.OrdinalIgnoreCase, out JToken name)) if (queryObj.TryGetValue("name", StringComparison.OrdinalIgnoreCase, out JToken name))
exp.And(it => it.Name.Contains(name.ToString())); exp.And(it => it.Name.Contains(name.ToString()));
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
exp.And(it => it.IsDelete.Equals(isDelete)); exp.And(it => it.IsDelete.Equals(isDelete));
if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime) if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime)
@ -106,7 +108,7 @@ public class CmMarkLabelService : ServiceBase<CmMarkLabel>, ITransient
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<List<CmMarkLabel>> GetPageList(string queryJson, string pagination) public override async Task<List<CmMarkLabel>> GetPageList(string pagination, string queryJson="")
{ {
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();

6
Cis.Application/Sys/Service/SysDictDataService.cs

@ -16,7 +16,7 @@ public class SysDictDataService : ServiceBase<SysDictData>, ITransient
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:sysDictTypeId,code,isDelete; between:[startTime,endTime];</param> /// <param name="queryJson">equal:sysDictTypeId,code,id,isDelete; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<SysDictData> GetQ(string queryJson) public override async Task<SysDictData> GetQ(string queryJson)
@ -26,6 +26,8 @@ public class SysDictDataService : ServiceBase<SysDictData>, ITransient
var exp = Expressionable.Create<SysDictData>(); var exp = Expressionable.Create<SysDictData>();
if (queryObj.TryGetValue("sysDictTypeId", StringComparison.OrdinalIgnoreCase, out JToken sysDictTypeId)) if (queryObj.TryGetValue("sysDictTypeId", StringComparison.OrdinalIgnoreCase, out JToken sysDictTypeId))
exp.And(it => it.SysDictTypeId.Equals(sysDictTypeId)); exp.And(it => it.SysDictTypeId.Equals(sysDictTypeId));
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("code", StringComparison.OrdinalIgnoreCase, out JToken code)) if (queryObj.TryGetValue("code", StringComparison.OrdinalIgnoreCase, out JToken code))
exp.And(it => it.Code.Equals(code)); exp.And(it => it.Code.Equals(code));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
@ -74,7 +76,7 @@ public class SysDictDataService : ServiceBase<SysDictData>, ITransient
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<List<SysDictData>> GetPageList(string queryJson, string pagination) public override async Task<List<SysDictData>> GetPageList(string pagination, string queryJson = "")
{ {
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();

6
Cis.Application/Sys/Service/SysDictTypeService.cs

@ -16,7 +16,7 @@ public class SysDictTypeService : ServiceBase<SysDictType>, ITransient
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:code,isDelete; like:name; between:[startTime,endTime];</param> /// <param name="queryJson">equal:code,id,isDelete; like:name; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<SysDictType> GetQ(string queryJson) public override async Task<SysDictType> GetQ(string queryJson)
@ -28,6 +28,8 @@ public class SysDictTypeService : ServiceBase<SysDictType>, ITransient
exp.And(it => it.Name.Contains(name.ToString())); exp.And(it => it.Name.Contains(name.ToString()));
if (queryObj.TryGetValue("code", StringComparison.OrdinalIgnoreCase, out JToken code)) if (queryObj.TryGetValue("code", StringComparison.OrdinalIgnoreCase, out JToken code))
exp.And(it => it.Code.Equals(code)); exp.And(it => it.Code.Equals(code));
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
exp.And(it => it.IsDelete.Equals(isDelete)); exp.And(it => it.IsDelete.Equals(isDelete));
if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime) if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime)
@ -74,7 +76,7 @@ public class SysDictTypeService : ServiceBase<SysDictType>, ITransient
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public override async Task<List<SysDictType>> GetPageList(string queryJson, string pagination) public override async Task<List<SysDictType>> GetPageList(string pagination, string queryJson="")
{ {
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();

2
Cis.Core/Cis.Core.xml

@ -261,7 +261,7 @@
<summary> <summary>
</summary> </summary>
<param name="queryJson">equal:isDelete; between:[startTime,endTime];</param> <param name="queryJson">equal:id,isDelete; between:[startTime,endTime];</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Cis.Core.Common.ServiceBase`1.GetList(System.String)"> <member name="M:Cis.Core.Common.ServiceBase`1.GetList(System.String)">

6
Cis.Core/Common/Entity/ServiceBase.cs

@ -120,7 +120,7 @@ public class ServiceBase<T> : IDynamicApiController where T : EntityBase, new()
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="queryJson">equal:isDelete; between:[startTime,endTime];</param> /// <param name="queryJson">equal:id,isDelete; between:[startTime,endTime];</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public virtual async Task<T> GetQ(string queryJson) public virtual async Task<T> GetQ(string queryJson)
@ -128,6 +128,8 @@ public class ServiceBase<T> : IDynamicApiController where T : EntityBase, new()
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();
var exp = Expressionable.Create<T>(); var exp = Expressionable.Create<T>();
if (queryObj.TryGetValue("Id", StringComparison.OrdinalIgnoreCase, out JToken Id))
exp.And(it => it.Id.Equals(Id));
if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete)) if (queryObj.TryGetValue("IsDelete", StringComparison.OrdinalIgnoreCase, out JToken isDelete))
exp.And(it => it.IsDelete.Equals(isDelete)); exp.And(it => it.IsDelete.Equals(isDelete));
if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime) if (queryObj.TryGetValue("StartTime", StringComparison.OrdinalIgnoreCase, out JToken startTime)
@ -170,7 +172,7 @@ public class ServiceBase<T> : IDynamicApiController where T : EntityBase, new()
/// <param name="pagination">index,size</param> /// <param name="pagination">index,size</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public virtual async Task<List<T>> GetPageList(string queryJson, string pagination) public virtual async Task<List<T>> GetPageList(string pagination, string queryJson = "")
{ {
JObject queryObj = queryJson.ToJObject(); JObject queryObj = queryJson.ToJObject();
Pagination pageObj = pagination.ToObject<Pagination>(); Pagination pageObj = pagination.ToObject<Pagination>();

Loading…
Cancel
Save