This commit is contained in:
2024-06-06 16:39:05 +08:00
parent 9e177b69f7
commit 9b4a904b9b
5 changed files with 36 additions and 2 deletions

View File

@@ -187,5 +187,22 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// </summary> /// </summary>
public string di { get; set; } public string di { get; set; }
/// <summary>
/// 上料库位id
/// </summary>
public string? upmat_location_id { get; set; }
public string? upmat_location_code { get; set; }
/// <summary>
/// 下料库位id
/// </summary>
public string? downmat_location_id { get; set; }
public string? downmat_location_code { get; set; }
/// <summary>
/// 入库仓库id
/// </summary>
public string? instock_warehouse_id { get; set; }
} }
} }

View File

@@ -1559,6 +1559,8 @@ namespace Tnb.ProductionMgr
BasLocation location = null; BasLocation location = null;
try try
{ {
throw new Exception("测试错误");
await _db.Ado.BeginTranAsync(); await _db.Ado.BeginTranAsync();
int row = -1; int row = -1;
PrdMo prdMo = await db.Queryable<PrdMo>().SingleAsync(x => x.id == prdMoTask.mo_id); PrdMo prdMo = await db.Queryable<PrdMo>().SingleAsync(x => x.id == prdMoTask.mo_id);

View File

@@ -473,7 +473,10 @@ namespace Tnb.ProductionMgr
third_equip_code = l.equip_code, third_equip_code = l.equip_code,
weight_name = l.label_point, weight_name = l.label_point,
category_id = b.category_id, category_id = b.category_id,
as_location_id = f.as_location_id as_location_id = f.as_location_id,
upmat_location_id = f.upmat_location_id,
downmat_location_id = f.as_location_id,
instock_warehouse_id = f.as_location_id,
}) })
.MergeTable() .MergeTable()
.OrderBy($"{input.sidx} {input.sort}") .OrderBy($"{input.sidx} {input.sort}")
@@ -487,6 +490,16 @@ namespace Tnb.ProductionMgr
BasLocation basLocation = await _db.Queryable<BasLocation>().SingleAsync(x => x.id == item.as_location_id); BasLocation basLocation = await _db.Queryable<BasLocation>().SingleAsync(x => x.id == item.as_location_id);
item.as_location_code = basLocation.location_code; item.as_location_code = basLocation.location_code;
} }
if (item.upmat_location_id!=null && !item.upmat_location_id.IsEmpty())
{
BasLocation basLocation = await _db.Queryable<BasLocation>().SingleAsync(x => x.id == item.upmat_location_id);
item.upmat_location_code = basLocation.location_code;
}
if (item.downmat_location_id!=null && !item.downmat_location_id.IsEmpty())
{
BasLocation basLocation = await _db.Queryable<BasLocation>().SingleAsync(x => x.id == item.downmat_location_id);
item.downmat_location_code = basLocation.location_code;
}
if (item.schedule_type == 2) if (item.schedule_type == 2)
{ {

View File

@@ -106,7 +106,7 @@ namespace Tnb.ProductionMgr
["DevName"] = device, ["DevName"] = device,
["token"] = _eleCtlCfg.token, ["token"] = _eleCtlCfg.token,
["TagName"] = eqpDaq3.label_point, ["TagName"] = eqpDaq3.label_point,
["Value"] = "false", ["Value"] = "true",
}; };
Log.Information($"称重完成参数:{JsonConvert.SerializeObject(dicCommand2)}"); Log.Information($"称重完成参数:{JsonConvert.SerializeObject(dicCommand2)}");
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)

View File

@@ -6,6 +6,8 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile> <GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;tianyi</Configurations> <Configurations>Debug;Release;tianyi</Configurations>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>