diff --git a/.vs/Admin.Core/FileContentIndex/0c7a6718-2ab1-43b1-b53f-b81d8d7092d6.vsidx b/.vs/Admin.Core/FileContentIndex/0c7a6718-2ab1-43b1-b53f-b81d8d7092d6.vsidx deleted file mode 100644 index 1904b341..00000000 Binary files a/.vs/Admin.Core/FileContentIndex/0c7a6718-2ab1-43b1-b53f-b81d8d7092d6.vsidx and /dev/null differ diff --git a/.vs/Admin.Core/v17/.suo b/.vs/Admin.Core/v17/.suo index 4521be79..1f26c8d0 100644 Binary files a/.vs/Admin.Core/v17/.suo and b/.vs/Admin.Core/v17/.suo differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 895e7ac3..97e8944b 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/Admin.Core.IService/IService_New/IProductPlanInfoServices.cs b/Admin.Core.IService/IService_New/IProductPlanInfoServices.cs index 5d7eb804..cbda25f1 100644 --- a/Admin.Core.IService/IService_New/IProductPlanInfoServices.cs +++ b/Admin.Core.IService/IService_New/IProductPlanInfoServices.cs @@ -11,6 +11,15 @@ namespace Admin.Core.IService /// public interface IProductPlanInfoServices :IBaseServices { + /// + /// 钣金获取计划 + /// + /// Task> QueryPlanInfo(); + /// + /// 打印获取数据 + /// + /// + Task> QueryPrintInfo(); } } \ No newline at end of file diff --git a/Admin.Core.Model/Model_New/BaseBomInfo.cs b/Admin.Core.Model/Model_New/BaseBomInfo.cs index 6e0263ad..e9379d6b 100644 --- a/Admin.Core.Model/Model_New/BaseBomInfo.cs +++ b/Admin.Core.Model/Model_New/BaseBomInfo.cs @@ -14,60 +14,60 @@ namespace Admin.Core.Model /// 主键标识 /// [SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)] - public int objId { get; set; } + public int ObjId { get; set; } /// /// BOM编号 /// [SugarColumn(ColumnName = "BOM_CODE")] - public string bomCode { get; set; } + public string BomCode { get; set; } /// /// 物料编号 /// [SugarColumn(ColumnName = "MATERIAL_CODE")] - public string materialCode { get; set; } + public string MaterialCode { get; set; } /// /// 物料名称 /// [SugarColumn(ColumnName = "MATERIAL_NAME")] - public string materialName { get; set; } + public string MaterialName { get; set; } /// /// 物料类别 /// [SugarColumn(ColumnName = "MATERIAL_TYPE")] - public string materialType { get; set; } + public string MaterialType { get; set; } /// /// 标准数量 /// [SugarColumn(ColumnName = "STANDARD_AMOUNT")] - public int standardAmount { get; set; } + public int StandardAmount { get; set; } /// /// 父级编号 /// [SugarColumn(ColumnName = "PARENT_ID")] - public string parentId { get; set; } + public string ParentId { get; set; } /// /// 工厂编号 /// [SugarColumn(ColumnName = "PLANT_CODE")] - public string planCode { get; set; } + public string PlantCode { get; set; } /// /// 产线/工位 /// [SugarColumn(ColumnName = "PRODUCT_LINE_CODE")] - public string productLineCode { get; set; } + public string ProductLineCode { get; set; } /// /// 是否标识 /// [SugarColumn(ColumnName = "IS_FLAG")] - public int isFlag { get; set; } + public int IsFlag { get; set; } } } diff --git a/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs b/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs index d15cab73..4ed5d0c8 100644 --- a/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs +++ b/Admin.Core.Service/Service_New/ProductPlanInfoServices.cs @@ -23,6 +23,7 @@ namespace Admin.Core.Service.Service_New _baseBomInfoRepository = baseBomInfoRepository; } + #region 查询计划执行信息 /// /// 查询计划执行信息 /// @@ -31,19 +32,46 @@ namespace Admin.Core.Service.Service_New public async Task> QueryPlanInfo() { List planList = await _dal.QueryAsync(); - List orderinfoList= await _baseBomInfoRepository.QueryAsync(); + List bomInfoList = await _baseBomInfoRepository.QueryAsync(); var list = (from p in planList - join o in orderinfoList on p.PlanCode equals o.PlanCode - select new PlanMaintenanceView - { - PlanCode=p.PlanCode, - MaterialCode=p.MaterialCode, - MaterialName=p.MaterialName, - OrderCode=p.OrderCode, - PlanAmount = p.PlanAmount, - ResidueAmount = p.PlanAmount-p.CompleteAmount - }).ToList(); + join o in bomInfoList on p.PlanCode equals o.PlanCode + select new PlanMaintenanceView + { + PlanCode = p.PlanCode, + MaterialCode = p.MaterialCode, + MaterialName = p.MaterialName, + OrderCode = p.OrderCode, + PlanAmount = p.PlanAmount, + ResidueAmount = p.PlanAmount - p.CompleteAmount + }).ToList(); + + return list; + } + + #endregion + + /// + /// 获取打印信息 + /// + /// + /// + public async Task> QueryPrintInfo() + { + List planList = await _dal.QueryAsync(); + List bomInfoList = await _baseBomInfoRepository.QueryAsync(); + + var list = (from p in planList + join b in bomInfoList on p.PlanCode equals b.PlanCode + select new PlanMaintenanceView + { + PlanCode = p.PlanCode, + MaterialCode = b.MaterialCode, + MaterialName = b.MaterialName, + OrderCode = p.OrderCode, + PlanAmount = b.StandardAmount, + ResidueAmount = p.PlanAmount - p.CompleteAmount + }).ToList(); return list; } diff --git a/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs b/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs index 00d16295..b4a45a31 100644 --- a/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.PrintTo/ViewModels/IndexPageViewModel.cs @@ -43,11 +43,11 @@ namespace Admin.Core.Wpf.ViewModels #region 加载DataGrid数据 private async Task LoadData() { - var list= await _productPlanInfoServices.QueryAsync(d=>d.ProductLineCode== "1001"); + var list= await _productPlanInfoServices.QueryPrintInfo(); foreach(var item in list) { - Datalist.Add(new OrderInfo() { plan_code= item.PlanCode, created_time = item.BeginTime.ToString(), order_code=item.OrderCode, material_code = item.MaterialCode, material_name = item.MaterialName, plan_amount =item.PlanAmount }); + Datalist.Add(new OrderInfo() { plan_code= item.PlanCode, order_code=item.OrderCode, material_code = item.MaterialCode, material_name = item.MaterialName, plan_amount =item.PlanAmount }); } } diff --git a/Aucma.Core.SheetMetal/obj/Release/net6.0-windows/Aucma.Core.SheetMetal_MarkupCompile.lref b/Aucma.Core.SheetMetal/obj/Release/net6.0-windows/Aucma.Core.SheetMetal_MarkupCompile.lref index fe0f3690..753f6da0 100644 --- a/Aucma.Core.SheetMetal/obj/Release/net6.0-windows/Aucma.Core.SheetMetal_MarkupCompile.lref +++ b/Aucma.Core.SheetMetal/obj/Release/net6.0-windows/Aucma.Core.SheetMetal_MarkupCompile.lref @@ -1,4 +1,4 @@ -D:\gitea\AUCMA\AUCMA_SCADA\Aucma.Core.SheetMetal\obj\Release\net6.0-windows\GeneratedInternalTypeHelper.g.cs + FD:\gitea\AUCMA\AUCMA_SCADA\Aucma.Core.SheetMetal\App.xaml;; FD:\gitea\AUCMA\AUCMA_SCADA\Aucma.Core.SheetMetal\Views\IndexPage.xaml;; FD:\gitea\AUCMA\AUCMA_SCADA\Aucma.Core.SheetMetal\Views\LogPageView.xaml;;