106 lines
3.7 KiB
C#
106 lines
3.7 KiB
C#
|
|
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(IQcGp12ServiceStatisticsService), ServiceLifetime = LifeTime.Transient)]
|
||
|
|
public class QcGp12ServiceStatisticsService : BaseService<QcGp12ServiceStatistics>, IQcGp12ServiceStatisticsService
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 查询质量GP12统计报表业务模块列表
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="parm"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public PagedInfo<QcGp12ServiceStatisticsDto> GetList(QcGp12ServiceStatisticsQueryDto parm)
|
||
|
|
{
|
||
|
|
var predicate = Expressionable.Create<QcGp12ServiceStatistics>();
|
||
|
|
|
||
|
|
var response = Queryable()
|
||
|
|
.Where(predicate.ToExpression())
|
||
|
|
.ToPage<QcGp12ServiceStatistics, QcGp12ServiceStatisticsDto>(parm);
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 获取详情
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="Id"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public QcGp12ServiceStatistics GetInfo(string Id)
|
||
|
|
{
|
||
|
|
var response = Queryable()
|
||
|
|
.Where(x => x.Id == Id)
|
||
|
|
.First();
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 添加质量GP12统计报表业务模块
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="model"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public QcGp12ServiceStatistics AddQcGp12ServiceStatistics(QcGp12ServiceStatistics model)
|
||
|
|
{
|
||
|
|
return Context.Insertable(model).ExecuteReturnEntity();
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 修改质量GP12统计报表业务模块
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="model"></param>
|
||
|
|
/// <returns></returns>
|
||
|
|
public int UpdateQcGp12ServiceStatistics(QcGp12ServiceStatistics model)
|
||
|
|
{
|
||
|
|
//var response = Update(w => w.Id == model.Id, it => new QcGp12ServiceStatistics()
|
||
|
|
//{
|
||
|
|
// WorkOrder = model.WorkOrder,
|
||
|
|
// PartNumber = model.PartNumber,
|
||
|
|
// Description = model.Description,
|
||
|
|
// Specification = model.Specification,
|
||
|
|
// Color = model.Color,
|
||
|
|
// Team = model.Team,
|
||
|
|
// SiteNo = model.SiteNo,
|
||
|
|
// ComNo = model.ComNo,
|
||
|
|
// IsOnetime = model.IsOnetime,
|
||
|
|
// IsBack = model.IsBack,
|
||
|
|
// IsPolish = model.IsPolish,
|
||
|
|
// IsOut = model.IsOut,
|
||
|
|
// StartTime = model.StartTime,
|
||
|
|
// EndTime = model.EndTime,
|
||
|
|
// Label = model.Label,
|
||
|
|
// RequireNumber = model.RequireNumber,
|
||
|
|
// QualifiedNumber = model.QualifiedNumber,
|
||
|
|
// QualifiedRate = model.QualifiedRate,
|
||
|
|
// DamoNumber = model.DamoNumber,
|
||
|
|
// BaofeiNumber = model.BaofeiNumber,
|
||
|
|
// GroupCode = model.GroupCode,
|
||
|
|
// GroupSort = model.GroupSort,
|
||
|
|
// GroupDefectJson = model.GroupDefectJson,
|
||
|
|
// 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);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|