预任务申请 所有出库任务 增加是否签收判断
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using JNPF.Common.Contracts;
|
||||
using JNPF.Common.Security;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Tnb.WarehouseMgr.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 载具台账主表
|
||||
/// </summary>
|
||||
public partial class WmsCarryH
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否签收
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public int is_sign { get; set; }
|
||||
|
||||
}
|
||||
@@ -157,5 +157,9 @@ public partial class WmsPretaskH : BaseEntity<string>
|
||||
/// 优先级
|
||||
/// </summary>
|
||||
public int priority { get; set; } = 1;
|
||||
/// <summary>
|
||||
/// 优先级
|
||||
/// </summary>
|
||||
public int is_sign { get; set; } = 1;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Tnb.WarehouseMgr
|
||||
await _runService.Create(templateEntity, input);
|
||||
//入库取终点
|
||||
//var OutStockStrategyInput = new OutStockStrategyQuery { carry_id = input.data[nameof(OutStockStrategyQuery.carry_id)].ToString(), Size = 1 };
|
||||
var carry = await _db.Queryable<WmsCarryH>().FirstAsync(it => it.id == input.data[nameof(WmsMoveOutstock.carry_id)].ToString());
|
||||
var carry = await _db.Queryable<WmsCarryH>().FirstAsync(it => it.id == input.data[nameof(WmsMoveOutstock.carry_id)].ToString());
|
||||
WmsPointH sPoint = null;
|
||||
WmsPointH ePoint = null;
|
||||
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
||||
@@ -113,6 +113,11 @@ namespace Tnb.WarehouseMgr
|
||||
preTask.create_time = DateTime.Now;
|
||||
return preTask;
|
||||
}).ToList();
|
||||
//判断目标库位是否自动签收
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
if (loc.is_sign ==0 ) {
|
||||
preTasks[^1].is_sign = 1; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks,null);
|
||||
if (isOk)
|
||||
{
|
||||
|
||||
@@ -72,7 +72,8 @@ namespace Tnb.WarehouseMgr
|
||||
/*//入库取终点
|
||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);*/
|
||||
|
||||
//判断目标库位是否自动签收
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
//出库取起点,获取所有符合输入的载具规格的载具
|
||||
var setQty = await _db.Queryable<WmsEmptyOutstockH>().FirstAsync(it => it.bill_code == input.data[nameof(WmsEmptyOutstockH.bill_code)].ToString());
|
||||
var carrys = await _db.Queryable<WmsCarryH>().LeftJoin<BasLocation>((a, b) => a.location_id == b.id)
|
||||
@@ -131,6 +132,11 @@ namespace Tnb.WarehouseMgr
|
||||
return preTask;
|
||||
}).ToList();
|
||||
//更新页面
|
||||
//赋值签收状态
|
||||
if (loc.is_sign == 0)
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
isOk = await _wareHouseService.GenPreTask(preTasks, null);
|
||||
|
||||
}
|
||||
|
||||
@@ -114,8 +114,12 @@ namespace Tnb.WarehouseMgr
|
||||
preTask.create_time = DateTime.Now;
|
||||
return preTask;
|
||||
}).ToList();
|
||||
|
||||
//preTasks[^1].is_sign =1; 修改最后一个元素的是否签收值
|
||||
//判断目标库位是否自动签收
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
if (loc.is_sign == 0)
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks, null);
|
||||
if (isOk)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,9 @@ namespace Tnb.WarehouseMgr
|
||||
/*//入库取终点
|
||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);*/
|
||||
|
||||
//判断目标库位是否自动签收
|
||||
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
|
||||
//出库取起点,获取所有符合输入的载具规格的载具
|
||||
var setQty = await _db.Queryable<WmsEmptyOutstockH>().FirstAsync(it => it.bill_code == input.data[nameof(WmsEmptyOutstockH.bill_code)].ToString());
|
||||
var carrys = await _db.Queryable<WmsCarryH>().LeftJoin<BasLocation>((a, b) => a.location_id == b.id)
|
||||
@@ -130,6 +132,10 @@ namespace Tnb.WarehouseMgr
|
||||
return preTask;
|
||||
}).ToList();
|
||||
//更新页面
|
||||
if (loc.is_sign == 0)
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
isOk = await _wareHouseService.GenPreTask(preTasks, null);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user