|
|
@@ -99,6 +99,76 @@ namespace BPA.SAAS.Manage.Application.Device.Services |
|
|
|
list.Add(batchingpushtopics); |
|
|
|
list.Add(chnologypushtopics); |
|
|
|
await _db.Insertable(list).CallEntityMethod(m => m.Create()).ExecuteCommandAsync(); |
|
|
|
List<BPA_ProductFunction> ProductFunctionlist = new(); |
|
|
|
var goodsProductFunction = new BPA_ProductFunction() |
|
|
|
{ |
|
|
|
Id=Guid.NewGuid().ToString(), |
|
|
|
CreateAt= DateTime.Now, |
|
|
|
DataType = "textareaary", |
|
|
|
Type = 1, |
|
|
|
Name = "商品数据下发", |
|
|
|
Description = "商品数据下发", |
|
|
|
ProductId = inputDto.ProductId, |
|
|
|
DeviceVersionKey = res.Id, |
|
|
|
IsDefault = true |
|
|
|
}; |
|
|
|
var batchingProductFunction = new BPA_ProductFunction() |
|
|
|
{ |
|
|
|
Id = Guid.NewGuid().ToString(), |
|
|
|
CreateAt = DateTime.Now, |
|
|
|
DataType = "textareaary", |
|
|
|
Type = 1, |
|
|
|
Name = "物料数据下发", |
|
|
|
Description = "物料数据下发", |
|
|
|
ProductId = inputDto.ProductId, |
|
|
|
DeviceVersionKey = res.Id, |
|
|
|
IsDefault = true |
|
|
|
}; |
|
|
|
var chnologyProductFunction = new BPA_ProductFunction() |
|
|
|
{ |
|
|
|
Id = Guid.NewGuid().ToString(), |
|
|
|
CreateAt = DateTime.Now, |
|
|
|
DataType = "textareaary", |
|
|
|
Type = 1, |
|
|
|
Name = "工艺数据下发", |
|
|
|
Description = "工艺数据下发", |
|
|
|
ProductId = inputDto.ProductId, |
|
|
|
DeviceVersionKey = res.Id, |
|
|
|
IsDefault = true |
|
|
|
}; |
|
|
|
ProductFunctionlist.Add(goodsProductFunction); |
|
|
|
ProductFunctionlist.Add(batchingProductFunction); |
|
|
|
ProductFunctionlist.Add(chnologyProductFunction); |
|
|
|
await _db.Insertable(ProductFunctionlist).ExecuteCommandAsync(); |
|
|
|
List<BPA_ProductFunctionAction> ProductFunctionActionlist = new(); |
|
|
|
var goodsProductFunctionActionlist = new BPA_ProductFunctionAction() |
|
|
|
{ |
|
|
|
ActionType = "textareaary", |
|
|
|
ProductFunctionId = goodsProductFunction.Id, |
|
|
|
ActionName = "DataSoure", |
|
|
|
ActionValue = "", |
|
|
|
IsDefault = true |
|
|
|
}; |
|
|
|
var batchingProductFunctionActionlist = new BPA_ProductFunctionAction() |
|
|
|
{ |
|
|
|
ActionType = "textareaary", |
|
|
|
ProductFunctionId = batchingProductFunction.Id, |
|
|
|
ActionName = "DataSoure", |
|
|
|
ActionValue = "", |
|
|
|
IsDefault = true |
|
|
|
}; |
|
|
|
var chnologyProductFunctionActionlist = new BPA_ProductFunctionAction() |
|
|
|
{ |
|
|
|
ActionType = "textareaary", |
|
|
|
ProductFunctionId = chnologyProductFunction.Id, |
|
|
|
ActionName = "DataSoure", |
|
|
|
ActionValue = "", |
|
|
|
IsDefault = true |
|
|
|
}; |
|
|
|
ProductFunctionActionlist.Add(goodsProductFunctionActionlist); |
|
|
|
ProductFunctionActionlist.Add(batchingProductFunctionActionlist); |
|
|
|
ProductFunctionActionlist.Add(chnologyProductFunctionActionlist); |
|
|
|
await _db.Insertable(ProductFunctionActionlist).CallEntityMethod(m => m.Create()).ExecuteCommandAsync(); |
|
|
|
_db.Ado.CommitTran(); |
|
|
|
return res != null; |
|
|
|
} |
|
|
|