Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
4c05590e
Commit
4c05590e
authored
Dec 08, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
fd2f34e8
cdfbafea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
0 deletions
+111
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+45
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+9
-0
ThirdController.cs
Edu.WebApi/Controllers/Third/ThirdController.cs
+44
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+13
-0
No files found.
Edu.Module.Course/OrderModule.cs
View file @
4c05590e
...
...
@@ -6,6 +6,7 @@ using Edu.Common.Plugin;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Log
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Course
;
using
Edu.Repository.Log
;
using
Edu.Repository.User
;
...
...
@@ -927,5 +928,49 @@ namespace Edu.Module.Course
return
orderRepository
.
GetMyOrderStatistics
(
demodel
);
}
#
endregion
#
region
订单操作
/// <summary>
/// 财务 更新订单实收,退款
/// </summary>
/// <param name="orderId"></param>
/// <param name="income"></param>
/// <param name="refund"></param>
/// <param name="empModel"></param>
/// <returns></returns>
public
bool
UpdateEduOrderIncome
(
int
orderId
,
decimal
income
,
decimal
refund
,
Employee_ViewModel
empModel
)
{
var
orderModel
=
orderRepository
.
GetEntity
(
orderId
);
if
(
orderModel
==
null
)
{
return
false
;
}
if
(
orderModel
.
Income
==
income
&&
orderModel
.
Refund
==
refund
)
{
return
true
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_ViewModel
.
Income
),
income
},
{
nameof
(
RB_Order_ViewModel
.
Refund
),
refund
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Order_ViewModel
.
OrderId
),
FiledValue
=
orderId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
orderRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//写入日志
changeLogRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_User_ChangeLog
()
{
Id
=
0
,
Type
=
2
,
CreateBy
=
empModel
.
Id
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
empModel
.
Group_Id
,
LogContent
=
$"【
{
empModel
.
EmployeeName
}
(
{
empModel
.
Id
}
)】单据审核通过,更新订单实收【
{
income
}
】,退款【
{
refund
}
】"
,
School_Id
=
empModel
.
School_Id
,
SourceId
=
orderId
});
}
return
flag
;
}
#
endregion
}
}
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
4c05590e
...
...
@@ -539,6 +539,15 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Success
();
}
/// <summary>
/// 订单使用最新班级报价
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetClassOrderUseNewPrice
()
{
return
ApiResult
.
Success
();
}
#
endregion
#
region
学生名单
...
...
Edu.WebApi/Controllers/Third/ThirdController.cs
View file @
4c05590e
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Module.Course
;
using
Edu.Module.User
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
...
...
@@ -24,6 +25,10 @@ namespace Edu.WebApi.Controllers.Third
/// 员工处理类
/// </summary>
private
readonly
EmployeeModule
employeeModule
=
new
EmployeeModule
();
/// <summary>
/// 订单处理类
/// </summary>
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
/// <summary>
/// 根部部门层级获取部门主管
...
...
@@ -117,5 +122,44 @@ namespace Edu.WebApi.Controllers.Third
qitem
.
GroupName
}));
}
/// <summary>
/// 更新订单实收、退款金额
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
UpdateEduOrderIncome
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
EmployeeId
=
parms
.
GetInt
(
"EmployeeId"
,
0
);
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
decimal
Income
=
parms
.
GetDecimal
(
"Income"
);
decimal
Refund
=
parms
.
GetDecimal
(
"Refund"
);
if
(
EmployeeId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递用户id"
);
}
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单id"
);
}
var
empModel
=
employeeModule
.
GetEmployeeListModule
(
new
Model
.
ViewModel
.
User
.
Employee_ViewModel
()
{
Id
=
EmployeeId
})?.
FirstOrDefault
();
if
(
empModel
==
null
)
{
return
ApiResult
.
ParamIsNull
(
message
:
"当前员工编号不存在!"
);
}
bool
flag
=
orderModule
.
UpdateEduOrderIncome
(
OrderId
,
Income
,
Refund
,
empModel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
}
}
Edu.WebApi/Controllers/User/UserController.cs
View file @
4c05590e
...
...
@@ -850,6 +850,19 @@ namespace Edu.WebApi.Controllers.User
}
/// <summary>
/// 获取触发事件枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAccountRemarkTypeEnumList
()
{
int
type
=
base
.
ParmJObj
.
GetInt
(
"Type"
,
0
);
var
list
=
EnumHelper
.
EnumToList
(
typeof
(
RemarkTypeEnum
));
return
ApiResult
.
Success
(
""
,
list
);
}
/// <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