Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
0044dcaa
Commit
0044dcaa
authored
Sep 22, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdzq-ld' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq
parents
03dcf549
74559e53
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
884 additions
and
1 deletion
+884
-1
OrderListExportEnum.cs
Mall.Common/Enum/Goods/OrderListExportEnum.cs
+158
-0
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+1
-1
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+405
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+320
-0
No files found.
Mall.Common/Enum/Goods/OrderListExportEnum.cs
View file @
0044dcaa
...
@@ -153,4 +153,162 @@ namespace Mall.Common.Enum.Goods
...
@@ -153,4 +153,162 @@ namespace Mall.Common.Enum.Goods
[
EnumField
(
"备注/表单"
)]
[
EnumField
(
"备注/表单"
)]
BZBD
=
27
BZBD
=
27
}
}
/// <summary>
/// 司导订单列表导出选项枚举
/// </summary>
public
enum
OrderListExportForSDEnum
{
/// <summary>
/// 所属平台
/// </summary>
[
EnumField
(
"所属平台"
)]
SSPT
=
1
,
/// <summary>
/// 订单号
/// </summary>
[
EnumField
(
"订单号"
)]
DDH
=
2
,
/// <summary>
/// 商户单号
/// </summary>
[
EnumField
(
"商户单号"
)]
SHDH
=
3
,
/// <summary>
/// 下单用户
/// </summary>
[
EnumField
(
"下单用户"
)]
XDYH
=
4
,
/// <summary>
/// 商品名
/// </summary>
[
EnumField
(
"商品名"
)]
SPM
=
5
,
/// <summary>
/// 副标题
/// </summary>
[
EnumField
(
"副标题"
)]
FBT
=
28
,
/// <summary>
/// 数量
/// </summary>
[
EnumField
(
"人数"
)]
SL
=
7
,
/// <summary>
/// 成本价
/// </summary>
[
EnumField
(
"成本价"
)]
CBJ
=
9
,
/// <summary>
/// 收件人
/// </summary>
[
EnumField
(
"客人"
)]
SJR
=
10
,
/// <summary>
/// 收件人电话
/// </summary>
[
EnumField
(
"电话"
)]
SJRDH
=
11
,
/// <summary>
/// 收件人地址
/// </summary>
[
EnumField
(
"接送地址"
)]
SJRDZ
=
12
,
/// <summary>
/// 总金额
/// </summary>
[
EnumField
(
"总金额"
)]
ZJE
=
13
,
/// <summary>
/// 实际付款
/// </summary>
[
EnumField
(
"实际付款"
)]
SJFK
=
14
,
/// <summary>
/// 运费
/// </summary>
[
EnumField
(
"保险费用"
)]
YF
=
15
,
/// <summary>
/// 下单时间
/// </summary>
[
EnumField
(
"下单时间"
)]
XDSJ
=
16
,
/// <summary>
/// 支付方式
/// </summary>
[
EnumField
(
"支付方式"
)]
ZFFS
=
17
,
/// <summary>
/// 订单状态
/// </summary>
[
EnumField
(
"订单状态"
)]
DDZT
=
18
,
/// <summary>
/// 付款状态
/// </summary>
[
EnumField
(
"付款状态"
)]
FKZT
=
19
,
/// <summary>
/// 付款时间
/// </summary>
[
EnumField
(
"付款时间"
)]
FKSJ
=
20
,
/// <summary>
/// 发货状态
/// </summary>
[
EnumField
(
"确认状态"
)]
FHZT
=
21
,
/// <summary>
/// 发货时间
/// </summary>
[
EnumField
(
"确认时间"
)]
FHSJ
=
22
,
/// <summary>
/// 收货状态
/// </summary>
[
EnumField
(
"出行状态"
)]
SHZT
=
23
,
/// <summary>
/// 收货时间
/// </summary>
[
EnumField
(
"出行时间"
)]
SHSJ
=
24
,
/// <summary>
/// 导游名称
/// </summary>
[
EnumField
(
"导游"
)]
DY
=
29
,
/// <summary>
/// 车辆
/// </summary>
[
EnumField
(
"车辆"
)]
CL
=
30
,
/// <summary>
/// 车牌号
/// </summary>
[
EnumField
(
"车牌号"
)]
CPH
=
31
,
/// <summary>
/// 服务类型
/// </summary>
[
EnumField
(
"服务类型"
)]
FWLX
=
32
,
/// <summary>
/// 卖家留言
/// </summary>
[
EnumField
(
"卖家留言"
)]
MJLY
=
25
,
/// <summary>
/// 商家备注
/// </summary>
[
EnumField
(
"商家备注"
)]
SJBZ
=
26
,
/// <summary>
/// 备注/表单
/// </summary>
[
EnumField
(
"备注/表单"
)]
BZBD
=
27
}
}
}
Mall.Module.Product/GuideCarModule.cs
View file @
0044dcaa
...
@@ -1730,7 +1730,7 @@ namespace Mall.Module.Product
...
@@ -1730,7 +1730,7 @@ namespace Mall.Module.Product
model
.
GuideScore
=
guideModel
?.
Score
??
5
;
model
.
GuideScore
=
guideModel
?.
Score
??
5
;
model
.
Introduction
=
guideModel
?.
Introduction
??
""
;
model
.
Introduction
=
guideModel
?.
Introduction
??
""
;
model
.
GuideWorkYears
=
guideModel
?.
WorkYears
??
1
;
model
.
GuideWorkYears
=
guideModel
?.
WorkYears
??
1
;
var
carModel
=
GuideCarRepository
.
GetGuideCarCarList
(
new
RB_GuideCar_Car_Extend
()
{
ID
=
model
.
Guide
Id
??
0
}).
FirstOrDefault
();
var
carModel
=
GuideCarRepository
.
GetGuideCarCarList
(
new
RB_GuideCar_Car_Extend
()
{
ID
=
model
.
Car
Id
??
0
}).
FirstOrDefault
();
string
CarName
=
carModel
?.
Name
??
""
;
string
CarName
=
carModel
?.
Name
??
""
;
model
.
CarColorName
=
CarColorRepository
.
GetCarColorList
(
new
RB_GuideCar_CarColor_Extend
()
{
ID
=
model
.
CarColorId
??
0
}).
FirstOrDefault
()?.
ColorName
??
""
;
model
.
CarColorName
=
CarColorRepository
.
GetCarColorList
(
new
RB_GuideCar_CarColor_Extend
()
{
ID
=
model
.
CarColorId
??
0
}).
FirstOrDefault
()?.
ColorName
??
""
;
model
.
CarScore
=
carModel
?.
Score
??
5
;
model
.
CarScore
=
carModel
?.
Score
??
5
;
...
...
Mall.Module.Product/OrderModule.cs
View file @
0044dcaa
...
@@ -13,6 +13,7 @@ using Mall.Model.Entity.Finance;
...
@@ -13,6 +13,7 @@ using Mall.Model.Entity.Finance;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.Finance
;
using
Mall.Model.Extend.Finance
;
using
Mall.Model.Extend.GuideCar
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Extend.User
;
using
Mall.Module.User
;
using
Mall.Module.User
;
...
@@ -297,6 +298,14 @@ namespace Mall.Module.Product
...
@@ -297,6 +298,14 @@ namespace Mall.Module.Product
/// 司导-车辆
/// 司导-车辆
/// </summary>
/// </summary>
private
readonly
RB_GuideCar_CarRepository
guideCar_CarRepository
=
new
RB_GuideCar_CarRepository
();
private
readonly
RB_GuideCar_CarRepository
guideCar_CarRepository
=
new
RB_GuideCar_CarRepository
();
/// <summary>
/// 司导站点
/// </summary>
private
RB_GuideCar_SiteRepository
guideCar_SiteRepository
=
new
RB_GuideCar_SiteRepository
();
/// <summary>
/// 车辆颜色
/// </summary>
private
RB_GuideCar_CarColorRepository
guideCar_CarColorRepository
=
new
RB_GuideCar_CarColorRepository
();
#
region
购物车
#
region
购物车
...
@@ -7013,6 +7022,108 @@ namespace Mall.Module.Product
...
@@ -7013,6 +7022,108 @@ namespace Mall.Module.Product
return
list
;
return
list
;
}
}
/// <summary>
/// 获取司导后台订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetSDGoodsOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Order_Extend
demodel
)
{
var
list
=
goods_OrderRepository
.
GetGuideCarOrderPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
List
<
RB_Finance_Extend
>
flist
=
new
List
<
RB_Finance_Extend
>();
if
(
pageSize
!=
10000
&&
demodel
.
TenantId
==
1
)
{
//查询所有财务单据
string
detailIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
Id
));
flist
=
financeRepository
.
GetList
(
new
RB_Finance_Extend
()
{
ECOrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
}
//查询图片
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
dlist
.
Any
())
{
//剑鱼兄需求 2020=07-30 再查询一次商品表
string
GoodsIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GoodsId
).
Distinct
());
var
GList
=
goodsRepository
.
GetSingleListForGoodsSubName
(
new
RB_Goods_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
GoodsIds
=
GoodsIds
},
true
);
#
region
查询司导信息
string
siteIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
SiteId
));
var
sitelist
=
guideCar_SiteRepository
.
GetGuideCarSiteList
(
new
RB_GuideCar_Site_Extend
()
{
SiteIds
=
siteIds
});
string
guideIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GuideId
));
var
guidelist
=
guideCar_GuideRepository
.
GetGuideCarGuideList
(
new
RB_GuideCar_Guide_Extend
()
{
GuideIds
=
guideIds
});
string
carids
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
CarId
));
var
carlist
=
guideCar_CarRepository
.
GetGuideCarCarList
(
new
RB_GuideCar_Car_Extend
()
{
GuideCarIds
=
carids
});
string
colorIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
CarColorId
));
var
carcolorlist
=
guideCar_CarColorRepository
.
GetCarColorList
(
new
RB_GuideCar_CarColor_Extend
()
{
CarColorIds
=
colorIds
});
#
endregion
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
GoodsSubName
=
GList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
()?.
SubName
??
""
;
item
.
FinanceList
=
flist
.
Where
(
x
=>
x
.
ECOrderDetailId
==
item
.
Id
).
ToList
();
// 2020-08-19 新增财务单据列表
item
.
SiteName
=
sitelist
.
Where
(
x
=>
x
.
ID
==
item
.
SiteId
).
FirstOrDefault
()?.
SiteName
??
""
;
item
.
GuideName
=
guidelist
.
Where
(
x
=>
x
.
ID
==
item
.
GuideId
).
FirstOrDefault
()?.
Name
??
""
;
item
.
CarName
=
carlist
.
Where
(
x
=>
x
.
ID
==
item
.
CarId
).
FirstOrDefault
()?.
Name
??
""
;
item
.
CarColorName
=
carcolorlist
.
Where
(
x
=>
x
.
ID
==
item
.
CarColorId
).
FirstOrDefault
()?.
ColorName
??
""
;
}
}
string
areaIds1
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Province
??
0
).
Distinct
());
string
areaIds2
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
City
??
0
).
Distinct
());
string
areaIds3
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
District
??
0
).
Distinct
());
string
areaIds
=
"0"
;
if
(!
string
.
IsNullOrEmpty
(
areaIds1
))
{
areaIds
+=
","
+
areaIds1
;
}
if
(!
string
.
IsNullOrEmpty
(
areaIds2
))
{
areaIds
+=
","
+
areaIds2
;
}
if
(!
string
.
IsNullOrEmpty
(
areaIds3
))
{
areaIds
+=
","
+
areaIds3
;
}
var
arealist
=
destinationRepository
.
GetDictvalueListForIds
(
areaIds
);
//2020-08-25 Add By:W Start
List
<
RB_Member_DiscountCoupon_Extend
>
memberCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(
list
.
Any
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CouponsIds
)))
{
memberCouponList
=
member_CouponRepository
.
GetList
(
new
RB_Member_DiscountCoupon_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UseState
=
-
1
,
Ids
=
string
.
Join
(
","
,
list
.
Where
(
x
=>
!
string
.
IsNullOrWhiteSpace
(
x
.
CouponsIds
)).
Select
(
x
=>
x
.
CouponsIds
))
});
}
//2020-08-25 Add By:W End
foreach
(
var
item
in
list
)
{
item
.
DetailList
=
dlist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
item
.
DistrictAddress
=
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
Province
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
City
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
District
).
FirstOrDefault
()?.
Name
??
""
);
item
.
MemberDiscountCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
CouponsIds
))
{
foreach
(
var
itemCoupons
in
item
.
CouponsIds
.
Split
(
','
))
{
item
.
MemberDiscountCouponList
.
AddRange
(
memberCouponList
.
Where
(
x
=>
itemCoupons
==
x
.
Id
.
ToString
()));
}
}
}
}
return
list
;
}
/// <summary>
/// <summary>
/// 获取直播订单分页列表
/// 获取直播订单分页列表
/// </summary>
/// </summary>
...
@@ -10923,6 +11034,300 @@ namespace Mall.Module.Product
...
@@ -10923,6 +11034,300 @@ namespace Mall.Module.Product
});
});
}
}
/// <summary>
/// 获取订单信息
/// </summary>
/// <param name="orderId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
ApiResult
GetSDGoodsOrderInfo
(
int
orderId
,
int
tenantId
,
int
mallBaseId
)
{
var
model
=
goods_OrderRepository
.
GetEntity
(
orderId
).
RefMapperTo
<
RB_Goods_Order_Extend
>();
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"订单信息不存在,请核实后再试"
);
}
//查询订单所属微店 2020-08-14 Add By:W
if
(
model
.
SmallShopsId
.
HasValue
&&
model
.
SmallShopsId
>
0
)
{
var
smallShop
=
smallShopsInfoRepository
.
GetEntity
(
model
.
SmallShopsId
??
0
);
if
(
smallShop
!=
null
)
{
model
.
SmallShopsName
=
smallShop
.
Name
;
}
}
// 2020-08-14 Add By:W End
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
var
erList
=
goods_ExpressRelevanceRepository
.
GetList
(
new
RB_Goods_ExpressRelevance_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
//查询图片
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
dlist
.
Any
())
{
#
region
查询司导信息
string
siteIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
SiteId
));
var
sitelist
=
guideCar_SiteRepository
.
GetGuideCarSiteList
(
new
RB_GuideCar_Site_Extend
()
{
SiteIds
=
siteIds
});
string
guideIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
GuideId
));
var
guidelist
=
guideCar_GuideRepository
.
GetGuideCarGuideList
(
new
RB_GuideCar_Guide_Extend
()
{
GuideIds
=
guideIds
});
string
carids
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
CarId
));
var
carlist
=
guideCar_CarRepository
.
GetGuideCarCarList
(
new
RB_GuideCar_Car_Extend
()
{
GuideCarIds
=
carids
});
string
colorIds
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
CarColorId
));
var
carcolorlist
=
guideCar_CarColorRepository
.
GetCarColorList
(
new
RB_GuideCar_CarColor_Extend
()
{
CarColorIds
=
colorIds
});
#
endregion
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
item
.
IsBindExpress
=
erList
.
Where
(
x
=>
x
.
OrderDetailId
==
item
.
Id
).
Any
()
?
1
:
2
;
item
.
SiteName
=
sitelist
.
Where
(
x
=>
x
.
ID
==
item
.
SiteId
).
FirstOrDefault
()?.
SiteName
??
""
;
item
.
GuideName
=
guidelist
.
Where
(
x
=>
x
.
ID
==
item
.
GuideId
).
FirstOrDefault
()?.
Name
??
""
;
item
.
CarName
=
carlist
.
Where
(
x
=>
x
.
ID
==
item
.
CarId
).
FirstOrDefault
()?.
Name
??
""
;
item
.
CarColorName
=
carcolorlist
.
Where
(
x
=>
x
.
ID
==
item
.
CarColorId
).
FirstOrDefault
()?.
ColorName
??
""
;
}
}
model
.
DetailList
=
dlist
;
//地址
model
.
DistrictAddress
=
(
destinationRepository
.
GetEntity
(
model
.
Province
)?.
Name
??
""
)
+
" "
+
(
destinationRepository
.
GetEntity
(
model
.
City
)?.
Name
??
""
)
+
" "
+
(
destinationRepository
.
GetEntity
(
model
.
District
)?.
Name
??
""
);
//获取返佣列表
var
ocList
=
goods_OrderCommissionRepository
.
GetListGroupByUser
(
new
RB_Goods_OrderCommission_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
}).
OrderBy
(
x
=>
x
.
Grade
).
ToList
();
if
(
ocList
.
Any
())
{
var
FXGradeList
=
new
List
<
RB_Distributor_FXGrade_Extend
>();
if
(
ocList
.
Where
(
x
=>
x
.
Type
==
3
).
Any
())
{
string
gradeIds
=
string
.
Join
(
","
,
ocList
.
Where
(
x
=>
x
.
Type
==
3
).
Select
(
x
=>
x
.
Grade
).
Distinct
());
FXGradeList
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
GradeIds
=
gradeIds
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
}
var
ulist
=
member_UserRepository
.
GetList
(
new
RB_Member_User_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
UserIds
=
string
.
Join
(
","
,
ocList
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
foreach
(
var
item
in
ocList
)
{
var
umodel
=
ulist
.
Where
(
x
=>
x
.
Id
==
item
.
UserId
).
FirstOrDefault
();
item
.
UserName
=
umodel
?.
Name
??
""
;
item
.
Mobile
=
umodel
?.
Moblie
??
""
;
if
(
item
.
Type
==
1
)
{
if
(
item
.
Grade
==
0
)
{
item
.
GradeDescription
=
"自购返利"
;
}
else
if
(
item
.
Grade
==
1
)
{
item
.
GradeDescription
=
"一级佣金"
;
}
else
if
(
item
.
Grade
==
2
)
{
item
.
GradeDescription
=
"二级佣金"
;
}
else
if
(
item
.
Grade
==
3
)
{
item
.
GradeDescription
=
"三级佣金"
;
}
}
else
if
(
item
.
Type
==
3
)
{
var
fxGModel
=
FXGradeList
.
Where
(
x
=>
x
.
Id
==
item
.
Grade
).
FirstOrDefault
();
item
.
GradeDescription
=
fxGModel
?.
GradeName
??
"暂无等级"
;
}
}
}
var
vipList
=
vip_BuyRepository
.
GetVipBuyList
(
new
RB_Vip_Buy_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
ReOrderId
=
model
.
OrderId
});
List
<
RB_VipBuy_Commission_Extend
>
clist
=
new
List
<
RB_VipBuy_Commission_Extend
>();
if
(
vipList
.
Any
())
{
string
vipIds
=
string
.
Join
(
","
,
vipList
.
Select
(
x
=>
x
.
Id
));
clist
=
vipBuy_CommissionRepository
.
GetList
(
new
RB_VipBuy_Commission_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderIds
=
vipIds
});
var
FXList
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
//获取用户
var
ulist
=
new
List
<
RB_Member_User_Extend
>();
if
(
clist
.
Any
())
{
ulist
=
member_UserRepository
.
GetList
(
new
RB_Member_User_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
UserIds
=
string
.
Join
(
","
,
clist
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
foreach
(
var
qitem
in
clist
)
{
var
fxmodel
=
FXList
.
Where
(
x
=>
x
.
Id
==
qitem
.
Grade
).
FirstOrDefault
();
qitem
.
GradeDescription
=
fxmodel
.
GradeName
;
qitem
.
UserName
=
ulist
.
Where
(
x
=>
x
.
Id
==
qitem
.
UserId
).
FirstOrDefault
()?.
Name
??
""
;
}
}
}
#
region
推荐返佣
List
<
RB_Goods_OrderIntroduction_Extend
>
OrderIntroduction
=
new
List
<
RB_Goods_OrderIntroduction_Extend
>();
var
introductList
=
goods_OrderIntroductionRepository
.
GetList
(
new
RB_Goods_OrderIntroduction_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
if
(
introductList
.
Any
())
{
var
ulist
=
member_UserRepository
.
GetList
(
new
RB_Member_User_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
UserIds
=
string
.
Join
(
","
,
introductList
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
foreach
(
var
item
in
ulist
)
{
decimal
Commission
=
introductList
.
Where
(
x
=>
x
.
UserId
==
item
.
Id
).
Sum
(
x
=>
x
.
Commission
??
0
);
OrderIntroduction
.
Add
(
new
RB_Goods_OrderIntroduction_Extend
()
{
UserId
=
item
.
Id
,
UserName
=
item
.
Name
,
Commission
=
Commission
});
}
}
#
endregion
#
region
微店返佣
List
<
RB_SmallShops_Commission_Extend
>
SmallShopsCommission
=
new
List
<
RB_SmallShops_Commission_Extend
>();
var
ssList
=
smallShops_CommissionRepository
.
GetList
(
new
RB_SmallShops_Commission_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
OrderId
=
orderId
});
if
(
ssList
.
Any
())
{
var
ulist
=
member_UserRepository
.
GetList
(
new
RB_Member_User_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
UserIds
=
string
.
Join
(
","
,
ssList
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
var
slist
=
smallShops_InfoRepository
.
GetListForSingle
(
new
RB_SmallShops_Info_Extend
()
{
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
,
UserIds
=
string
.
Join
(
","
,
ssList
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
foreach
(
var
item
in
ulist
)
{
decimal
Commission
=
ssList
.
Where
(
x
=>
x
.
UserId
==
item
.
Id
).
Sum
(
x
=>
x
.
Commission
??
0
);
var
smodel
=
slist
.
Where
(
x
=>
x
.
UserId
==
item
.
Id
).
FirstOrDefault
();
SmallShopsCommission
.
Add
(
new
RB_SmallShops_Commission_Extend
()
{
UserId
=
item
.
Id
,
UserName
=
item
.
Name
,
Name
=
smodel
?.
Name
??
""
,
Commission
=
Commission
});
}
}
#
endregion
#
region
优惠券
2020
-
08
-
25
Add
By
:
W
Start
List
<
RB_Member_DiscountCoupon_Extend
>
memberCouponList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
CouponsIds
))
{
memberCouponList
=
member_CouponRepository
.
GetList
(
new
RB_Member_DiscountCoupon_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UseState
=
-
1
,
Ids
=
model
.
CouponsIds
});
}
#
endregion
2020
-
08
-
25
Add
By
:
W
End
return
ApiResult
.
Success
(
""
,
new
{
model
.
OrderId
,
model
.
OrderStatus
,
OrderStatusName
=
model
.
OrderStatus
.
GetEnumName
(),
CreateDate
=
model
.
CreateDate
.
HasValue
?
model
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
PaymentTime
=
model
.
PaymentTime
.
HasValue
?
model
.
PaymentTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
DeliveryTime
=
model
.
DeliveryTime
.
HasValue
?
model
.
DeliveryTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
ReceivingTime
=
model
.
ReceivingTime
.
HasValue
?
model
.
ReceivingTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
FinishTime
=
model
.
FinishTime
.
HasValue
?
model
.
FinishTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
CancelTime
=
model
.
CancelTime
.
HasValue
?
model
.
CancelTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
model
.
Remark
,
model
.
BuyerMessage
,
model
.
PreferPrice
,
model
.
Income
,
model
.
FreightMoney
,
CouponMoney
=
model
.
CouponMoney
??
0
,
IntegralMoney
=
(
model
.
DetailList
!=
null
&&
model
.
DetailList
.
Any
())
?
(
model
.
DetailList
.
Sum
(
x
=>
x
.
IntegralMoney
??
0
))
:
0
,
IntegralNumber
=
(
model
.
DetailList
!=
null
&&
model
.
DetailList
.
Any
())
?
(
model
.
DetailList
.
Sum
(
x
=>
x
.
IntegralNumber
??
0
))
:
0
,
MemberDiscountCouponList
=
memberCouponList
.
Select
(
y
=>
new
{
y
.
Name
,
y
.
MinConsumePrice
,
y
.
MaxDiscountsPrice
,
y
.
UseType
,
y
.
CouponType
,
y
.
DiscountsPrice
}),
OrderInfo
=
new
{
model
.
OrderNo
,
model
.
MerchantsNo
,
model
.
PaymentWay
,
PaymentWayName
=
model
.
PaymentWay
.
GetEnumName
(),
model
.
DeliveryMethod
,
DeliveryMethodName
=
model
.
DeliveryMethod
.
GetEnumName
(),
UserName
=
member_UserRepository
.
GetEntity
(
model
.
UserId
)?.
Name
??
""
,
model
.
Consignee
,
model
.
Mobile
,
model
.
DistrictAddress
,
model
.
ShoppingAddress
,
model
.
DestinationAddress
,
model
.
Country
,
model
.
Province
,
model
.
City
,
model
.
District
,
model
.
SmallShopsName
,
model
.
SmallShopsId
,
},
DistributionInfo
=
ocList
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Grade
,
x
.
GradeDescription
,
x
.
UserName
,
x
.
Mobile
,
x
.
Commission
}),
VipCommissionInfo
=
clist
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Grade
,
x
.
GradeDescription
,
x
.
UserName
,
x
.
Commission
}),
OrderIntroductionInfo
=
OrderIntroduction
.
Select
(
x
=>
new
{
x
.
UserId
,
x
.
UserName
,
x
.
Commission
}),
SmallShopsCommissionInfo
=
SmallShopsCommission
.
Select
(
x
=>
new
{
x
.
UserId
,
x
.
UserName
,
SmallShopsName
=
x
.
Name
,
x
.
Commission
}),
DetailList
=
model
.
DetailList
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
GoodsName
,
x
.
CoverImage
,
x
.
CoverImagePath
,
x
.
Unit_Price
,
x
.
Number
,
x
.
Original_Price
,
x
.
Final_Price
,
x
.
IsBindExpress
,
x
.
FreeShippingRemarks
,
x
.
SmallShopsCostPrice
,
CouponMoney
=
x
.
CouponMoney
??
0
,
InsuranceMoney
=
x
.
InsuranceMoney
??
0
,
IntegralMoney
=
x
.
IntegralMoney
??
0
,
IntegralNumber
=
x
.
IntegralNumber
??
0
,
x
.
SiteName
,
x
.
SiteId
,
x
.
GuideId
,
x
.
GuideName
,
x
.
CarId
,
x
.
CarName
,
x
.
CarColorId
,
x
.
CarColorName
,
x
.
CarNumber
,
x
.
LineName
,
TripSTime
=
x
.
TripSTime
.
HasValue
?
x
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
TripETime
=
x
.
TripETime
.
HasValue
?
x
.
TripETime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
x
.
CarType
,
CarTypeName
=
x
.
CarType
.
GetEnumName
(),
x
.
UseDay
,
x
.
IsSpell
,
x
.
CommentGiveIntegral
})
});
}
/// <summary>
/// <summary>
/// 获取快递对应的商品
/// 获取快递对应的商品
/// </summary>
/// </summary>
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
0044dcaa
...
@@ -325,6 +325,326 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -325,6 +325,326 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
#
region
司导列表
/// <summary>
/// 司导商品订单后台分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSDGoodsOrderPageList
()
{
var
parms
=
RequestParm
;
JObject
newParms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Order_Extend
demodel
=
new
RB_Goods_Order_Extend
()
{
UserName
=
newParms
.
GetStringValue
(
"UserName"
),
OrderSource
=
(
UserSourceEnum
)
newParms
.
GetInt
(
"OrderSource"
),
OrderType
=
newParms
.
GetInt
(
"OrderType"
),
DeliveryMethod
=
(
OrderDeliveryMethodEnum
)
newParms
.
GetInt
(
"DeliveryMethod"
),
OrderId
=
newParms
.
GetInt
(
"OrderId"
),
StartTime
=
newParms
.
GetStringValue
(
"StartTime"
),
EndTime
=
newParms
.
GetStringValue
(
"EndTime"
),
OrderStatus
=
(
OrderStatusEnum
)
newParms
.
GetInt
(
"OrderStatus"
),
OrderNo
=
newParms
.
GetStringValue
(
"OrderNo"
),
MerchantsNo
=
newParms
.
GetStringValue
(
"MerchantsNo"
),
UserId
=
newParms
.
GetInt
(
"UserId"
),
GoodsName
=
newParms
.
GetStringValue
(
"GoodsName"
),
Consignee
=
newParms
.
GetStringValue
(
"Consignee"
),
Recycled
=
newParms
.
GetInt
(
"Recycled"
),
AnchorName
=
newParms
.
GetStringValue
(
"AnchorName"
),
IsSelectPayMoney
=
newParms
.
GetInt
(
"IsSelectPayMoney"
,
0
)
};
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
orderModule
.
GetSDGoodsOrderPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
OrderId
,
x
.
OrderNo
,
x
.
MerchantsNo
,
x
.
OrderSource
,
OrderSourceName
=
x
.
OrderSource
.
GetEnumName
(),
x
.
UserId
,
x
.
UserName
,
x
.
DeliveryMethod
,
DeliveryMethodName
=
x
.
DeliveryMethod
.
GetEnumName
(),
x
.
Income
,
x
.
FreightMoney
,
x
.
PaymentWay
,
PaymentWayName
=
x
.
PaymentWay
.
GetEnumName
(),
CouponMoney
=
x
.
CouponMoney
??
0
,
IntegralMoney
=
(
x
.
DetailList
!=
null
&&
x
.
DetailList
.
Any
())
?
(
x
.
DetailList
.
Sum
(
x
=>
x
.
IntegralMoney
??
0
))
:
0
,
IntegralNumber
=
(
x
.
DetailList
!=
null
&&
x
.
DetailList
.
Any
())
?
(
x
.
DetailList
.
Sum
(
x
=>
x
.
IntegralNumber
??
0
))
:
0
,
MemberDiscountCouponList
=
x
.
MemberDiscountCouponList
.
Select
(
y
=>
new
{
y
.
Name
,
y
.
MinConsumePrice
,
y
.
MaxDiscountsPrice
,
y
.
UseType
,
y
.
CouponType
,
y
.
DiscountsPrice
}),
DetailList
=
x
.
DetailList
.
Select
(
y
=>
new
{
y
.
SupplierId
,
y
.
SupplierName
,
y
.
FreightCostMoney
,
y
.
FreightMoney
,
y
.
CostMoney
,
y
.
Id
,
y
.
CoverImage
,
y
.
CoverImagePath
,
y
.
OrderType
,
OrderTypeName
=
y
.
OrderType
.
GetEnumName
(),
y
.
GoodsName
,
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Number
,
y
.
IsBindExpress
,
y
.
FreeShippingRemarks
,
y
.
SmallShopsCostPrice
,
y
.
YSMoney
,
y
.
RealMoney
,
y
.
YFMoney
,
y
.
PayMoney
,
CouponMoney
=
y
.
CouponMoney
??
0
,
InsuranceMoney
=
y
.
InsuranceMoney
??
0
,
InsuranceCostMoney
=
y
.
InsuranceCostMoney
??
0
,
IntegralMoney
=
y
.
IntegralMoney
??
0
,
IntegralNumber
=
y
.
IntegralNumber
??
0
,
SFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
1
).
Select
(
z
=>
new
{
z
.
FrID
,
z
.
Status
,
z
.
Is_Cashier
}),
ZFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
2
).
Select
(
z
=>
new
{
z
.
FrID
,
z
.
Status
,
z
.
Is_Cashier
}),
y
.
SiteName
,
y
.
SiteId
,
y
.
GuideId
,
y
.
GuideName
,
y
.
CarId
,
y
.
CarName
,
y
.
CarColorId
,
y
.
CarColorName
,
y
.
CarNumber
,
y
.
LineName
,
TripSTime
=
y
.
TripSTime
.
HasValue
?
y
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
TripETime
=
y
.
TripETime
.
HasValue
?
y
.
TripETime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
y
.
CarType
,
CarTypeName
=
y
.
CarType
.
GetEnumName
(),
y
.
UseDay
,
y
.
IsSpell
,
y
.
CommentGiveIntegral
}),
x
.
Consignee
,
x
.
Mobile
,
x
.
DistrictAddress
,
x
.
ShoppingAddress
,
x
.
DestinationAddress
,
x
.
BuyerMessage
,
x
.
Remark
,
x
.
OrderStatus
,
OrderStatusName
=
x
.
OrderStatus
.
GetEnumName
(),
PaymentTime
=
x
.
PaymentTime
.
HasValue
?
x
.
PaymentTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
DeliveryTime
=
x
.
DeliveryTime
.
HasValue
?
x
.
DeliveryTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
ReceivingTime
=
x
.
ReceivingTime
.
HasValue
?
x
.
ReceivingTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
FinishTime
=
x
.
FinishTime
.
HasValue
?
x
.
FinishTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
Country
,
x
.
Province
,
x
.
City
,
x
.
District
,
x
.
TenantId
,
x
.
MallBaseId
,
x
.
SmallShopsId
,
x
.
SmallShopsName
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取商品订单导出选项列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderListExportForSDEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderListExportForSDEnum
));
return
ApiResult
.
Success
(
""
,
list
.
OrderBy
(
x
=>
x
.
Value
).
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// 商品订单下载
/// </summary>
[
HttpPost
]
public
FileContentResult
GetSDGoodsOrderListToExcel
()
{
var
parms
=
RequestParm
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
parms
.
msg
.
ToString
());
string
ExcelName
=
"司导订单列表"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
+
".xls"
;
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
if
(
demodel
.
ExcelEnumIds
==
null
||
!
demodel
.
ExcelEnumIds
.
Any
())
{
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
ExcelName
);
}
var
Enumlist
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderListExportForSDEnum
));
ExcelDataSource
header
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
new
ExcelColumn
(
value
:
"序号"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
}
}
};
foreach
(
var
item
in
demodel
.
ExcelEnumIds
)
{
var
Name
=
Enumlist
.
Where
(
x
=>
x
.
Value
==
item
.
ToString
()).
FirstOrDefault
().
Key
??
""
;
header
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
Name
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
});
}
slist
.
Add
(
header
);
try
{
demodel
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
if
(!(
demodel
.
OrderStatus
>
0
))
{
demodel
.
IsNotSelectCancel
=
1
;
}
var
list
=
orderModule
.
GetSDGoodsOrderPageList
(
1
,
10000
,
out
long
count
,
demodel
);
#
region
组装数据
int
Num
=
0
;
foreach
(
var
item
in
list
)
{
foreach
(
var
item2
in
item
.
DetailList
)
{
Num
++;
ExcelDataSource
datarow
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
new
ExcelColumn
(
value
:
Num
.
ToString
()){
},
},
ColumnHight
=
30
};
foreach
(
var
qitem
in
demodel
.
ExcelEnumIds
)
{
switch
(
qitem
)
{
case
1
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
OrderSource
.
GetEnumName
())
{
});
break
;
case
2
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
OrderNo
)
{
});
break
;
case
3
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
MerchantsNo
)
{
});
break
;
case
4
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
UserName
)
{
});
break
;
case
5
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item2
.
GoodsName
)
{
});
break
;
case
28
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item2
.
GoodsSubName
)
{
});
break
;
case
7
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
Number
??
0
).
ToString
())
{
});
break
;
case
9
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
CostMoney
??
0
).
ToString
())
{
});
break
;
case
10
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
Consignee
)
{
});
break
;
case
11
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
Mobile
)
{
});
break
;
case
12
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
DistrictAddress
??
""
)
+
" "
+
(
item
.
ShoppingAddress
??
""
))
{
});
break
;
case
13
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
Original_Price
??
0
).
ToString
())
{
});
break
;
case
14
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
Final_Price
??
0
).
ToString
())
{
});
break
;
case
15
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
FreightMoney
??
0
).
ToString
())
{
});
break
;
case
16
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
))
{
});
break
;
case
17
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
PaymentWay
.
GetEnumName
())
{
});
break
;
case
18
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
OrderStatus
.
GetEnumName
())
{
});
break
;
case
19
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
OrderStatus
>
OrderStatusEnum
.
NonPayment
?
"已付款"
:
"未付款"
)
{
});
break
;
case
20
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
PaymentTime
.
HasValue
?
item
.
PaymentTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
)
{
});
break
;
case
21
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
OrderStatus
>
OrderStatusEnum
.
WaitSendGoods
?
"已发货"
:
"未发货"
)
{
});
break
;
case
22
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
DeliveryTime
.
HasValue
?
item
.
DeliveryTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
)
{
});
break
;
case
23
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
OrderStatus
>
OrderStatusEnum
.
WaitReceiving
?
"已收货"
:
"未收货"
)
{
});
break
;
case
24
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
ReceivingTime
.
HasValue
?
item
.
ReceivingTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
)
{
});
break
;
case
29
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
GuideName
??
""
))
{
});
break
;
case
30
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
CarName
??
""
))
{
});
break
;
case
31
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
CarNumber
??
""
))
{
});
break
;
case
32
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item2
.
CarType
.
GetEnumName
()
??
""
))
{
});
break
;
case
25
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
""
)
{
});
break
;
case
26
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
Remark
)
{
});
break
;
case
27
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
BuyerMessage
)
{
});
break
;
}
}
slist
.
Add
(
datarow
);
}
}
#
endregion
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
ExcelName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
string
.
Format
(
"GetFileFromWebApi_requestData: {0}"
,
JsonHelper
.
Serialize
(
RequestParm
)));
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
ExcelName
);
}
}
/// <summary>
/// 获取订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSDGoodsOrderInfo
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
Failed
();
}
return
orderModule
.
GetSDGoodsOrderInfo
(
OrderId
,
req
.
TenantId
,
req
.
MallBaseId
);
}
#
endregion
/// <summary>
/// <summary>
/// 获取商品订单类型枚举
/// 获取商品订单类型枚举
/// </summary>
/// </summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment