Commit 3e2900cf authored by 吴春's avatar 吴春

提交代码

parent f4b92651
...@@ -123,6 +123,8 @@ namespace Mall.WindowsService.Module ...@@ -123,6 +123,8 @@ namespace Mall.WindowsService.Module
builder.AppendFormat($@" SELECT a.*,b.OrderNo from rb_goods_orderdetail as a LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId builder.AppendFormat($@" SELECT a.*,b.OrderNo from rb_goods_orderdetail as a LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId
where b.TenantId=1 and b.MallBaseId=1 and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{startDate}','%y-%m-%d') where b.TenantId=1 and b.MallBaseId=1 and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{startDate}','%y-%m-%d')
and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') and b.OrderStatus in(2,3,4,5,6) "); and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') and b.OrderStatus in(2,3,4,5,6) ");
Helper.LogHelper.Write("sql语句:" + builder.ToString());
var goodsDetailList = goodsOrderDetailRepository.Get<RB_Goods_OrderDetail_Extend>(builder.ToString()).ToList(); var goodsDetailList = goodsOrderDetailRepository.Get<RB_Goods_OrderDetail_Extend>(builder.ToString()).ToList();
var result = new List<RB_Goods_OrderDetail_Extend>(); var result = new List<RB_Goods_OrderDetail_Extend>();
...@@ -213,7 +215,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an ...@@ -213,7 +215,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
{ {
record.FinanceId = frid; record.FinanceId = frid;
int recordId = financeRecordRepository.Insert(record); int recordId = financeRecordRepository.Insert(record);
Helper.LogHelper.Write("财务单据ID:" + frid + ",记录id:"+ recordId + "订单数量:" + record.RecordDetailList.Count()); Helper.LogHelper.Write("财务单据ID:" + frid + ",记录id:" + recordId + "订单数量:" + record.RecordDetailList.Count());
record.RecordDetailList.ForEach(x => x.RecordId = recordId); record.RecordDetailList.ForEach(x => x.RecordId = recordId);
record.RecordDetailList.ForEach(x => x.FinanceId = frid); record.RecordDetailList.ForEach(x => x.FinanceId = frid);
flag = financeRecordDetailRepository.InsertBatch(record.RecordDetailList); flag = financeRecordDetailRepository.InsertBatch(record.RecordDetailList);
...@@ -245,7 +247,8 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an ...@@ -245,7 +247,8 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
/// 自动取消订单 /// 自动取消订单
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static bool AutoCancelOrder() { public static bool AutoCancelOrder()
{
try try
{ {
var list = mallBaseRepository.GetListRepository(new Mall.Model.Extend.BaseSetUp.RB_MallBase_Extend() { }); var list = mallBaseRepository.GetListRepository(new Mall.Model.Extend.BaseSetUp.RB_MallBase_Extend() { });
...@@ -258,7 +261,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an ...@@ -258,7 +261,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
foreach (var qitem in olist) foreach (var qitem in olist)
{ {
try try
{ {
Dictionary<string, object> keyValues = new Dictionary<string, object>() { }; Dictionary<string, object> keyValues = new Dictionary<string, object>() { };
keyValues.Add(nameof(RB_Goods_Order_Extend.OrderStatus), OrderStatusEnum.Cancel); keyValues.Add(nameof(RB_Goods_Order_Extend.OrderStatus), OrderStatusEnum.Cancel);
keyValues.Add(nameof(RB_Goods_Order_Extend.CancelTime), DateTime.Now); keyValues.Add(nameof(RB_Goods_Order_Extend.CancelTime), DateTime.Now);
...@@ -450,7 +453,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an ...@@ -450,7 +453,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
{ {
Helper.LogHelper.Write("AutoCancelOrder:" + ex.Message); Helper.LogHelper.Write("AutoCancelOrder:" + ex.Message);
return false; return false;
} }
} }
#endregion #endregion
...@@ -461,7 +464,8 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an ...@@ -461,7 +464,8 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
/// 自动收货 /// 自动收货
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public static bool AutoReceivingOrder() { public static bool AutoReceivingOrder()
{
try try
{ {
var list = mallBaseRepository.GetListRepository(new Mall.Model.Extend.BaseSetUp.RB_MallBase_Extend() { }); var list = mallBaseRepository.GetListRepository(new Mall.Model.Extend.BaseSetUp.RB_MallBase_Extend() { });
...@@ -502,7 +506,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an ...@@ -502,7 +506,7 @@ and DATE_FORMAT(b.CreateDate,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') an
bool flag = goods_OrderRepository.Update(keyValues, wheres); bool flag = goods_OrderRepository.Update(keyValues, wheres);
if (flag) if (flag)
{ {
goods_LogRepository.Insert(new Mall.Model.Entity.Product.RB_Goods_Log() goods_LogRepository.Insert(new Mall.Model.Entity.Product.RB_Goods_Log()
{ {
Id = 0, Id = 0,
......
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