From 9b4a904b9b95fc8675c1d4d887f15d8c2457d3c3 Mon Sep 17 00:00:00 2001
From: zhou keda <1315948824@qq.com>
Date: Thu, 6 Jun 2024 16:39:05 +0800
Subject: [PATCH] bug
---
.../Dto/PrdManage/PADPackageTaskPageOutput.cs | 17 +++++++++++++++++
.../Tnb.ProductionMgr/PrdMoTaskService.cs | 2 ++
.../Tnb.ProductionMgr/PrdPackReportService.cs | 15 ++++++++++++++-
.../Tnb.ProductionMgr/RedisDataService.cs | 2 +-
.../Tnb.ProductionMgr/Tnb.ProductionMgr.csproj | 2 ++
5 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs
index a0587d74..a29d841e 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PADPackageTaskPageOutput.cs
@@ -187,5 +187,22 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
///
public string di { get; set; }
+ ///
+ /// 上料库位id
+ ///
+ public string? upmat_location_id { get; set; }
+ public string? upmat_location_code { get; set; }
+
+ ///
+ /// 下料库位id
+ ///
+ public string? downmat_location_id { get; set; }
+ public string? downmat_location_code { get; set; }
+
+ ///
+ /// 入库仓库id
+ ///
+ public string? instock_warehouse_id { get; set; }
+
}
}
\ No newline at end of file
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
index b9f90097..0cda4d3e 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
@@ -1559,6 +1559,8 @@ namespace Tnb.ProductionMgr
BasLocation location = null;
try
{
+ throw new Exception("测试错误");
+
await _db.Ado.BeginTranAsync();
int row = -1;
PrdMo prdMo = await db.Queryable().SingleAsync(x => x.id == prdMoTask.mo_id);
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs
index bf8c8a66..de750ee1 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs
@@ -473,7 +473,10 @@ namespace Tnb.ProductionMgr
third_equip_code = l.equip_code,
weight_name = l.label_point,
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()
.OrderBy($"{input.sidx} {input.sort}")
@@ -487,6 +490,16 @@ namespace Tnb.ProductionMgr
BasLocation basLocation = await _db.Queryable().SingleAsync(x => x.id == item.as_location_id);
item.as_location_code = basLocation.location_code;
}
+ if (item.upmat_location_id!=null && !item.upmat_location_id.IsEmpty())
+ {
+ BasLocation basLocation = await _db.Queryable().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().SingleAsync(x => x.id == item.downmat_location_id);
+ item.downmat_location_code = basLocation.location_code;
+ }
if (item.schedule_type == 2)
{
diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs b/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs
index 0061a0b6..1cdf43ef 100644
--- a/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs
@@ -106,7 +106,7 @@ namespace Tnb.ProductionMgr
["DevName"] = device,
["token"] = _eleCtlCfg.token,
["TagName"] = eqpDaq3.label_point,
- ["Value"] = "false",
+ ["Value"] = "true",
};
Log.Information($"称重完成参数:{JsonConvert.SerializeObject(dicCommand2)}");
for (int i = 0; i < 5; i++)
diff --git a/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj b/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj
index fd26adc3..72be0cb3 100644
--- a/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj
+++ b/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj
@@ -6,6 +6,8 @@
enable
True
Debug;Release;tianyi
+ full
+ true