Browse Source

工艺列表和复制列表排序20241112

kitchenmanage
gwbvipvip 1 month ago
parent
commit
a906fbc917
3 changed files with 18 additions and 17 deletions
  1. +15
    -15
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs
  2. +1
    -1
      BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json
  3. +2
    -1
      BPA.SAAS.Manage.Web.Entry/appsettings.json

+ 15
- 15
BPA.SAAS.Manage.Application/DataBase/Services/GoodsTechnologyService.cs View File

@@ -419,17 +419,18 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
public async Task<List<DeviceTechnologyActionListView>> GetDeviceTechnologyAction(DeviceQueryDto param)
public async Task<List<DeviceTechnologyActionListView>> GetDeviceTechnologyAction(DeviceQueryDto param)
{
List<DeviceTechnologyActionListView> goodsTechnologyActionListViews = new List<DeviceTechnologyActionListView>();
var list = _db.Queryable<BPA_GoodsTechnologyAction>().Where(x => x.DeviceId ==param.DeviceId).Select(x => new DeviceTechnologyActionListView()
{
Id = x.Id.SelectAll(),
}).ToList();
var list = _db.Queryable<BPA_GoodsTechnologyAction>().Where(x => x.DeviceId == param.DeviceId)
.Select(x => new DeviceTechnologyActionListView()
{
Id = x.Id.SelectAll(),
}).ToList();
var Goodlist = await _db.Queryable<BPA_GoodsInfo>().ToListAsync();
var Devicelist = await _db.Queryable<BPA_DeviceInfo>().ToListAsync();
var GoodsAttributeValue = await _db.Queryable<BPA_GoodsAttributeValue>().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<BPA_DeviceInfo>().ToListAsync();
var goodlist = await _db.Queryable<BPA_GoodsInfo>().ToListAsync();
var GoodsAttributeValue = await _db.Queryable<BPA_GoodsAttributeValue>().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,


+ 1
- 1
BPA.SAAS.Manage.Web.Entry/Properties/launchSettings.json View File

@@ -14,7 +14,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5006"
"applicationUrl": "http://192.168.1.50:5006"
},
"Docker": {
"commandName": "Docker",


+ 2
- 1
BPA.SAAS.Manage.Web.Entry/appsettings.json View File

@@ -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
}


Loading…
Cancel
Save