diff --git a/.vs/HighWayIot/FileContentIndex/1f21a624-39bf-48a1-bea4-52574883b2cb.vsidx b/.vs/HighWayIot/FileContentIndex/1f21a624-39bf-48a1-bea4-52574883b2cb.vsidx deleted file mode 100644 index 22e27761..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/1f21a624-39bf-48a1-bea4-52574883b2cb.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/20beb2bb-2431-4f96-93cf-f00dc33addcf.vsidx b/.vs/HighWayIot/FileContentIndex/20beb2bb-2431-4f96-93cf-f00dc33addcf.vsidx deleted file mode 100644 index addaeb9d..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/20beb2bb-2431-4f96-93cf-f00dc33addcf.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/45b72eab-16bf-43a8-a07e-57f86f319e04.vsidx b/.vs/HighWayIot/FileContentIndex/45b72eab-16bf-43a8-a07e-57f86f319e04.vsidx deleted file mode 100644 index 87553bb4..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/45b72eab-16bf-43a8-a07e-57f86f319e04.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/64f9c86f-e9cd-4985-8b24-d3f69b65b4f5.vsidx b/.vs/HighWayIot/FileContentIndex/64f9c86f-e9cd-4985-8b24-d3f69b65b4f5.vsidx deleted file mode 100644 index e2fc2354..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/64f9c86f-e9cd-4985-8b24-d3f69b65b4f5.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/65b49a7c-a0af-436a-aee7-042a73912af1.vsidx b/.vs/HighWayIot/FileContentIndex/65b49a7c-a0af-436a-aee7-042a73912af1.vsidx deleted file mode 100644 index 8537588f..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/65b49a7c-a0af-436a-aee7-042a73912af1.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/6e354185-7f4f-4392-af05-c49e1712958b.vsidx b/.vs/HighWayIot/FileContentIndex/6e354185-7f4f-4392-af05-c49e1712958b.vsidx deleted file mode 100644 index 94b8d7b6..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/6e354185-7f4f-4392-af05-c49e1712958b.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/6f19ed08-3313-43af-a7a6-95d9f7a36e28.vsidx b/.vs/HighWayIot/FileContentIndex/6f19ed08-3313-43af-a7a6-95d9f7a36e28.vsidx deleted file mode 100644 index a70c6934..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/6f19ed08-3313-43af-a7a6-95d9f7a36e28.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/6f4a27db-ed43-4fc8-8e63-9c66d62f0b47.vsidx b/.vs/HighWayIot/FileContentIndex/6f4a27db-ed43-4fc8-8e63-9c66d62f0b47.vsidx deleted file mode 100644 index 6149db96..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/6f4a27db-ed43-4fc8-8e63-9c66d62f0b47.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/7e909b8f-81b1-4a9d-85e8-09c3b977bdcc.vsidx b/.vs/HighWayIot/FileContentIndex/7e909b8f-81b1-4a9d-85e8-09c3b977bdcc.vsidx deleted file mode 100644 index 207bea28..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/7e909b8f-81b1-4a9d-85e8-09c3b977bdcc.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/934de256-cba9-437a-b170-56656c006175.vsidx b/.vs/HighWayIot/FileContentIndex/934de256-cba9-437a-b170-56656c006175.vsidx deleted file mode 100644 index 4c5a859a..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/934de256-cba9-437a-b170-56656c006175.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/ba06790b-4460-4b0c-b99b-74ccf68a435d.vsidx b/.vs/HighWayIot/FileContentIndex/ba06790b-4460-4b0c-b99b-74ccf68a435d.vsidx deleted file mode 100644 index 2b8cea2c..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/ba06790b-4460-4b0c-b99b-74ccf68a435d.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/d4561008-11d8-442a-b88b-eb66494f1b0c.vsidx b/.vs/HighWayIot/FileContentIndex/d4561008-11d8-442a-b88b-eb66494f1b0c.vsidx deleted file mode 100644 index 077e777f..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/d4561008-11d8-442a-b88b-eb66494f1b0c.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/d625a7cd-ff45-4c99-bde9-954718bd4359.vsidx b/.vs/HighWayIot/FileContentIndex/d625a7cd-ff45-4c99-bde9-954718bd4359.vsidx deleted file mode 100644 index 0f195c75..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/d625a7cd-ff45-4c99-bde9-954718bd4359.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/FileContentIndex/e462e3f4-0a51-4b54-a4cb-49ed1d7ee163.vsidx b/.vs/HighWayIot/FileContentIndex/e462e3f4-0a51-4b54-a4cb-49ed1d7ee163.vsidx new file mode 100644 index 00000000..c9efb2e4 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/e462e3f4-0a51-4b54-a4cb-49ed1d7ee163.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/fdfdcac1-62b4-4005-85c6-d65db8dda4f0.vsidx b/.vs/HighWayIot/FileContentIndex/fdfdcac1-62b4-4005-85c6-d65db8dda4f0.vsidx deleted file mode 100644 index 155e387b..00000000 Binary files a/.vs/HighWayIot/FileContentIndex/fdfdcac1-62b4-4005-85c6-d65db8dda4f0.vsidx and /dev/null differ diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo index 666d42c5..f9a70df2 100644 Binary files a/.vs/HighWayIot/v17/.suo and b/.vs/HighWayIot/v17/.suo differ diff --git a/Aucma.Scada.Business/InStoreBusiness.cs b/Aucma.Scada.Business/InStoreBusiness.cs index 431c1dc4..9f39f29b 100644 --- a/Aucma.Scada.Business/InStoreBusiness.cs +++ b/Aucma.Scada.Business/InStoreBusiness.cs @@ -108,7 +108,6 @@ namespace Aucma.Scada.Business // Thread.Sleep(1000); // } //}); - } /// @@ -493,5 +492,14 @@ namespace Aucma.Scada.Business return materialName; } + + /// + /// 获取仓库物料库存 + /// + /// + public List GetMaterialStock() + { + return _spaceInfoService.GetMaterialStock(appConfig.shellStoreCode, appConfig.linerStoreCode); + } } } diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll index aed8c7ba..534677e3 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb index 0f87be07..db76c9a5 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.dll index 00146f1b..535759d6 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.dll differ diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb index 729d8bab..370c2987 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb differ diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll index 5ab25a3e..9c277a85 100644 Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll differ diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb index 05f0039b..fa92bdb7 100644 Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache index 5a051d71..e97fedf6 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll index aed8c7ba..534677e3 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb index 0f87be07..db76c9a5 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache index 0c354bee..6ac346ba 100644 Binary files a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache and b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache 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/bin/Debug/Aucma.Scada.Model.dll b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll index 00146f1b..535759d6 100644 Binary files a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll and b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll differ diff --git a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb index 729d8bab..370c2987 100644 Binary files a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb differ 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 e2b161f1..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 d80d9ce2..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 abd82577..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.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache index ba1a49f9..f74b7f5e 100644 Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.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 510df1d3..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 a257223f..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 e89e3aa5..b10fe949 100644 Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ