Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -101,7 +101,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
.InnerJoin<UserEntity>((a, b, c) => c.Id == a.create_id)
|
.InnerJoin<UserEntity>((a, b, c) => c.Id == a.create_id)
|
||||||
.InnerJoin<BasWarehouse>((a, b, c, d) => d.id == a.warehouse_outstock)
|
.InnerJoin<BasWarehouse>((a, b, c, d) => d.id == a.warehouse_outstock)
|
||||||
.InnerJoin<BasWarehouse>((a, b, c, d, e) => e.id == a.warehouse_instock)
|
.InnerJoin<BasWarehouse>((a, b, c, d, e) => e.id == a.warehouse_instock)
|
||||||
.InnerJoin<DictionaryDataEntity>((a, b, c, d, e, f) => a.type == f.EnCode)
|
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e, f) => a.type == f.EnCode)
|
||||||
// 只显示未完成的单据
|
// 只显示未完成的单据
|
||||||
.Where(a => a.status != "25065149810453")
|
.Where(a => a.status != "25065149810453")
|
||||||
.WhereIF(queryJson != null, a => a.type == queryJson["type"].ToString())
|
.WhereIF(queryJson != null, a => a.type == queryJson["type"].ToString())
|
||||||
|
|||||||
@@ -136,15 +136,14 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
BasLocation endlocation = rackEndLocations.First();
|
BasLocation endlocation = rackEndLocations.First();
|
||||||
|
|
||||||
var memberCarryCodes = _db.Queryable<WmsCarryD>()
|
var memberCarryCodes = _db.Queryable<WmsCarryH>()
|
||||||
.InnerJoin<WmsCarryH>((a, b) => a.membercarry_id == b.id)
|
.InnerJoin<WmsCarryCode>((a, b) => a.id == b.carry_id)
|
||||||
.InnerJoin<WmsCarryCode>((a, b, c) => b.id == c.carry_id)
|
.Where((a, b) => input.details.Select(r => r.carry_code).Contains(a.carry_code)).Select((a, b) => new
|
||||||
.Where((a, b, c) => a.carry_id == wmsCarryH.id).Select((a, b, c) => new
|
|
||||||
{
|
{
|
||||||
carry_code = b.carry_code,
|
carry_code = a.carry_code,
|
||||||
barcode = c.barcode,
|
barcode = b.barcode,
|
||||||
material_id = c.material_id,
|
material_id = b.material_id,
|
||||||
material_code = c.material_code,
|
material_code = b.material_code,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
List<string> matIds = memberCarryCodes.Select(r => r.material_id).Distinct().ToList();
|
List<string> matIds = memberCarryCodes.Select(r => r.material_id).Distinct().ToList();
|
||||||
@@ -243,8 +242,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(input.carry_code))
|
if (string.IsNullOrEmpty(input.carry_code))
|
||||||
{
|
{
|
||||||
Logger.LogWarning($"【PrdReturn】料架不能为空!{input.carry_code}");
|
Logger.LogWarning($"【PrdReturn】料架/载运小车不能为空!{input.carry_code}");
|
||||||
throw new AppFriendlyException($"【PrdReturn】料架不能为空!{input.carry_code}!", 500);
|
throw new AppFriendlyException($"【PrdReturn】料架/载运小车不能为空!{input.carry_code}!", 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 找到未占用且未锁定的库位
|
// 找到未占用且未锁定的库位
|
||||||
@@ -287,17 +286,17 @@ namespace Tnb.WarehouseMgr
|
|||||||
string msg = "";
|
string msg = "";
|
||||||
foreach (var row in existsMat)
|
foreach (var row in existsMat)
|
||||||
{
|
{
|
||||||
msg += $",料箱{row.carry_code} 条码{row.barcode}";
|
msg += $",料架/载运小车{row.carry_code} 条码{row.barcode}";
|
||||||
}
|
}
|
||||||
Logger.LogWarning($"【PrdReturn】存在装有与生产退料单明细不匹配物料的料箱,请检查! {msg.Trim(',')}");
|
Logger.LogWarning($"【PrdReturn】存在装有与生产退料单明细不匹配物料的料架/载运小车,请检查! {msg.Trim(',')}");
|
||||||
throw new AppFriendlyException($"【PrdReturn】存在装有与生产退料单明细不匹配物料的料箱,请检查!{msg.Trim(',')}", 500);
|
throw new AppFriendlyException($"【PrdReturn】存在装有与生产退料单明细不匹配物料的料架/载运小车,请检查!{msg.Trim(',')}", 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
WmsPretaskH wmsPretaskH = _db.Queryable<WmsPretaskH>().Where(r => r.carry_code == wmsCarryH.carry_code && r.status != WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID).First();
|
WmsPretaskH wmsPretaskH = _db.Queryable<WmsPretaskH>().Where(r => r.carry_code == wmsCarryH.carry_code && r.status != WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID).First();
|
||||||
if (wmsPretaskH != null)
|
if (wmsPretaskH != null)
|
||||||
{
|
{
|
||||||
Logger.LogWarning($"【CallRackToProductionLine】此料架{wmsCarryH.carry_code}存在未完成的预任务{wmsPretaskH.bill_code}!");
|
Logger.LogWarning($"【CallRackToProductionLine】此料架/载运小车{wmsCarryH.carry_code}存在未完成的预任务{wmsPretaskH.bill_code}!");
|
||||||
throw new AppFriendlyException($"此料架{wmsCarryH.carry_code}存在未完成的预任务{wmsPretaskH.bill_code}!", 500);
|
throw new AppFriendlyException($"此料架/载运小车{wmsCarryH.carry_code}存在未完成的预任务{wmsPretaskH.bill_code}!", 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user