diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..7da3af76
--- /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 00000000..8ef4456f
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 28906ebf..1e51a3b8 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 00000000..c0023b46
--- /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 bba70298..89409a41 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 00146f1b..535759d6 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 729d8bab..370c2987 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 aed8c7ba..534677e3 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 0f87be07..db76c9a5 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 00146f1b..535759d6 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 729d8bab..370c2987 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 3ac67579..0f7bc51b 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 b550dfef..436c737f 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 5ab25a3e..9c277a85 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 05f0039b..fa92bdb7 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 157087f2..3bd243e9 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 3ac67579..0f7bc51b 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 b550dfef..436c737f 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 08ce70b1..108dfeb1 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()
- {
- "SC232",
- "SA124",
- "SC387",
- "SC211",
- "DQ196",
- };
-
- Random random = new Random();
- for (int i = 0; i < 5; i++)
- {
- achievement.Add(random.Next(60, 100));
- }
- var column = new ColumnSeries();
- column.DataLabels = true;
- column.Title = "箱壳";
- column.Values = achievement;
-
-
- Random random2 = new Random();
- for (int i = 0; i < 5; i++)
+ foreach (var item in info)
{
- achievement2.Add(random2.Next(60, 100));
+ MaterialNameList.Add(item.parentMaterialName);
+ shellAchievement.Add(Convert.ToDouble(item.shellStock));
+ linerAchievement.Add(Convert.ToDouble(item.linerStock));
}
+ }
- var column2 = new ColumnSeries();
- column2.DataLabels = true;
- column2.Title = "内胆";
- column2.Values = achievement2;
- Achievement.Add(column);
- Achievement.Add(column2);
+ App.Current.Dispatcher.BeginInvoke((Action)(() =>
+ {
+ var shellColumn = new ColumnSeries();
+ shellColumn.DataLabels = true;
+ shellColumn.Title = "箱壳";
+ shellColumn.Values = shellAchievement;
+
+ 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 e966f998..c0b50a6a 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 361cbdfc..1bb5c21f 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 00146f1b..535759d6 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 729d8bab..370c2987 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 5ab25a3e..9c277a85 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 05f0039b..fa92bdb7 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 2f6f1d74..f6e5bf0b 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 5ab25a3e..9c277a85 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 05f0039b..fa92bdb7 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 07e634dd..15ba32ec 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 9a7cdfcc..5f77c46f 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 848f9e52..5f0bdce9 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 98f0cccc..535759d6 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 418de0c4..370c2987 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 e9615603..9c277a85 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 41545909..fa92bdb7 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 ae01de80..b10fe949 100644
Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ