112
This commit is contained in:
21
DOAN.Service/PBL/IService/ILightLogService.cs
Normal file
21
DOAN.Service/PBL/IService/ILightLogService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
|
||||
namespace DOAN.Service.PBL.IPBLService
|
||||
{
|
||||
/// <summary>
|
||||
/// service接口
|
||||
/// </summary>
|
||||
public interface ILightLogService : IBaseService<LightLog>
|
||||
{
|
||||
PagedInfo<LightLogDto> GetList(LightLogQueryDto parm);
|
||||
|
||||
LightLog GetInfo(string Id);
|
||||
|
||||
|
||||
LightLog AddLightLog(LightLog parm);
|
||||
int UpdateLightLog(LightLog parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
21
DOAN.Service/PBL/IService/IMesInterationLogService.cs
Normal file
21
DOAN.Service/PBL/IService/IMesInterationLogService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
|
||||
namespace DOAN.Service.PBL.IPBLService
|
||||
{
|
||||
/// <summary>
|
||||
/// service接口
|
||||
/// </summary>
|
||||
public interface IMesInterationLogService : IBaseService<MesInterationLog>
|
||||
{
|
||||
PagedInfo<MesInterationLogDto> GetList(MesInterationLogQueryDto parm);
|
||||
|
||||
MesInterationLog GetInfo(string Id);
|
||||
|
||||
|
||||
MesInterationLog AddMesInterationLog(MesInterationLog parm);
|
||||
int UpdateMesInterationLog(MesInterationLog parm);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
79
DOAN.Service/PBL/LightLogService.cs
Normal file
79
DOAN.Service/PBL/LightLogService.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Repository;
|
||||
using DOAN.Service.PBL.IPBLService;
|
||||
|
||||
namespace DOAN.Service.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(ILightLogService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class LightLogService : BaseService<LightLog>, ILightLogService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<LightLogDto> GetList(LightLogQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<LightLog, LightLogDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public LightLog GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public LightLog AddLightLog(LightLog model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateLightLog(LightLog model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<LightLog> QueryExp(LightLogQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<LightLog>();
|
||||
|
||||
return predicate;
|
||||
}
|
||||
}
|
||||
}
|
||||
79
DOAN.Service/PBL/MesInterationLogService.cs
Normal file
79
DOAN.Service/PBL/MesInterationLogService.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Repository;
|
||||
using DOAN.Service.PBL.IPBLService;
|
||||
|
||||
namespace DOAN.Service.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IMesInterationLogService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class MesInterationLogService : BaseService<MesInterationLog>, IMesInterationLogService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<MesInterationLogDto> GetList(MesInterationLogQueryDto parm)
|
||||
{
|
||||
var predicate = QueryExp(parm);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<MesInterationLog, MesInterationLogDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public MesInterationLog GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public MesInterationLog AddMesInterationLog(MesInterationLog model)
|
||||
{
|
||||
return Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateMesInterationLog(MesInterationLog model)
|
||||
{
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询导出表达式
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
private static Expressionable<MesInterationLog> QueryExp(MesInterationLogQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<MesInterationLog>();
|
||||
|
||||
return predicate;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user