diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/BomServices.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/BomServices.cs
index 87d51cc..c2bea71 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/BomServices.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/BomServices.cs
@@ -50,9 +50,9 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom
///
///
[HttpPost("/api/ExternalPlatform/Bom/DeleteBom")]
- public async Task DeleteBom(string[] ids)
+ public async Task DeleteBom(DeleteBomDto dto)
{
- return await _bomService.DeleteBom(ids);
+ return await _bomService.DeleteBom(dto);
}
///
/// 根据配方id查询配方详情
@@ -60,7 +60,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom
///
///
[HttpPost("/api/ExternalPlatform/Bom/GetBomEntry")]
- public async Task GetBomEntry(BomIdDto dto)
+ public async Task> GetBomEntry(BomIdDto dto)
{
return await _bomService.GetBomEntry(dto);
}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Dtos/DeleteBomDto.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Dtos/DeleteBomDto.cs
new file mode 100644
index 0000000..5ec28b1
--- /dev/null
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Dtos/DeleteBomDto.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Dtos
+{
+ public class DeleteBomDto
+ {
+ public List Ids { get; set; }
+ }
+}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/BomService.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/BomService.cs
index 4f26839..c99a61f 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/BomService.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/BomService.cs
@@ -138,11 +138,12 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
///
///
///
- public async Task DeleteBom(string[] ids)
+ public async Task DeleteBom(DeleteBomDto dto)
{
try
{
SqlSugarDb.Db.BeginTran();
+ var ids= dto.Ids;
var goods = SqlSugarDb.Db.Queryable().Where(x => ids.Contains(x.Id)).ToList();
if (goods == null) throw Oops.Oh(ErrorCodeEnum.Code10015);
var goodsbom = SqlSugarDb.Db.Queryable().Where(x => ids.Contains(x.BomId)).ToList();
@@ -163,7 +164,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
///
///
///
- public async Task GetBomEntry(BomIdDto dto)
+ public async Task> GetBomEntry(BomIdDto dto)
{
try
{
@@ -178,7 +179,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
BatchingName=c.Batching_Name,
BomId = a.BomId,
BomName=b.Name
- }).FirstAsync();
+ }).ToListAsync();
return resEntity;
}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/IBomService.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/IBomService.cs
index 6e3ef05..7374a49 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/IBomService.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Bom/Services/IBomService.cs
@@ -35,13 +35,13 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Bom.Services
///
///
///
- Task DeleteBom(string[] ids);
+ Task DeleteBom(DeleteBomDto dto);
///
/// 根据配方id查询配方详情
///
///
///
- Task GetBomEntry(BomIdDto dto);
+ Task> GetBomEntry(BomIdDto dto);
///
/// 添加配方详情
///
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Dtos/DeviceInfoDelDto.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Dtos/DeviceInfoDelDto.cs
index 2ba9808..e7b5cd7 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Dtos/DeviceInfoDelDto.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Device/Dtos/DeviceInfoDelDto.cs
@@ -8,6 +8,6 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Device.Dtos
{
public class DeviceInfoDelDto
{
- public string[] Ids { get; set; }
+ public List Ids { get; set; }
}
}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/DeleteGoodsDto.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/DeleteGoodsDto.cs
new file mode 100644
index 0000000..5b6bd8d
--- /dev/null
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/DeleteGoodsDto.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
+{
+ public class DeleteGoodsDto
+ {
+ public List Ids { get; set; }
+ }
+}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionListViewDto.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionListViewDto.cs
index 72391dc..6241539 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionListViewDto.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Dtos/GoodsTechnologyActionListViewDto.cs
@@ -12,7 +12,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
public string DeviceId { get; set; }
public string WarehousrTemplateId { get; set; }
public string GoodsAttributeId { get; set; }
- public string DeviceName { get; set; }
+ public string TechnologyName { get; set; }
public List Data { get; set; }
}
public class GoodsTechnologyActionViewDto
@@ -30,17 +30,12 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Dtos
/// 商品属性id集合
///
public string GoodsAttributeId { get; set; }
- ///
- /// 是否物料
- ///
- public bool IsBatch { get; set; }
+
///
/// 动作value
///
public string ChnologyId { get; set; }
public DateTime CreateAt { get; set; }
- public string GroupId { get; set; }
- public int IsDeleted { get; set; }
public int Sort { get; set; }
public string GoodsId { get; set; }
public string DeviceId { get; set; }
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs
index 72937eb..32fb34d 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/GoodsServices.cs
@@ -58,9 +58,9 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
///
///
[HttpPost("/api/ExternalPlatform/Goods/DeleteGoods")]
- public async Task DeleteGoods(string[] ids)
+ public async Task DeleteGoods(DeleteGoodsDto dto)
{
- return await _goodsService.DeleteGoods(ids);
+ return await _goodsService.DeleteGoods(dto);
}
///
///添加商品属性
@@ -77,9 +77,9 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods
///
///
[HttpPost("/api/ExternalPlatform/Goods/GetGoodsAttributeList")]
- public async Task> GetGoodsAttributeList()
+ public async Task> GetGoodsAttributeList(GoodsIdDto dto)
{
- return await _goodsService.GetGoodsAttributeList();
+ return await _goodsService.GetGoodsAttributeList(dto);
}
///
/// 查询商品工艺
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs
index eadb647..dcc4770 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/GoodsService.cs
@@ -206,15 +206,15 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
///
///
///
- public async Task DeleteGoods(string[] ids)
+ public async Task DeleteGoods(DeleteGoodsDto dto)
{
try
{
SqlSugarDb.Db.BeginTran();
- var goods = SqlSugarDb.Db.Queryable().Where(x => ids.Contains(x.Id)).ToList();
+ var goods = SqlSugarDb.Db.Queryable().Where(x => dto.Ids.Contains(x.Id)).ToList();
if (goods == null) throw Oops.Oh(ErrorCodeEnum.Code1008);
- var goodsbom = SqlSugarDb.Db.Queryable().Where(x => ids.Contains( x.Goods_Id)).ToList();
- var goodsTechnology = SqlSugarDb.Db.Queryable().Where(x => ids.Contains(x.GoodsId)).ToList();
+ var goodsbom = SqlSugarDb.Db.Queryable().Where(x => dto.Ids.Contains( x.Goods_Id)).ToList();
+ var goodsTechnology = SqlSugarDb.Db.Queryable().Where(x => dto.Ids.Contains(x.GoodsId)).ToList();
await SqlSugarDb.Db.Deleteable(goodsbom).ExecuteCommandAsync();
await SqlSugarDb.Db.Deleteable(goodsTechnology).ExecuteCommandAsync();
var res = await SqlSugarDb.Db.Deleteable(goods).ExecuteCommandAsync();
@@ -281,9 +281,16 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
/// 查询商品属性
///
///
- public async Task> GetGoodsAttributeList()
+ public async Task> GetGoodsAttributeList(GoodsIdDto dto)
{
+ var goodstypeid = "";
+ var goods=SqlSugarDb.Db.Queryable().WhereIF(!string.IsNullOrWhiteSpace(dto.GoodsId), x => x.Id == dto.GoodsId).First();
+ if (goods != null)
+ {
+ goodstypeid = goods.GoodsTypeId;
+ }
var res = await SqlSugarDb.Db.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(goodstypeid),x=>x.GoodsTypeId== goodstypeid)
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.Select(a => new GoodsAttributeVewDto
{
@@ -330,7 +337,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
DeviceId = s[t].Key,
WarehousrTemplateId = sf1[t].Key,
GoodsAttributeId = string.Join(',', sdw),
- DeviceName = Devicelist?.FirstOrDefault(x => x.Id == s[t].Key).DeviceName + "【" + nane + "】",
+ TechnologyName = Devicelist?.FirstOrDefault(x => x.Id == s[t].Key).DeviceName + "【" + nane + "】",
Data = s[t].AsQueryable().ToList(),
};
goodsTechnologyActionListViews.Add(item);
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs
index a22dc36..750789b 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Goods/Services/IGoodsService.cs
@@ -34,7 +34,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
///
///
///
- Task DeleteGoods(string[] ids);
+ Task DeleteGoods(DeleteGoodsDto dto);
///
///添加商品属性
///
@@ -45,7 +45,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Goods.Services
/// 查询商品属性
///
///
- Task> GetGoodsAttributeList();
+ Task> GetGoodsAttributeList(GoodsIdDto dto);
///
/// 查询商品工艺
///
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplatInsertDto.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplatInsertDto.cs
index 261a24d..f7b2c6f 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplatInsertDto.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplatInsertDto.cs
@@ -16,8 +16,8 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplat
}
public class WarehousePostionInsert
{
- public string Id { get; set; }
- public string TemplateId { get; set; }
+ //public string Id { get; set; }
+ //public string TemplateId { get; set; }
public string Code { get; set; }
public string BatchingId { get; set; }
}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplateView.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplateView.cs
index 256d7dd..753de48 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplateView.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Dtos/WarehouseTemplateView.cs
@@ -14,8 +14,16 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplat
public string DeviceName { get; set; }
public string TemplateName { get; set; }
public DateTime CreateAt { get; set; }
- public int ProductNumber { get; set; }
+ public int Count { get; set; }
public string ProductUrl { get; set; }
- public List WarehousePostion { get; set; }
+ public List WarehousePostion { get; set; }
+ }
+ public class WarehousePostionVewDto
+ {
+ public string Id { get; set; }
+ public string TemplateId { get; set; }
+ public string Code { get; set; }
+ public string BatchingId { get; set; }
+ public string BatchingName { get; set; }
}
}
diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Services/WarehouseTemplateService.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Services/WarehouseTemplateService.cs
index c6358f2..fb5897d 100644
--- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Services/WarehouseTemplateService.cs
+++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/WarehouseTemplate/Services/WarehouseTemplateService.cs
@@ -3,6 +3,7 @@ using BPA.SAAS.Manage.Application.AExternalPlatform.Enum;
using BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplate.Dtos;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
+using BPA.SAAS.Manage.Core.DataBase;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Product;
using LogicExtensions;
@@ -30,12 +31,12 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplat
DeviceName = b.DeviceName,
TemplateName = a.TemplateName,
CreateAt = a.CreateAt,
- ProductNumber = c.ProductNumber,
+ Count = c.ProductNumber,
ProductUrl = c.ProductUrl
})
.Mapper(x =>
{
- x.WarehousePostion = SqlSugarDb.Db.Queryable().Where(t => t.TemplateId == x.Id).ToList();
+ x.WarehousePostion = SqlSugarDb.Db.Queryable((a, b) => new JoinQueryInfos(JoinType.Left,a.BatchingId==b.Id)).Where((a, b) => a.TemplateId == x.Id).Select((a, b) => new WarehousePostionVewDto() { Id=a.Id.SelectAll(),BatchingName=b.Batching_Name}).ToList();
})
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.ToPageListAsync(inputDto.Current, inputDto.PageSize, total);
@@ -59,12 +60,12 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.WarehouseTemplat
DeviceName = b.DeviceName,
TemplateName = a.TemplateName,
CreateAt = a.CreateAt,
- ProductNumber = c.ProductNumber,
+ Count = c.ProductNumber,
ProductUrl = c.ProductUrl
})
.Mapper(x =>
{
- x.WarehousePostion = SqlSugarDb.Db.Queryable().Where(t => t.TemplateId == x.Id).ToList();
+ x.WarehousePostion = SqlSugarDb.Db.Queryable((a, b) => new JoinQueryInfos(JoinType.Left, a.BatchingId == b.Id)).Where((a, b) => a.TemplateId == x.Id).Select((a, b) => new WarehousePostionVewDto() { Id = a.Id.SelectAll(), BatchingName = b.Batching_Name }).ToList();
})
.OrderBy(a => a.CreateAt, OrderByType.Desc)
.ToListAsync();