optimize
wet 2 years ago
parent ec2bbc60a4
commit c26a09e62d

@ -354,7 +354,7 @@ namespace Myshipping.Application
Select((goods, config) => new
{
bookingid = goods.bookingId,
ConfigId = config.Id,
ConfigId = goods.ConfigId,
SystemCode = config.SystemCode,
StatusName = config.StatusName,
FinishTime = goods.FinishTime,

@ -57,14 +57,14 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingGoodsStatus> _goodsStatus;
private readonly SqlSugarRepository<BookingGoodsStatusConfig> _goodsStatusConfig;
private readonly SqlSugarRepository<DjyTenantLine> _repline;
private readonly SqlSugarRepository<MappingCarrier> _mapcarrier;
public DataSyncService(ILogger<DataSyncService> logger, ISysCacheService cache, SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
SqlSugarRepository<SysUser> repUser, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<DjyCustomer> djycustomer,
SqlSugarRepository<DjyCustomerContact> djycustomercontact, SqlSugarRepository<DjyVesselInfo> vesselinfo, SqlSugarRepository<BookingCtnDetail> ctndetailrep
, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail,
SqlSugarRepository<BookingGoodsStatus> goodsStatus, SqlSugarRepository<BookingGoodsStatusConfig> goodsStatusConfig, SqlSugarRepository<DjyTenantLine> repline,
SqlSugarRepository<BookingRemark> bookingremark)
SqlSugarRepository<BookingRemark> bookingremark, SqlSugarRepository<MappingCarrier> mapcarrier)
{
this._logger = logger;
this._rep = rep;
@ -83,6 +83,7 @@ namespace Myshipping.Application
this._goodsStatus = goodsStatus;
this._goodsStatusConfig = goodsStatusConfig;
this._repline = repline;
this._mapcarrier = mapcarrier;
}
@ -115,7 +116,10 @@ namespace Myshipping.Application
else
{
entity.Id = m.Id;
await _djycustomer.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
await _djycustomer.AsUpdateable(entity).IgnoreColumns(it => new
{
it.TIDANINFO
}).ExecuteCommandAsync();
await _djycustomercontact.DeleteAsync(x => x.CustomerId == entity.Id);
foreach (var item in model.ContactList)
{
@ -160,7 +164,10 @@ namespace Myshipping.Application
else
{
entity.Id = m.Id;
await _djycustomer.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
await _djycustomer.AsUpdateable(entity).IgnoreColumns(it => new
{
it.TIDANINFO
}).ExecuteCommandAsync();
await _djycustomercontact.DeleteAsync(x => x.CustomerId == entity.Id);
foreach (var it in item.ContactList)
{

Loading…
Cancel
Save