Commit afbb0721 by pengjinyang

no message

parent c69053ee
...@@ -71,12 +71,14 @@ namespace Service.TakeStock ...@@ -71,12 +71,14 @@ namespace Service.TakeStock
[DisplayName("添加盘点作业, 盘点计划Id:{0}")] [DisplayName("添加盘点作业, 盘点计划Id:{0}")]
public async Task<bool> ReTry(int scheduleId) 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; bool isSuccess = false;
try try
{ {
foreach (var order in orders) foreach (var order in orders)
{ {
order.State = TSOrderState.创建;
await _orderRepository.UpdateAsync(order, "State", "LastModificationTime");
BackgroundJob.Enqueue(() => FreezeStockAsync(order.Id)); BackgroundJob.Enqueue(() => FreezeStockAsync(order.Id));
} }
isSuccess = true; isSuccess = true;
...@@ -84,7 +86,6 @@ namespace Service.TakeStock ...@@ -84,7 +86,6 @@ namespace Service.TakeStock
catch (Exception ex) catch (Exception ex)
{ {
isSuccess = false; isSuccess = false;
BackgroundJob.Schedule(() => ReTry(scheduleId), DateTime.Now.AddMinutes(_delay));
} }
return isSuccess; return isSuccess;
} }
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"ConnectionStrings": { "ConnectionStrings": {
"Localhost": "server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;", "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", "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": "127.0.0.1,connectRetry=2"
//"Redis": "129.204.97.78,password=BLT.redis&2019,connectRetry=2" "Redis": "129.204.97.78,password=BLT.redis&2019,connectRetry=2"
}, },
"App": { "App": {
"CorsOrigins": "*" "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