😎采购申请优化代码
This commit is contained in:
parent
ce1d126366
commit
b2e89ddbd9
@ -37,7 +37,6 @@ public class PurchasingRequisitionToSap : IJob
|
|||||||
var sapOutputs = await _purchasingRequisition.TimingSyncToSAPPurchasingRequisition();
|
var sapOutputs = await _purchasingRequisition.TimingSyncToSAPPurchasingRequisition();
|
||||||
var json = JsonConvert.SerializeObject(sapOutputs);
|
var json = JsonConvert.SerializeObject(sapOutputs);
|
||||||
using var serviceScope = _scopeFactory.CreateScope();
|
using var serviceScope = _scopeFactory.CreateScope();
|
||||||
var sysEnumService = serviceScope.ServiceProvider.GetRequiredService<SysEnumService>();
|
|
||||||
var dbMain = serviceScope.ServiceProvider.GetRequiredService<ISqlSugarClient>().AsTenant().GetConnectionScope("1300000000001").CopyNew();
|
var dbMain = serviceScope.ServiceProvider.GetRequiredService<ISqlSugarClient>().AsTenant().GetConnectionScope("1300000000001").CopyNew();
|
||||||
string output = json;
|
string output = json;
|
||||||
var elapsedMilliseconds = (DateTime.Now - startTime).TotalMilliseconds;
|
var elapsedMilliseconds = (DateTime.Now - startTime).TotalMilliseconds;
|
||||||
|
@ -120,7 +120,7 @@ public class PurchasingRequisitionService : IDynamicApiController, ITransient
|
|||||||
|
|
||||||
//查询BOM
|
//查询BOM
|
||||||
var bomData = await db.CopyNew().Queryable<ConfigurationData>().Where(x => x.ConfigId == configid && x.ParentGuid == item.RecordGuid && x.isDeleted == false && x.ParentVersion == item.VersionIndex).ToListAsync();
|
var bomData = await db.CopyNew().Queryable<ConfigurationData>().Where(x => x.ConfigId == configid && x.ParentGuid == item.RecordGuid && x.isDeleted == false && x.ParentVersion == item.VersionIndex).ToListAsync();
|
||||||
var project = await db.CopyNew().Queryable<Obj119>().Where(x => x.RecordGuid == item.fld004639_Rec && x.deleted == false).OrderByDescending(x => x.VersionIndex).FirstAsync();
|
var project = await db.CopyNew().Queryable<Obj109>().Where(x => x.RecordGuid == item.fld004639_Rec && x.deleted == false).OrderByDescending(x => x.VersionIndex).FirstAsync();
|
||||||
foreach (var bomItem in bomData)
|
foreach (var bomItem in bomData)
|
||||||
{
|
{
|
||||||
var unit = await _dataValidationService.GetUnit(bomItem.ChildObjID, bomItem.ChildGuid);
|
var unit = await _dataValidationService.GetUnit(bomItem.ChildObjID, bomItem.ChildGuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user