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