异常工单
This commit is contained in:
parent
37be819f03
commit
f30d8fdfd6
@ -23,6 +23,24 @@ namespace DOAN.Model.MES.exception.Dto
|
||||
|
||||
public string Workorder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 存货编码
|
||||
/// </summary>
|
||||
|
||||
public string ProductionCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
|
||||
public string ProductionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
|
||||
public string Specification { get; set; }
|
||||
|
||||
public string Log { get; set; }
|
||||
|
||||
public string ResponsiblePerson { get; set; }
|
||||
|
||||
@ -9,6 +9,7 @@ using DOAN.Model.MES.exception;
|
||||
using DOAN.Repository;
|
||||
|
||||
using System.Linq;
|
||||
using DOAN.Model.MES.product;
|
||||
using DOAN.Service.exception.IService;
|
||||
using Org.BouncyCastle.Asn1;
|
||||
|
||||
@ -27,19 +28,26 @@ namespace DOAN.Service.exception.Service
|
||||
/// <returns></returns>
|
||||
public PagedInfo<ProWorkorderUpdateLogDto> GetList(ProWorkorderUpdateLogQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<ProWorkorderUpdateLog>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.Workorder),it=>it.Workorder.Contains(parm.Workorder))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.ResponsiblePerson),it=>it.ResponsiblePerson.Contains(parm.ResponsiblePerson))
|
||||
.AndIF(parm.SearchDateTimeArray[0]>DateTime.MinValue,it=>it.ChangeTime>=parm.SearchDateTimeArray[0])
|
||||
.AndIF(parm.SearchDateTimeArray[1]>DateTime.MinValue,it=>it.ChangeTime<=parm.SearchDateTimeArray[1])
|
||||
var predicate = Expressionable.Create<ProWorkorderUpdateLog,ProWorkorder>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.Workorder),(it,rw)=>it.Workorder.Contains(parm.Workorder))
|
||||
.AndIF(!string.IsNullOrEmpty(parm.ResponsiblePerson),(it,rw)=>it.ResponsiblePerson.Contains(parm.ResponsiblePerson))
|
||||
.AndIF(parm.SearchDateTimeArray[0]>DateTime.MinValue,(it,rw)=>it.ChangeTime>=parm.SearchDateTimeArray[0])
|
||||
.AndIF(parm.SearchDateTimeArray[1]>DateTime.MinValue,(it,rw)=>it.ChangeTime<=parm.SearchDateTimeArray[1])
|
||||
|
||||
|
||||
;
|
||||
|
||||
var response = Queryable()
|
||||
.OrderByDescending(it=>it.ChangeTime)
|
||||
var response = Queryable().LeftJoin<ProWorkorder>((it,rw)=>it.Workorder==rw.Workorder)
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<ProWorkorderUpdateLog, ProWorkorderUpdateLogDto>(parm);
|
||||
.Select((it,rw)=>new ProWorkorderUpdateLogDto()
|
||||
{
|
||||
ProductionCode = rw.ProductionCode,
|
||||
ProductionName = rw.ProductionName,
|
||||
Specification = rw.Specification
|
||||
|
||||
},true)
|
||||
.OrderByDescending(it=>it.ChangeTime)
|
||||
.ToPage<ProWorkorderUpdateLogDto, ProWorkorderUpdateLogDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user