diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7da3af7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+################################################################################
+# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
+################################################################################
+
+/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.dll
+/.vs/HighWayIot/FileContentIndex/25e78e95-6255-41c5-a154-4541a66120c0.vsidx
+/.vs/HighWayIot/FileContentIndex/b0be4f28-965f-4ade-8340-b6e7f52cca40.vsidx
+/.vs/HighWayIot/FileContentIndex/e462e3f4-0a51-4b54-a4cb-49ed1d7ee163.vsidx
diff --git a/.vs/HighWayIot/FileContentIndex/26aa9716-b906-4888-806d-1aee0dca78ee.vsidx b/.vs/HighWayIot/FileContentIndex/26aa9716-b906-4888-806d-1aee0dca78ee.vsidx
new file mode 100644
index 0000000..8ef4456
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/26aa9716-b906-4888-806d-1aee0dca78ee.vsidx differ
diff --git a/Aucma.Scada.Model/Aucma.Scada.Model.csproj b/Aucma.Scada.Model/Aucma.Scada.Model.csproj
index 28906eb..1e51a3b 100644
--- a/Aucma.Scada.Model/Aucma.Scada.Model.csproj
+++ b/Aucma.Scada.Model/Aucma.Scada.Model.csproj
@@ -54,6 +54,7 @@
+
diff --git a/Aucma.Scada.Model/dto/MaterialStockDto.cs b/Aucma.Scada.Model/dto/MaterialStockDto.cs
new file mode 100644
index 0000000..c0023b4
--- /dev/null
+++ b/Aucma.Scada.Model/dto/MaterialStockDto.cs
@@ -0,0 +1,21 @@
+using Microsoft.SqlServer.Server;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aucma.Scada.Model.dto
+{
+ ///
+ /// 物料库存统计DTO
+ ///
+ public class MaterialStockDto
+ {
+ public string parentMaterialName { get;set; }
+
+ public decimal? shellStock { get; set; }
+
+ public decimal? linerStock { get; set; }
+ }
+}
diff --git a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.CoreCompileInputs.cache b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.CoreCompileInputs.cache
index bba7029..89409a4 100644
--- a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.CoreCompileInputs.cache
+++ b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-18c4bfb08d50bd6f5b9fa705009ee111ebbc33e4
+fd85de37e5a909d36e22af79675d4e2437bf75a2
diff --git a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.dll b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.dll
index 00146f1..535759d 100644
Binary files a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.dll and b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.dll differ
diff --git a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.pdb
index 729d8ba..370c298 100644
Binary files a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll
index aed8c7b..534677e 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb
index 0f87be0..db76c9a 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll
index 00146f1..535759d 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb
index 729d8ba..370c298 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe
index 3ac6757..0f7bc51 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb
index b550dfe..436c737 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll
index 5ab25a3..9c277a8 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb
index 05f0039..fa92bdb 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache
index 157087f..3bd243e 100644
Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache differ
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe
index 3ac6757..0f7bc51 100644
Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe differ
diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb
index b550dfe..436c737 100644
Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb differ
diff --git a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs
index 08ce70b..108dfeb 100644
--- a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs
+++ b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs
@@ -1,11 +1,13 @@
using Aucma.Scada.Business;
using Aucma.Scada.Model.domain;
+using Aucma.Scada.Model.dto;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using HighWayIot.Config;
using HighWayIot.Log4net;
using LiveCharts;
using LiveCharts.Wpf;
+using MySqlX.XDevAPI.Common;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -293,43 +295,36 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
public void Init()
{
Query();
- ChartValues achievement = new ChartValues();
- ChartValues achievement2 = new ChartValues();
- App.Current.Dispatcher.BeginInvoke((Action)(() =>
+ ChartValues shellAchievement = new ChartValues();
+ ChartValues linerAchievement = new ChartValues();
+ MaterialNameList = new List();
+ List info = inStoreBusiness.GetMaterialStock();
+
+ if (info != null)
{
Achievement.Clear();
- MaterialNameList = new List()
+ foreach (var item in info)
{
- "SC232",
- "SA124",
- "SC387",
- "SC211",
- "DQ196",
- };
-
- Random random = new Random();
- for (int i = 0; i < 5; i++)
- {
- achievement.Add(random.Next(60, 100));
+ MaterialNameList.Add(item.parentMaterialName);
+ shellAchievement.Add(Convert.ToDouble(item.shellStock));
+ linerAchievement.Add(Convert.ToDouble(item.linerStock));
}
- var column = new ColumnSeries();
- column.DataLabels = true;
- column.Title = "箱壳";
- column.Values = achievement;
+ }
-
- Random random2 = new Random();
- for (int i = 0; i < 5; i++)
- {
- achievement2.Add(random2.Next(60, 100));
- }
+ App.Current.Dispatcher.BeginInvoke((Action)(() =>
+ {
+ var shellColumn = new ColumnSeries();
+ shellColumn.DataLabels = true;
+ shellColumn.Title = "箱壳";
+ shellColumn.Values = shellAchievement;
- var column2 = new ColumnSeries();
- column2.DataLabels = true;
- column2.Title = "内胆";
- column2.Values = achievement2;
- Achievement.Add(column);
- Achievement.Add(column2);
+ var linerColumn = new ColumnSeries();
+ linerColumn.DataLabels = true;
+ linerColumn.Title = "内胆";
+ linerColumn.Values = linerAchievement;
+
+ Achievement.Add(shellColumn);
+ Achievement.Add(linerColumn);
}));
}
diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache
index e966f99..c0b50a6 100644
Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache
index 361cbdf..1bb5c21 100644
Binary files a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache and b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.dll b/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.dll
index 00146f1..535759d 100644
Binary files a/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.dll and b/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.pdb b/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.pdb
index 729d8ba..370c298 100644
Binary files a/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.pdb and b/HighWayIot.Repository/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll
index 5ab25a3..9c277a8 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb
index 05f0039..fa92bdb 100644
Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache
index 2f6f1d7..f6e5bf0 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll
index 5ab25a3..9c277a8 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb
index 05f0039..fa92bdb 100644
Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot.Repository/service/IBaseSpaceInfoService.cs b/HighWayIot.Repository/service/IBaseSpaceInfoService.cs
index 07e634d..15ba32e 100644
--- a/HighWayIot.Repository/service/IBaseSpaceInfoService.cs
+++ b/HighWayIot.Repository/service/IBaseSpaceInfoService.cs
@@ -1,4 +1,5 @@
using Aucma.Scada.Model.domain;
+using Microsoft.SqlServer.Server;
using System.Collections.Generic;
namespace HighWayIot.Repository.service
@@ -45,5 +46,13 @@ namespace HighWayIot.Repository.service
///
///
bool UpdateSpaceInfo(BaseSpaceInfo spaceInfo);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ List GetMaterialStock(string shellStoreCode,string linerStoreCode);
}
}
diff --git a/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs b/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs
index 9a7cdfc..5f77c46 100644
--- a/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs
+++ b/HighWayIot.Repository/service/Impl/BaseSpaceInfoServiceImpl.cs
@@ -1,7 +1,10 @@
using Aucma.Scada.Model.domain;
+using Aucma.Scada.Model.dto;
using HighWayIot.Common;
using HighWayIot.Log4net;
+using SqlSugar;
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
@@ -202,5 +205,39 @@ namespace HighWayIot.Repository.service.Impl
}
return result;
}
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public List GetMaterialStock(string shellStoreCode, string linerStoreCode)
+ {
+ List result = null;
+
+ try
+ {
+ var _db = _mesRepository.Context;
+ List query = _db.Queryable().AS("GET_STORE_MATERIALSTOCK").Where("STORE_CODE in (@shellStore,@linerStore)", new { shellStore = shellStoreCode, linerStore = linerStoreCode }).ToList();
+
+ if(query.Count > 0)
+ {
+ result = query.GroupBy(s => s.PARENT_NAME)
+ .Select(g => (dynamic)new MaterialStockDto
+ {
+ parentMaterialName = g.Key,
+ shellStock = g.Where(x => x.STORE_CODE == shellStoreCode).Select(x => x.SPACE_STOCK).FirstOrDefault(),
+ linerStock = g.Where(x => x.STORE_CODE == linerStoreCode).Select(x => x.SPACE_STOCK).FirstOrDefault()
+ }).ToList();
+
+ }
+ }
+ catch (Exception ex)
+ {
+ logHelper.Error("获取物料库存异常", ex);
+ }
+ return result;
+ }
}
}
\ No newline at end of file
diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache
index 848f9e5..5f0bdce 100644
Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache differ
diff --git a/HighWayIot/bin/Debug/Aucma.Scada.Model.dll b/HighWayIot/bin/Debug/Aucma.Scada.Model.dll
index 98f0ccc..535759d 100644
Binary files a/HighWayIot/bin/Debug/Aucma.Scada.Model.dll and b/HighWayIot/bin/Debug/Aucma.Scada.Model.dll differ
diff --git a/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb b/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb
index 418de0c..370c298 100644
Binary files a/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb and b/HighWayIot/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.dll b/HighWayIot/bin/Debug/HighWayIot.Repository.dll
index e961560..9c277a8 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb
index 4154590..fa92bdb 100644
Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache
index ae01de8..b10fe94 100644
Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ