diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs
index dd8aeb9b..832b4ad5 100644
--- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs
@@ -34,17 +34,18 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql
///
///
///
+ /// 颜色代码
///
///
///
[HttpGet("gettestlist")]
- public IActionResult GetTestlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
+ public IActionResult GetTestlist(DateTime starttime, DateTime endTime, string workorderid, int pageNum, int pageSize)
{
//starttime = starttime.AddHours(8);
//endTime = endTime.AddHours(8);
// 时间要增加,8个小时
- (List, int) lst = plTestService.GetPLTestTable(starttime, endTime, pageNum, pageSize);
+ (List, int) lst = plTestService.GetPLTestTable(starttime, endTime, workorderid, pageNum, pageSize);
return ToResponse(new ApiResult(200, "success", lst));
}
diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs
index d45e9a5b..2baed6f6 100644
--- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs
@@ -34,17 +34,18 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql
///
///
///
+ /// 颜色代码
///
///
///
[HttpGet("getbatchlist")]
- public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
+ public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, string workorderid, int pageNum, int pageSize)
{
//starttime = starttime.AddHours(8);
//endTime = endTime.AddHours(8);
// 时间要增加,8个小时
- (List, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, pageNum, pageSize);
+ (List, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, workorderid, pageNum, pageSize);
return ToResponse(new ApiResult(200, "success", lst));
}
diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs
index a43766c8..59af6f7c 100644
--- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs
@@ -33,19 +33,21 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql
///
/// 查询原材料记录表
///
- ///
- ///
- ///
- ///
+ /// 开始时间
+ /// 结束时间
+ /// 批次号
+ /// 颜色代码
+ /// 页号
+ /// 页大小
///
[HttpGet("getrawmateriallist")]
- public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
+ public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, string workorderid,string partnumber,int pageNum, int pageSize)
{
//starttime = starttime.AddHours(8);
//endTime = endTime.AddHours(8);
// 时间要增加,8个小时
- (List, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, pageNum, pageSize);
+ (List, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, workorderid, partnumber,pageNum, pageSize);
return ToResponse(new ApiResult(200, "success", lst));
}
diff --git a/ZR.Service/mes/ql/IService/IPLBatchService.cs b/ZR.Service/mes/ql/IService/IPLBatchService.cs
index 02a98da6..fe6b2a4f 100644
--- a/ZR.Service/mes/ql/IService/IPLBatchService.cs
+++ b/ZR.Service/mes/ql/IService/IPLBatchService.cs
@@ -11,7 +11,7 @@ namespace ZR.Service.mes.ql.IService
public interface IPLBatchService
{
- public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize);
+ public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, string code,int pageNum, int pageSize);
public int AddPLBatchRecords(int num, int size);
diff --git a/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs b/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs
index 0763dbad..c895934d 100644
--- a/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs
+++ b/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs
@@ -12,7 +12,7 @@ namespace ZR.Service.mes.ql.IService
public interface IPLRawMaterialService
{
- public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize);
+ public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime,string pci, string colorCode,int pageNum, int pageSize);
public int AddRawMaterialRecords(int num,int size);
diff --git a/ZR.Service/mes/ql/IService/IPLTestService.cs b/ZR.Service/mes/ql/IService/IPLTestService.cs
index 3819f0b5..3bd89982 100644
--- a/ZR.Service/mes/ql/IService/IPLTestService.cs
+++ b/ZR.Service/mes/ql/IService/IPLTestService.cs
@@ -11,7 +11,7 @@ namespace ZR.Service.mes.ql.IService
public interface IPLTestService
{
- public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize);
+ public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, string code,int pageNum, int pageSize);
public int AddPLTestRecords(int num, int size);
diff --git a/ZR.Service/mes/ql/PLBatchService.cs b/ZR.Service/mes/ql/PLBatchService.cs
index fe52e528..64b8a9e1 100644
--- a/ZR.Service/mes/ql/PLBatchService.cs
+++ b/ZR.Service/mes/ql/PLBatchService.cs
@@ -35,18 +35,20 @@ namespace ZR.Service.mes.ql
PLBatch t3 = GetDefaultPLBatch();
PLBatch t4 = GetDefaultPLBatch();
PLBatch t5 = GetDefaultPLBatch();
- t1.Value01 = "15°"; t1.Value07 = "加浆"; t1.Value09 = "R1"; t1.Value14 = "底漆";
- t2.Value01 = "25°"; t2.Value07 = "加浆"; t2.Value09 = "R2"; t2.Value14 = "色漆";
- t3.Value01 = "45°"; t3.Value07 = "加浆"; t3.Value09 = "R3"; t3.Value14 = "云母";
- t4.Value01 = "75°"; t4.Value07 = "加浆"; t4.Value09 = "R4"; t4.Value14 = "清漆";
- t5.Value01 = "110°"; t5.Value07 = "加浆"; t5.Value09 = "R5"; t5.Value14 = "总膜厚";
+ PLBatch t6 = GetDefaultPLBatch();
+ t1.Value01 = "15°"; t1.Value07 = "0"; t1.Value09 = "R1"; t1.Value14 = "底漆"; t1.Value19 = "2";
+ t2.Value01 = "25°"; t2.Value07 = "0"; t2.Value09 = "R2"; t2.Value14 = "色漆"; t2.Value19 = "2";
+ t3.Value01 = "45°"; t3.Value07 = "0"; t3.Value09 = "R3"; t3.Value14 = "云母"; t3.Value19 = "2";
+ t4.Value01 = "75°"; t4.Value07 = "0"; t4.Value09 = "R4"; t4.Value14 = "清漆"; t4.Value19 = "2";
+ t5.Value01 = "110°"; t5.Value07 = "0"; t5.Value09 = "R5"; t5.Value14 = "总膜厚"; t5.Value19 = "2";
+ t6.Value01 = ""; t6.Value07 = "0"; t6.Value09 = "R6"; t6.Value14 = ""; t6.Value19 = "2";
t2.IdGroup = t1.IdGroup;
t3.IdGroup = t1.IdGroup;
t4.IdGroup = t1.IdGroup;
t5.IdGroup = t1.IdGroup;
-
+ t6.IdGroup = t1.IdGroup;
List lst = new List();
- lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5);
+ lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5); lst.Add(t6);
int ret = Context.Insertable(lst).ExecuteReturnIdentity();
@@ -73,11 +75,21 @@ namespace ZR.Service.mes.ql
///
///
///
- public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
+ public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime,string code, int pageNum, int pageSize)
{
+ starttime = starttime.ToLocalTime();
+ endTime = endTime.ToLocalTime();
int totalNum = 0;
+ var predicate = Expressionable.Create()
+ .AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime >= starttime.ToLocalTime())
+ .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime <= endTime.ToLocalTime())
+ .AndIF(!string.IsNullOrEmpty(code), it => it.Code.Contains(code))
+ .ToExpression();
+
+ //int totalNum = 0;
List data = Context.Queryable()
- .Where(it => it.CreatedTime > starttime.ToLocalTime() && it.CreatedTime <= endTime.ToLocalTime())
+ .Where(predicate)
+ .OrderByDescending(it=>it.IdGroup)
.OrderBy(it => it.Id)
.ToPageList(pageNum, pageSize, ref totalNum);
return (data, totalNum);
diff --git a/ZR.Service/mes/ql/PLRawMaterialService.cs b/ZR.Service/mes/ql/PLRawMaterialService.cs
index 02be8d4c..908ee60f 100644
--- a/ZR.Service/mes/ql/PLRawMaterialService.cs
+++ b/ZR.Service/mes/ql/PLRawMaterialService.cs
@@ -68,20 +68,17 @@ namespace ZR.Service.mes.ql
/// 查询数据记录,要改成分页查询
///
///
- public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
+ public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, string pci, string colorCode, int pageNum, int pageSize)
{
- //starttime = starttime.ToLocalTime();
- //endTime = endTime.ToLocalTime();
- //int totalNum = 0;
- //var predicate = Expressionable.Create()
- // //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();
+ starttime = starttime.ToLocalTime();
+ endTime = endTime.ToLocalTime();
+ int totalNum = 0;
+ var predicate = Expressionable.Create()
+ .AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime >= starttime.ToLocalTime())
+ .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime <= endTime.ToLocalTime())
+ .AndIF(!string.IsNullOrEmpty(pci), it => it.Pci.Contains(pci))
+ .AndIF(!string.IsNullOrEmpty(colorCode), it => it.Pci.Contains(colorCode))
+ .ToExpression();
//List data = Context.Queryable().Where(predicate).OrderBy(it => it.WorkorderId).OrderBy(it => it.Remark2).ToPageList(pageNum, pageSize, ref totalNum);
@@ -100,9 +97,9 @@ namespace ZR.Service.mes.ql
//return (data, totalNum);
- int totalNum = 0;
List data = Context.Queryable()
- .Where(it => it.CreatedTime > starttime.ToLocalTime() && it.CreatedTime<= endTime.ToLocalTime())
+ .Where(predicate)
+ .OrderByDescending(it => it.IdGroup)
.OrderBy(it => it.Id)
.ToPageList(pageNum, pageSize, ref totalNum);
return (data, totalNum);
diff --git a/ZR.Service/mes/ql/PLTestService.cs b/ZR.Service/mes/ql/PLTestService.cs
index 7e0aaf70..71d50107 100644
--- a/ZR.Service/mes/ql/PLTestService.cs
+++ b/ZR.Service/mes/ql/PLTestService.cs
@@ -35,18 +35,20 @@ namespace ZR.Service.mes.ql
PLTest t3 = GetDefaultPLTest();
PLTest t4 = GetDefaultPLTest();
PLTest t5 = GetDefaultPLTest();
- t1.Value01 = "15°"; t1.Value07 = "加浆"; t1.Value09 = "R1"; t1.Value14 = "底漆";
- t2.Value01 = "25°"; t2.Value07 = "加浆"; t2.Value09 = "R2"; t2.Value14 = "色漆";
- t3.Value01 = "45°"; t3.Value07 = "加浆"; t3.Value09 = "R3"; t3.Value14 = "云母";
- t4.Value01 = "75°"; t4.Value07 = "加浆"; t4.Value09 = "R4"; t4.Value14 = "清漆";
- t5.Value01 = "110°"; t5.Value07 = "加浆"; t5.Value09 = "R5"; t5.Value14 = "总膜厚";
+ PLTest t6 = GetDefaultPLTest();
+ t1.Value01 = "15°"; t1.Value07 = "0"; t1.Value09 = "R1"; t1.Value14 = "底漆";
+ t2.Value01 = "25°"; t2.Value07 = "0"; t2.Value09 = "R2"; t2.Value14 = "色漆";
+ t3.Value01 = "45°"; t3.Value07 = "0"; t3.Value09 = "R3"; t3.Value14 = "云母";
+ t4.Value01 = "75°"; t4.Value07 = "0"; t4.Value09 = "R4"; t4.Value14 = "清漆";
+ t5.Value01 = "110°"; t5.Value07 = "0"; t5.Value09 = "R5"; t5.Value14 = "总膜厚";
+ t6.Value01 = ""; t6.Value07 = "0"; t6.Value09 = "R6"; t6.Value14 = "";
t2.IdGroup = t1.IdGroup;
t3.IdGroup = t1.IdGroup;
t4.IdGroup = t1.IdGroup;
t5.IdGroup = t1.IdGroup;
-
+ t6.IdGroup = t1.IdGroup;
List lst = new List();
- lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5);
+ lst.Add(t1); lst.Add(t2); lst.Add(t3); lst.Add(t4); lst.Add(t5); lst.Add(t6);
int ret = Context.Insertable(lst).ExecuteReturnIdentity();
@@ -73,11 +75,21 @@ namespace ZR.Service.mes.ql
///
///
///
- public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize)
+ public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, string code,int pageNum, int pageSize)
{
+ starttime = starttime.ToLocalTime();
+ endTime = endTime.ToLocalTime();
int totalNum = 0;
+ var predicate = Expressionable.Create()
+ .AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime >= starttime.ToLocalTime())
+ .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime <= endTime.ToLocalTime())
+ .AndIF(!string.IsNullOrEmpty(code), it => it.Code.Contains(code))
+ .ToExpression();
+
+ //int totalNum = 0;
List data = Context.Queryable()
- .Where(it => it.CreatedTime > starttime.ToLocalTime() && it.CreatedTime <= endTime.ToLocalTime())
+ .Where(predicate)
+ .OrderByDescending(it => it.IdGroup)
.OrderBy(it => it.Id)
.ToPageList(pageNum, pageSize, ref totalNum);
return (data, totalNum);