diff --git a/Admin.Core.Api/Controllers/Business/WarehouseController.cs b/Admin.Core.Api/Controllers/Business/WarehouseController.cs index 413a113..03c47fb 100644 --- a/Admin.Core.Api/Controllers/Business/WarehouseController.cs +++ b/Admin.Core.Api/Controllers/Business/WarehouseController.cs @@ -287,16 +287,16 @@ namespace Admin.Core.Api.Controllers.Business return Failed>("传入参数为空!"); } MessageModel> messageModel = new MessageModel>(); - string planID = _hw_BarrelService.GetPlanIdByBarrelID(barrelBarcode.Trim()); - if (string.IsNullOrEmpty(planID)) + string materialName = _hw_BarrelService.GetMaterialNameByBarrelID(barrelBarcode.Trim()); + if (string.IsNullOrEmpty(materialName)) { - return Failed>("查询不到罐号对应的计划ID!"); + return Failed>("查询不到罐号对应的物料ID!"); } - if (planID == "-1") + if (materialName == "-1") { return Failed>("查询不到罐号!"); } - List wlist = _lr_weighService.GetRecentWeightList(planID); + List wlist = _lr_weighService.GetRecentWeightList(materialName); List list = new List(); foreach (LR_weigh weigh in wlist) { diff --git a/Admin.Core.Api/appsettings.Development.json b/Admin.Core.Api/appsettings.Development.json index bc6167b..9a19e01 100644 --- a/Admin.Core.Api/appsettings.Development.json +++ b/Admin.Core.Api/appsettings.Development.json @@ -80,8 +80,8 @@ "DBType": 1, "Enabled": true, "HitRate": 50, - //"Connection": "Data Source=192.168.10.50;Initial Catalog=cwss_xl;User ID=sa;Password=sa;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", - "Connection": "Data Source=119.45.202.115;Initial Catalog=cwss_xl;User ID=sa;Password=haiwei@123;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", + "Connection": "Data Source=127.0.0.1;Initial Catalog=cwss_xl;User ID=sa;Password=123456;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", + //"Connection": "Data Source=119.45.202.115;Initial Catalog=cwss_xl;User ID=sa;Password=haiwei@123;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //"Connection": "Data Source=192.168.10.50;Initial Catalog=cwss_xl;User ID=sa;Password=sa;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", "ProviderName": "System.Data.SqlClient" diff --git a/Admin.Core.IService/IService_New/IHw_BarrelServices.cs b/Admin.Core.IService/IService_New/IHw_BarrelServices.cs index c640c97..133160e 100644 --- a/Admin.Core.IService/IService_New/IHw_BarrelServices.cs +++ b/Admin.Core.IService/IService_New/IHw_BarrelServices.cs @@ -15,8 +15,8 @@ namespace Admin.Core.IService.IService_New /// /// 根据罐号获取料罐ID /// - /// + /// /// - string GetPlanIdByBarrelID(string barrelBarcode); + string GetMaterialNameByBarrelID(string barrelBarcode); } } diff --git a/Admin.Core.IService/IService_New/ILR_weighServices.cs b/Admin.Core.IService/IService_New/ILR_weighServices.cs index e3e0fcc..45c8f18 100644 --- a/Admin.Core.IService/IService_New/ILR_weighServices.cs +++ b/Admin.Core.IService/IService_New/ILR_weighServices.cs @@ -10,9 +10,9 @@ namespace Admin.Core.IService public interface ILR_weighServices :IBaseServices { /// - /// 通过计划号获取最近一次的称量列表 + /// 通过物料名称获取最近一次的称量列表 /// /// - List GetRecentWeightList(string planCode); + List GetRecentWeightList(string MaterialName); } } \ No newline at end of file diff --git a/Admin.Core.Service/Service_New/Hw_BarrelServices.cs b/Admin.Core.Service/Service_New/Hw_BarrelServices.cs index af83390..3512b1d 100644 --- a/Admin.Core.Service/Service_New/Hw_BarrelServices.cs +++ b/Admin.Core.Service/Service_New/Hw_BarrelServices.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace Admin.Core.Service.Service_New @@ -21,12 +22,12 @@ namespace Admin.Core.Service.Service_New base.BaseDal = dal; } - public string GetPlanIdByBarrelID(string barrelBarcode) + public string GetMaterialNameByBarrelID(string barrelBarcode) { try { - string planId = _dal.Query(x => x.BarCode == barrelBarcode).FirstOrDefault().PlanId; - return planId; + string materialName = _dal.Query(x => x.BarCode == barrelBarcode).FirstOrDefault().MaterialName; + return materialName; } catch(Exception ex) { diff --git a/Admin.Core.Service/Service_New/LR_weighServices.cs b/Admin.Core.Service/Service_New/LR_weighServices.cs index bfdd653..b6aee05 100644 --- a/Admin.Core.Service/Service_New/LR_weighServices.cs +++ b/Admin.Core.Service/Service_New/LR_weighServices.cs @@ -17,11 +17,11 @@ namespace Admin.Core.Service base.BaseDal = dal; } - public List GetRecentWeightList(string planCode) + public List GetRecentWeightList(string MaterialName) { try { - List list = _dal.Query(x => x.Plan_ID == planCode).ToList(); + List list = _dal.Query(x => x.Material_Name == MaterialName).ToList(); int maxMainID = list.Max(x => x.MainId); List groupList = list.Where(x => x.MainId == maxMainID).ToList(); return groupList;