diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json index 6f3b5a80..c8c74e7f 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json @@ -2,17 +2,17 @@ "App": { "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, - "ConnectionStrings": { - "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", - "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" - }, //"ConnectionStrings": { - // //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", - // //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;" - // "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", - // "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", - // "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" + // "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", + // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" //}, + "ConnectionStrings": { + //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", + //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;" + "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", + "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", + "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json index 62b95db0..2b54af4e 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -2,18 +2,18 @@ "App": { "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, - "ConnectionStrings": { - "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", - "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;" - }, //"ConnectionStrings": { - // //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", - // //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;", - // "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", - // "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", - // "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" - + // "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", + // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;" //}, + "ConnectionStrings": { + //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", + //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;", + "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", + "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", + "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" + + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs index 8c4f00fa..6f180115 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -291,9 +291,10 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + " @type = 4\n" + + " @date = N'{1}',\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum)); + string.Format(sql, input.BillNum,input.AccountDate)); } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index 6e6834a9..b343e9b0 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -145,18 +145,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); - var totalCount = await GetCountAsync(input); var stockList = _wmsDapper.GetSalesStock(); - - - var query= from itm in entities join itm1 in stockList on itm.MaterialCode equals itm1.SapCode into temp1 from tm1 in temp1.DefaultIfEmpty() select new WmsHQHSharePartOutPutDetial(//少加个发货,由于零件有重复 - itm.Id, + itm.Id, itm.WmsBillNum, itm.OrderBillNum, itm.MaterialCode, @@ -173,7 +169,7 @@ into temp1 itm.TaskId, itm.Remark, itm.Qty, - tm1 == null ? 0 : tm1.Qty + tm1==null?0:tm1.Qty ); @@ -319,9 +315,10 @@ into temp1 "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + " @type = 4\n" + + " @date = N'{1}',\n"+ "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum)); + string.Format(sql, input.BillNum,input.AccountDate)); } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs index 5497abbd..da00e419 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -179,7 +179,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum); - if (_count == 0) + if (_count == 0 && _wmslst.Count()>0) { var _version = new WmsJitOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email); await _wmsVersionRepository.InsertAsync(_version, true); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs index bace842d..68cf5174 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs @@ -391,6 +391,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + " @type = 1\n" + + " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum)); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs index 4053c24e..d247eac8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -315,6 +315,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + " @type = 2\n" + + " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum)); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs index 278a4a18..7a65fcbe 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs @@ -295,9 +295,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMS "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + " @type = 4\n" + + " @date = N'{1}',\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum)); + string.Format(sql, input.BillNum,input.AccountDate)); } }