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
8c199dce
Commit
8c199dce
authored
Dec 23, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
f9adb90e
35e18500
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
60 deletions
+139
-60
RB_Personnel_Deduction.cs
Edu.Model/Entity/Bonus/RB_Personnel_Deduction.cs
+14
-4
EmployeeBonusModule.cs
Edu.Module.Course/EmployeeBonusModule.cs
+49
-6
StudentModule.cs
Edu.Module.User/StudentModule.cs
+43
-30
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+25
-12
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+1
-1
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+7
-7
No files found.
Edu.Model/Entity/Bonus/RB_Personnel_Deduction.cs
View file @
8c199dce
...
@@ -23,13 +23,23 @@ namespace Edu.Model.Entity.Bonus
...
@@ -23,13 +23,23 @@ namespace Edu.Model.Entity.Bonus
public
int
BonusId
{
get
;
set
;
}
public
int
BonusId
{
get
;
set
;
}
/// <summary>
/// <summary>
///
订单人数
///
抵扣金额
/// </summary>
/// </summary>
public
int
OrderGuestNum
{
get
;
set
;
}
public
decimal
DeductionMoney
{
get
;
set
;
}
/// <summary>
/// <summary>
///
订单金额
///
创建人
/// </summary>
/// </summary>
public
decimal
OrderMoney
{
get
;
set
;
}
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 抵扣内容
/// </summary>
public
string
DeductionContent
{
get
;
set
;
}
}
}
}
}
Edu.Module.Course/EmployeeBonusModule.cs
View file @
8c199dce
...
@@ -121,17 +121,17 @@ namespace Edu.Module.Course
...
@@ -121,17 +121,17 @@ namespace Edu.Module.Course
Dictionary
<
string
,
object
>
detailFileds
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
detailFileds
=
new
Dictionary
<
string
,
object
>();
detailFileds
.
Clear
();
detailFileds
.
Clear
();
var
tempCurMonthOrder
=
orderModel
;
var
tempCurMonthOrder
=
orderModel
;
if
(
dItem
.
Order
State
!=
(
tempCurMonthOrder
?.
OrderState
)
)
if
(
dItem
.
Order
Id
==
orderModel
.
OrderId
)
{
{
var
newMoney
=
tempCurMonthOrder
.
Income
-
tempCurMonthOrder
.
Refund
-
tempCurMonthOrder
.
PlatformTax
;
var
newMoney
=
tempCurMonthOrder
.
Income
-
tempCurMonthOrder
.
Refund
-
tempCurMonthOrder
.
PlatformTax
;
dItem
.
OrderGuestNum
=
0
;
dItem
.
OrderMoney
=
newMoney
;
detailFileds
.
Add
(
nameof
(
RB_Personnel_BonusDetail_Extend
.
OrderGuestNum
),
0
);
detailFileds
.
Add
(
nameof
(
RB_Personnel_BonusDetail_Extend
.
OrderGuestNum
),
0
);
detailFileds
.
Add
(
nameof
(
RB_Personnel_BonusDetail_Extend
.
OrderMoney
),
newMoney
);
detailFileds
.
Add
(
nameof
(
RB_Personnel_BonusDetail_Extend
.
OrderMoney
),
newMoney
);
string
_log1
=
$"订单号【
{
dItem
.
OrderId
}
】的订单状态由:
{
dItem
.
OrderState
.
ToName
()}
=>
{
tempCurMonthOrder
?.
OrderState
.
ToName
()}
"
+
string
_log1
=
$"订单号【
{
dItem
.
OrderId
}
】的订单状态由:
{
dItem
.
OrderState
.
ToName
()}
=>
{
tempCurMonthOrder
?.
OrderState
.
ToName
()}
"
+
$"订单人数由:
{
dItem
.
OrderGuestNum
}
=>0,订单金额由:
{
dItem
.
OrderMoney
}
=>
{
newMoney
}
"
$"订单人数由:
{
dItem
.
OrderGuestNum
}
=>0,订单金额由:
{
dItem
.
OrderMoney
}
=>
{
newMoney
}
"
;
;
personnel_BonusLogRepository
.
AddPersonnelBonusLogRepository
(
sItem
.
Id
,
1
,
dItem
.
OrderId
,
_log1
);
personnel_BonusLogRepository
.
AddPersonnelBonusLogRepository
(
sItem
.
Id
,
1
,
dItem
.
OrderId
,
_log1
);
dItem
.
OrderGuestNum
=
0
;
dItem
.
OrderMoney
=
newMoney
;
}
}
if
(
detailFileds
!=
null
&&
detailFileds
.
Count
>
0
)
if
(
detailFileds
!=
null
&&
detailFileds
.
Count
>
0
)
{
{
...
@@ -143,7 +143,7 @@ namespace Edu.Module.Course
...
@@ -143,7 +143,7 @@ namespace Edu.Module.Course
var
curRewardMoney
=
GetStepAwardAmount
(
planModel
,
sumNum
);
var
curRewardMoney
=
GetStepAwardAmount
(
planModel
,
sumNum
);
deductionMoney
=
sItem
.
CurRewardMoney
-
curRewardMoney
;
deductionMoney
=
sItem
.
CurRewardMoney
-
curRewardMoney
;
//修改已发放
//修改已发放
string
_bonusLog
=
$"订单号变更:
由
:
{
sItem
.
CurGuestNum
}
=>
{
sumNum
}
,订单完成金额由:
{
sItem
.
CurOrderMoney
}
=>
{
sumOrderMoney
}
"
string
_bonusLog
=
$"订单号变更:
完成人数
:
{
sItem
.
CurGuestNum
}
=>
{
sumNum
}
,订单完成金额由:
{
sItem
.
CurOrderMoney
}
=>
{
sumOrderMoney
}
"
+
$"奖励金额由:
{
sItem
.
CurRewardMoney
}
=>
{
curRewardMoney
}
"
+
$"奖励金额由:
{
sItem
.
CurRewardMoney
}
=>
{
curRewardMoney
}
"
;
;
Dictionary
<
string
,
object
>
bonusFileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
bonusFileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -180,6 +180,7 @@ namespace Edu.Module.Course
...
@@ -180,6 +180,7 @@ namespace Edu.Module.Course
PlanType
=
item
.
PlanType
,
PlanType
=
item
.
PlanType
,
IsNoBalance
=
1
,
IsNoBalance
=
1
,
});
});
//计算差额
var
chaE
=
saleBonusList
?.
Sum
(
qitem
=>
qitem
.
DeductionMoney
-
qitem
.
FinishDeductionMoney
)
??
0
;
var
chaE
=
saleBonusList
?.
Sum
(
qitem
=>
qitem
.
DeductionMoney
-
qitem
.
FinishDeductionMoney
)
??
0
;
decimal
DeductionMoney
=
0
;
decimal
DeductionMoney
=
0
;
...
@@ -220,7 +221,49 @@ namespace Edu.Module.Course
...
@@ -220,7 +221,49 @@ namespace Edu.Module.Course
//写抵扣记录表信息
//写抵扣记录表信息
if
(
pModel
.
BeforeMoney
>
0
)
if
(
pModel
.
BeforeMoney
>
0
)
{
{
decimal
tempChaE
=
chaE
;
foreach
(
var
sItem
in
saleBonusList
)
{
if
(
tempChaE
>
0
)
{
if
(
sItem
.
DeductionMoney
<=
tempChaE
)
{
var
deductionModel
=
new
RB_Personnel_Deduction
()
{
BonusId
=
sItem
.
Id
,
CreateBy
=
1
,
CreateTime
=
DateTime
.
Now
,
DeductionMoney
=
sItem
.
DeductionMoney
,
DeductionContent
=
"抵扣"
+
sItem
.
YearNum
+
"年"
+
sItem
.
MonthNum
+
"月的待抵扣金额"
+
sItem
.
DeductionMoney
,
};
personnel_DeductionRepository
.
Insert
(
deductionModel
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Personnel_Bonus_Extend
.
FinishDeductionMoney
),(
sItem
?.
FinishDeductionMoney
??
0
)+
sItem
.
DeductionMoney
}
};
personnel_BonusRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Personnel_Bonus_Extend
.
Id
),
sItem
.
Id
));
tempChaE
-=
sItem
.
DeductionMoney
;
}
else
{
var
deductionModel
=
new
RB_Personnel_Deduction
()
{
BonusId
=
sItem
.
Id
,
CreateBy
=
1
,
CreateTime
=
DateTime
.
Now
,
DeductionMoney
=
tempChaE
,
DeductionContent
=
"抵扣"
+
sItem
.
YearNum
+
"年"
+
sItem
.
MonthNum
+
"月的待抵扣金额"
+
tempChaE
,
};
personnel_DeductionRepository
.
Insert
(
deductionModel
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Personnel_Bonus_Extend
.
FinishDeductionMoney
),(
sItem
?.
FinishDeductionMoney
??
0
)+
tempChaE
}
};
personnel_BonusRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Personnel_Bonus_Extend
.
Id
),
sItem
.
Id
));
tempChaE
=
0
;
}
}
}
}
}
var
newId
=
personnel_BonusRepository
.
Insert
(
pModel
);
var
newId
=
personnel_BonusRepository
.
Insert
(
pModel
);
pModel
.
Id
=
newId
;
pModel
.
Id
=
newId
;
...
...
Edu.Module.User/StudentModule.cs
View file @
8c199dce
...
@@ -133,7 +133,7 @@ namespace Edu.Module.User
...
@@ -133,7 +133,7 @@ namespace Edu.Module.User
var
stuTypeList
=
student_TypeRepository
.
GetStudentTypeListRepository
(
new
RB_Student_Type_Extend
());
var
stuTypeList
=
student_TypeRepository
.
GetStudentTypeListRepository
(
new
RB_Student_Type_Extend
());
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
//学员跟进
//学员跟进
var
followList
=
followRepository
.
GetStudentFollowListRepository
(
new
RB_Student_Follow_Extend
()
var
followList
=
followRepository
.
GetStudentFollowListRepository
(
new
RB_Student_Follow_Extend
()
{
{
QStuIds
=
stuIds
QStuIds
=
stuIds
});
});
...
@@ -143,7 +143,7 @@ namespace Edu.Module.User
...
@@ -143,7 +143,7 @@ namespace Edu.Module.User
QStudentIds
=
stuIds
QStudentIds
=
stuIds
});
});
//本周新增
//本周新增
var
stuList
=
studentRepository
.
GetCustomerStuWeekListRepository
(
new
RB_Student_ViewModel
()
var
stuList
=
studentRepository
.
GetCustomerStuWeekListRepository
(
new
RB_Student_ViewModel
()
{
{
CustomerId
=
query
.
CustomerId
CustomerId
=
query
.
CustomerId
});
});
...
@@ -153,10 +153,10 @@ namespace Edu.Module.User
...
@@ -153,10 +153,10 @@ namespace Edu.Module.User
QStuIds
=
stuIds
QStuIds
=
stuIds
});
});
//内部介绍人
//内部介绍人
List
<
int
>
empIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
List
<
int
>
empIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
List
<
int
>
aIds
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
assistList
.
Select
(
qitem
=>
qitem
.
AssistId
)));
List
<
int
>
aIds
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
assistList
.
Select
(
qitem
=>
qitem
.
AssistId
)));
List
<
RB_Account_ViewModel
>
accountList
=
new
List
<
RB_Account_ViewModel
>();
List
<
RB_Account_ViewModel
>
accountList
=
new
List
<
RB_Account_ViewModel
>();
if
(
aIds
!=
null
&&
aIds
.
Count
>
0
)
if
(
aIds
!=
null
&&
aIds
.
Count
>
0
)
{
{
empIdList
.
AddRange
(
aIds
);
empIdList
.
AddRange
(
aIds
);
}
}
...
@@ -206,7 +206,7 @@ namespace Edu.Module.User
...
@@ -206,7 +206,7 @@ namespace Edu.Module.User
List
<
int
>
customerIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
List
<
int
>
customerIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
customerIdList
!=
null
&&
customerIdList
.
Count
>
0
)
if
(
customerIdList
!=
null
&&
customerIdList
.
Count
>
0
)
{
{
customerList
=
customerRepository
.
GetCustomerListRepository
(
new
RB_Customer_Extend
()
customerList
=
customerRepository
.
GetCustomerListRepository
(
new
RB_Customer_Extend
()
{
{
CustomerIds
=
string
.
Join
(
","
,
customerIdList
)
CustomerIds
=
string
.
Join
(
","
,
customerIdList
)
});
});
...
@@ -226,13 +226,13 @@ namespace Edu.Module.User
...
@@ -226,13 +226,13 @@ namespace Edu.Module.User
string
goalIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuPurpose
));
string
goalIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuPurpose
));
var
goalList
=
learningGoalsRepository
.
GetLearningGoalsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_LearningGoals_Extend
()
var
goalList
=
learningGoalsRepository
.
GetLearningGoalsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_LearningGoals_Extend
()
{
{
QGoalIds
=
goalIds
QGoalIds
=
goalIds
});
});
string
channelIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuChannel
));
string
channelIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuChannel
));
var
channelList
=
channelRepository
.
GetChannelListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Channel_Extend
()
var
channelList
=
channelRepository
.
GetChannelListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Channel_Extend
()
{
{
QChannelIds
=
channelIds
QChannelIds
=
channelIds
});
});
var
needIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuNeeds
));
var
needIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuNeeds
));
...
@@ -245,10 +245,10 @@ namespace Edu.Module.User
...
@@ -245,10 +245,10 @@ namespace Edu.Module.User
var
tempOrderList
=
stuOrderList
?.
Where
(
qitem
=>
qitem
.
Student_Id
==
item
.
StuId
)?.
ToList
();
var
tempOrderList
=
stuOrderList
?.
Where
(
qitem
=>
qitem
.
Student_Id
==
item
.
StuId
)?.
ToList
();
var
tempFollow
=
followList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
OrderByDescending
(
qitem
=>
qitem
.
Id
)?.
FirstOrDefault
();
var
tempFollow
=
followList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
OrderByDescending
(
qitem
=>
qitem
.
Id
)?.
FirstOrDefault
();
item
.
followUpTime
=
Common
.
ConvertHelper
.
FormatTime
(
tempFollow
?.
CreateTime
);
item
.
followUpTime
=
Common
.
ConvertHelper
.
FormatTime
(
tempFollow
?.
CreateTime
);
item
.
WeekCount
=
stuList
?.
Count
()
??
0
;
item
.
WeekCount
=
stuList
?.
Count
()
??
0
;
item
.
TodayCount
=
stuList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
))?.
Count
()
??
0
;
item
.
TodayCount
=
stuList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
))?.
Count
()
??
0
;
item
.
OrderCount
=
tempOrderList
?.
Count
()
??
0
;
item
.
OrderCount
=
tempOrderList
?.
Count
()
??
0
;
item
.
RenewOrderCount
=
tempOrderList
?.
Where
(
qitem
=>
qitem
.
RenewState
==
2
)?.
Count
()
??
0
;
item
.
RenewOrderCount
=
tempOrderList
?.
Where
(
qitem
=>
qitem
.
RenewState
==
2
)?.
Count
()
??
0
;
item
.
StuGuestState
=
tempOrderList
?.
OrderByDescending
(
qitem
=>
qitem
.
OrderId
)?.
LastOrDefault
()?.
StuGuestState
??
0
;
item
.
StuGuestState
=
tempOrderList
?.
OrderByDescending
(
qitem
=>
qitem
.
OrderId
)?.
LastOrDefault
()?.
StuGuestState
??
0
;
item
.
AreaName
=
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
ProviceId
)?.
Name
??
""
)
item
.
AreaName
=
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
ProviceId
)?.
Name
??
""
)
+
"/"
+
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
CityId
)?.
Name
??
""
)
+
"/"
+
(
destinationList
?.
FirstOrDefault
(
qitem
=>
qitem
.
ID
==
item
.
CityId
)?.
Name
??
""
)
...
@@ -290,7 +290,7 @@ namespace Edu.Module.User
...
@@ -290,7 +290,7 @@ namespace Edu.Module.User
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="Type">1-电话,2-QQ,3-微信号</param>
/// <param name="Type">1-电话,2-QQ,3-微信号</param>
/// <returns></returns>
/// <returns></returns>
public
bool
CheckStudentModule
(
RB_Student_ViewModel
model
,
int
Type
)
public
bool
CheckStudentModule
(
RB_Student_ViewModel
model
,
int
Type
)
{
{
List
<
WhereHelper
>
where
=
new
List
<
WhereHelper
>()
List
<
WhereHelper
>
where
=
new
List
<
WhereHelper
>()
{
{
...
@@ -337,7 +337,7 @@ namespace Edu.Module.User
...
@@ -337,7 +337,7 @@ namespace Edu.Module.User
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="fromApp">来至于同业 1是</param>
/// <param name="fromApp">来至于同业 1是</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetStudentModule
(
RB_Student_ViewModel
model
,
int
fromApp
=
0
)
public
bool
SetStudentModule
(
RB_Student_ViewModel
model
,
int
fromApp
=
0
)
{
{
bool
IsInsert
=
false
;
bool
IsInsert
=
false
;
if
(
model
.
StuId
==
0
)
{
IsInsert
=
true
;
}
if
(
model
.
StuId
==
0
)
{
IsInsert
=
true
;
}
...
@@ -381,7 +381,7 @@ namespace Edu.Module.User
...
@@ -381,7 +381,7 @@ namespace Edu.Module.User
/// <param name="StuStage"></param>
/// <param name="StuStage"></param>
/// <param name="Uid"></param>
/// <param name="Uid"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetStudentStageModule
(
int
StuId
,
int
StuStage
,
int
Uid
)
public
bool
SetStudentStageModule
(
int
StuId
,
int
StuStage
,
int
Uid
)
{
{
return
studentRepository
.
SetStudentStageRepository
(
StuId
,
StuStage
,
Uid
);
return
studentRepository
.
SetStudentStageRepository
(
StuId
,
StuStage
,
Uid
);
}
}
...
@@ -408,7 +408,7 @@ namespace Edu.Module.User
...
@@ -408,7 +408,7 @@ namespace Edu.Module.User
/// <param name="CreateBy">负责人</param>
/// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param>
/// <param name="OperateId">操作人</param>
/// <returns></returns>
/// <returns></returns>
public
bool
ForwardStudentModule
(
int
StuId
,
int
CreateBy
,
int
OperateId
)
public
bool
ForwardStudentModule
(
int
StuId
,
int
CreateBy
,
int
OperateId
)
{
{
return
studentRepository
.
ForwardStudentRepository
(
StuId
,
CreateBy
,
OperateId
);
return
studentRepository
.
ForwardStudentRepository
(
StuId
,
CreateBy
,
OperateId
);
}
}
...
@@ -586,13 +586,27 @@ namespace Edu.Module.User
...
@@ -586,13 +586,27 @@ namespace Edu.Module.User
/// 推送消息
/// 推送消息
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
public
void
PushMessageModule
(
RB_Student_ViewModel
model
)
/// <param name="type">1-手机,2-QQ,3-微信</param>
public
void
PushMessageModule
(
RB_Student_ViewModel
model
,
int
type
)
{
{
var
assistList
=
GetStuAssistListModule
(
model
.
StuId
);
var
assistList
=
GetStuAssistListModule
(
model
.
StuId
);
var
customerModel
=
customerRepository
.
GetEntity
(
model
.
CustomerId
);
var
customerModel
=
customerRepository
.
GetEntity
(
model
.
CustomerId
);
string
searchContent
=
model
.
StuTel
;
string
markdownContent
=
$"`同业查重通知` \n>**概要信息** \n>同业名称:
{
customerModel
?.
CustomerName
??
""
}
(
{
customerModel
?.
ContactNumber
??
""
}
)\n>学生名称:
{
model
.
StuName
}
\n>学生电话:
{
model
.
StuTel
}
\n>"
;
if
(
type
==
2
)
{
searchContent
=
model
.
QQ
;
}
if
(
type
==
3
)
{
searchContent
=
model
.
WeChatNo
;
}
string
createByName
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
Id
=
model
.
CreateBy
})?.
FirstOrDefault
()?.
AccountName
??
""
;
string
markdownContent
=
$"`同业查重通知` \n>**概要信息** \n>同业名称:
{
customerModel
?.
CustomerName
??
""
}
(
{
customerModel
?.
ContactNumber
??
""
}
)\n>查询内容:
{
searchContent
}
\n>关联学员:
{
model
.
StuName
}
\n>关联学员电话:
{
model
.
StuTel
}
\n>"
;
markdownContent
+=
$"关联同事:
{
createByName
}
\n> "
;
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
{
CategoryId
=
PushMessageCategoryEnum
.
B2BCustomerStu
,
CategoryId
=
PushMessageCategoryEnum
.
B2BCustomerStu
,
...
@@ -606,22 +620,21 @@ namespace Edu.Module.User
...
@@ -606,22 +620,21 @@ namespace Edu.Module.User
Title
=
"同业查重通知"
,
Title
=
"同业查重通知"
,
Platform
=
5
,
Platform
=
5
,
};
};
if
(
customerModel
.
CreateBy
>
0
)
if
(
model
.
CreateBy
>
0
)
{
{
var
queryTargetWorkId
=
accountModule
.
GetWorkUserIdModule
(
m
odel
.
CreateBy
);
var
queryTargetWorkId
=
accountModule
.
GetWorkUserIdModule
(
customerM
odel
.
CreateBy
);
modelWork
.
ReceiveId
=
queryTargetWorkId
;
modelWork
.
ReceiveId
=
queryTargetWorkId
;
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
}
if
(
assistList
!=
null
&&
assistList
.
Count
>
0
)
//
if (assistList != null && assistList.Count > 0)
{
//
{
foreach
(
var
item
in
assistList
)
//
foreach (var item in assistList)
{
//
{
var
queryTargetWorkId
=
accountModule
.
GetWorkUserIdModule
(
item
.
AssistId
);
//
var queryTargetWorkId = accountModule.GetWorkUserIdModule(item.AssistId);
modelWork
.
ReceiveId
=
queryTargetWorkId
;
//
modelWork.ReceiveId = queryTargetWorkId;
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
//
Common.Message.MessageHelper.SendMessage(modelWork);
}
//
}
}
//
}
}
}
#
region
小程序用户
#
region
小程序用户
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
8c199dce
...
@@ -99,7 +99,7 @@ namespace Edu.Repository.Sell
...
@@ -99,7 +99,7 @@ namespace Edu.Repository.Sell
{
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
LXConfirmDate
)}
<='
{
demodel
.
ConfirmETime
}
23:59:59'"
;
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
LXConfirmDate
)}
<='
{
demodel
.
ConfirmETime
}
23:59:59'"
;
}
}
if
(
demodel
.
JoinType
==
OrderJoinTypeEnum
.
InsertClass
)
if
(
demodel
.
JoinType
==
OrderJoinTypeEnum
.
InsertClass
)
{
{
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
JoinType
)}
=
{(
int
)
OrderJoinTypeEnum
.
InsertClass
}
"
;
where
+=
$@" and o.
{
nameof
(
RB_Order_ViewModel
.
JoinType
)}
=
{(
int
)
OrderJoinTypeEnum
.
InsertClass
}
"
;
}
}
...
@@ -627,7 +627,7 @@ GROUP BY ClassId;";
...
@@ -627,7 +627,7 @@ GROUP BY ClassId;";
/// <param name="courseModel"></param>
/// <param name="courseModel"></param>
/// <param name="FinishHours"></param>
/// <param name="FinishHours"></param>
/// <returns></returns>
/// <returns></returns>
public
decimal
CalcBackMoneyRepository
(
RB_Order
orderModel
,
RB_Course
courseModel
,
decimal
FinishHours
,
out
decimal
newClassHourPrice
)
public
decimal
CalcBackMoneyRepository
(
RB_Order
orderModel
,
RB_Course
courseModel
,
decimal
FinishHours
,
out
decimal
newClassHourPrice
)
{
{
newClassHourPrice
=
0
;
newClassHourPrice
=
0
;
//课时单价
//课时单价
...
@@ -641,7 +641,7 @@ GROUP BY ClassId;";
...
@@ -641,7 +641,7 @@ GROUP BY ClassId;";
decimal
backMoney
=
0
;
decimal
backMoney
=
0
;
//违约金
//违约金
decimal
breakContractPrice
=
(
courseModel
.
ClassHours
-
FinishHours
)
*
classHourPrice
*
Convert
.
ToDecimal
(
0.1
);
decimal
breakContractPrice
=
(
courseModel
.
ClassHours
-
FinishHours
)
*
classHourPrice
*
Convert
.
ToDecimal
(
0.1
);
backMoney
=
(
orderModel
.
Income
+
orderModel
.
PlatformTax
-
orderModel
.
Refund
)
/
orderModel
.
GuestNum
-
FinishHours
*
classHourPrice
-
breakContractPrice
;
backMoney
=
(
orderModel
.
Income
+
orderModel
.
PlatformTax
-
orderModel
.
Refund
)
/
orderModel
.
GuestNum
-
FinishHours
*
classHourPrice
-
breakContractPrice
;
return
backMoney
;
return
backMoney
;
}
}
...
@@ -653,7 +653,7 @@ GROUP BY ClassId;";
...
@@ -653,7 +653,7 @@ GROUP BY ClassId;";
/// <param name="eDate">开班时间</param>
/// <param name="eDate">开班时间</param>
/// <param name="courseIds">内部班课程</param>
/// <param name="courseIds">内部班课程</param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetAllMoneyCollectedOrderList
(
int
group_Id
,
string
eDate
,
string
courseIds
,
string
enableDate
)
public
List
<
RB_Order_ViewModel
>
GetAllMoneyCollectedOrderList
(
int
group_Id
,
string
eDate
,
string
courseIds
,
string
enableDate
)
{
{
string
where
=
""
;
string
where
=
""
;
if
(!
string
.
IsNullOrEmpty
(
courseIds
))
if
(!
string
.
IsNullOrEmpty
(
courseIds
))
...
@@ -711,10 +711,12 @@ and LXConfirmState =1 and IFNULL(CommissionMoney,0) = -1 and LXConfirmDate <='{e
...
@@ -711,10 +711,12 @@ and LXConfirmState =1 and IFNULL(CommissionMoney,0) = -1 and LXConfirmDate <='{e
public
List
<
RB_Order_ViewModel
>
GetSaleAchievementsRankStatistics
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
saleId
,
int
schoolId
,
string
startMonth
,
string
endMonth
,
int
group_Id
)
public
List
<
RB_Order_ViewModel
>
GetSaleAchievementsRankStatistics
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
saleId
,
int
schoolId
,
string
startMonth
,
string
endMonth
,
int
group_Id
)
{
{
string
where
=
""
;
string
where
=
""
;
if
(
saleId
>
0
)
{
if
(
saleId
>
0
)
{
where
+=
$@" and o.EnterID =
{
saleId
}
"
;
where
+=
$@" and o.EnterID =
{
saleId
}
"
;
}
}
if
(
schoolId
>=
0
)
{
if
(
schoolId
>=
0
)
{
where
+=
$@" and o.School_Id =
{
schoolId
}
"
;
where
+=
$@" and o.School_Id =
{
schoolId
}
"
;
}
}
...
@@ -984,7 +986,7 @@ left join rb_teacher t on c.Teacher_Id = t.TId
...
@@ -984,7 +986,7 @@ left join rb_teacher t on c.Teacher_Id = t.TId
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
where
{
where
}
order by
{
orderBy
}
where
{
where
}
order by
{
orderBy
}
"
;
"
;
return
Get
<
RB_Order_ViewModel
>(
sql
).
ToList
();
return
Get
<
RB_Order_ViewModel
>(
sql
).
ToList
();
}
}
#
endregion
#
endregion
...
@@ -1181,8 +1183,10 @@ group by o.OrderId
...
@@ -1181,8 +1183,10 @@ group by o.OrderId
/// </summary>
/// </summary>
/// <param name="group_Id">集团编号</param>
/// <param name="group_Id">集团编号</param>
/// <param name="eDate">结束日期</param>
/// <param name="eDate">结束日期</param>
/// <param name="PlanType">1-市场人员,2-课程顾问</param>
/// <param name="SaleId">员工编号</param>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetAllBonusOrderListRepository
(
int
group_Id
,
string
eDate
,
int
PlanType
,
int
SaleId
)
public
List
<
RB_Order_ViewModel
>
GetAllBonusOrderListRepository
(
int
group_Id
,
string
eDate
,
int
PlanType
,
int
SaleId
)
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
builder
.
AppendFormat
(
@"
...
@@ -1206,7 +1210,16 @@ WHERE 1=1
...
@@ -1206,7 +1210,16 @@ WHERE 1=1
}
}
if
(
SaleId
>
0
)
if
(
SaleId
>
0
)
{
{
builder
.
AppendFormat
(
" AND ( EnterID={0} OR CreateBy={0} ) "
,
SaleId
);
//市场人员
if
(
PlanType
==
1
)
{
builder
.
AppendFormat
(
" AND (EnterID={0}) "
,
SaleId
);
}
//课程顾问
else
{
builder
.
AppendFormat
(
" AND (CourseConsultantId={0}) "
,
SaleId
);
}
}
}
builder
.
AppendFormat
(
" ORDER BY o.CreateTime ASC "
);
builder
.
AppendFormat
(
" ORDER BY o.CreateTime ASC "
);
return
Get
<
RB_Order_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_Order_ViewModel
>(
builder
.
ToString
()).
ToList
();
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
8c199dce
...
@@ -1288,7 +1288,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1288,7 +1288,7 @@ namespace Edu.WebApi.Controllers.Course
int
priceDiscountType
=
param
.
GetInt
(
"PriceDiscountType"
);
int
priceDiscountType
=
param
.
GetInt
(
"PriceDiscountType"
);
if
(
priceDiscountType
<=
0
)
if
(
priceDiscountType
<=
0
)
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择【优惠类型】"
);
//
return ApiResult.ParamIsNull(message: "请选择【优惠类型】");
}
}
RB_Course_Preferential_Extend
model
=
new
RB_Course_Preferential_Extend
()
RB_Course_Preferential_Extend
model
=
new
RB_Course_Preferential_Extend
()
{
{
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
8c199dce
...
@@ -919,7 +919,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -919,7 +919,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
if
(
isB2B
)
{
{
message
=
"此学员手机号已绑定同行!请重新录入!"
;
message
=
"此学员手机号已绑定同行!请重新录入!"
;
studentModule
.
PushMessageModule
(
model
);
studentModule
.
PushMessageModule
(
model
,
1
);
}
}
else
else
{
{
...
@@ -932,7 +932,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -932,7 +932,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
if
(
isB2B
)
{
{
message
=
"此学员手机号已绑定同行!请重新录入!"
;
message
=
"此学员手机号已绑定同行!请重新录入!"
;
studentModule
.
PushMessageModule
(
model
);
studentModule
.
PushMessageModule
(
model
,
1
);
}
}
else
else
{
{
...
@@ -954,7 +954,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -954,7 +954,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
if
(
isB2B
)
{
{
message
=
"此学员QQ已绑定同行!请重新录入!"
;
message
=
"此学员QQ已绑定同行!请重新录入!"
;
studentModule
.
PushMessageModule
(
model
);
studentModule
.
PushMessageModule
(
model
,
2
);
}
}
else
else
{
{
...
@@ -967,7 +967,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -967,7 +967,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
if
(
isB2B
)
{
{
message
=
"此学员QQ已绑定同行!请重新录入!"
;
message
=
"此学员QQ已绑定同行!请重新录入!"
;
studentModule
.
PushMessageModule
(
model
);
studentModule
.
PushMessageModule
(
model
,
2
);
}
}
else
else
{
{
...
@@ -989,7 +989,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -989,7 +989,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
if
(
isB2B
)
{
{
message
=
"此学员微信号已绑定同行!请重新录入!"
;
message
=
"此学员微信号已绑定同行!请重新录入!"
;
studentModule
.
PushMessageModule
(
model
);
studentModule
.
PushMessageModule
(
model
,
3
);
}
}
else
else
{
{
...
@@ -1002,7 +1002,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1002,7 +1002,7 @@ namespace Edu.WebApi.Controllers.User
if
(
isB2B
)
if
(
isB2B
)
{
{
message
=
"此学员微信号已绑定同行!请重新录入!"
;
message
=
"此学员微信号已绑定同行!请重新录入!"
;
studentModule
.
PushMessageModule
(
model
);
studentModule
.
PushMessageModule
(
model
,
3
);
}
}
else
else
{
{
...
@@ -1252,7 +1252,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1252,7 +1252,7 @@ namespace Edu.WebApi.Controllers.User
if
(
customer
!=
null
)
if
(
customer
!=
null
)
{
{
Common
.
Plugin
.
LogHelper
.
Write
(
"查重推送消息"
);
Common
.
Plugin
.
LogHelper
.
Write
(
"查重推送消息"
);
studentModule
.
PushMessageModule
(
extModel
);
studentModule
.
PushMessageModule
(
extModel
,
1
);
}
}
}
}
return
ApiResult
.
Success
(
data
:
extModel
);
return
ApiResult
.
Success
(
data
:
extModel
);
...
...
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