bug
This commit is contained in:
@@ -65,19 +65,23 @@ namespace Tnb.WarehouseMgr
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
|
var Location = await _db.Queryable<BasLocation>().FirstAsync(it => it.location_code == input.data["location_code"].ToString());
|
||||||
|
input.data.Add("warehouse_id", Location.wh_id);
|
||||||
|
input.data.Add("location_id", Location.id);
|
||||||
|
input.data.Add("status", "25065138925589");
|
||||||
//入库取终点 //出库起点
|
//入库取终点 //出库起点
|
||||||
InStockStrategyQuery inStockStrategyInput = new() { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString()!, Size = 1 };
|
InStockStrategyQuery inStockStrategyInput = new() { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString()!, Size = 1 };
|
||||||
List<BasLocation> endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
List<BasLocation> endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||||
WmsPointH? sPoint = null;
|
WmsPointH? sPoint = null;
|
||||||
WmsPointH? ePoint = null;
|
WmsPointH? ePoint = null;
|
||||||
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
if (input.data.ContainsKey("location_code"))
|
||||||
{
|
{
|
||||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_code == input.data["location_code"].ToString());
|
||||||
}
|
}
|
||||||
if (endLocations?.Count > 0)
|
if (endLocations?.Count > 0)
|
||||||
{
|
{
|
||||||
WmsCarryH carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == input.data[nameof(WmsCarryD.carry_id)].ToString());
|
WmsCarryH carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.data["carry_code"].ToString());
|
||||||
|
input.data.Add("carry_id", carry.id);
|
||||||
BasLocation loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == endLocations[0].id);
|
BasLocation loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == endLocations[0].id);
|
||||||
bool isMatch = await IsCarryAndLocationMatchByCarryStd(carry, loc);
|
bool isMatch = await IsCarryAndLocationMatchByCarryStd(carry, loc);
|
||||||
if (!isMatch)
|
if (!isMatch)
|
||||||
@@ -141,8 +145,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
preTask.require_code = input.data[nameof(preTask.bill_code)]?.ToString()!;
|
preTask.require_code = input.data[nameof(preTask.bill_code)]?.ToString()!;
|
||||||
preTask.create_id = _userManager.UserId;
|
preTask.create_id = _userManager.UserId;
|
||||||
preTask.create_time = DateTime.Now;
|
preTask.create_time = DateTime.Now;
|
||||||
preTask.source_id = input.data[nameof(WmsKittingInstock.source_id)].ToString();
|
preTask.source_id = "";
|
||||||
preTask.source_code = input.data[nameof(WmsKittingInstock.source_code)].ToString();
|
preTask.source_code = "";
|
||||||
return preTask;
|
return preTask;
|
||||||
}).ToList();
|
}).ToList();
|
||||||
List<WmsCarryCode> carryCodes = new();
|
List<WmsCarryCode> carryCodes = new();
|
||||||
@@ -220,8 +224,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
location_id = preTaskUpInput.CarryStartLocationId,
|
location_id = preTaskUpInput.CarryStartLocationId,
|
||||||
location_code = preTaskUpInput.CarryStartLocationCode,
|
location_code = preTaskUpInput.CarryStartLocationCode,
|
||||||
carry_status = ((int)EnumCarryStatus.齐套).ToString(),
|
carry_status = ((int)EnumCarryStatus.齐套).ToString(),
|
||||||
collocation_scheme_id = input.data[nameof(WmsKittingInstock.collocation_scheme_id)].ToString(),
|
// collocation_scheme_id = input.data[nameof(WmsKittingInstock.collocation_scheme_id)].ToString(),
|
||||||
collocation_scheme_code = input.data[nameof(WmsKittingInstock.collocation_scheme_code)].ToString()
|
// collocation_scheme_code = input.data[nameof(WmsKittingInstock.collocation_scheme_code)].ToString()
|
||||||
},
|
},
|
||||||
it => new BasLocation { is_lock = 1 });
|
it => new BasLocation { is_lock = 1 });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user