修改了拉取时间
This commit is contained in:
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31729.503
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.10.34916.146
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WMS.Web.Api", "src\WMS.Web.Api\WMS.Web.Api.csproj", "{6BC3A5E0-0590-4F16-B7A0-DAAC5591001C}"
|
||||
EndProject
|
||||
|
||||
@@ -136,6 +136,7 @@ namespace WMS.Web.Api.Controllers
|
||||
|
||||
//2.同步金蝶
|
||||
return await _inStockTaskService.Sysn(sbns);
|
||||
// return await _inStockTaskService.Sysn(null);//alter by yzh
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace WMS.Web.Api.Controllers
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
DateTime begin = DateTime.Now.AddDays(-3);//默认拉去三天以内的数据
|
||||
DateTime begin = DateTime.Now.AddDays(-9);//默认拉去三天以内的数据,刷新改成过去8天的数据,本身为3天,Alter by yzh
|
||||
var res = await _repositories.GetEntityList(dto.Ids);
|
||||
//先刷新选中的数据
|
||||
await _outStockTaskService.Sync(res.Select(s => s.BillNo).ToList());
|
||||
|
||||
@@ -5340,6 +5340,16 @@
|
||||
箱重
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.ExportInfoResponse.Qty">
|
||||
<summary>
|
||||
箱内数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.ExportInfoResponse.AccruedQty">
|
||||
<summary>
|
||||
应出库数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskByNoResponse">
|
||||
<summary>
|
||||
根据单号搜索出库单任务信息
|
||||
|
||||
@@ -10,6 +10,7 @@ using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Options;
|
||||
using WMS.Web.Domain.Services;
|
||||
|
||||
namespace WMS.Web.Domain.QuartzJob
|
||||
{
|
||||
@@ -50,6 +51,7 @@ namespace WMS.Web.Domain.QuartzJob
|
||||
try
|
||||
{
|
||||
_logger.LogInformation("执行金蝶删单监测");
|
||||
|
||||
var data = DateTime.Now;
|
||||
if (data.Hour == 8 || data.Hour == 12 || data.Hour == 16 || data.Hour == 20)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace WMS.Web.Domain.QuartzJob
|
||||
var begindatetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
_logger.LogInformation($"出库单-同步金蝶出库单数据:执行开始时间->{begindatetime}");
|
||||
|
||||
DateTime begin = DateTime.Now.AddHours(-8);//默认拉去8个小时以内的
|
||||
DateTime begin = DateTime.Now.AddHours(-160);//默认拉去8个小时以内的aLTER BY YZH
|
||||
//3.同步数据
|
||||
var result = await _outStockTaskService.Sync(null, begin);
|
||||
//5.记录:结束时间
|
||||
|
||||
@@ -21,6 +21,7 @@ using WMS.Web.Domain.IService;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Services.Public;
|
||||
using WMS.Web.Domain.Values;
|
||||
using static StackExchange.Redis.Role;
|
||||
|
||||
namespace WMS.Web.Domain.Services
|
||||
{
|
||||
@@ -237,7 +238,8 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
if (billNos == null || billNos.Count == 0)
|
||||
{
|
||||
var beginTime = DateTime.Now.AddHours(-8);
|
||||
var beginTime = DateTime.Now.AddHours(-260);//默认拉去8小时以内的数据,ALTER BY YZH
|
||||
|
||||
//1.同步数据:采购订单
|
||||
var purchase_result = await this.SsynPurchaseInStock(null, isTransaction, beginTime);
|
||||
if (!purchase_result.IsSuccess)
|
||||
|
||||
@@ -432,7 +432,7 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
//DateTime begin = await _erpOpsSyncDateRepositories.Get(ErpOpsSyncType.OutStock);
|
||||
if (begin == null)
|
||||
begin = DateTime.Now.AddHours(-8);//默认拉去8小时以内的数据
|
||||
begin = DateTime.Now.AddHours(-220);//默认拉去8小时以内的数据,ALTER BY YZH
|
||||
//更新时间范围内所有
|
||||
result = await BillQueryForSalOutStock(false, null, begin);
|
||||
if (!result.IsSuccess) isRollback = true;
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
/// </summary>
|
||||
public class ErpService : IErpService
|
||||
{
|
||||
private readonly IOutStockTaskService _outStockTaskService;
|
||||
private IMapper _mapper;
|
||||
private AppOptions _appOptions;
|
||||
private ErpOptions _erpOptions;
|
||||
@@ -304,7 +305,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
|
||||
//2.时间条件:可能还有其它条件
|
||||
//var beginTime = DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd 00:00:00");
|
||||
var beginStr = DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
var beginStr = DateTime.Now.AddDays(-9).ToString("yyyy-MM-dd HH:mm:ss");//本是3,alter by yzh
|
||||
if (beginTime != null) beginStr = beginTime?.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
var endTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
//3.获取金蝶其他入库订单:拼接参数和条件
|
||||
@@ -1021,7 +1022,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
}
|
||||
var endTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
_logger.LogInformation($"物料拉取-结束时间:{endTime}");
|
||||
//5.物料集合进行缓存-当前缓存时间到当天晚上的0点,后面定时任务执行重新放入缓存
|
||||
//5.物料集合进行缓存-当前缓存时间到当天晚上的0点,后面a执行重新放入缓存
|
||||
_memoryCache.Set(_erpOptions.cache_materail_key, erp_materials_list, new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(DateTimeUtil.GetTotalMinutesTimeSpan())));
|
||||
_logger.LogInformation($"物料拉取-总条数:{erp_materials_list.Count}");
|
||||
return ResultList<ErpMaterialDto>.ReSuccess(erp_materials_list);
|
||||
@@ -1405,6 +1406,8 @@ namespace WMS.Web.Domain.Services.Public
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
//1.获取缓存中的供应商数据;
|
||||
var suppliers = _memoryCache.Get<List<ErpSupplierDto>>(_erpOptions.cache_supplier_key);
|
||||
if (suppliers == null || suppliers.Count == 0)
|
||||
@@ -1471,6 +1474,7 @@ namespace WMS.Web.Domain.Services.Public
|
||||
/// <returns></returns>
|
||||
public async Task<ResultList<ErpCustomerDto>> BillQueryForCustomer()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
//1.获取缓存中的供应商数据;
|
||||
|
||||
Reference in New Issue
Block a user