Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -60,7 +60,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
var eles = await _db.Queryable<WmsElevatorH>().LeftJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
var eles = await _db.Queryable<WmsElevatorH>().LeftJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
||||||
.LeftJoin<WmsDistaskH>((a, b, c) => b.location_id == c.startlocation_id)
|
.LeftJoin<WmsDistaskH>((a, b, c) => b.location_id == c.startlocation_id)
|
||||||
.Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == $"{input.taskChainCode}-{input.taskCode}")
|
.Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == input.taskCode)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
@@ -83,7 +83,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
var eles = await _db.Queryable<WmsElevatorH>().LeftJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
var eles = await _db.Queryable<WmsElevatorH>().LeftJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
||||||
.LeftJoin<WmsDistaskH>((a, b, c) => b.location_id == c.endlocation_id)
|
.LeftJoin<WmsDistaskH>((a, b, c) => b.location_id == c.endlocation_id)
|
||||||
.Where((a, b, c) => c.endlocation_code == input.targetName && c.bill_code == $"{input.taskChainCode}-{input.taskCode}")
|
.Where((a, b, c) => c.endlocation_code == input.targetName && c.bill_code == input.taskCode)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
@@ -141,7 +141,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var disTasks = await _db.Queryable<WmsDistaskH>().Where(it => it.bill_code.Contains($"{input.taskChainCode}-{input.taskCode}")).ToListAsync();
|
var disTasks = await _db.Queryable<WmsDistaskH>().Where(it => it.bill_code.Contains(input.taskCode)).ToListAsync();
|
||||||
if (input.action == "取货")
|
if (input.action == "取货")
|
||||||
{
|
{
|
||||||
TaskExecuteAfterUpInput taskExecuteAfterUpInput = new()
|
TaskExecuteAfterUpInput taskExecuteAfterUpInput = new()
|
||||||
@@ -179,7 +179,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
var eles = await _db.Queryable<WmsElevatorH>().LeftJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
var eles = await _db.Queryable<WmsElevatorH>().LeftJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
||||||
.LeftJoin<WmsDistaskH>((a, b, c) => b.location_id == c.startlocation_id)
|
.LeftJoin<WmsDistaskH>((a, b, c) => b.location_id == c.startlocation_id)
|
||||||
.Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == $"{input.taskChainCode}-{input.taskCode}")
|
.Where((a, b, c) => c.startlocation_code == input.sourceName && c.bill_code == input.taskCode)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
int row = 0;
|
int row = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//例1 获取所有表
|
|
||||||
|
|
||||||
List<Dictionary<string, object>> dics = await ImportExcelToMemory(file);
|
List<Dictionary<string, object>> dics = await ImportExcelToMemory(file);
|
||||||
List<BasLocation> locs = new List<BasLocation>();
|
List<BasLocation> locs = new List<BasLocation>();
|
||||||
BasLocation loc = new BasLocation();
|
BasLocation loc = new BasLocation();
|
||||||
@@ -55,16 +53,16 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
locs.ForEach(x =>
|
locs.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.id = SnowflakeIdHelper.NextId();
|
x.id = SnowflakeIdHelper.NextId();
|
||||||
x.org_id = _userManager.User.OrganizeId;
|
x.org_id = _userManager.User.OrganizeId;
|
||||||
x.is_lock = 0;
|
x.is_lock = 0;
|
||||||
x.create_id = _userManager.UserId;
|
x.create_id = _userManager.UserId;
|
||||||
x.create_time = DateTime.Now;
|
x.create_time = DateTime.Now;
|
||||||
x.modify_id = null;
|
x.modify_id = null;
|
||||||
x.modify_time = null;
|
x.modify_time = null;
|
||||||
x.is_mix = 1;
|
x.is_mix = 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
row = await _db.Insertable(locs).ExecuteCommandAsync();
|
row = await _db.Insertable(locs).ExecuteCommandAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user