diff --git a/ds-wms-service/DS.Module.DjyServiceStatus/ServiceProjectRes.cs b/ds-wms-service/DS.Module.DjyServiceStatus/ServiceProjectRes.cs
new file mode 100644
index 00000000..15c984be
--- /dev/null
+++ b/ds-wms-service/DS.Module.DjyServiceStatus/ServiceProjectRes.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static System.Net.Mime.MediaTypeNames;
+
+namespace DS.Module.DjyServiceStatus
+{
+ ///
+ /// 服务项目返回
+ ///
+ public class ServiceProjectRes
+ {
+ ///
+ ///
+ ///
+ public string ProjectPKId { get; set; }
+ ///
+ ///
+ ///
+ public string ProjectCode { get; set; }
+ ///
+ /// 订舱
+ ///
+ public string ProjectName { get; set; }
+ ///
+ ///
+ ///
+ public int SortNo { get; set; }
+ ///
+ ///
+ ///
+ public bool IsYield { get; set; }
+ ///
+ ///
+ ///
+ public DateTime ActDate { get; set; }
+ ///
+ ///
+ ///
+ public int StatusNum { get; set; }
+ }
+
+ public class ServiceProjectRoot
+ {
+ ///
+ ///
+ ///
+ public bool Succ { get; set; }
+ ///
+ ///
+ ///
+ public int Status { get; set; }
+ ///
+ ///
+ ///
+ public List Ext { get; set; }
+ ///
+ ///
+ ///
+ public bool IsTimeout { get; set; }
+ ///
+ ///
+ ///
+ public DateTime ExecuteTime { get; set; }
+ }
+}
diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportService.cs
index 8ba1596a..ca7824ad 100644
--- a/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportService.cs
+++ b/ds-wms-service/DS.WMS.Core/Op/Interface/ISeaExportService.cs
@@ -280,4 +280,10 @@ public interface ISeaExportService
///
///
public Task CreateOrderAuditTaskAsync(IdModel req);
+
+ ///
+ /// 更新服务项目
+ ///
+ ///
+ public Task UpdateSeaExportServiceItem();
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs
index 95052b6c..bbea8402 100644
--- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs
+++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportService.cs
@@ -102,6 +102,7 @@ public partial class SeaExportService : ISeaExportService
//_bookingSlotService = _serviceProvider.GetRequiredService();
_seaTaskService = _serviceProvider.GetRequiredService();
+
_taskManageBaseService = _serviceProvider.GetRequiredService>();
}
@@ -1652,4 +1653,38 @@ public partial class SeaExportService : ISeaExportService
return DataResult.Success;
}
}
+
+
+ ///
+ /// 更新服务项目
+ ///
+ ///
+ public async Task UpdateSeaExportServiceItem()
+ {
+
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+ var list = await tenantDb.Queryable().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(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;
+ }
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs
index 41cdcb8c..18266968 100644
--- a/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs
+++ b/ds-wms-service/DS.WMS.OpApi/Controllers/SeaExportController.cs
@@ -593,5 +593,15 @@ public class SeaExportController : ApiController
var res = await _invokeService.CreateOrderAuditTaskAsync(req);
return res;
}
-
+ ///
+ /// 更新服务项目
+ ///
+ ///
+ [HttpGet]
+ [Route("UpdateSeaExportServiceItem")]
+ public async Task UpdateSeaExportServiceItem()
+ {
+ var res = await _invokeService.UpdateSeaExportServiceItem();
+ return res;
+ }
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Test/Startup.cs b/ds-wms-service/DS.WMS.Test/Startup.cs
index 3905d24f..437f5f7a 100644
--- a/ds-wms-service/DS.WMS.Test/Startup.cs
+++ b/ds-wms-service/DS.WMS.Test/Startup.cs
@@ -56,7 +56,8 @@ public class Startup
services.AddSqlSugarInstall();
services.AddSaasDbInstall();
services.AddPrintModuleInstall();
-
+ services.AddDjyModuleInstall(); //djy服务
+
}
///