wenjy 1 year ago
commit 0a7f773272

@ -49,7 +49,9 @@ namespace Admin.Core.Model.Model_New
[SugarColumn(ColumnName = "STATION_NAME")]
public string StationName { get; set; }
/// <summary>
/// 所属产线
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_LINE_CODE")]
public string ProductLineCode { get; set; }
@ -63,5 +65,12 @@ namespace Admin.Core.Model.Model_New
/// </summary>
[SugarColumn(ColumnName = "PLAN_CODE")]
public string planCode { get; set; }
/// <summary>
/// 是否下线
/// </summary>
[SugarColumn(ColumnName = "IS_DOWN_LINE")]
public int isDownLine { get; set; }
}
}

@ -295,8 +295,11 @@ namespace Aucma.Core.BoxFoam.Business
//completion.MaterialBarcode = materialBarCode;
//completion.MaterialCode = print.MaterialCode;
//completion.MaterialName = print.MaterialName;
//completion.StationName = "1003";
//completion.StationName = "1004";
//completion.ProductLineCode = "CX_02";
//completion.isDownLine = 0;
//completion.CompleteDate = DateTime.Now;
//await _iMaterialCompletionServices.AddAsync(completion);
#endregion
RefreshDataGridDelegateEvent?.Invoke();

@ -485,7 +485,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
{
RefreshAndWriteLog("条码【" + record.BoxCode + "】与SN码【" + record.ProductCode + "】绑定成功");
#region 更新过点数据,插入记录到MATERIAL_COMPLETION表
//PrintBarCode print = await _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == code1);
//PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == code1).Result;
//if (print != null) return;
//MaterialCompletion completion = new MaterialCompletion();
//completion.OrderCode = print.OrderCode;
@ -494,7 +494,10 @@ namespace Aucma.Core.CodeBinding.ViewModels
//completion.MaterialName = print.MaterialName;
//completion.StationName = "1007";
//completion.CompleteDate = DateTime.Now;
//await _iMaterialCompletionServices.AddAsync(completion);
//completion.isDownLine = 0;
//completion.ProductLineCode = "CX_02";
//_= _iMaterialCompletionServices.AddAsync(completion).Result;
#endregion
}

@ -61,6 +61,7 @@ namespace Aucma.Core.ProductOffLine.Business
#region 接口引用
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(OffLineBusiness));
private readonly IBaseOrderInfoServices _baseOrderInfoServices = App.ServiceProvider.GetService<IBaseOrderInfoServices>();
private readonly IPrintBarCodeServices? _printBarCodeServices = App.ServiceProvider.GetService<IPrintBarCodeServices>();
// 成品下线操作条码系统接口
@ -251,15 +252,22 @@ namespace Aucma.Core.ProductOffLine.Business
#region 暂时不启用,因为还没打箱体码,查不到数据,更新过点数据
//PrintBarCode print = await _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode);
//MaterialCompletion completion = new MaterialCompletion();
//completion.OrderCode = print.OrderCode;
//completion.MaterialBarcode = bindingRecord1.BoxCode;
//completion.MaterialCode = print.MaterialCode;
//completion.MaterialName = print.MaterialName;
//completion.StationName = "1008" ;
//completion.CompleteDate = DateTime.Now;
//await _iMaterialCompletionServices.AddAsync(completion);
//PrintBarCode print = _printBarCodeServices.FirstAsync(x => x.MaterialBarcode == bindingRecord1.BoxCode).Result;
//if (print != null)
//{
// MaterialCompletion completion = new MaterialCompletion();
// completion.OrderCode = print.OrderCode;
// completion.MaterialBarcode = bindingRecord1.BoxCode;
// completion.MaterialCode = print.MaterialCode;
// completion.MaterialName = print.MaterialName;
// completion.StationName = "1009";
// completion.CompleteDate = DateTime.Now;
// completion.ProductLineCode = "CX_02";
// completion.isDownLine = 1;
// _ = _iMaterialCompletionServices.AddAsync(completion).Result;
//}
#endregion

@ -59,7 +59,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
int a = 0;
public IndexPageViewModel()
{
OffLineQty = "235";
_offLineInfoServices = App.ServiceProvider.GetService<IOffLineInfoServices>();
_baseBomInfoServices = App.ServiceProvider.GetService<IBaseBomInfoServices>();
InitEveryDayMethod();
@ -72,6 +72,20 @@ namespace Aucma.Core.ProductOffLine.ViewModels
#region 参数定义
#region 扫描信息
#region 下线数量
private string _offLineQty;
public string OffLineQty
{
get { return _offLineQty; }
set
{
_offLineQty = value;
OnPropertyChanged(nameof(OffLineQty));
}
}
#endregion
#region 产品条码
private string _productSNCode;
@ -326,8 +340,11 @@ namespace Aucma.Core.ProductOffLine.ViewModels
// List<dynamic> hourAmount = _offLineInfoServices.QueryCharts1("CX_01");
List<Admin.Core.Model.ViewModels.ChartsByTime> list = _offLineInfoServices.QueryCharts(listTime[0].startTime, listTime[11].startTime).Result;
if (list == null) return;
List<ChartsByTimeAmount> hourList1 = new List<ChartsByTimeAmount>();
List<ChartsByTimeAmount> hourList1 = new List<ChartsByTimeAmount>();
// 当班下线数量
int sum = 0;
foreach(ChartsByTime item in list)
{
DateTime date = DateTime.ParseExact(item.date + ":00:00", "yyyy-MM-dd/HH:mm:ss", CultureInfo.InvariantCulture);
@ -335,8 +352,11 @@ namespace Aucma.Core.ProductOffLine.ViewModels
hour.ProductCode = item.productLineCode;
hour.ProductDate = date;
hour.ProductAmount = item.Amount;
sum += item.Amount;
hourList1.Add(hour);
}
// 当班下线数量页面赋值
OffLineQty = sum.ToString();
if (hourList1 == null) return;
@ -346,7 +366,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
ChartValues<int> achievement2 = new ChartValues<int>();
foreach (var item in hourList)
{
xList.Add(item.ProductDate.Hour.ToString());
xList.Add(item.ProductDate.Hour.ToString()+":00");
achievement2.Add(item.ProductAmount);
}

@ -212,7 +212,7 @@
<TextBlock Text="下线产量" Foreground="White" FontSize="20" />
</Border>
<Border Grid.Row="1" Grid.RowSpan="2" Grid.Column="5" Height="78" VerticalAlignment="Top">
<TextBlock Text="1225" Foreground="White" FontSize="70"/>
<TextBlock Text="{Binding OffLineQty}" Foreground="White" FontSize="70"/>
</Border>
<Border Grid.Row="3" Grid.Column="5" Height="39" VerticalAlignment="Center">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">

Loading…
Cancel
Save