liulb@mesnac.com 1 year ago
parent d5927e91e0
commit 9ac8f05ba1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -42,23 +42,23 @@ namespace Admin.Core.Model.ViewModels
/// <summary>
/// 物料数量
/// </summary>
public int StandardAmount { get; set; }
public int StandardAmount { get; set; } = 0;
/// <summary>
/// 异常量
/// </summary>
public int ErrorAmount { get; set; }
public int ErrorAmount { get; set; } = 0;
/// <summary>
/// 内胆码已打量
/// </summary>
public int LinerAmount { get; set; }
public int LinerAmount { get; set; } = 0;
/// <summary>
/// 箱壳码已打量
/// </summary>
public int BoxAmount { get; set; }
public int BoxAmount { get; set; } = 0;
/// <summary>
/// 剩余数量
/// </summary>
public int ResidueAmount { get; set; }
public int ResidueAmount { get; set; } = 0;
/// <summary>
/// 创建时间
/// </summary>

@ -113,7 +113,7 @@ namespace Admin.Core.Service
}
}
return bbinfolist;
}
}
#endregion
#region 得到子节点列表
@ -126,20 +126,13 @@ namespace Admin.Core.Service
public List<BaseBomInfo> GetChildList(List<BaseBomInfo> list, string materialCode)
{
List<BaseBomInfo> tlist = new List<BaseBomInfo>();
//IEnumerator<BaseBomInfo> it = list.GetEnumerator();
//while (it.MoveNext())
//{
// BaseBomInfo n = it.Current;
// if (n.BomCode.IsNotEmptyOrNull() && n.BomCode == t.MaterialCode)
// {
// tlist.Add(n);
// }
//}
foreach (var item in list.Where(d=>d.BomCode== materialCode))
IEnumerator<BaseBomInfo> it = list.Where(d => d.ParentId == materialCode).GetEnumerator();
while (it.MoveNext())
{
if (item.MaterialCode.IsNotEmptyOrNull())
BaseBomInfo n = it.Current;
if (n.ParentId.IsNotEmptyOrNull())
{
tlist.Add(item);
tlist.Add(n);
}
}
return tlist;
@ -160,7 +153,7 @@ namespace Admin.Core.Service
public List<BaseBomInfo> IsExist(List<BaseBomInfo> list, string materialCode)
{
List<BaseBomInfo> tlist = list.Where(d => d.BomCode == materialCode&& d.BomCode!= d.MaterialCode).ToList();
List<BaseBomInfo> tlist = list.Where(d => d.ParentId == materialCode).ToList();
return tlist;
}
#endregion

@ -16,5 +16,5 @@ D:\Project\gitea\AUCMA\SCADA\Aucma.Core.BoxFoam\App.xaml
4152067969098
Assets\Styles\DefaultStyles.xaml;Views\EnterWarehouseStatisticsPageView.xaml;Views\IndexPageView.xaml;Views\MainWindow.xaml;Views\MonitorPageView.xaml;Views\RealTimeInventoryPageView.xaml;Views\UserPage\AfterFoamingPageView.xaml;Views\UserPage\BeforeFoamingPageView.xaml;Views\UserPage\SpaceDetailPageView.xaml;
False
True

@ -1,2 +1,62 @@

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "7.0.12.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

@ -13,7 +13,7 @@ D:\Project\gitea\AUCMA\SCADA\Aucma.Core.BoxFoam\App.xaml
9-1290854581
21064389523
281610457503
415286307481
415-1316205814
Assets\Styles\DefaultStyles.xaml;Views\EnterWarehouseStatisticsPageView.xaml;Views\IndexPageView.xaml;Views\MainWindow.xaml;Views\MonitorPageView.xaml;Views\RealTimeInventoryPageView.xaml;Views\UserPage\AfterFoamingPageView.xaml;Views\UserPage\BeforeFoamingPageView.xaml;Views\UserPage\SpaceDetailPageView.xaml;
True

@ -1,4 +1,4 @@

D:\Project\gitea\AUCMA\SCADA\Aucma.Core.BoxFoam\obj\Release\net6.0-windows\GeneratedInternalTypeHelper.g.cs
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.BoxFoam\App.xaml;;
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.BoxFoam\Views\EnterWarehouseStatisticsPageView.xaml;;
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.BoxFoam\Views\IndexPageView.xaml;;

@ -16,5 +16,5 @@ D:\Project\gitea\AUCMA\SCADA\Aucma.Core.DoorFoam\App.xaml
417-1046291176
Assets\Styles\DefaultStyles.xaml;Views\IndexPageView.xaml;Views\MainWindow.xaml;Views\StatisticsPageView.xaml;
False
True

@ -1,2 +1,62 @@

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "7.0.12.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

@ -13,7 +13,7 @@ D:\Project\gitea\AUCMA\SCADA\Aucma.Core.DoorFoam\App.xaml
4820000597
21064389523
171935592671
4171467014503
417-135498792
Assets\Styles\DefaultStyles.xaml;Views\IndexPageView.xaml;Views\MainWindow.xaml;Views\StatisticsPageView.xaml;
True

@ -1,4 +1,4 @@

D:\Project\gitea\AUCMA\SCADA\Aucma.Core.DoorFoam\obj\Release\net6.0-windows\GeneratedInternalTypeHelper.g.cs
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.DoorFoam\App.xaml;;
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.DoorFoam\Views\IndexPageView.xaml;;
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.DoorFoam\Views\StatisticsPageView.xaml;;

@ -16,5 +16,5 @@ D:\Project\gitea\AUCMA\SCADA\Aucma.Core.Palletiz\App.xaml
417-1046291176
Assets\Styles\DefaultStyles.xaml;Views\IndexPageView.xaml;Views\MainWindow.xaml;Views\StatisticsPageView.xaml;
False
True

@ -1,2 +1,62 @@

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "7.0.12.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

@ -13,7 +13,7 @@ D:\Project\gitea\AUCMA\SCADA\Aucma.Core.Palletiz\App.xaml
4820000597
21064389523
16764066740
4171467014503
417-135498792
Assets\Styles\DefaultStyles.xaml;Views\IndexPageView.xaml;Views\MainWindow.xaml;Views\StatisticsPageView.xaml;
True

@ -1,4 +1,4 @@

D:\Project\gitea\AUCMA\SCADA\Aucma.Core.Palletiz\obj\Release\net6.0-windows\GeneratedInternalTypeHelper.g.cs
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.Palletiz\App.xaml;;
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.Palletiz\Views\IndexPageView.xaml;;
FD:\Project\gitea\AUCMA\SCADA\Aucma.Core.Palletiz\Views\StatisticsPageView.xaml;;

@ -1,9 +1,9 @@
<Application x:Class="Admin.Core.Wpf.App"
<Application x:Class="Aucma.Core.PrintTo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Admin.Core.Wpf"
xmlns:local="clr-namespace:Aucma.Core.PrintTo"
d1p1:Ignorable="d">
<Application.Resources>

@ -1,4 +1,4 @@
using Admin.Core.Wpf.Views;
using Aucma.Core.PrintTo.Views;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
@ -10,7 +10,7 @@ using Autofac.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Admin.Core.Common;
namespace Admin.Core.Wpf
namespace Aucma.Core.PrintTo
{
/// <summary>
/// Interaction logic for App.xaml

@ -78,4 +78,22 @@
<ProjectReference Include="..\Admin.Core.Extensions\Admin.Core.Extensions.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="FastReport">
<HintPath>..\dll\FastReport.dll</HintPath>
</Reference>
<Reference Include="FastReport.Bars">
<HintPath>..\dll\FastReport.Bars.dll</HintPath>
</Reference>
<Reference Include="FastReport.Editor">
<HintPath>..\dll\FastReport.Editor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="Report\MaterialBar.frx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

@ -0,0 +1,42 @@
using FastReport;
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.PrintTo
{
public class PrintHelper
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(PrintHelper));
public static bool Print(string printer,string orderNo,string materialName,string barCode)
{
try
{
//对接打印机
Report barReport = new Report();
barReport.Load(System.Environment.CurrentDirectory + @"\Report\MaterialBar.frx");//打印报表位置
// 设置打印机和打印选项
barReport.PrintSettings.ShowDialog = false;
barReport.PrintSettings.Printer = printer; // 设置打印机名称
barReport.PrintSettings.Copies = 1; // 设置打印份数
//barReport.PrintSettings.PageRange = "1-3"; // 设置打印页范围
barReport.SetParameterValue("BoxBarData.Order_No", orderNo);//订单码
barReport.SetParameterValue("BoxBarData.Order_Material_Name", materialName);//物料名称
barReport.SetParameterValue("BoxBarData.Bar_Code", barCode);//二维码
barReport.Print();
return true;
}
catch (Exception ex)
{
log.Error($"打印出错:{ex.Message}");
return false;
}
}
}
}

@ -1,57 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Wpf.Common
{
/// <summary>
/// 窗口管理器
/// </summary>
public class WindowManager
{
static Dictionary<string, WindowStruct> _regWindowContainer = new Dictionary<string, WindowStruct>();
/// <summary>
/// 注册类型
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="name"></param>
/// <param name="owner"></param>
public static void Register<T>(string name, System.Windows.Window owner = null)
{
if (!_regWindowContainer.ContainsKey(name))
{
_regWindowContainer.Add(name, new WindowStruct { WindowType = typeof(T), Owner = owner });
}
}
/// <summary>
/// 获取对象
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="name"></param>
/// <param name="dataContext"></param>
/// <returns></returns>
public static bool ShowDialog<T>(string name, T dataContext)
{
if (_regWindowContainer.ContainsKey(name))
{
Type type = _regWindowContainer[name].WindowType;
//反射创建窗体对象
var window = (System.Windows.Window)Activator.CreateInstance(type);
window.Owner = _regWindowContainer[name].Owner;
window.DataContext = dataContext;
return window.ShowDialog() == true;
}
return false;
}
}
public class WindowStruct
{
public Type WindowType { get; set; }
public System.Windows.Window Owner { get; set; }
}
}

@ -6,7 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace Admin.Core.Wpf.ConvertTo
namespace Aucma.Core.PrintTo.ConvertTo
{
public class MultiFaultAppConverter : IMultiValueConverter
{

@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Wpf
namespace Aucma.Core.PrintTo
{
public class AutofacPropertityModuleReg : Autofac.Module
{

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Wpf.Models
namespace Aucma.Core.PrintTo.Models
{
public class BarCodeModel
{

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Wpf.Models
namespace Aucma.Core.PrintTo.Models
{
public class MainModel : ObservableObject
{

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Wpf.Models
namespace Aucma.Core.PrintTo.Models
{
/// <summary>
/// 打印数据
@ -15,51 +15,51 @@ namespace Admin.Core.Wpf.Models
/// <summary>
/// 订单日期
/// </summary>
public string? created_time { get; set; }
public DateTime CreatedTime { get; set; }
/// <summary>
/// 工单编码
/// </summary>
public string? order_code { get; set; }
public string OrderCode { get; set; }
/// <summary>
/// 产品编码
/// </summary>
public string? product_code { get; set; }
public string ProductCode { get; set; }
/// <summary>
/// 产品名称
/// </summary>
public string? product_name { get; set; }
public string ProductName { get; set; }
/// <summary>
/// 计划数量
/// </summary>
public int plan_amount { get; set; }
public int PlanAmount { get; set; } = 0;
/// <summary>
/// 完成量
/// </summary>
public int complete_amount { get; set; }
public int CompleteAmount { get; set; }
/// <summary>
/// 物料编码
/// </summary>
public string? material_code { get; set; }
public string MaterialCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string? material_name { get; set; }
public string MaterialName { get; set; }
/// <summary>
/// 物料数量
/// </summary>
public int standard_amount { get; set; }
public int StandardAmount { get; set; } = 0;
/// <summary>
/// 异常量
/// </summary>
public int ErrorNum { get; set; }
public int ErrorNum { get; set; } = 0;
/// <summary>
/// 内胆码已打量
/// </summary>
public int LinerCodeNum { get; set; }
public int LinerCodeNum { get; set; } = 0;
/// <summary>
/// 箱体码已打量
/// </summary>
public int BoxCodeNum { get; set; }
public int BoxCodeNum { get; set; } = 0;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save