diff --git a/Admin.Core.IService/IService_New/IRecordInstoreServices.cs b/Admin.Core.IService/IService_New/IRecordInstoreServices.cs
index 2f101114..8b39b15e 100644
--- a/Admin.Core.IService/IService_New/IRecordInstoreServices.cs
+++ b/Admin.Core.IService/IService_New/IRecordInstoreServices.cs
@@ -27,6 +27,6 @@ namespace Admin.Core.IService
/// 开始时间
/// 结束时间
/// 入库记录集合
- Task> SaveRecordToDb(string storeCode,DateTime startTime, DateTime endTime);
+ Task> queryRecordToDb(string storeCode,DateTime startTime, DateTime endTime);
}
}
\ No newline at end of file
diff --git a/Admin.Core.Model/ViewModels/EnterLibView.cs b/Admin.Core.Model/ViewModels/EnterLibView.cs
index 522c4a5d..335dc52a 100644
--- a/Admin.Core.Model/ViewModels/EnterLibView.cs
+++ b/Admin.Core.Model/ViewModels/EnterLibView.cs
@@ -12,36 +12,54 @@ namespace Admin.Core.Model.ViewModels
public class EnterLibView
{
///
- /// 序号
+ /// 序号
///
public int No { get; set; }
///
- /// 计划名称
+ /// 货道号
///
- public string PlanCode { get; set; }
+ public string SpaceCode { get; set; }
+
///
- /// 物料编码
- ///
- public string MaterialCode { get; set; }
- ///
- /// 物料型号
- ///
- public string MaterialName { get; set; }
- ///
- /// 物料条码
+ /// 产品条码
///
public string MaterialBarCode { get; set; }
///
- /// 入库货道
+ /// 产品型号
///
- public string EnterSpace { get; set; }
+ public string MaterialType { get; set; }
///
- /// 执行时间
+ /// 入库时间
///
- public DateTime ExecDateTime { get; set; }
- ///
- /// 状态
- ///
- public string Status { get; set; }
+ public DateTime InstoreTime { get; set; }
+
+ /////
+ ///// 计划名称
+ /////
+ //public string PlanCode { get; set; }
+ /////
+ ///// 物料编码
+ /////
+ //public string MaterialCode { get; set; }
+ /////
+ ///// 物料型号
+ /////
+ //public string MaterialName { get; set; }
+ /////
+ ///// 物料条码
+ /////
+ //public string MaterialBarCode { get; set; }
+ /////
+ ///// 入库货道
+ /////
+ //public string EnterSpace { get; set; }
+ /////
+ ///// 执行时间
+ /////
+ //public DateTime ExecDateTime { get; set; }
+ /////
+ ///// 状态
+ /////
+ //public string Status { get; set; }
}
}
diff --git a/Admin.Core.Service/Service_New/RecordInstoreServices.cs b/Admin.Core.Service/Service_New/RecordInstoreServices.cs
index 60345436..0664a787 100644
--- a/Admin.Core.Service/Service_New/RecordInstoreServices.cs
+++ b/Admin.Core.Service/Service_New/RecordInstoreServices.cs
@@ -43,30 +43,30 @@ namespace Admin.Core.Service
///
///
///
- public async Task> SaveRecordToDb(string storeCode,DateTime startTime, DateTime endTime)
+ public async Task> queryRecordToDb(string storeCode,DateTime startTime, DateTime endTime)
{
try
{
- List preCordList = _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) ).Result;//&& d.CreatedTime >= startTime&& d.CreatedTime <= endTime
- if (preCordList.Count() == 0) return null;
- var proList = _productPlanInfoRepository.Query();
- if (proList.Count() == 0) return null;
- var list = from d in proList
- join p in preCordList
- on d.MaterialCode equals p.MaterialCode
- select new EnterLibView
- {
- No = p.ObjId,
- PlanCode = d.PlanCode,
- MaterialCode = d.MaterialCode,
- MaterialName = d.MaterialName,
- MaterialBarCode = p.BarCodeCode,
- EnterSpace = p.SpaceCode,
- ExecDateTime = p.CreatedTime,
- Status = p.EntryPattern==0?"正常":"异常"
- };
- return list.ToList();
+ List preCordList = _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) && d.InStoreTime >= startTime && d.InStoreTime <= endTime).Result;//
+ if(preCordList == null && preCordList.Count == 0) return null;
+ return preCordList;
+ //List list = new List();
+ //int count = 0;
+ //foreach(RecordInStore item in preCordList)
+ //{
+
+ // list.Add(new EnterLibView
+ // {
+ // No = ++count,
+ // SpaceCode = item.SpaceCode,
+ // MaterialBarCode = item.BarCodeCode,
+ // MaterialType = item.MaterialType,
+ // InstoreTime = item.InStoreTime,
+ // });
+ //}
+
+ //return list;
}
catch (Exception ex)
{
diff --git a/Aucma.Core.BoxFoam/ViewModels/EnterWarehouseStatisticsPageViewModel.cs b/Aucma.Core.BoxFoam/ViewModels/EnterWarehouseStatisticsPageViewModel.cs
index c304ca97..245b3f06 100644
--- a/Aucma.Core.BoxFoam/ViewModels/EnterWarehouseStatisticsPageViewModel.cs
+++ b/Aucma.Core.BoxFoam/ViewModels/EnterWarehouseStatisticsPageViewModel.cs
@@ -35,26 +35,25 @@ namespace Aucma.Core.BoxFoam.ViewModels
{
try
{
- var storeCode = Appsettings.app("StoreInfo", "StoreCode");
+ MaterialDataGrid.Clear();
+ var storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");
DateTime startTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
DateTime endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
- var list = await _recordInstoreServices.SaveRecordToDb(storeCode, startTime, endTime);
- foreach (var item in list.OrderByDescending(d => d.No))
+ var list = await _recordInstoreServices.queryRecordToDb(storeCode, startTime, endTime);
+ if (list == null) return;
+ int count = 0;
+ foreach (var item in list)
{
-
- MaterialDataGrid.Add(new EnterLibView()
- {
- No = item.No,
- PlanCode = item.PlanCode,
- MaterialBarCode= item.MaterialBarCode,
- MaterialCode = item.MaterialCode,
- MaterialName = item.MaterialName,
- EnterSpace = item.EnterSpace,
- ExecDateTime = item.ExecDateTime,
- Status = item.Status,
-
- });
+ MaterialDataGrid.Add(new EnterLibView
+ {
+ No = ++count,
+ SpaceCode = item.SpaceCode,
+ MaterialBarCode = item.BarCodeCode,
+ MaterialType = item.MaterialType,
+ InstoreTime = item.InStoreTime,
+ });
};
+
}
catch (Exception ex)
{
@@ -111,27 +110,24 @@ namespace Aucma.Core.BoxFoam.ViewModels
var storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");
DateTime startTime = Convert.ToDateTime(theBeginTime.ToString("yyyy-MM-dd 00:00:00"));
DateTime endTime = Convert.ToDateTime(theEndTime.ToString("yyyy-MM-dd 23:59:59"));
-
+
System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
{
if (!string.IsNullOrEmpty(result.BeginTime))
{
MaterialDataGrid.Clear();
- var list = await _recordInstoreServices.SaveRecordToDb(storeCode, startTime, endTime);
- if (list==null) return;
- foreach (var item in list.OrderByDescending(d => d.No))
+ var list = await _recordInstoreServices.queryRecordToDb(storeCode, startTime, endTime);
+ if (list == null) return;
+ int count = 0;
+ foreach (var item in list)
{
- MaterialDataGrid.Add(new EnterLibView()
+ MaterialDataGrid.Add(new EnterLibView
{
- No = item.No,
- PlanCode = item.PlanCode,
- MaterialBarCode = item.MaterialBarCode,
- MaterialCode = item.MaterialCode,
- MaterialName = item.MaterialName,
- EnterSpace = item.EnterSpace,
- ExecDateTime = item.ExecDateTime,
- Status = item.Status,
-
+ No = ++count,
+ SpaceCode = item.SpaceCode,
+ MaterialBarCode = item.BarCodeCode,
+ MaterialType = item.MaterialType,
+ InstoreTime = item.InStoreTime,
});
};
}
diff --git a/Aucma.Core.BoxFoam/Views/EnterWarehouseStatisticsPageView.xaml b/Aucma.Core.BoxFoam/Views/EnterWarehouseStatisticsPageView.xaml
index a6d32ed4..ddcb637a 100644
--- a/Aucma.Core.BoxFoam/Views/EnterWarehouseStatisticsPageView.xaml
+++ b/Aucma.Core.BoxFoam/Views/EnterWarehouseStatisticsPageView.xaml
@@ -155,14 +155,14 @@
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
-
-
-
-
-
-
+
+
+
+
+
+