This commit is contained in:
qianhao.xu
2024-04-22 10:36:40 +08:00
parent f1507365ed
commit d688fd7f9b
5 changed files with 50 additions and 16 deletions

View File

@@ -276,17 +276,21 @@ namespace ZR.Service.mes.wms
if (isStrict && wmInfo.Remark != "临时")
{
//1.2 判断是否检验合格 入库检验
WmFgentryInspect inspect = Context.Queryable<WmGoodsNowProduction>()
.LeftJoin<WmFgentryInspect>((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<WmFgentryInspect>()
.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时判断是否是满箱标签

View File

@@ -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<ProWorkorder_v2>((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
};