Parcourir la source

提交

master
gwbvipvip il y a 9 mois
Parent
révision
824e6a32fb
1 fichiers modifiés avec 89 ajouts et 12 suppressions
  1. +89
    -12
      BPA.KitChen.GroupMealOrder.Application/Service/Order/OrderService.cs

+ 89
- 12
BPA.KitChen.GroupMealOrder.Application/Service/Order/OrderService.cs Voir le fichier

@@ -58,10 +58,10 @@ namespace BPA.KitChen.StoreManagementOrder.Application.Service.Order
string strWhere = string.Empty;
int total = 0;
List<OrderFlowQuery> res = new List<OrderFlowQuery>();
if (!string.IsNullOrEmpty(dto.StoreTypeId))//店铺分类
{
strWhere += $" and d.Id='{dto.StoreTypeId}'";
}
//if (!string.IsNullOrEmpty(dto.StoreTypeId))//店铺分类
//{
// strWhere += $" and d.Id='{dto.StoreTypeId}'";
//}
if (dto.StoreId != null && dto.StoreId.Length > 0)//店铺名称
{
strWhere += $" and a.StoreId in (";
@@ -98,10 +98,10 @@ namespace BPA.KitChen.StoreManagementOrder.Application.Service.Order
}
strWhere += $" and a.StoreId not in ('" + StoreId + "')";
}
if (!string.IsNullOrEmpty(dto.Customer_Tel))
{
strWhere += $" and g.Phone='{dto.Customer_Tel}'";
}
//if (!string.IsNullOrEmpty(dto.Customer_Tel))
//{
// strWhere += $" and g.Phone='{dto.Customer_Tel}'";
//}

if (dto.GoodsTypeId != null && dto.GoodsTypeId.Length > 0)//商品类型
{
@@ -161,12 +161,89 @@ UUID() as orderFlowId,
a.Order_CreateTime AS Order_CreateTime,
a.PlaceMode AS PayMode,
a.Order_Status AS Order_Status,
g.NickName AS Customer_Name,
g.Phone AS Customer_Tel,
a.Customer_ID AS Customer_Name,
a.Customer_ID AS Customer_Tel,
1 as order_Count
FROM
V_AllOrder a
LEFT JOIN BPA_MemberInfo g ON ( a.Customer_ID = LOWER(g.Id) )
(SELECT
c.`OrderInfo_Id` AS `OrderInfo_Id`,
c.`Order_Status` AS `Order_Status`,
c.`Order_CreateTime` AS `Order_CreateTime`,
c.`StoreId` AS `StoreId`,
c.`StoreName` AS `StoreName`,
c.`Order_OriginalMoney` AS `Order_OriginalMoney`,
c.`Order_RealMoney` AS `Order_RealMoney`,
c.`PlaceMode` AS `PlaceMode`,
c.`Customer_ID` AS `Customer_ID`,
c.`Transaction_ID` AS `Transaction_ID`,
c.`RefundStatus` AS `RefundStatus`,
c.`GroupId` AS `GroupId`,
c.`order_Count` AS `order_Count`
FROM
(
SELECT
`a`.`Id` AS `OrderInfo_Id`,
`a`.`OrderStatus` AS `Order_Status`,
`a`.`CreatedAt` AS `Order_CreateTime`,
`a`.`OrgId` AS `StoreId`,
`a`.`OrgId` AS `StoreName`,
`a`.`OrderOriginalMoney` AS `Order_OriginalMoney`,
`a`.`OrderRealMoney` AS `Order_RealMoney`,((((
`a`.`OrderRealMoney` + ifnull( `a`.`DiscountMoney`, 0 )) + ifnull( json_extract( `a`.`PriceCollection`, '$.CouponPrice' ), 0 )) + ifnull( json_extract( `a`.`PriceCollection`, '$.ActivityPrice' ), 0 )) + ifnull( json_extract( `a`.`PriceCollection`, '$.Vip' ), 0 )) AS `OrderRealMoney`,
`a`.`OrderType` AS `PlaceMode`,
`a`.`CustomerId` AS `Customer_ID`,
`a`.`OrderCount` AS `order_Count`,
`a`.`TransactionId` AS `Transaction_ID`,-(
1
) AS `RefundStatus`,
`a`.`GroupId` AS `GroupId`
FROM
`bpa_order` `a`
WHERE
( length( `a`.`TransactionId` ) > 1 )) AS c UNION ALL
SELECT
`a`.`OrderInfo_Id` AS `OrderInfo_Id`,
`a`.`Order_Status` AS `Order_Status`,
`b`.`RefundTime` AS `Order_CreateTime`,
`a`.`StoreId` AS `StoreId`,
`a`.`StoreName` AS `StoreName`,
`a`.`Order_OriginalMoney` AS `Order_OriginalMoney`,
`a`.`Order_RealMoney` AS `Order_RealMoney`,
`a`.`PlaceMode` AS `PlaceMode`,
`a`.`Customer_ID` AS `Customer_ID`,
`a`.`Transaction_ID` AS `Transaction_ID`,
`b`.`RefundResult` AS `RefundStatus`,
`a`.`GroupId` AS `GroupId`,
`a`.`order_Count` AS `order_Count`
FROM
(
`bpa_orderrefundlog` `b`
LEFT JOIN (
SELECT
`a`.`Id` AS `OrderInfo_Id`,
`a`.`OrderStatus` AS `Order_Status`,
`a`.`CreatedAt` AS `Order_CreateTime`,
`a`.`OrgId` AS `StoreId`,
`a`.`OrgId` AS `StoreName`,
`a`.`OrderOriginalMoney` AS `Order_OriginalMoney`,
`a`.`OrderRealMoney` AS `Order_RealMoney`,((((
`a`.`OrderRealMoney` + ifnull( `a`.`DiscountMoney`, 0 )) + ifnull( json_extract( `a`.`PriceCollection`, '$.CouponPrice' ), 0 )) + ifnull( json_extract( `a`.`PriceCollection`, '$.ActivityPrice' ), 0 )) + ifnull( json_extract( `a`.`PriceCollection`, '$.Vip' ), 0 )) AS `OrderRealMoney`,
`a`.`OrderType` AS `PlaceMode`,
`a`.`CustomerId` AS `Customer_ID`,
`a`.`OrderCount` AS `order_Count`,
`a`.`TransactionId` AS `Transaction_ID`,-(
1
) AS `RefundStatus`,
`a`.`GroupId` AS `GroupId`
FROM
`bpa_order` `a`
WHERE
( length( `a`.`TransactionId` ) > 1 )) `a` ON ((
`a`.`OrderInfo_Id` = `b`.`OrderId`
)))
WHERE
(
`b`.`Stutas` = 202)) a
where a.RefundStatus is not NULL and
a.Order_CreateTime >='" + temp1.ToString("yyyy-MM-dd HH:mm:ss") + @"' and a.Order_CreateTime <'" + temp2.ToString("yyyy-MM-dd HH:mm:ss") + @"'
" + strWhere + "";


Chargement…
Annuler
Enregistrer