diff --git a/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs b/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs
index 2d167da..ce8d0a3 100644
--- a/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs
+++ b/BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs
@@ -419,17 +419,18 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
///
///
///
- public async Task> GetDeviceTechnologyAction(DeviceQueryDto param)
+ public async Task> GetDeviceTechnologyAction(DeviceQueryDto param)
{
List goodsTechnologyActionListViews = new List();
- var list = _db.Queryable().Where(x => x.DeviceId ==param.DeviceId).Select(x => new DeviceTechnologyActionListView()
- {
- Id = x.Id.SelectAll(),
- }).ToList();
+ var list = _db.Queryable().Where(x => x.DeviceId == param.DeviceId)
+ .Select(x => new DeviceTechnologyActionListView()
+ {
+ Id = x.Id.SelectAll(),
+ }).ToList();
var Goodlist = await _db.Queryable().ToListAsync();
var Devicelist = await _db.Queryable().ToListAsync();
var GoodsAttributeValue = await _db.Queryable().ToListAsync();
- var sf = list.GroupBy(x => (x.GoodsAttributeId, x.WarehousrTemplateId)).ToList();
+ var sf = list.GroupBy(x => (x.GoodsId, x.GoodsAttributeId, x.WarehousrTemplateId)).OrderBy(t => t.Key.GoodsId).ThenBy(t => t.Key.GoodsAttributeId).ToList();
for (int i = 0; i < sf.Count; i++)
{
var sd = GoodsAttributeValue?.Where(x => sf[i].Key.GoodsAttributeId.Contains(x.Id)).OrderBy(x => sf[i].Key.GoodsAttributeId.IndexOf(x.Id)).Select(x => x.AttributeValue).ToArray();
@@ -439,20 +440,20 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
for (int t = 0; t < s.Count; t++)
{
DeviceTechnologyActionListView item = new()
- {
- DeviceId =param.DeviceId ,
+ {
+ DeviceId = param.DeviceId,
GoodsId = s[t].Key,
- GoodsName= Goodlist?.FirstOrDefault(x => x.Id == s[t].Key).Name,
+ GoodsName = Goodlist?.FirstOrDefault(x => x.Id == s[t].Key).Name,
GoodsAttributeId = string.Join(',', sdw),
- DeviceName = Devicelist?.FirstOrDefault(x => x.Id ==param.DeviceId).DeviceName,
- TechnologyName = Goodlist?.FirstOrDefault(x => x.Id == s[t].Key).Name + "【" + name + "】",
+ DeviceName = Devicelist?.FirstOrDefault(x => x.Id == param.DeviceId).DeviceName,
+ TechnologyName = Goodlist?.FirstOrDefault(x => x.Id == s[t].Key).Name + "【" + name + "】",
};
goodsTechnologyActionListViews.Add(item);
}
}
if (!string.IsNullOrWhiteSpace(param.TechnologyName))
{
- goodsTechnologyActionListViews=goodsTechnologyActionListViews.Where(x => x.TechnologyName.Contains(param.TechnologyName)).ToList();
+ goodsTechnologyActionListViews = goodsTechnologyActionListViews.Where(x => x.TechnologyName.Contains(param.TechnologyName)).ToList();
}
return goodsTechnologyActionListViews;
}
@@ -464,11 +465,11 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
.Select(x => new GoodsTechnologyActionView()
{
Id = x.Id.SelectAll(),
- }).OrderBy(x => x.GoodsAttributeId, OrderByType.Asc).ToList();
+ }).ToList();
var Devicelist = await _db.Queryable().ToListAsync();
var goodlist = await _db.Queryable().ToListAsync();
var GoodsAttributeValue = await _db.Queryable().ToListAsync();
- var sf = list.GroupBy(x => (x.GoodsAttributeId, x.WarehousrTemplateId)).ToList();
+ var sf = list.GroupBy(x => (x.GoodsAttributeId, x.WarehousrTemplateId)).OrderBy(t => t.Key.GoodsAttributeId).ToList();
for (int i = 0; i < sf.Count; i++)
{
var sd = GoodsAttributeValue?.Where(x => sf[i].Key.GoodsAttributeId.Contains(x.Id)).OrderBy(x => sf[i].Key.GoodsAttributeId.IndexOf(x.Id)).Select(x => x.AttributeValue).ToArray();
@@ -493,7 +494,6 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
result = result.Where(x => x.DeviceName.Contains(dto.DeviceName)).ToList();
}
- result = result.OrderBy(t => t.Order).ToList();
PageUtil util = new PageUtil()
{
Total = result.Count,
diff --git a/BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json b/BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json
index 9571557..6c47137 100644
--- a/BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json
+++ b/BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json
@@ -14,7 +14,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
- "applicationUrl": "http://localhost:5006"
+ "applicationUrl": "http://192.168.1.50:5006"
},
"Docker": {
"commandName": "Docker",
diff --git a/BPA.SAAS.Manage.Web.Entry/appsettings.json b/BPA.SAAS.Manage.Web.Entry/appsettings.json
index 6488e7d..f665de0 100644
--- a/BPA.SAAS.Manage.Web.Entry/appsettings.json
+++ b/BPA.SAAS.Manage.Web.Entry/appsettings.json
@@ -8,10 +8,11 @@
}
},
"AllowedHosts": "*",
- "baseurl": "http://localhost:5007/", //后厨服务地址
+ "baseurl": "http://192.168.1.50:5007/", //后厨服务地址
"ConnectionConfigs": [
{
"ConnectionString": "server=10.2.1.21;Database=bpa_kitchen_kitchenbasemanage;Uid=root;Pwd=cygadmin;Allow Zero Datetime=True;Convert Zero Datetime=True;",
+ //"ConnectionString": "server=rm-2vc13i9x07380opr2jo.mysql.cn-chengdu.rds.aliyuncs.com;Database=bpa_kitchen_kitchenbasemanage;Uid=readadmin;Pwd=readBapAdmin123456@$;Allow Zero Datetime=True;Convert Zero Datetime=True;",
"DbType": "Mysql",
"IsAutoCloseConnection": true
}