Commit 31e2cb3e authored by liudong1993's avatar liudong1993

定时器调整

parent 68e95a3b
...@@ -1695,6 +1695,23 @@ LEFT JOIN rb_guidecar_guide as gcg on gcg.ID=od.GuideId ...@@ -1695,6 +1695,23 @@ LEFT JOIN rb_guidecar_guide as gcg on gcg.ID=od.GuideId
where {where} group by o.OrderId order by o.CreateDate desc"; where {where} group by o.OrderId order by o.CreateDate desc";
return GetPage<RB_Goods_Order_Extend>(pageIndex, pageSize, out count, sql, parameters).ToList(); return GetPage<RB_Goods_Order_Extend>(pageIndex, pageSize, out count, sql, parameters).ToList();
} }
/// <summary>
/// 获取司导订单已逾期 未完成的订单
/// </summary>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public List<RB_Goods_Order_Extend> GetSDOrderNotFinishList(int tenantId, int mallBaseId)
{
string sql = $@"
SELECT o.* FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId = od.OrderId
WHERE o.TenantId={tenantId} AND o.MallBaseId={mallBaseId} AND o.`Status`=0 AND o.Recycled=2 AND o.OrderStatus =4 AND o.OrderClassify =1 AND od.TripETime < '{DateTime.Now.ToString("yyyy-MM-dd")}'
GROUP BY o.OrderId
";
return Get<RB_Goods_Order_Extend>(sql).ToList();
}
#endregion #endregion
} }
} }
...@@ -661,12 +661,27 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A ...@@ -661,12 +661,27 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
} }
} }
} }
try
{
//查询所有司导已逾期未完成订单
var olist = goods_OrderRepository.GetSDOrderNotFinishList(item.TenantId, item.MallBaseId);
foreach (var qitem in olist)
{
//自动确认订单
SetOrderOperation(qitem, 6, "", 0, "", item.TenantId, item.MallBaseId, 0);
}
}
catch (Exception ex)
{
Helper.LogHelper.Write("AutoSDOrderFinishOrder:" + ex.Message);
}
} }
return true; return true;
} }
catch (Exception ex) catch (Exception ex)
{ {
Helper.LogHelper.Write("AutoCancelOrder:" + ex.Message); Helper.LogHelper.Write("AutoReceivingOrder:" + ex.Message);
return false; return false;
} }
} }
......
{ {
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_3;CharSet=utf8; Convert Zero Datetime=true; ", "DefaultConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_3;CharSet=utf8; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient", "DefaultConnectionPName": "MySql.Data.MySqlClient",
"FinanceConnection": "server=192.168.2.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; ", "FinanceConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient" "FinanceConnectionPName": "MySql.Data.MySqlClient"
}, },
"Logging": { "Logging": {
......
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