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
9e2a9560
Commit
9e2a9560
authored
Mar 22, 2023
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 甲鹤市场提成调整
parent
6a23e57b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
390 additions
and
39 deletions
+390
-39
StudentLogTypeEnum.cs
Edu.Common/Enum/Log/StudentLogTypeEnum.cs
+1
-1
RB_Sell_Achievements_Rule.cs
Edu.Model/Entity/Sell/RB_Sell_Achievements_Rule.cs
+15
-0
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+10
-0
RB_Student_Assist_Extend.cs
Edu.Model/ViewModel/Customer/RB_Student_Assist_Extend.cs
+5
-0
SellAchievementsModule.cs
Edu.Module.Course/SellAchievementsModule.cs
+183
-24
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+81
-1
RB_Student_AssistRepository.cs
Edu.Repository/Customer/RB_Student_AssistRepository.cs
+14
-0
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+14
-1
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+4
-0
SellAchievementsController.cs
Edu.WebApi/Controllers/Course/SellAchievementsController.cs
+25
-12
CustomerStudentController.cs
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
+32
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+5
-0
Startup.cs
Edu.WebApi/Startup.cs
+1
-0
No files found.
Edu.Common/Enum/Log/StudentLogTypeEnum.cs
View file @
9e2a9560
...
...
@@ -36,7 +36,7 @@ namespace Edu.Common.Enum.Log
/// <summary>
///
试听
///
基础资料
/// </summary>
[
EnumField
(
"基础资料"
)]
BasicInfo
=
5
,
...
...
Edu.Model/Entity/Sell/RB_Sell_Achievements_Rule.cs
View file @
9e2a9560
...
...
@@ -97,5 +97,20 @@ namespace Edu.Model.Entity.Sell
/// </summary>
public
string
SchoolIds
{
get
;
set
;
}
/// <summary>
/// 提成类型 1业绩百分比 2人数固定金额
/// </summary>
public
int
SendType
{
get
;
set
;
}
/// <summary>
/// 人头奖励金额
/// </summary>
public
decimal
PeopleMoney
{
get
;
set
;
}
/// <summary>
/// 额外奖励金额 根据确认邀约咨询30分钟以上 发放
/// </summary>
public
decimal
ExtraMoney
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Student.cs
View file @
9e2a9560
...
...
@@ -266,5 +266,15 @@ namespace Edu.Model.Entity.User
/// 课程顾问期望达成协议日期
/// </summary>
public
string
AdvisorExpectDate
{
get
;
set
;
}
/// <summary>
/// 学员填表文件路径
/// </summary>
public
string
FileVoucher
{
get
;
set
;
}
/// <summary>
/// 确认邀约咨询30分钟以上 1是
/// </summary>
public
int
IsSureConsultTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Customer/RB_Student_Assist_Extend.cs
View file @
9e2a9560
...
...
@@ -19,5 +19,10 @@ namespace Edu.Model.ViewModel.Customer
/// 协助人员名称
/// </summary>
public
string
AssistName
{
get
;
set
;
}
/// <summary>
/// 订单Id
/// </summary>
public
int
OrderId
{
get
;
set
;
}
}
}
Edu.Module.Course/SellAchievementsModule.cs
View file @
9e2a9560
This diff is collapsed.
Click to expand it.
Edu.Module.Customer/CustomerStudentModule.cs
View file @
9e2a9560
...
...
@@ -17,6 +17,7 @@ using Edu.Repository.StudyAbroad;
using
Edu.Model.ViewModel.StudyAbroad
;
using
Edu.Common.Enum.System
;
using
Newtonsoft.Json.Linq
;
using
Edu.Model.CacheModel
;
namespace
Edu.Module.Customer
{
...
...
@@ -825,7 +826,7 @@ namespace Edu.Module.Customer
});
}
return
student_AssistRepository
.
Exists
(
list
);
}
}
/// <summary>
/// 推送课程顾问
...
...
@@ -1351,5 +1352,84 @@ namespace Edu.Module.Customer
return
flag
;
}
#
endregion
#
region
学员填报上传
+
顾问给市场提成确认
/// <summary>
/// 学员填表上传
/// </summary>
/// <param name="stuId"></param>
/// <param name="voucher"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
bool
SetStudentVoucher
(
int
stuId
,
string
voucher
,
UserInfo
userInfo
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
FileVoucher
),
voucher
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Student_ViewModel
.
StuId
),
FiledValue
=
stuId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
studentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
student_LogRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Log
()
{
LogId
=
0
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateType
=
1
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
"上传学员填表附件"
,
LogTitle
=
"上传资料"
,
LogType
=
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
StuId
=
stuId
});
}
return
flag
;
}
/// <summary>
/// 确认邀约咨询30分钟以上 1是
/// </summary>
/// <param name="stuId"></param>
/// <param name="isSureConsultTime"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
bool
SetStudentSureConsult
(
int
stuId
,
int
isSureConsultTime
,
UserInfo
userInfo
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
IsSureConsultTime
),
isSureConsultTime
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Student_ViewModel
.
StuId
),
FiledValue
=
stuId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
studentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
student_LogRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Log
()
{
LogId
=
0
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateType
=
1
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
$"修改学生是否邀约咨询30分钟以上【
{(
isSureConsultTime
==
1
?
"是"
:
"否"
)}
】"
,
LogTitle
=
"修改咨询状态"
,
LogType
=
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
StuId
=
stuId
});
}
return
flag
;
}
#
endregion
}
}
Edu.Repository/Customer/RB_Student_AssistRepository.cs
View file @
9e2a9560
...
...
@@ -66,5 +66,19 @@ inner join rb_student s on s.StuId = a.StuId
WHERE a.`Status`=0 and s.Group_Id =
{
group_Id
}
and s.`Status`=0 and a.AssistId =
{
userId
}
"
;
return
Get
<
RB_Student_Assist_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 根据订单获取 转介绍学生的老师
/// </summary>
/// <param name="orderIds"></param>
/// <returns></returns>
public
List
<
RB_Student_Assist_Extend
>
GetAssistTeacherForOrder
(
string
orderIds
)
{
string
sql
=
$@"SELECT og.OrderId,a.AssistId FROM rb_student_orderguest og
INNER JOIN rb_student_assist a on og.Student_Id =a.StuId
INNER JOIN rb_student s on og.Student_Id =s.StuId
INNER JOIN rb_account ac on a.AssistId = ac.Id
WHERE og.`Status` =0 and a.`Status` =0 and og.OrderId in(
{
orderIds
}
) and a.AssistType =4 and s.CreateType =4 and ac.AccountType =2"
;
return
Get
<
RB_Student_Assist_Extend
>(
sql
).
ToList
();
}
}
}
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
9e2a9560
...
...
@@ -1289,7 +1289,7 @@ WHERE 1=1
//市场人员
if
(
PlanType
==
1
)
{
builder
.
AppendFormat
(
" AND (EnterID={0})
"
,
SaleId
);
builder
.
AppendFormat
(
" AND (EnterID={0})
and o.JoinType <>3 "
,
SaleId
);
//ld 2023-03-22 徐总要求 续费订单 市场不参加,续费跟课程顾问 + 老师相关
}
//课程顾问
else
...
...
@@ -1437,5 +1437,18 @@ FROM rb_order o WHERE o.Group_Id ={group_Id} and o.OrderState <>3 and o.CreateTi
GROUP BY o.CourseConsultantId"
;
return
Get
<
RB_Order_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取学生确认咨询时间
/// </summary>
/// <param name="orderIds"></param>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetStuSureConsultTimeForOrder
(
string
orderIds
)
{
string
sql
=
$@"SELECT og.OrderId,s.IsSureConsultTime as OrderCount FROM rb_student_orderguest og
INNER JOIN rb_student s on og.Student_Id =s.StuId
WHERE og.`Status` =0 and og.OrderId in(
{
orderIds
}
)"
;
return
Get
<
RB_Order_ViewModel
>(
sql
).
ToList
();
}
}
}
Edu.Repository/User/RB_StudentRepository.cs
View file @
9e2a9560
...
...
@@ -724,6 +724,10 @@ GROUP BY GuestId";
{
nameof
(
RB_Student_ViewModel
.
StuType
),
model
.
StuType
},
{
nameof
(
RB_Student_ViewModel
.
StuRealMobile
),
model
.
StuRealMobile
},
};
if
(!
string
.
IsNullOrEmpty
(
model
.
FileVoucher
))
{
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
FileVoucher
),
model
.
FileVoucher
);
}
//教育后台操作
if
(
model
.
OperateType
==
1
)
{
...
...
Edu.WebApi/Controllers/Course/SellAchievementsController.cs
View file @
9e2a9560
...
...
@@ -67,6 +67,9 @@ namespace Edu.WebApi.Controllers.Course
x
.
RateList
,
x
.
SchoolIds
,
x
.
SchoolName
,
x
.
SendType
,
x
.
PeopleMoney
,
x
.
ExtraMoney
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}));
}
...
...
@@ -107,22 +110,32 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
ParamIsNull
(
"请传递首次发放比例"
);
}
if
(
demodel
.
RateList
==
null
||
!
demodel
.
RateList
.
Any
()
)
if
(
demodel
.
SendType
==
1
)
{
return
ApiResult
.
ParamIsNull
(
"请传递业绩提成比例"
);
}
int
length
=
demodel
.
RateList
.
Count
();
for
(
var
i
=
0
;
i
<
length
;
i
++)
{
if
(
i
<
length
-
1
)
{
if
(
demodel
.
RateList
[
i
].
EndValue
>
demodel
.
RateList
[
i
+
1
].
StartValue
)
{
return
ApiResult
.
ParamIsNull
(
"业绩金额有误,请核实后再试"
);
}
if
(
demodel
.
RateList
==
null
||
!
demodel
.
RateList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递业绩提成比例"
);
}
if
(
demodel
.
RateList
[
i
].
Rate
<
0
)
{
return
ApiResult
.
ParamIsNull
(
"业绩提成比例有误"
);
int
length
=
demodel
.
RateList
.
Count
();
for
(
var
i
=
0
;
i
<
length
;
i
++)
{
if
(
i
<
length
-
1
)
{
if
(
demodel
.
RateList
[
i
].
EndValue
>
demodel
.
RateList
[
i
+
1
].
StartValue
)
{
return
ApiResult
.
ParamIsNull
(
"业绩金额有误,请核实后再试"
);
}
}
if
(
demodel
.
RateList
[
i
].
Rate
<
0
)
{
return
ApiResult
.
ParamIsNull
(
"业绩提成比例有误"
);
}
}
demodel
.
Content
=
JsonHelper
.
Serialize
(
demodel
.
RateList
);
}
else
{
demodel
.
Content
=
""
;
}
demodel
.
Content
=
JsonHelper
.
Serialize
(
demodel
.
RateList
);
demodel
.
Status
=
0
;
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
...
...
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
View file @
9e2a9560
...
...
@@ -989,5 +989,37 @@ namespace Edu.WebApi.Controllers.Customer
bool
flag
=
customerStudentModule
.
RemoveNeedsModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
region
学员填报上传
+
顾问给市场提成确认
/// <summary>
/// 保存学员填表文件
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentVoucher
()
{
int
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
);
string
Voucher
=
base
.
ParmJObj
.
GetStringValue
(
"Voucher"
);
bool
flag
=
customerStudentModule
.
SetStudentVoucher
(
StuId
,
Voucher
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 确认邀约咨询30分钟以上
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentSureConsult
()
{
int
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
);
int
IsSureConsultTime
=
base
.
ParmJObj
.
GetInt
(
"IsSureConsultTime"
);
bool
flag
=
customerStudentModule
.
SetStudentSureConsult
(
StuId
,
IsSureConsultTime
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
Edu.WebApi/Controllers/User/UserController.cs
View file @
9e2a9560
...
...
@@ -806,6 +806,8 @@ namespace Edu.WebApi.Controllers.User
item
.
AdvisorStatusName
,
item
.
AdvisorList
,
item
.
AdvisorWinRate
,
item
.
FileVoucher
,
item
.
IsSureConsultTime
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -1059,6 +1061,7 @@ namespace Edu.WebApi.Controllers.User
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
StuNeeds
=
base
.
ParmJObj
.
GetInt
(
"StuNeeds"
),
StuRealMobile
=
base
.
ParmJObj
.
GetStringValue
(
"StuRealMobile"
),
FileVoucher
=
base
.
ParmJObj
.
GetStringValue
(
"FileVoucher"
),
};
if
(
string
.
IsNullOrEmpty
(
extModel
.
StuRealMobile
)
&&
string
.
IsNullOrEmpty
(
extModel
.
QQ
)
&&
string
.
IsNullOrEmpty
(
extModel
.
WeChatNo
))
{
...
...
@@ -1493,6 +1496,8 @@ namespace Edu.WebApi.Controllers.User
extModel
.
ConsultingResults
,
ConsultDate
=
extModel
.
ConsultDate
.
HasValue
?
extModel
.
ConsultDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
extModel
.
OrderCount
,
extModel
.
IsSureConsultTime
,
extModel
.
FileVoucher
};
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
Edu.WebApi/Startup.cs
View file @
9e2a9560
...
...
@@ -76,6 +76,7 @@ namespace Edu.WebApi
"http://mobile.kookaku.com"
,
"http://m.kookaku.com"
,
"http://lm.oytour.com"
,
"http://192.168.10.9:8068"
,
};
services
.
AddCors
(
options
=>
options
.
AddPolicy
(
"AllowCors"
,
policy
=>
policy
.
AllowAnyHeader
().
AllowAnyMethod
().
AllowCredentials
().
WithOrigins
(
corsArray
.
ToArray
())));
services
.
Configure
<
IISServerOptions
>(
options
=>
options
.
AllowSynchronousIO
=
true
);
...
...
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