|
|
|
@ -102,6 +102,7 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
//_bookingSlotService = _serviceProvider.GetRequiredService<IBookingSlotService>();
|
|
|
|
|
_seaTaskService = _serviceProvider.GetRequiredService<ISeaExportTaskService>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_taskManageBaseService = _serviceProvider.GetRequiredService<Lazy<ITaskManageBaseService>>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1652,4 +1653,38 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新服务项目
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<DataResult> UpdateSeaExportServiceItem()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
var list = await tenantDb.Queryable<SeaExport>().Where(x => x.ServiceItem == null || x.ServiceItem == "").ToListAsync();//.Where(x => x.IsRefund == false && x.IsChangeETD == false)
|
|
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
var res = await _djyServiceStatusService.GetServiceProjectList(new EmbedQueryServiceProjectWithStatus()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = item.Id.ToString(),
|
|
|
|
|
QueryType = 0,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var data = JsonConvert.DeserializeObject<ServiceProjectRoot>(res.data.ToString());
|
|
|
|
|
var res1 = data.Ext;
|
|
|
|
|
if (res1 != null && res1.Count>0) {
|
|
|
|
|
|
|
|
|
|
var codes = res1.Where(x=>x.IsYield == true).Select(x=> x.ProjectCode.ToLower()).ToList();
|
|
|
|
|
var codeStr = String.Join(",", codes);
|
|
|
|
|
item.ServiceItem = codeStr;
|
|
|
|
|
await tenantDb.Updateable(item).UpdateColumns(x=>new { x.ServiceItem}).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
Console.WriteLine(res.data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
}
|
|
|
|
|
}
|