From 10d7470b56c9825ffa3d665b8367dd608d024177 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Sat, 12 Oct 2024 11:34:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E7=A9=BA=E7=AE=B1=E9=85=8D?= =?UTF-8?q?=E9=80=81=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EquipMgr/Tnb.EquipMgr.Entities/Dto/EquipListOuput.cs | 2 ++ EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpEquipment.cs | 6 ++++++ EquipMgr/Tnb.EquipMgr/EquipmentService.cs | 11 +++++++++++ ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/EquipListOuput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/EquipListOuput.cs index 740787a3..c719b614 100644 --- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/EquipListOuput.cs +++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/EquipListOuput.cs @@ -225,6 +225,8 @@ public partial class EquipListOuput public string? as_location_id { get; set; } public string? as_location_id_id { get; set; } + + public string is_send { get; set; } } diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpEquipment.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpEquipment.cs index 9a3d9f55..a310d400 100644 --- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpEquipment.cs +++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpEquipment.cs @@ -233,4 +233,10 @@ public partial class EqpEquipment : BaseEntity /// 截料阀 /// public string stop_valve { get; set; } + + /// + /// 注塑空载具是否配送 + /// + public int is_send { get; set; } + } diff --git a/EquipMgr/Tnb.EquipMgr/EquipmentService.cs b/EquipMgr/Tnb.EquipMgr/EquipmentService.cs index ab32e0fa..e6f6d370 100644 --- a/EquipMgr/Tnb.EquipMgr/EquipmentService.cs +++ b/EquipMgr/Tnb.EquipMgr/EquipmentService.cs @@ -128,6 +128,7 @@ namespace Tnb.EquipMgr qrcode = a.qrcode, as_location_id = h.location_name, as_location_id_id = a.as_location_id, + is_send = a.is_send==1 ? "是" : "否", }).ToPagedListAsync(input.currentPage,input.pageSize); return PageResult.SqlSugarPageResult(result); @@ -324,5 +325,15 @@ namespace Tnb.EquipMgr string qrcode = dic["qrcode"]; return await _repository.GetSingleAsync(x => x.qrcode == qrcode); } + + [HttpPost] + public async Task SaveSend(string id) + { + await _repository.AsSugarClient().Updateable() + .SetColumns(x => x.is_send == 1 - x.is_send) + .Where(x => x.id == id) + .ExecuteCommandAsync(); + return "成功"; + } } } \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 5a19c624..cd610162 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -512,7 +512,7 @@ namespace Tnb.ProductionMgr string msg = ""; List equipments = await _db.Queryable() .InnerJoin((x, y) => x.id == y.equip_type_id) - .Where((x, y) => x.code == "ZSJ") + .Where((x, y) => x.code == "ZSJ" && y.is_send==1) .Select((x, y) => y).ToListAsync(); int cs01Count = await _redisData.TryGetValueByKeyField("YTCS", "EmptyNo_CS01");