1
hutongqing
2024-12-23 10f53087313130934c23d7f2e53a6a73fde17e09
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs
@@ -1,11 +1,29 @@

using SqlSugar;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.BasicInfo;
namespace WIDESEAWCS_Server.HostedService
{
    public class WarehouseHostedService : IHostedService
    {
        public Task StartAsync(CancellationToken cancellationToken)
        {
            throw new NotImplementedException();
            string connStr = AppSettings.GetValue("WMSConnectionStrings");
            if (string.IsNullOrEmpty(connStr))
            {
                throw new Exception("WMS连接字符串错误");
            }
            SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig()
            {
                ConnectionString = connStr,
                IsAutoCloseConnection = true,
                DbType = DbType.SqlServer
            });
            List<WarehouseDTO> warehouses = sugarClient.Queryable<WarehouseDTO>().ToList();
            return Task.CompletedTask;
        }
        public Task StopAsync(CancellationToken cancellationToken)