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");