测试接口
This commit is contained in:
@@ -3,14 +3,15 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
|
||||
namespace WMS.Web.Domain.IService
|
||||
{
|
||||
public interface IBoxService
|
||||
public interface IBoxService
|
||||
{
|
||||
// 同步老Ops箱信息
|
||||
Task<Result> Sync();
|
||||
Task<Result> Sync(List<OpsBoxResponse> list = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,12 +45,15 @@ namespace WMS.Web.Domain.Services
|
||||
_serialNumbersRepositories = serialNumbersRepositories;
|
||||
}
|
||||
|
||||
public async Task<Result> Sync()
|
||||
public async Task<Result> Sync(List<OpsBoxResponse> list)
|
||||
{
|
||||
DateTime begin = await _erpOpsSyncDateRepositories.Get(ErpOpsSyncType.Ops);
|
||||
begin= begin.AddYears(-1);
|
||||
OpsBoxRequest request = new OpsBoxRequest(begin, DateTime.Now);
|
||||
var list = await _opsService.GetBox(request);
|
||||
if (list == null || list.Count() <= 0)
|
||||
{
|
||||
DateTime begin = await _erpOpsSyncDateRepositories.Get(ErpOpsSyncType.Ops);
|
||||
begin = begin.AddYears(-1);
|
||||
OpsBoxRequest request = new OpsBoxRequest(begin, DateTime.Now);
|
||||
list = await _opsService.GetBox(request);
|
||||
}
|
||||
var nos = list.Select(s => s.BoxBillNo).ToList();
|
||||
var old_nos = await _boxRepositories.GetByNos(nos);
|
||||
foreach (var s in old_nos)
|
||||
|
||||
Reference in New Issue
Block a user