Commit afbb0721 by pengjinyang

no message

parent c69053ee
......@@ -71,12 +71,14 @@ namespace Service.TakeStock
[DisplayName("添加盘点作业, 盘点计划Id:{0}")]
public async Task<bool> ReTry(int scheduleId)
{
var orders = _orderRepository.GetAllList(o => !o.IsDeleted && o.State == TSOrderState.创建 && o.ScheduleId == scheduleId);
var orders = _orderRepository.GetAllList(o => !o.IsDeleted && o.State != TSOrderState.取消 && o.State != TSOrderState.完成 && o.ScheduleId == scheduleId);
bool isSuccess = false;
try
{
foreach (var order in orders)
{
order.State = TSOrderState.创建;
await _orderRepository.UpdateAsync(order, "State", "LastModificationTime");
BackgroundJob.Enqueue(() => FreezeStockAsync(order.Id));
}
isSuccess = true;
......@@ -84,7 +86,6 @@ namespace Service.TakeStock
catch (Exception ex)
{
isSuccess = false;
BackgroundJob.Schedule(() => ReTry(scheduleId), DateTime.Now.AddMinutes(_delay));
}
return isSuccess;
}
......
......@@ -13,8 +13,8 @@
"ConnectionStrings": {
"Localhost": "server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;",
"RabbitMqConnection": "host=111.230.164.154:5672;username=bailun;password=1234abcd;prefetchcount=2;publisherConfirms=true;timeout=10",
"Redis": "127.0.0.1,connectRetry=2"
//"Redis": "129.204.97.78,password=BLT.redis&2019,connectRetry=2"
//"Redis": "127.0.0.1,connectRetry=2"
"Redis": "129.204.97.78,password=BLT.redis&2019,connectRetry=2"
},
"App": {
"CorsOrigins": "*"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment