质量完成
This commit is contained in:
@@ -20,6 +20,7 @@ using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
using System.Drawing;
|
||||
using Newtonsoft.Json;
|
||||
using ZR.Model.MES.qu;
|
||||
using static Microsoft.Extensions.Logging.EventSource.LoggingEventSource;
|
||||
|
||||
namespace ZR.Service.MES.op
|
||||
{
|
||||
@@ -145,7 +146,7 @@ namespace ZR.Service.MES.op
|
||||
{
|
||||
case 1:
|
||||
// 首检抛光数量
|
||||
detailsList = Context.Queryable<QcFirstinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FKInpectionId == i.InspectionCode).Where("f.FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 1 + "_" })
|
||||
detailsList = Context.Queryable<QcFirstinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FKInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FKInpectionId, "_1_")).Where(f=>f.FKWorkorderId== fkWorkorderId)
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
@@ -154,7 +155,7 @@ namespace ZR.Service.MES.op
|
||||
}).ToList(); break;
|
||||
case 2:
|
||||
// 首检打磨数量
|
||||
detailsList = Context.Queryable<QcFirstinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FKInpectionId == i.InspectionCode).Where("FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 2 + "_" })
|
||||
detailsList = Context.Queryable<QcFirstinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FKInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FKInpectionId, "_2_"))
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
@@ -165,7 +166,8 @@ namespace ZR.Service.MES.op
|
||||
|
||||
case 3:
|
||||
// 首检报废数量
|
||||
detailsList = Context.Queryable<QcFirstinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FKInpectionId == i.InspectionCode).Where("FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 3 + "_" })
|
||||
detailsList = Context.Queryable<QcFirstinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FKInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FKInpectionId, "_3_"))
|
||||
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
@@ -176,7 +178,7 @@ namespace ZR.Service.MES.op
|
||||
|
||||
case 4:
|
||||
// 二检打磨数量
|
||||
detailsList = Context.Queryable<QcAgaininspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FkInpectionId == i.InspectionCode).Where("FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 2 + "_" })
|
||||
detailsList = Context.Queryable<QcAgaininspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FkInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FkInpectionId, "_2_"))
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
@@ -186,7 +188,7 @@ namespace ZR.Service.MES.op
|
||||
break;
|
||||
case 5:
|
||||
// 二检报废数量
|
||||
detailsList = Context.Queryable<QcAgaininspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FkInpectionId == i.InspectionCode).Where("FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 3 + "_" })
|
||||
detailsList = Context.Queryable<QcAgaininspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FkInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FkInpectionId, "_3_"))
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
@@ -196,7 +198,7 @@ namespace ZR.Service.MES.op
|
||||
break;
|
||||
case 6:
|
||||
// 三检打磨数量
|
||||
detailsList = Context.Queryable<QcFinalinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FkInpectionId == i.InspectionCode).Where("FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 2 + "_" })
|
||||
detailsList = Context.Queryable<QcFinalinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FkInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FkInpectionId, "_2_"))
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
@@ -207,7 +209,7 @@ namespace ZR.Service.MES.op
|
||||
break;
|
||||
case 7:
|
||||
// 三检报废数量
|
||||
detailsList = Context.Queryable<QcFinalinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => f.FkInpectionId == i.InspectionCode).Where("FKInpectionId like @FKInpectionId", new { FKInpectionId = "_" + 3+ "_" })
|
||||
detailsList = Context.Queryable<QcFinalinspectionRecord>().LeftJoin<QcInspectionitem>((f, i) => SqlFunc.ToInt32(f.FkInpectionId) == i.Id).Where(f => SqlFunc.Like(f.FkInpectionId, "_3_"))
|
||||
.Select((f, i) => new DetailsOfDetectionDTO
|
||||
{
|
||||
InspectionName = i.InspectionName,
|
||||
|
||||
Reference in New Issue
Block a user