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
633b55ee
Commit
633b55ee
authored
Mar 16, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 教育商品资产化
parent
d70204ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1290 additions
and
136 deletions
+1290
-136
FinanceConfigTypeEnum.cs
Mall.Common/Enum/Education/FinanceConfigTypeEnum.cs
+18
-0
RB_Goods.cs
Mall.Model/Entity/Education/RB_Goods.cs
+5
-0
RB_Goods_Order.cs
Mall.Model/Entity/Education/RB_Goods_Order.cs
+5
-31
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Education/RB_Goods_OrderDetail.cs
+126
-0
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+1
-0
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+5
-0
RB_Supplies_StockOutApplyFor.cs
Mall.Model/Entity/Property/RB_Supplies_StockOutApplyFor.cs
+111
-0
RB_Supplies_StockOutApplyForDetail.cs
...del/Entity/Property/RB_Supplies_StockOutApplyForDetail.cs
+101
-0
RB_Goods_OrderDetail_ViewModel.cs
....Model/Extend/Education/RB_Goods_OrderDetail_ViewModel.cs
+20
-0
RB_Goods_ViewModel.cs
Mall.Model/Extend/Education/RB_Goods_ViewModel.cs
+5
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+16
-2
OrderModule_Part.cs
Mall.Module.Product/OrderModule_Part.cs
+332
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+24
-22
PropertyModule.cs
Mall.Module.Property/PropertyModule.cs
+37
-0
UserCommonModule.cs
Mall.Module.User/UserCommonModule.cs
+238
-73
RB_GoodsRepository.cs
Mall.Repository/Education/RB_GoodsRepository.cs
+4
-0
RB_Goods_OrderDetailRepository.cs
Mall.Repository/Education/RB_Goods_OrderDetailRepository.cs
+52
-0
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+13
-1
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+1
-1
RB_Supplies_StockOutApplyForDetailRepository.cs
.../Property/RB_Supplies_StockOutApplyForDetailRepository.cs
+16
-0
RB_Supplies_StockOutApplyForRepository.cs
...sitory/Property/RB_Supplies_StockOutApplyForRepository.cs
+16
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+1
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+26
-1
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+9
-4
PropertyController.cs
Mall.WebApi/Controllers/Property/PropertyController.cs
+39
-0
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+69
-0
No files found.
Mall.Common/Enum/Education/FinanceConfigTypeEnum.cs
View file @
633b55ee
...
...
@@ -70,5 +70,23 @@ namespace Mall.Common.Enum.Education
/// </summary>
[
EnumField
(
"教育咖啡劵"
)]
EduCoffee
=
15
,
/// <summary>
/// 教育商品- 资产
/// </summary>
[
EnumField
(
"教育资产商品"
)]
EduProperty
=
16
,
/// <summary>
/// 教育商品- 资产 取消退款
/// </summary>
[
EnumField
(
"教育资产商品取消退款"
)]
EduPropertyRefund
=
17
,
/// <summary>
/// 教育商品- 运费成本
/// </summary>
[
EnumField
(
"教育资产商品运费成本"
)]
EduFreightCost
=
18
,
}
}
Mall.Model/Entity/Education/RB_Goods.cs
View file @
633b55ee
...
...
@@ -68,5 +68,10 @@ namespace Mall.Model.Entity.Coffee
/// </summary>
public
int
MallGoodsId
{
get
;
set
;
}
/// <summary>
/// 对应的物料档案ID
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
}
}
Mall.Model/Entity/Education/RB_Goods_Order.cs
View file @
633b55ee
...
...
@@ -63,16 +63,6 @@ namespace Mall.Model.Entity.Coffee
/// </summary>
public
int
PaymentWay
{
get
;
set
;
}
/// <summary>
/// 单价
/// </summary>
public
decimal
Unit_Price
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
int
Number
{
get
;
set
;
}
/// <summary>
/// 应收金额
/// </summary>
...
...
@@ -89,7 +79,7 @@ namespace Mall.Model.Entity.Coffee
public
decimal
Fee
{
get
;
set
;
}
/// <summary>
/// 退款
/// 退款
金额
/// </summary>
public
decimal
Refund
{
get
;
set
;
}
...
...
@@ -113,26 +103,6 @@ namespace Mall.Model.Entity.Coffee
/// </summary>
public
DateTime
?
CancelTime
{
get
;
set
;
}
/// <summary>
/// 教育商品id
/// </summary>
public
int
GoodsId
{
get
;
set
;
}
/// <summary>
/// 对应电商商品ID
/// </summary>
public
int
MallGoodsId
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
GoodsName
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 总成本价格
/// </summary>
...
...
@@ -163,5 +133,9 @@ namespace Mall.Model.Entity.Coffee
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 总运费成本
/// </summary>
public
decimal
FreightCostMoney
{
get
;
set
;
}
}
}
Mall.Model/Entity/Education/RB_Goods_OrderDetail.cs
0 → 100644
View file @
633b55ee
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum.Education
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Coffee
{
/// <summary>
/// 教育商品订单明细实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"EduConnection"
)]
public
class
RB_Goods_OrderDetail
{
/// <summary>
/// 明细ID
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// OrderId
/// </summary>
public
int
OrderId
{
get
;
set
;
}
/// <summary>
/// 对应电商订单ID
/// </summary>
public
int
MallOrderId
{
get
;
set
;
}
/// <summary>
/// 对应电商订单明细ID
/// </summary>
public
int
MallOrderDetailId
{
get
;
set
;
}
/// <summary>
/// 单价
/// </summary>
public
decimal
Unit_Price
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
int
Number
{
get
;
set
;
}
/// <summary>
/// 应收金额
/// </summary>
public
decimal
PreferPrice
{
get
;
set
;
}
/// <summary>
/// 实收金额
/// </summary>
public
decimal
Income
{
get
;
set
;
}
/// <summary>
/// 手续费
/// </summary>
public
decimal
Fee
{
get
;
set
;
}
/// <summary>
/// 运费
/// </summary>
public
decimal
FreightMoney
{
get
;
set
;
}
/// <summary>
/// 教育商品id
/// </summary>
public
int
GoodsId
{
get
;
set
;
}
/// <summary>
/// 对应电商商品ID
/// </summary>
public
int
MallGoodsId
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
GoodsName
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 总成本价格
/// </summary>
public
decimal
CostMoney
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 集团ID
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 对应的物料档案ID
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
/// <summary>
/// 商品运费成本
/// </summary>
public
decimal
FreightCostMoney
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
633b55ee
...
...
@@ -371,5 +371,6 @@ namespace Mall.Model.Entity.Product
/// 教育商品 0 正常订单 1咖啡劵 2耗材类 3教室类
/// </summary>
public
int
OrderEduType
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
633b55ee
...
...
@@ -414,5 +414,10 @@ namespace Mall.Model.Entity.Product
/// 赠送咖啡数量
/// </summary>
public
int
PresentCoffeeNum
{
get
;
set
;
}
/// <summary>
/// 耗材对应的ID
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
}
}
Mall.Model/Entity/Property/RB_Supplies_StockOutApplyFor.cs
0 → 100644
View file @
633b55ee
using
System
;
using
VT.FW.DB
;
using
Mall.Common.Plugin
;
namespace
Mall.Model.Entity.Property
{
/// <summary>
/// 耗材出库申请实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"PropertyConnection"
)]
public
class
RB_Supplies_StockOutApplyFor
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 总数量
/// </summary>
public
int
TotalNumber
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 状态 0 正常 1删除
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 公司
/// </summary>
public
int
RB_Branch_Id
{
get
;
set
;
}
/// <summary>
/// 集团
/// </summary>
public
int
RB_Group_Id
{
get
;
set
;
}
/// <summary>
/// CreateBy
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateBy
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 关联财务单据id(英文逗号分隔)
/// </summary>
public
string
FinanceIds
{
get
;
set
;
}
/// <summary>
/// 出库状态 1未出库 2部分出库 3已出库
/// </summary>
public
int
StockOutStatus
{
get
;
set
;
}
/// <summary>
/// 审核状态 1审核中 2通过 3驳回
/// </summary>
public
int
AuditStatus
{
get
;
set
;
}
/// <summary>
/// 审核备注
/// </summary>
public
string
AuditRemark
{
get
;
set
;
}
/// <summary>
/// 审核人
/// </summary>
public
int
AuditEmpId
{
get
;
set
;
}
/// <summary>
/// 审核时间
/// </summary>
public
DateTime
?
AuditDate
{
get
;
set
;
}
/// <summary>
/// 类型 1主营业务 2其他业务
/// </summary>
public
int
Type
{
get
;
set
;
}
/// <summary>
/// 电商关联订单ID
/// </summary>
public
int
MallOrderId
{
get
;
set
;
}
/// <summary>
/// 电商关联凭证
/// </summary>
public
string
MallRelevance
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Model/Entity/Property/RB_Supplies_StockOutApplyForDetail.cs
0 → 100644
View file @
633b55ee
using
System
;
using
VT.FW.DB
;
using
Mall.Common.Plugin
;
namespace
Mall.Model.Entity.Property
{
/// <summary>
/// 耗材出库申请明细实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"PropertyConnection"
)]
public
class
RB_Supplies_StockOutApplyForDetail
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 申请id
/// </summary>
public
int
ApplyForId
{
get
;
set
;
}
/// <summary>
/// 班级id
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 班级名称
/// </summary>
public
string
ClassName
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
CourseName
{
get
;
set
;
}
/// <summary>
/// 耗材id
/// </summary>
public
int
SuppliesId
{
get
;
set
;
}
/// <summary>
/// 出库数量
/// </summary>
public
int
Number
{
get
;
set
;
}
/// <summary>
/// 已出库数量
/// </summary>
public
int
StockOutNum
{
get
;
set
;
}
/// <summary>
/// 状态 0 正常 1删除
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 公司
/// </summary>
public
int
RB_Branch_Id
{
get
;
set
;
}
/// <summary>
/// 集团
/// </summary>
public
int
RB_Group_Id
{
get
;
set
;
}
/// <summary>
/// CreateBy
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateBy
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 校区id
/// </summary>
public
int
SchoolId
{
get
;
set
;
}
/// <summary>
/// 校区名称
/// </summary>
public
string
SchoolName
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Model/Extend/Education/RB_Goods_OrderDetail_ViewModel.cs
0 → 100644
View file @
633b55ee
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.Education
{
/// <summary>
/// 教育商品订单明细扩展类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"EduConnection"
)]
public
class
RB_Goods_OrderDetail_ViewModel
:
Entity
.
Coffee
.
RB_Goods_OrderDetail
{
/// <summary>
/// 订单Ids
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/Education/RB_Goods_ViewModel.cs
View file @
633b55ee
...
...
@@ -16,5 +16,10 @@ namespace Mall.Model.Extend.Education
/// 商品Ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 电商商品IDs
/// </summary>
public
string
MallGoodsIds
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
633b55ee
...
...
@@ -992,7 +992,8 @@ namespace Mall.Module.Product
model
.
RejectRemark
,
model
.
IsCanApplyForAfterSale
,
model
.
PresentFXGrade
,
model
.
BuyerMessage
model
.
BuyerMessage
,
model
.
OrderEduType
});
}
...
...
@@ -3381,6 +3382,11 @@ namespace Mall.Module.Product
{
return
ApiResult
.
Failed
(
"有商品不存在或者商品已失效"
);
}
if
(
gmodel
.
GoodsEduType
==
2
)
{
demodel
.
OrderEduType
=
2
;
//资产商品化
}
item
.
MaterialId
=
gmodel
.
MaterialId
;
if
(
gmodel
.
PresentFXGrade
>
0
)
{
//是赠送VIP商品
...
...
@@ -3915,6 +3921,13 @@ namespace Mall.Module.Product
{
continue
;
}
if
(
demodel
.
OrderEduType
==
2
)
{
if
(
item
.
MaterialId
<=
0
)
{
return
ApiResult
.
Failed
(
"不同板块商品,无法一起下单"
);
}
}
item
.
MaterialId
=
gmodel
.
MaterialId
;
item
.
SupplierId
=
gmodel
.
SupplierId
;
item
.
CouponMoney
=
0
;
var
couponModel
=
GoodsCouponList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
FirstOrDefault
();
...
...
@@ -7860,7 +7873,8 @@ namespace Mall.Module.Product
ClassId
=
item
.
ClassId
,
FXCommission
=
item
.
CommissionPrice
,
OriginalCostMoney
=
item
.
CostMoney
??
0
,
PresentCoffeeNum
=
item
.
PresentCoffeeNum
PresentCoffeeNum
=
item
.
PresentCoffeeNum
,
MaterialId
=
item
.
MaterialId
},
trans
);
item
.
Id
=
detailId
;
if
(
detailId
>
0
&&
SatisfiedGoodsList
.
Any
())
...
...
Mall.Module.Product/OrderModule_Part.cs
View file @
633b55ee
This diff is collapsed.
Click to expand it.
Mall.Module.Product/ProductModule.cs
View file @
633b55ee
...
...
@@ -7141,8 +7141,7 @@ namespace Mall.Module.Product
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
SetProductGoodsInfo
(
RB_Goods_Extend
demodel
)
public
bool
SetProductGoodsInfo
(
RB_Goods_Extend
demodel
)
{
var
goodsModel
=
new
RB_Goods
();
if
(
demodel
.
Id
>
0
)
...
...
@@ -7797,7 +7796,7 @@ namespace Mall.Module.Product
#
endregion
#
region
修改咖啡劵商品
if
(
goodsModel
.
GoodsEduType
==
1
)
{
if
(
goodsModel
.
GoodsEduType
==
1
||
goodsModel
.
GoodsEduType
==
2
)
{
var
eduGoodsMdoel
=
eduGoodsRepository
.
GetList
(
new
Model
.
Extend
.
Education
.
RB_Goods_ViewModel
()
{
MallBaseId
=
goodsModel
.
MallBaseId
,
MallGoodsId
=
goodsModel
.
Id
}).
FirstOrDefault
();
if
(
eduGoodsMdoel
!=
null
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -7821,10 +7820,12 @@ namespace Mall.Module.Product
else
{
#
region
验证咖啡劵
if
(
demodel
.
GoodsEduType
==
1
)
{
//咖啡劵商品需唯一
var
kfList
=
goodsRepository
.
GetSingleList
(
new
RB_Goods_Extend
()
{
MallBaseId
=
demodel
.
MallBaseId
,
GoodsEduType
=
1
});
if
(
kfList
.
Any
())
{
if
(
demodel
.
GoodsEduType
==
1
||
demodel
.
GoodsEduType
==
2
)
{
//咖啡劵商品需唯一 //验证资产商品必须唯一
var
kfList
=
goodsRepository
.
GetSingleList
(
new
RB_Goods_Extend
()
{
MallBaseId
=
demodel
.
MallBaseId
,
GoodsEduType
=
demodel
.
GoodsEduType
,
MaterialId
=
demodel
.
MaterialId
});
if
(
kfList
.
Any
())
{
return
false
;
}
}
...
...
@@ -7964,22 +7965,23 @@ namespace Mall.Module.Product
}
}
if
(
demodel
.
GoodsEduType
==
1
)
{
if
(
demodel
.
GoodsEduType
==
1
||
demodel
.
GoodsEduType
==
2
)
{
//咖啡劵商品 (分布式事务 无法跨服保存)
//eduGoodsRepository.Insert(new Model.Entity.Coffee.RB_Goods()
//{
// CoverImage = demodel.CarouselImageList.Where(x => x.Type == 0).FirstOrDefault()?.Path ?? "",
// CreateDate = DateTime.Now,
// GoodsName = demodel.Name,
// GoodsType = demodel.GoodsEduType,
// Group_Id = 100000,
// Id = 0,
// MallBaseId = demodel.MallBaseId,
// MallGoodsId = Id,
// SellingPrice = demodel.SellingPrice ??0,
// Status = 0,
// UpdateDate = DateTime.Now
//});
eduGoodsRepository
.
Insert
(
new
Model
.
Entity
.
Coffee
.
RB_Goods
()
{
CoverImage
=
demodel
.
CarouselImageList
.
Where
(
x
=>
x
.
Type
==
0
).
FirstOrDefault
()?.
Path
??
""
,
CreateDate
=
DateTime
.
Now
,
GoodsName
=
demodel
.
Name
,
GoodsType
=
demodel
.
GoodsEduType
,
Group_Id
=
100000
,
Id
=
0
,
MallBaseId
=
demodel
.
MallBaseId
,
MallGoodsId
=
Id
,
SellingPrice
=
demodel
.
SellingPrice
??
0
,
Status
=
0
,
UpdateDate
=
DateTime
.
Now
,
MaterialId
=
demodel
.
MaterialId
});
}
}
}
...
...
Mall.Module.Property/PropertyModule.cs
View file @
633b55ee
...
...
@@ -2134,5 +2134,42 @@ namespace Mall.Module.Property
#
endregion
#
region
教育资产商品化
/// <summary>
/// 获取所有的耗材列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="demodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public
List
<
RB_Supplies_Material_Extend
>
GetEduGoodsMaterialList
(
RB_Supplies_Material_Extend
demodel
)
{
var
list
=
supplies_MaterialRepository
.
GetList
(
demodel
);
List
<
RB_Supplies_Inventory_Extend
>
iList
=
new
List
<
RB_Supplies_Inventory_Extend
>();
if
(
list
.
Any
())
{
//查询出该仓库 耗材下 所有的库存
string
Sstr
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
).
Distinct
());
iList
=
supplies_InventoryRepository
.
GetList
(
new
RB_Supplies_Inventory_Extend
()
{
RB_Group_Id
=
demodel
.
RB_Group_Id
,
SuppliesIdStr
=
Sstr
},
null
);
}
foreach
(
var
item
in
list
)
{
if
(
item
.
Images
==
""
||
item
.
Images
==
null
)
{
item
.
Images
=
"[]"
;
}
item
.
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Images
);
item
.
InventoryNum
=
iList
.
Where
(
x
=>
x
.
SuppliesId
==
item
.
Id
).
Sum
(
x
=>
x
.
Number
??
0
);
var
inventoryModel
=
iList
.
Where
(
x
=>
x
.
SuppliesId
==
item
.
Id
).
OrderByDescending
(
x
=>
x
.
Money
).
FirstOrDefault
();
if
(
inventoryModel
!=
null
&&
inventoryModel
.
Number
>
0
)
{
item
.
Money
=
Math
.
Round
((
inventoryModel
.
Money
??
0
)
/
(
inventoryModel
.
Number
??
0
),
2
,
MidpointRounding
.
AwayFromZero
);
}
}
return
list
;
}
#
endregion
}
}
Mall.Module.User/UserCommonModule.cs
View file @
633b55ee
This diff is collapsed.
Click to expand it.
Mall.Repository/Education/RB_GoodsRepository.cs
View file @
633b55ee
...
...
@@ -38,6 +38,10 @@ namespace Mall.Repository.Education
{
where
+=
$@" and
{
nameof
(
RB_Goods_ViewModel
.
MallGoodsId
)}
=
{
demodel
.
MallGoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
MallGoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_ViewModel
.
MallGoodsId
)}
in(
{
demodel
.
MallGoodsIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_ViewModel
.
Id
)}
in(
{
demodel
.
GoodsIds
}
)"
;
...
...
Mall.Repository/Education/RB_Goods_OrderDetailRepository.cs
0 → 100644
View file @
633b55ee
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Model.Entity.Coffee
;
using
Mall.Model.Extend.Education
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.Education
{
/// <summary>
/// 教育商品订单明细仓储
/// </summary>
public
class
RB_EduGoods_OrderDetailRepository
:
BaseRepository
<
RB_Goods_OrderDetail
>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderDetail_ViewModel
>
GetList
(
RB_Goods_OrderDetail_ViewModel
demodel
)
{
var
parameters
=
new
DynamicParameters
();
string
where
=
$@" 1=1 and Status =0"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
MallBaseId
)}
=
{
demodel
.
MallBaseId
}
"
;
}
if
(
demodel
.
OrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
OrderId
)}
=
{
demodel
.
OrderId
}
"
;
}
if
(
demodel
.
MallOrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
MallOrderId
)}
=
{
demodel
.
MallOrderId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
OrderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail_ViewModel
.
OrderId
)}
in(
{
demodel
.
OrderIds
}
)"
;
}
string
sql
=
$@" select * from RB_Goods_OrderDetail where
{
where
}
order by Id desc"
;
return
Get
<
RB_Goods_OrderDetail_ViewModel
>(
sql
,
parameters
).
ToList
();
}
}
}
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
633b55ee
...
...
@@ -122,6 +122,14 @@ namespace Mall.Repository.Product
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsPageType
)}
in(0,2)"
;
}
}
if
(
dmodel
.
MaterialId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MaterialId
)}
=
{
dmodel
.
MaterialId
}
"
;
}
if
(
dmodel
.
GoodsEduType
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsEduType
)}
=
{
dmodel
.
GoodsEduType
}
"
;
}
if
(
dmodel
.
Q_GoodsEduType
==
1
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsEduType
)}
>0"
;
...
...
@@ -711,6 +719,10 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsEduType
)}
=
{
dmodel
.
GoodsEduType
}
"
;
}
if
(
dmodel
.
MaterialId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MaterialId
)}
=
{
dmodel
.
MaterialId
}
"
;
}
string
sql
=
$@"select g.* from RB_Goods g where
{
where
}
"
;
return
Get
<
RB_Goods_Extend
>(
sql
).
ToList
();
...
...
@@ -918,7 +930,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
}
else
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsEduType
)}
=0
"
;
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsEduType
)}
<>1
"
;
}
//HK 新加参数
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StoresIds
))
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
633b55ee
...
...
@@ -151,7 +151,7 @@ namespace Mall.Repository.Product
}
else
{
//默认查询
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderEduType
)}
=0
"
;
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderEduType
)}
<>1
"
;
}
...
...
Mall.Repository/Property/RB_Supplies_StockOutApplyForDetailRepository.cs
0 → 100644
View file @
633b55ee
using
Mall.Model.Entity.Property
;
using
Mall.Model.Extend.Property
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.Property
{
/// <summary>
/// 耗材出库申请明细仓储类
/// </summary>
public
class
RB_Supplies_StockOutApplyForDetailRepository
:
BaseRepository
<
RB_Supplies_StockOutApplyForDetail
>
{
}
}
Mall.Repository/Property/RB_Supplies_StockOutApplyForRepository.cs
0 → 100644
View file @
633b55ee
using
Mall.Model.Entity.Property
;
using
Mall.Model.Extend.Property
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.Property
{
/// <summary>
/// 耗材出库申请仓储类
/// </summary>
public
class
RB_Supplies_StockOutApplyForRepository
:
BaseRepository
<
RB_Supplies_StockOutApplyFor
>
{
}
}
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
633b55ee
...
...
@@ -267,6 +267,7 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
OrderStatus
,
OrderStatusName
=
x
.
OrderStatus
.
GetEnumName
(),
x
.
VersionSource
,
x
.
OrderEduType
,
x
.
TenantId
,
x
.
MallBaseId
,
x
.
PresentFXGrade
,
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
633b55ee
...
...
@@ -145,6 +145,8 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
IsApplyForAfterSale
,
y
.
OriginalCostMoney
,
y
.
FXCommission
,
y
.
CostFinanceId
,
y
.
FreightFinanceId
,
SFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
Common
.
Enum
.
Finance
.
WFTempLateClassEnum
.
IN
).
Select
(
z
=>
new
{
z
.
FrID
,
...
...
@@ -4740,6 +4742,29 @@ namespace Mall.WebApi.Controllers.MallBase
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
endregion
#
endregion
#
region
教育资产商品
[
HttpPost
]
public
ApiResult
SetEduGoodsFreightCostFinance
()
{
var
userInfo
=
base
.
UserInfo
;
var
parm
=
JObject
.
Parse
(
base
.
RequestParm
.
msg
.
ToString
());
int
OrderId
=
parm
.
GetInt
(
"OrderId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
string
msg
=
orderModule
.
SetEduGoodsFreightCostFinance
(
OrderId
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
633b55ee
...
...
@@ -1228,7 +1228,9 @@ namespace Mall.WebApi.Controllers.MallBase
OrderBy
=
parameters
.
GetInt
(
"OrderBy"
),
RetailStore
=
parameters
.
GetInt
(
"RetailStore"
,
-
1
),
CreateBy
=
parameters
.
GetInt
(
"EmpId"
,
-
1
),
Q_GoodsEduType
=
parameters
.
GetInt
(
"Q_GoodsEduType"
,
0
)
Q_GoodsEduType
=
parameters
.
GetInt
(
"Q_GoodsEduType"
,
0
),
GoodsEduType
=
parameters
.
GetInt
(
"GoodsEduType"
,
0
),
MaterialId
=
parameters
.
GetInt
(
"MaterialId"
,
0
)
};
demodel
.
TenantId
=
parms
.
TenantId
;
...
...
@@ -1285,7 +1287,8 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
SourceGoodsId
,
x
.
RetailStore
,
x
.
SupplierName
,
x
.
GoodsEduType
x
.
GoodsEduType
,
x
.
MaterialId
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
@@ -1825,7 +1828,8 @@ namespace Mall.WebApi.Controllers.MallBase
model
?.
FatCode
,
model
?.
GoodsUrl
,
model
?.
goodsLogo
,
model
?.
GoodsEduType
model
?.
GoodsEduType
,
model
?.
MaterialId
};
}
return
ApiResult
.
Success
(
""
,
obj
);
...
...
@@ -1900,7 +1904,8 @@ namespace Mall.WebApi.Controllers.MallBase
goodsLogo
=
parms
.
GetStringValue
(
"goodsLogo"
),
RetailStore
=
parms
.
GetInt
(
"RetailStore"
),
CreateBy
=
parms
.
GetInt
(
"EmpId"
,
0
),
GoodsEduType
=
parms
.
GetInt
(
"GoodsEduType"
,
0
)
GoodsEduType
=
parms
.
GetInt
(
"GoodsEduType"
,
0
),
MaterialId
=
parms
.
GetInt
(
"MaterialId"
,
0
)
};
if
(!
string
.
IsNullOrEmpty
(
parms
.
GetStringValue
(
"ShelvesDate"
)))
{
...
...
Mall.WebApi/Controllers/Property/PropertyController.cs
View file @
633b55ee
...
...
@@ -12,6 +12,7 @@ using Mall.Common;
using
Mall.Module.Property
;
using
Mall.Model.Extend.Property
;
using
Mall.Model.Extend.Product
;
using
Microsoft.AspNetCore.Authorization
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -639,5 +640,43 @@ namespace Mall.WebApi.Controllers.MallBase
}
#
endregion
#
region
教育资产商品化
/// <summary>
/// 获取所有的耗材列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
HttpPost
]
public
ApiResult
GetEduGoodsMaterialList
()
{
var
demdoel
=
JsonHelper
.
DeserializeObject
<
RB_Supplies_Material_Extend
>(
base
.
RequestParm
.
msg
.
ToString
());
if
(
demdoel
.
RB_Group_Id
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递集团ID"
);
}
if
(
string
.
IsNullOrEmpty
(
demdoel
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请输入资产名称"
);
}
var
list
=
propertyModule
.
GetEduGoodsMaterialList
(
demdoel
);
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
SuppliesNum
,
x
.
CategoryId
,
x
.
CategoryName
,
x
.
BrandName
,
x
.
SuppliesModel
,
x
.
Units
,
SellPrice
=
(
x
.
Money
??
0
)
+
Math
.
Ceiling
((
x
.
Money
??
0
)
*
Convert
.
ToDecimal
(
0.006
)),
// 提高 千分之6的手续费
x
.
Money
,
x
.
InventoryNum
,
x
.
ImageList
}));
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
633b55ee
...
...
@@ -89,6 +89,7 @@ namespace Mall.WebApi.Controllers.User
IsShow
=
1
,
LookTimes
=
5
,
};
int
EduId
=
parms
.
GetInt
(
"EduId"
);
//用于教育绑定用户 2022-03-15
if
(
requestParm
.
TenantId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商户号"
);
...
...
@@ -298,6 +299,39 @@ namespace Mall.WebApi.Controllers.User
UserGroupIds
=
demodel
.
BelongGroupIds
,
};
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
,
appletUserInfo
,
Config
.
JwtExpirTime
);
if
(
EduId
>
0
&&
demodel
.
MallBaseId
==
5
)
{
try
{
//教育 甲小鹤跳转至甲鹤小程序 自动绑定账号信息
var
eduModel
=
activityModule
.
GetEducationSellBaseInfo
(
new
Model
.
Extend
.
Education
.
RB_Education_EduSell_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
EduSellId
=
EduId
}).
FirstOrDefault
();
if
(
eduModel
!=
null
&&
eduModel
.
UserId
!=
UserId
)
{
LogHelper
.
Write
(
"账户已绑定其他用户(甲小鹤跳甲鹤自动绑学员账号)EduId:"
+
EduId
+
",UserId:"
+
UserId
);
}
else
{
if
(
eduModel
==
null
||
eduModel
.
Id
==
0
)
{
eduModel
=
new
Model
.
Extend
.
Education
.
RB_Education_EduSell_Extend
{
Id
=
0
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
CreateDate
=
DateTime
.
Now
,
Status
=
0
,
UserId
=
UserId
,
EduSellId
=
EduId
,
Type
=
2
//甲小鹤过来的 都是学生
};
activityModule
.
SetEduSellBaseInfo
(
eduModel
);
}
}
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"SetEduSellBaseInfo_RLogin"
);
}
}
if
(
isGiveCoupon
)
{
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Success
,
1
,
""
,
couponName
,
appletUserInfo
);
...
...
@@ -413,6 +447,41 @@ namespace Mall.WebApi.Controllers.User
}
}
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
umodel
.
Id
,
appletUserInfo
,
Config
.
JwtExpirTime
);
if
(
EduId
>
0
&&
demodel
.
MallBaseId
==
5
)
{
try
{
//教育 甲小鹤跳转至甲鹤小程序 自动绑定账号信息
var
eduModel
=
activityModule
.
GetEducationSellBaseInfo
(
new
Model
.
Extend
.
Education
.
RB_Education_EduSell_Extend
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
EduSellId
=
EduId
}).
FirstOrDefault
();
if
(
eduModel
!=
null
&&
eduModel
.
UserId
!=
umodel
.
Id
)
{
LogHelper
.
Write
(
"账户已绑定其他用户(甲小鹤跳甲鹤自动绑学员账号)EduId:"
+
EduId
+
",UserId:"
+
umodel
.
Id
);
}
else
{
if
(
eduModel
==
null
||
eduModel
.
Id
==
0
)
{
eduModel
=
new
Model
.
Extend
.
Education
.
RB_Education_EduSell_Extend
{
Id
=
0
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
CreateDate
=
DateTime
.
Now
,
Status
=
0
,
UserId
=
umodel
.
Id
,
EduSellId
=
EduId
,
Type
=
2
//甲小鹤过来的 都是学生
};
activityModule
.
SetEduSellBaseInfo
(
eduModel
);
}
}
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"SetEduSellBaseInfo_Login"
);
}
}
if
(
isGiveCoupon
)
{
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Success
,
1
,
""
,
couponName
,
appletUserInfo
);
...
...
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