后道
This commit is contained in:
87
ZR.Service/mes/qc/gp12/QcGp12BaseLabelAnalysisService.cs
Normal file
87
ZR.Service/mes/qc/gp12/QcGp12BaseLabelAnalysisService.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.Business;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.Business.IBusinessService;
|
||||
using System.Linq;
|
||||
|
||||
namespace ZR.Service.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量GP12基础标签解析Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IQcGp12BaseLabelAnalysisService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class QcGp12BaseLabelAnalysisService : BaseService<QcGp12BaseLabelAnalysis>, IQcGp12BaseLabelAnalysisService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询质量GP12基础标签解析列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<QcGp12BaseLabelAnalysisDto> GetList(QcGp12BaseLabelAnalysisQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<QcGp12BaseLabelAnalysis>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<QcGp12BaseLabelAnalysis, QcGp12BaseLabelAnalysisDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public QcGp12BaseLabelAnalysis GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量GP12基础标签解析
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public QcGp12BaseLabelAnalysis AddQcGp12BaseLabelAnalysis(QcGp12BaseLabelAnalysis model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改质量GP12基础标签解析
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateQcGp12BaseLabelAnalysis(QcGp12BaseLabelAnalysis model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new QcGp12BaseLabelAnalysis()
|
||||
//{
|
||||
// Name = model.Name,
|
||||
// Code = model.Code,
|
||||
// Expression = model.Expression,
|
||||
// Sort = model.Sort,
|
||||
// Type = model.Type,
|
||||
// Status = model.Status,
|
||||
// Remark = model.Remark,
|
||||
// CreatedBy = model.CreatedBy,
|
||||
// CreatedTime = model.CreatedTime,
|
||||
// UpdatedBy = model.UpdatedBy,
|
||||
// UpdatedTime = model.UpdatedTime,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user