Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -526,7 +526,16 @@ namespace Tnb.ProductionMgr
|
||||
Log.Information($"签收载具信息{JsonConvert.SerializeObject(carryCodes)}");
|
||||
foreach (var item in carryCodes)
|
||||
{
|
||||
|
||||
PrdMaterialReceiptD existD = await db.Queryable<PrdMaterialReceiptD>()
|
||||
.LeftJoin<PrdMaterialReceiptH>((x, y) => x.material_receipt_id == y.id)
|
||||
.Where((x, y) => x.carry_id == carry.id && y.mo_task_id == moTask.id && x.is_all_feeding == 0)
|
||||
.Select((x,y)=>x)
|
||||
.FirstAsync();
|
||||
if (existD != null)
|
||||
{
|
||||
throw new Exception($"{moTask.mo_task_code}任务单存在未投完的签收物料,物料签收子表id{existD.id}");
|
||||
}
|
||||
|
||||
insertDList.Add(new PrdMaterialReceiptD
|
||||
{
|
||||
material_receipt_id = prdMaterialReceiptH.id,
|
||||
|
||||
@@ -4029,7 +4029,7 @@ namespace Tnb.ProductionMgr
|
||||
batch = $"{organizeEntity.EnCode.Substring(organizeEntity.EnCode.Length - 2, 2)}{DateTime.Now.ToString("yyMMdd")}";
|
||||
}
|
||||
|
||||
string code = $"(01){basMaterial.di ?? ""}*(11){DateTime.Now.ToString("yyMMdd")}*(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}*(10){batch}#{basMaterial.material_specification}*{batch}*{DateTime.Now.ToString("yyyyMMdd")}*{DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyyyMMdd")}*{basMaterial.container_no}";
|
||||
string code = $"(01){basMaterial.di ?? ""}*(11){DateTime.Now.ToString("yyMMdd")}*(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}*(10){batch}#{basMaterial.material_specification}*{batch}*{DateTime.Now.ToString("yyyyMMdd")}*{DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyyyMMdd")}*{basMaterial.material_standard}";
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,24 @@ namespace Tnb.ProductionMgr
|
||||
// Log.Information($"{device},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
|
||||
// }
|
||||
// }
|
||||
string equipStatus = await _redisData.GetHash(device, "1 启动2停止 3手动4急停");
|
||||
Log.Information($"换箱机状态:{equipStatus}");
|
||||
if (equipStatus != "1")
|
||||
{
|
||||
if (equipStatus.Trim() == "2")
|
||||
{
|
||||
throw Oops.Bah("换箱机状态为停止");
|
||||
}
|
||||
if (equipStatus.Trim() == "3")
|
||||
{
|
||||
throw Oops.Bah("换箱机状态为手动");
|
||||
}
|
||||
if (equipStatus.Trim() == "4")
|
||||
{
|
||||
throw Oops.Bah("换箱机状态为急停");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user