生产退料,暂存仓配送优化
This commit is contained in:
@@ -89,14 +89,23 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
try
|
||||
{
|
||||
JObject queryJson = null;
|
||||
if (!string.IsNullOrEmpty(input.queryJson))
|
||||
{
|
||||
queryJson = JObject.Parse(input.queryJson);
|
||||
}
|
||||
|
||||
|
||||
SqlSugarPagedList<WmsMaterialTransfer> result = await _db.Queryable<WmsMaterialTransfer>()
|
||||
.InnerJoin<DictionaryDataEntity>((a, b) => a.status == b.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, e) => e.id == a.warehouse_instock)
|
||||
.InnerJoin<DictionaryDataEntity>((a, b, c, d, e, f) => a.type == f.EnCode)
|
||||
// 只显示未完成的单据
|
||||
.Where( a => a.status != "25065149810453")
|
||||
.Select((a, b, c, d, e) => new WmsMaterialTransfer
|
||||
.Where(a => a.status != "25065149810453")
|
||||
.WhereIF(queryJson != null, a => a.type == queryJson["type"].ToString())
|
||||
.Select((a, b, c, d, e, f) => new WmsMaterialTransfer
|
||||
{
|
||||
id = a.id,
|
||||
create_id = c.RealName,
|
||||
@@ -111,7 +120,7 @@ namespace Tnb.WarehouseMgr
|
||||
bill_date = a.bill_date,
|
||||
warehouse_outstock = d.whname,
|
||||
warehouse_instock = e.whname,
|
||||
type = a.type,
|
||||
type = f.FullName,
|
||||
biller_out = a.biller_out,
|
||||
depart_out = a.depart_out,
|
||||
biller_in = a.biller_in,
|
||||
@@ -967,6 +976,13 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
try
|
||||
{
|
||||
List<WmsCarryD> wmsCarryDs = _db.Queryable<WmsCarryD>().Where(r => r.carry_id == wmsCarryH.id).ToList();
|
||||
if (wmsCarryDs.Count > 0)
|
||||
{
|
||||
Logger.LogWarning($"【RackInstock】料架{wmsCarryH.carry_code}下有料箱未解绑!");
|
||||
throw new AppFriendlyException($"【RackInstock】料架{wmsCarryH.carry_code}下有料箱未解绑!", 500);
|
||||
}
|
||||
|
||||
BasLocation startlocation = _db.Queryable<BasLocation>().Where(r => r.id == input.startlocation_id).First();
|
||||
if (startlocation == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user