1 year ago
parent d52934ddb0
commit dc66aa55d7

Binary file not shown.

Binary file not shown.

@ -11,6 +11,15 @@ namespace Admin.Core.IService
/// </summary>
public interface IProductPlanInfoServices :IBaseServices<ProductPlanInfo>
{
/// <summary>
/// 钣金获取计划
/// </summary>
/// <returns></returns>
Task<List<PlanMaintenanceView>> QueryPlanInfo();
/// <summary>
/// 打印获取数据
/// </summary>
/// <returns></returns>
Task<List<PlanMaintenanceView>> QueryPrintInfo();
}
}

@ -14,60 +14,60 @@ namespace Admin.Core.Model
/// 主键标识
///</summary>
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int objId { get; set; }
public int ObjId { get; set; }
/// <summary>
/// BOM编号
/// </summary>
[SugarColumn(ColumnName = "BOM_CODE")]
public string bomCode { get; set; }
public string BomCode { get; set; }
/// <summary>
/// 物料编号
/// </summary>
[SugarColumn(ColumnName = "MATERIAL_CODE")]
public string materialCode { get; set; }
public string MaterialCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
[SugarColumn(ColumnName = "MATERIAL_NAME")]
public string materialName { get; set; }
public string MaterialName { get; set; }
/// <summary>
/// 物料类别
/// </summary>
[SugarColumn(ColumnName = "MATERIAL_TYPE")]
public string materialType { get; set; }
public string MaterialType { get; set; }
/// <summary>
/// 标准数量
/// </summary>
[SugarColumn(ColumnName = "STANDARD_AMOUNT")]
public int standardAmount { get; set; }
public int StandardAmount { get; set; }
/// <summary>
/// 父级编号
/// </summary>
[SugarColumn(ColumnName = "PARENT_ID")]
public string parentId { get; set; }
public string ParentId { get; set; }
/// <summary>
/// 工厂编号
/// </summary>
[SugarColumn(ColumnName = "PLANT_CODE")]
public string planCode { get; set; }
public string PlantCode { get; set; }
/// <summary>
/// 产线/工位
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_LINE_CODE")]
public string productLineCode { get; set; }
public string ProductLineCode { get; set; }
/// <summary>
/// 是否标识
/// </summary>
[SugarColumn(ColumnName = "IS_FLAG")]
public int isFlag { get; set; }
public int IsFlag { get; set; }
}
}

@ -23,6 +23,7 @@ namespace Admin.Core.Service.Service_New
_baseBomInfoRepository = baseBomInfoRepository;
}
#region 查询计划执行信息
/// <summary>
/// 查询计划执行信息
/// </summary>
@ -31,10 +32,10 @@ namespace Admin.Core.Service.Service_New
public async Task<List<PlanMaintenanceView>> QueryPlanInfo()
{
List<ProductPlanInfo> planList = await _dal.QueryAsync();
List<BaseBomInfo> orderinfoList= await _baseBomInfoRepository.QueryAsync();
List<BaseBomInfo> bomInfoList = await _baseBomInfoRepository.QueryAsync();
var list = (from p in planList
join o in orderinfoList on p.PlanCode equals o.PlanCode
join o in bomInfoList on p.PlanCode equals o.PlanCode
select new PlanMaintenanceView
{
PlanCode = p.PlanCode,
@ -47,5 +48,32 @@ namespace Admin.Core.Service.Service_New
return list;
}
#endregion
/// <summary>
/// 获取打印信息
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public async Task<List<PlanMaintenanceView>> QueryPrintInfo()
{
List<ProductPlanInfo> planList = await _dal.QueryAsync();
List<BaseBomInfo> 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;
}
}
}

@ -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 });
}
}

@ -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;;

Loading…
Cancel
Save