质量报表日期查询方式修改

This commit is contained in:
赵正易
2024-03-01 14:42:53 +08:00
parent 18938c7baf
commit a0ae0c35b0
2 changed files with 22 additions and 19 deletions

View File

@@ -33,11 +33,11 @@ namespace ZR.Service.mes.qc
{
int totalNum = 0;
var predicate = Expressionable.Create<QcQualityStatisticsFirst>()
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime)
//XXX:修改查询日期查询的字段
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.EndTime <= endTime)
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Equals(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Equals(partnumber))
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime.ToLocalTime())
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime <= endTime.ToLocalTime())
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Contains(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Contains(partnumber))
.AndIF(!string.IsNullOrEmpty(team), it => it.Team.Equals(team))
.AndIF(!string.IsNullOrEmpty(product_description), it => it.ProductDescription.Contains(product_description))
.ToExpression();
@@ -67,10 +67,11 @@ namespace ZR.Service.mes.qc
{
int totalNum = 0;
var predicate = Expressionable.Create<QcQualityStatisticsAgain>()
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime)
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.EndTime <= endTime)
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Equals(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Equals(partnumber))
//XXX:修改查询日期查询的字段
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime.ToLocalTime())
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime <= endTime.ToLocalTime())
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Contains(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Contains(partnumber))
.AndIF(!string.IsNullOrEmpty(team), it => it.Team.Equals(team))
.AndIF(!string.IsNullOrEmpty(product_description), it => it.ProductDescription.Contains(product_description))
.ToExpression();
@@ -99,10 +100,11 @@ namespace ZR.Service.mes.qc
{
int totalNum = 0;
var predicate = Expressionable.Create<QcQualityStatisticsFinal>()
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime)
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.EndTime <= endTime)
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Equals(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Equals(partnumber))
//XXX:修改查询日期查询的字段
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime.ToLocalTime())
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime <= endTime.ToLocalTime())
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Contains(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Contains(partnumber))
.AndIF(!string.IsNullOrEmpty(team), it => it.Team.Equals(team))
.AndIF(!string.IsNullOrEmpty(product_description), it => it.ProductDescription.Contains(product_description))
.ToExpression();
@@ -132,10 +134,11 @@ namespace ZR.Service.mes.qc
{
int totalNum = 0;
var predicate = Expressionable.Create<QcQualityStatisticsTotal>()
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime)
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.EndTime <= endTime)
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Equals(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Equals(partnumber))
//XXX:修改查询日期查询的字段
.AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime >= starttime.ToLocalTime())
.AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.StartTime <= endTime.ToLocalTime())
.AndIF(!string.IsNullOrEmpty(workorderid), it => it.WorkorderId.Contains(workorderid))
.AndIF(!string.IsNullOrEmpty(partnumber), it => it.FinishedPartNumber.Contains(partnumber))
.AndIF(!string.IsNullOrEmpty(team), it => it.Team.Equals(team))
.AndIF(!string.IsNullOrEmpty(product_description), it => it.ProductDescription.Contains(product_description))
.ToExpression();