diff --git a/DOAN.Admin.WebApi/Controllers/MES/BigScreen/product/Product2Controller.cs b/DOAN.Admin.WebApi/Controllers/MES/BigScreen/product/Product2Controller.cs index 97613d5..67d0595 100644 --- a/DOAN.Admin.WebApi/Controllers/MES/BigScreen/product/Product2Controller.cs +++ b/DOAN.Admin.WebApi/Controllers/MES/BigScreen/product/Product2Controller.cs @@ -20,5 +20,91 @@ namespace DOAN.WebApi.Controllers.MES.BigScreen { productBigScreenService = _product2BigScreenService; } + + + /// + /// 数字牌 + /// + /// + [HttpGet("getMoudle01")] + public IActionResult GetMoudle01() + { + var response = productBigScreenService.GetMoudle01(); + return SUCCESS(response); + } + + /// + /// 班组进度统计 + /// + /// + [HttpGet("getMoudle02")] + public IActionResult GetMoudle02() + { + var response = productBigScreenService.GetMoudle02(); + return SUCCESS(response); + } + + /// + /// 昨天 班组报工数 和计划数对比 + /// + /// + [HttpGet("getMoudle03")] + public IActionResult GetMoudle03() + { + var response = productBigScreenService.GetMoudle03(); + return SUCCESS(response); + + } + + /// + /// 上周 班组报工数 和计划数对比 + /// + /// + + [HttpGet("getMoudle04")] + public IActionResult GetMoudle04() + { + var response = productBigScreenService.GetMoudle04(); + return SUCCESS(response); + } + + + /// + /// 今天异常工单 + /// + /// + [HttpGet("getMoudle05")] + public IActionResult GetMoudle05() + { + var response = productBigScreenService.GetMoudle05(); + return SUCCESS(response); + } + + /// + /// 近7天 异常工单占比 + /// + /// + [HttpGet("getMoudle06")] + public IActionResult GetMoudle06() + { + var response = productBigScreenService.GetMoudle06(); + return SUCCESS(response); + } + + + [HttpGet("getMoudle07")] + public IActionResult GetMoudle07() + { + var response = productBigScreenService.GetMoudle07(); + return SUCCESS(response); + } + + + [HttpGet("getMoudle08")] + public IActionResult GetMoudle08() + { + var response = productBigScreenService.GetMoudle08(); + return SUCCESS(response); + } } } \ No newline at end of file diff --git a/DOAN.Admin.WebApi/Controllers/MES/mm/line_sider/MmLinesidebarInventoryCheckController.cs b/DOAN.Admin.WebApi/Controllers/MES/mm/line_sider/MmLinesidebarInventoryCheckController.cs index d728ebd..f09d049 100644 --- a/DOAN.Admin.WebApi/Controllers/MES/mm/line_sider/MmLinesidebarInventoryCheckController.cs +++ b/DOAN.Admin.WebApi/Controllers/MES/mm/line_sider/MmLinesidebarInventoryCheckController.cs @@ -37,17 +37,29 @@ namespace DOAN.Admin.WebApi.Controllers } + //TODO 获取盘点详情 + [HttpPost("get_detail")] + public IActionResult GetDetail(string id) + { + if(string.IsNullOrEmpty(id)) throw new CustomException("id is empty"); + var response = _mmLinesidebarInventoryCheckService.GetDetail(id); + + return SUCCESS(response); + + } + + //TODO 校正 [HttpGet("correcting")] - public IActionResult Correcting(string id) + public IActionResult Correcting(string[] ids) { - if (string.IsNullOrEmpty(id)) throw new CustomException("id is empty"); - var response = _mmLinesidebarInventoryCheckService.Correcting(id); + if (ids==null||ids.Length==0) throw new CustomException("id is empty"); + var response = _mmLinesidebarInventoryCheckService.Correcting(ids); return SUCCESS(response); } - //TODO 修改 + //TODO 修改 用于填写实际数量,和异常原因备注 [HttpPut] [Log(Title = "线边库库存盘点", BusinessType = BusinessType.UPDATE)] diff --git a/DOAN.Service/MES/bigScreen/IService/IProduct2BigScreenService.cs b/DOAN.Service/MES/bigScreen/IService/IProduct2BigScreenService.cs index 27f53e2..0f295fa 100644 --- a/DOAN.Service/MES/bigScreen/IService/IProduct2BigScreenService.cs +++ b/DOAN.Service/MES/bigScreen/IService/IProduct2BigScreenService.cs @@ -1,6 +1,16 @@ +using DOAN.Model.mes.echarts; using DOAN.Model.MES.product; namespace DOAN.Service.MES.bigScreen.IService; public interface IProduct2BigScreenService : IBaseService -{} \ No newline at end of file +{ + EchartsOptions GetMoudle01(); + EchartsOptions GetMoudle02(); + EchartsOptions GetMoudle03(); + EchartsOptions GetMoudle04(); + EchartsOptions GetMoudle05(); + EchartsOptions GetMoudle06(); + EchartsOptions GetMoudle07(); + EchartsOptions GetMoudle08(); +} \ No newline at end of file diff --git a/DOAN.Service/MES/bigScreen/Product2BigScreenService.cs b/DOAN.Service/MES/bigScreen/Product2BigScreenService.cs index e38c2df..c2ba78a 100644 --- a/DOAN.Service/MES/bigScreen/Product2BigScreenService.cs +++ b/DOAN.Service/MES/bigScreen/Product2BigScreenService.cs @@ -1,16 +1,70 @@ +using DOAN.Model.mes.echarts; using DOAN.Model.MES.product; using DOAN.Service.MES.bigScreen.IService; using Infrastructure.Attribute; namespace DOAN.Service.MES.bigScreen { - + /// - /// 生产大屏 + /// 生产大屏 2 /// [AppService(ServiceType = typeof(IProduct2BigScreenService), ServiceLifetime = LifeTime.Transient)] public class Product2BigScreenService : BaseService, IProduct2BigScreenService - {} + { + public EchartsOptions GetMoudle01() + { + + return null; + } + + public EchartsOptions GetMoudle02() + { + return null; + } + + public EchartsOptions GetMoudle03() + { + return null; + } + + public EchartsOptions GetMoudle04() + { + return null; + + + } + + public EchartsOptions GetMoudle05() + { + return null; + } + + public EchartsOptions GetMoudle06() + { + return null; + } + + public EchartsOptions GetMoudle07() + { + return null; + } + + public EchartsOptions GetMoudle08() + { + return null; + } + + public EchartsOptions GetMoudle09() + { + return null; + } + + public EchartsOptions GetMoudle10() + { + return null; + } + } } diff --git a/DOAN.Service/MES/mm/IService/IMmLinesidebarInventoryCheckService.cs b/DOAN.Service/MES/mm/IService/IMmLinesidebarInventoryCheckService.cs index b5f0959..50260ce 100644 --- a/DOAN.Service/MES/mm/IService/IMmLinesidebarInventoryCheckService.cs +++ b/DOAN.Service/MES/mm/IService/IMmLinesidebarInventoryCheckService.cs @@ -11,7 +11,9 @@ namespace DOAN.Service.MES.mm.IService PagedInfo GetList(MmInventoryCheckLogQueryDto parm); - bool Correcting(string id); + MmInventoryCheckLog GetDetail(string id); + + bool Correcting(string[] ids); int UpdateMmInventoryCheckLog(MmInventoryCheckLog model); } diff --git a/DOAN.Service/MES/mm/MmLinesidebarInventoryCheckServcie.cs b/DOAN.Service/MES/mm/MmLinesidebarInventoryCheckServcie.cs index 7c4217a..dab7f2b 100644 --- a/DOAN.Service/MES/mm/MmLinesidebarInventoryCheckServcie.cs +++ b/DOAN.Service/MES/mm/MmLinesidebarInventoryCheckServcie.cs @@ -69,30 +69,35 @@ namespace DOAN.Service.MES.mm /// /// /// - public bool Correcting(string id) + public bool Correcting(string[] ids) { bool result = false; UseTran2(() => { - Context.Updateable().Where(it => it.LineCode == id) + Context.Updateable().Where(it => ids.Contains(it.Id)) .SetColumns(it => it.IsCorrecting == 1) .ExecuteCommand(); result = Context.Updateable().Where(it => - it.LineCode == SqlFunc.Subqueryable().Where(it => it.Id == id) + it.LineCode == SqlFunc.Subqueryable().Where(it => ids.Contains(it.Id)) .Select(it => it.LineCode)) .Where(it => it.MaterialCode == SqlFunc.Subqueryable() - .Where(it => it.Id == id) + .Where(it => ids.Contains(it.Id)) .Select(it => it.MaterialCode)) .SetColumns(it => it.LogicQuantity == SqlFunc.Subqueryable() - .Where(it => it.Id == id).Select(it => it.ActualQuantity)) + .Where(it =>ids.Contains(it.Id)).Select(it => it.ActualQuantity)) .ExecuteCommandHasChange(); }); return result; } + public MmInventoryCheckLog GetDetail(string id) + { + return Queryable().Where(it => it.Id == id).First(); + } + public int UpdateMmInventoryCheckLog(MmInventoryCheckLog model) { return Update(model, true); diff --git a/DOAN.Service/Mobile/PADReportWorkService.cs b/DOAN.Service/Mobile/PADReportWorkService.cs index c3a93f4..d90b845 100644 --- a/DOAN.Service/Mobile/PADReportWorkService.cs +++ b/DOAN.Service/Mobile/PADReportWorkService.cs @@ -38,7 +38,7 @@ namespace DOAN.Service.Mobile else { //新增 - var handle_workorder= Context.Queryable().Where(it => it.Workorder == wokorder).First(); + var handle_workorder= Context.Queryable().Where(it => it.Workorder == wokorder).First(); var reportWork = new ProReportwork(); reportWork.Id = XueHua; reportWork.FkWorkorder = wokorder;