|
@@ -14,6 +14,7 @@ using BPA.SAAS.Manage.Core.Base; |
|
|
using BPA.SAAS.Manage.Core.DataBase; |
|
|
using BPA.SAAS.Manage.Core.DataBase; |
|
|
using BPA.SAAS.Manage.Core.Device; |
|
|
using BPA.SAAS.Manage.Core.Device; |
|
|
using BPA.SAAS.Manage.Core.Product; |
|
|
using BPA.SAAS.Manage.Core.Product; |
|
|
|
|
|
using Furion.ClayObject.Extensions; |
|
|
using Newtonsoft.Json; |
|
|
using Newtonsoft.Json; |
|
|
using Npoi.Mapper; |
|
|
using Npoi.Mapper; |
|
|
using NPOI.HSSF.UserModel; |
|
|
using NPOI.HSSF.UserModel; |
|
@@ -956,7 +957,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
var device = await _db.Queryable<BPA_DeviceInfo>().FirstAsync(x => x.Id == deviceId); |
|
|
var device = await _db.Queryable<BPA_DeviceInfo>().FirstAsync(x => x.Id == deviceId); |
|
|
|
|
|
|
|
|
//设备类型 |
|
|
//设备类型 |
|
|
var dictData = await _db.Queryable<BPA_ProductVesion>().FirstAsync(x => x.Id == device.ProductVersionId); |
|
|
|
|
|
|
|
|
var dictData = await _db.Queryable<BPA_TechnologyExportRecode>().FirstAsync(x => x.DeviceVersionId == device.ProductVersionId); |
|
|
|
|
|
|
|
|
return dictData?.TemplatePath ?? ""; |
|
|
return dictData?.TemplatePath ?? ""; |
|
|
} |
|
|
} |
|
@@ -977,11 +978,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
//} |
|
|
//} |
|
|
//else |
|
|
//else |
|
|
//{ |
|
|
//{ |
|
|
var path = await _SystemConfigService.GetCosImgesURL(file); |
|
|
|
|
|
await _db.Updateable<BPA_ProductVesion>() |
|
|
|
|
|
.SetColumns(it => it.TemplatePath == path) |
|
|
|
|
|
.Where(it => it.Id == inputDto.Id) |
|
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
|
|
|
|
var source = file.OpenReadStream(); |
|
|
var source = file.OpenReadStream(); |
|
|
var mapper = new Mapper(source); |
|
|
var mapper = new Mapper(source); |
|
|
var deviceVersion = await _db.Queryable<BPA_ProductVesion>().FirstAsync(x => x.ProductId == inputDto.DeviceClientType && x.Vesion == inputDto.Version); |
|
|
var deviceVersion = await _db.Queryable<BPA_ProductVesion>().FirstAsync(x => x.ProductId == inputDto.DeviceClientType && x.Vesion == inputDto.Version); |
|
@@ -1081,22 +1078,31 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
await _db.Insertable(item).ExecuteCommandAsync(); |
|
|
await _db.Insertable(item).ExecuteCommandAsync(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endregion |
|
|
|
|
|
var TechnologyExportRecode = _db.Queryable<BPA_TechnologyExportRecode>().Where(x=>x.DeviceVersionId == inputDto.Id).First(); |
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
var path = await _SystemConfigService.GetCosImgesURL(file); |
|
|
|
|
|
var TechnologyExportRecode = _db.Queryable<BPA_TechnologyExportRecode>().Where(x=>x.DeviceVersionId == inputDto.Id).First(); |
|
|
if (TechnologyExportRecode != null) |
|
|
if (TechnologyExportRecode != null) |
|
|
{ |
|
|
{ |
|
|
TechnologyExportRecode.CreateAt= DateTime.Now; |
|
|
TechnologyExportRecode.CreateAt= DateTime.Now; |
|
|
await _db.Updateable(TechnologyExportRecode).ExecuteCommandAsync(); |
|
|
|
|
|
|
|
|
TechnologyExportRecode.TemplatePath = path; |
|
|
|
|
|
await _db.Updateable(TechnologyExportRecode).ExecuteCommandAsync(); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
BPA_TechnologyExportRecode _TechnologyExportRecode = new(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BPA_TechnologyExportRecode _TechnologyExportRecode = new(); |
|
|
_TechnologyExportRecode.Id = Guid.NewGuid().ToString(); |
|
|
_TechnologyExportRecode.Id = Guid.NewGuid().ToString(); |
|
|
_TechnologyExportRecode.CreateAt = DateTime.Now; |
|
|
_TechnologyExportRecode.CreateAt = DateTime.Now; |
|
|
_TechnologyExportRecode.ProductId = inputDto.DeviceClientType; |
|
|
_TechnologyExportRecode.ProductId = inputDto.DeviceClientType; |
|
|
_TechnologyExportRecode.DeviceVersionId = inputDto.Id; |
|
|
_TechnologyExportRecode.DeviceVersionId = inputDto.Id; |
|
|
|
|
|
_TechnologyExportRecode.TemplatePath= path; |
|
|
await _db.Insertable(_TechnologyExportRecode).ExecuteCommandAsync(); |
|
|
await _db.Insertable(_TechnologyExportRecode).ExecuteCommandAsync(); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//await _db.Updateable<BPA_TechnologyExportRecode>() |
|
|
|
|
|
// .SetColumns(it => it.TemplatePath == path) |
|
|
|
|
|
// .Where(it => it.Id == inputDto.Id) |
|
|
|
|
|
// .ExecuteCommandAsync(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//} |
|
|
//} |
|
|
_db.Ado.CommitTran(); |
|
|
_db.Ado.CommitTran(); |
|
|