|
|
@ -67,17 +67,17 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService |
|
|
|
[ApiExplorerSettings(IgnoreApi = true)] |
|
|
|
public async Task Invoke(IServiceProvider serviceProvider) |
|
|
|
{ |
|
|
|
await this.Invoke(); |
|
|
|
await this.Invoke().ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
public async Task Invoke() |
|
|
|
{ |
|
|
|
await SyncJitRecordAsync(); |
|
|
|
await SyncJisRecordAsync(); |
|
|
|
await SyncJitRecordAsync().ConfigureAwait(false); |
|
|
|
await SyncJisRecordAsync().ConfigureAwait(false); |
|
|
|
if (_addMaterialRelationships.Any()) |
|
|
|
{ |
|
|
|
_addMaterialRelationships = _addMaterialRelationships.GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList(); |
|
|
|
_addMaterialRelationships = _addMaterialRelationships.Where(t => !string.IsNullOrEmpty(t.ErpMaterialCode)).GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList(); |
|
|
|
await _materialRelationshipManager.AddNewMaterialRelationships(_addMaterialRelationships).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
@ -100,7 +100,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService |
|
|
|
} |
|
|
|
|
|
|
|
//WMS发运记录
|
|
|
|
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).ToList(); |
|
|
|
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).Take(10000).ToList(); |
|
|
|
|
|
|
|
var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords); |
|
|
|
if (bbacSeDetails.Any()) |
|
|
@ -150,7 +150,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService |
|
|
|
} |
|
|
|
|
|
|
|
//WMS发运数据
|
|
|
|
var wmsRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD.Where(predicate).OrderBy(b => b.UID).ToList(); |
|
|
|
var wmsRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD.Where(predicate).OrderBy(b => b.UID).Take(10000).ToList(); |
|
|
|
|
|
|
|
var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<BBAC_SE_DETAIL>>(wmsRecords); |
|
|
|
if (bbacSeDetails.Any()) |
|
|
|