diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs
index fe61054f..bd69d24a 100644
--- a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/FirstFQCController.cs
@@ -166,6 +166,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_thirty();
+ Console.WriteLine("workorder" + workorder);
+
+
return SUCCESS(workorder);
}
diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs
index 3cdf1b8a..66f46002 100644
--- a/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmFgentryInspectController.cs
@@ -67,6 +67,7 @@ namespace ZR.Admin.WebApi.Controllers
[ActionPermissionFilter(Permission = "wmsManagement:wmfgentryinspect:list")]
public IActionResult QueryWmFgentryInspect_first([FromQuery] WmFgentryInspectQueryDto parm)
{
+
var response = _WmFgentryInspectService.GetList_first(parm);
return SUCCESS(response);
}
diff --git a/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs b/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs
index ae77ac76..5cba4887 100644
--- a/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs
+++ b/ZR.Model/MES/wms/Dto/WmFgentryInspectDto.cs
@@ -1,4 +1,6 @@
+using MiniExcelLibs.Attributes;
using System.ComponentModel.DataAnnotations;
+using System.Xml.Linq;
namespace ZR.Model.MES.wms.Dto
{
@@ -37,6 +39,10 @@ namespace ZR.Model.MES.wms.Dto
public string Machine { get; set; }
public int? ProductionNum { get; set; }
+ ///
+ /// 箱子数量
+ ///
+ public int? Packnum { get; set; }
public string Partnumber { get; set; }
@@ -72,6 +78,19 @@ namespace ZR.Model.MES.wms.Dto
///
public string Colour { get; set; }
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+ ///
+ /// 上件数
+ ///
+ public int PreviousNumber { get; set; }
+
}
diff --git a/ZR.Service/mes/wms/WMentryWarehousing_productService.cs b/ZR.Service/mes/wms/WMentryWarehousing_productService.cs
index d395e508..ab935226 100644
--- a/ZR.Service/mes/wms/WMentryWarehousing_productService.cs
+++ b/ZR.Service/mes/wms/WMentryWarehousing_productService.cs
@@ -276,17 +276,21 @@ namespace ZR.Service.mes.wms
if (isStrict && wmInfo.Remark != "临时")
{
//1.2 判断是否检验合格 入库检验
- WmFgentryInspect inspect = Context.Queryable()
- .LeftJoin((g, f) => g.PackageCode == f.Packcode)
- .Where(g => g.PackageCodeClient == resultionPackage.PatchCode)
- .Select((g, f) => new WmFgentryInspect()
- {
- Result = f.Result
-
- }).First();
- if (inspect == null || inspect.Result == 2)
+ string package_no = resultionPackage.PatchCode.Split("_")[1];
+ var inspect= Context.Queryable()
+ .Where(it => it.Workorder == resultionPackage.WorkoderID)
+ .Where(it => it.Packcode.EndsWith(package_no)).First();
+ if(inspect == null)
{
- return "该箱号GP12 检验不合格";
+ return "GP12 异常错误 null ";
+ }
+ if (inspect.Result == 2)
+ {
+ return "该箱号GP12 检验不合格,不得入库";
+ }
+ if (inspect.Result == 0|| inspect.Result==null)
+ {
+ return "该箱号GP12 未检验,不得入库";
}
// 3.isStrict = TRUE时判断是否是满箱标签
diff --git a/ZR.Service/mes/wms/WmFgentryInspectService.cs b/ZR.Service/mes/wms/WmFgentryInspectService.cs
index 4c08c3cd..70dec7ee 100644
--- a/ZR.Service/mes/wms/WmFgentryInspectService.cs
+++ b/ZR.Service/mes/wms/WmFgentryInspectService.cs
@@ -101,18 +101,24 @@ namespace ZR.Service.mes.wms
{
Workorder = it.Workorder,
ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0),
- // Result= SqlFunc.AggregateSum(it.Result??0),
- Partnumber = SqlFunc.AggregateMax(it.Partnumber)
- })
+ Packnum = SqlFunc.AggregateCount(it.Workorder),
+ Partnumber = SqlFunc.AggregateMax(it.Partnumber),
+ CreatedTime= SqlFunc.AggregateMax(it.CreatedTime),
+
+ })
.LeftJoin((s, w) => s.Workorder==w.ClientWorkorder)
.Select((s,w)=>new WmFgentryInspect_parentDto
{
Workorder= s.Workorder,
ProductionNum=s.ProductionNum,
Partnumber=s.Partnumber,
- ProductDescription=w.ProductDescription,
+ CreatedTime = s.CreatedTime,
+ Packnum = s.Packnum,
+ ProductDescription =w.ProductDescription,
Specifications=w.Specifications,
+ PreviousNumber = w.PreviousNumber,
Colour = w.Colour
+
})
.ToList();
@@ -126,7 +132,7 @@ namespace ZR.Service.mes.wms
}
- int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize);
+ //int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize);
var pageProducts = inspects.Skip((parm.PageNum - 1) * parm.PageSize).Take(parm.PageSize).ToList();
@@ -134,7 +140,8 @@ namespace ZR.Service.mes.wms
{
PageSize = parm.PageSize,
PageIndex = parm.PageNum,
- TotalPage = totalPages,
+ TotalNum= inspects.Count,
+
Result = pageProducts
};