From 445d14becca6b5251814934343d7a6394ada6009 Mon Sep 17 00:00:00 2001
From: 小飞侠 <8277136+liaoxujun@user.noreply.gitee.com>
Date: 星期五, 17 十月 2025 16:55:19 +0800
Subject: [PATCH] no message
---
CoreCms.Net.Repository/Order/CoreCmsPlanOrderRepository.cs | 45 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/CoreCms.Net.Repository/Order/CoreCmsPlanOrderRepository.cs b/CoreCms.Net.Repository/Order/CoreCmsPlanOrderRepository.cs
index a6a3b9f..74afbef 100644
--- a/CoreCms.Net.Repository/Order/CoreCmsPlanOrderRepository.cs
+++ b/CoreCms.Net.Repository/Order/CoreCmsPlanOrderRepository.cs
@@ -21,6 +21,7 @@
using CoreCms.Net.Model.ViewModels.UI;
using SqlSugar;
using CoreCms.Net.Model.Entities.Order;
+using CoreCms.Net.Model.Entities.baifenbingfa.puhuo;
namespace CoreCms.Net.Repository
{
@@ -83,7 +84,8 @@
oldModel.createBy = entity.createBy;
oldModel.upDataBy = entity.upDataBy;
oldModel.isdelete = entity.isdelete;
-
+ oldModel.huaFeiAmount = entity.huaFeiAmount;
+
//浜嬬墿澶勭悊杩囩▼缁撴潫
var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
@@ -169,7 +171,7 @@
/// <param name="blUseNoLock">鏄惁浣跨敤WITH(NOLOCK)</param>
/// <returns></returns>
public async Task<IPageList<CoreCmsPlanOrder>> QueryPageAsync(Expression<Func<CoreCmsPlanOrder, bool>> predicate,
- Expression<Func<CoreCmsPlanOrder, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
+ Expression<Func<CoreCmsPlanOrder, object>> orderByExpression, OrderByType orderByType, OtherData otherData, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false)
{
RefAsync<int> totalCount = 0;
@@ -189,12 +191,19 @@
shipMobile = p.shipMobile,
oldOrderAmount = p.oldOrderAmount,
keYongAmount = p.keYongAmount,
+ huaFeiAmount = p.huaFeiAmount,
createTime = p.createTime,
upDataTime = p.upDataTime,
createBy = p.createBy,
upDataBy = p.upDataBy,
isdelete = p.isdelete,
-
+ shengId = p.shengId,
+ shiId = p.shiId,
+ shi = p.shi,
+ quxian = p.quxian,
+ quxianId = p.quxianId,
+ pianqu = p.pianqu,
+ shouhuoAddress = p.shouhuoAddress,
}).With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
}
else
@@ -212,14 +221,40 @@
shipMobile = p.shipMobile,
oldOrderAmount = p.oldOrderAmount,
keYongAmount = p.keYongAmount,
- createTime = p.createTime,
+ huaFeiAmount = p.huaFeiAmount,
+ createTime = p.createTime,
upDataTime = p.upDataTime,
createBy = p.createBy,
upDataBy = p.upDataBy,
isdelete = p.isdelete,
-
+ shiId = p.shiId,
+ shi = p.shi,
+ quxian = p.quxian,
+ quxianId = p.quxianId,
+ pianqu = p.pianqu,
+ shouhuoAddress = p.shouhuoAddress,
+
+
}).ToPageListAsync(pageIndex, pageSize, totalCount);
}
+
+
+
+ var pagetotal = DbClient.Queryable<CoreCmsPlanOrder>()
+ // .GroupBy(it => new { it.CategoryId, it.CategoryName, it.goodsId, it.goodsName, it.productsId, it.productsName, it.price })
+ .WhereIF(predicate != null, predicate)
+ .Select(p => new CoreCmsPlanOrder
+ {
+ oldOrderAmounts = SqlFunc.AggregateSum(p.oldOrderAmount),
+ orderAmounts = SqlFunc.AggregateSum(p.orderAmount),
+ keYongAmounts = SqlFunc.AggregateSum(p.keYongAmount),
+ })
+ .First(); // 鎴栬�呬娇鐢� Single/FirstOrDefault 绛夋柟娉曡幏鍙栫粨鏋�
+
+ otherData.heji4 = pagetotal.oldOrderAmounts;
+ otherData.heji5 = pagetotal.orderAmounts;
+ otherData.heji6 = pagetotal.keYongAmounts;
+
var list = new PageList<CoreCmsPlanOrder>(page, pageIndex, pageSize, totalCount);
return list;
}
--
Gitblit v1.9.1