仓库-零头箱查询功能优化

This commit is contained in:
2024-04-29 09:32:04 +08:00
parent a5ff6f019b
commit c99118ea02

View File

@@ -282,7 +282,7 @@ namespace ZR.Service.mes.wms
.Where(it => it.Packcode.EndsWith(package_no)).First();
if(inspect == null)
{
return "GP12 异常错误 null ";
return "GP12 异常错误 GP12无此箱记录 ";
}
if (inspect.Result == 2)
{
@@ -297,7 +297,9 @@ namespace ZR.Service.mes.wms
string packingCode = resultionPackage.PatchCode.Split('_')[1];
bool isExist = Context.Queryable<WmPackingrecord>()
.Where(it => it.WorkOrderNum == resultionPackage.WorkoderID)
.Where(it => it.PackingCode.EndsWith(packingCode))
// .Where(it => it.PackingCode.EndsWith(packingCode))
// .Where(it => packingCode == int.Parse(it.PackingCode.Substring(7)).ToString())
.Where(it => packingCode == int.Parse( SqlFunc.Right(it.PackingCode,5)).ToString())
.Where(it => it.BFilled == true)
.Any();
if (!isExist)