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
a577a949
Commit
a577a949
authored
Jul 31, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b5be68ce
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
25 deletions
+39
-25
SellAchievementsModule.cs
Edu.Module.Course/SellAchievementsModule.cs
+12
-7
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+5
-2
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+4
-0
SellAchievementsController.cs
Edu.WebApi/Controllers/Course/SellAchievementsController.cs
+4
-3
ExamController.cs
Edu.WebApi/Controllers/Exam/ExamController.cs
+1
-0
TimedTaskServices.cs
Edu.WebApi/Timers/TimedTaskServices.cs
+13
-13
No files found.
Edu.Module.Course/SellAchievementsModule.cs
View file @
a577a949
...
...
@@ -2302,7 +2302,8 @@ namespace Edu.Module.Course
//查询最新的提成规则
rulelist
=
sell_Achievements_RuleRepository
.
GetList
(
new
RB_Sell_Achievements_Rule_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
});
}
else
{
else
{
rulelist
=
JsonHelper
.
DeserializeObject
<
List
<
RB_Sell_Achievements_Rule_ViewModel
>>(
periodsModel
.
AdminRemark
);
}
//非部门规则
...
...
@@ -2391,7 +2392,10 @@ namespace Edu.Module.Course
}
else
{
CMoney
=
Convert
.
ToDecimal
(
Content
.
Split
(
','
)[
1
]);
if
(
Content
.
Split
(
','
).
Length
>
1
)
{
CMoney
=
Convert
.
ToDecimal
(
Content
.
Split
(
','
)[
1
]);
}
}
Remark
=
"教师续费语培订单提成:"
+
CMoney
+
";课程等级:"
+
courseModel
.
CourseRate
.
ToName
();
}
...
...
@@ -2453,7 +2457,7 @@ namespace Edu.Module.Course
}
#
endregion
if
(
RuleModel
!=
null
&&
RuleModel
.
Type
==
3
)
if
(
RuleModel
!=
null
&&
RuleModel
.
Type
==
3
)
{
//当前匹配教师规则 只查询老师的业绩
foreach
(
var
item
in
rulelist
.
Where
(
x
=>
x
.
Id
==
RuleModel
.
Id
))
...
...
@@ -2541,7 +2545,7 @@ namespace Edu.Module.Course
//计算老师业绩
decimal
TotalYj
=
orderChildList
.
Sum
(
x
=>
x
.
PreferPrice
-
x
.
DiscountMoney
);
decimal
YjMoney
=
TotalYj
;
//排除同行返佣
//根据业绩所在区间 查询比例
//根据业绩所在区间 查询比例
var
rateModel
=
item
.
RateList
.
Where
(
x
=>
x
.
StartValue
<
YjMoney
&&
(
x
.
EndValue
>=
YjMoney
||
x
.
EndValue
==
-
1
)).
FirstOrDefault
();
if
(
rateModel
!=
null
)
{
...
...
@@ -2574,7 +2578,7 @@ namespace Edu.Module.Course
}
}
//再查询当前用户的
foreach
(
var
item
in
rulelist
.
Where
(
x
=>
x
.
Id
==
(
RuleModel
?.
Id
??
0
)))
foreach
(
var
item
in
rulelist
.
Where
(
x
=>
x
.
Id
==
(
RuleModel
?.
Id
??
0
)))
{
if
(
string
.
IsNullOrEmpty
(
item
.
ChildEmpIds
))
{
...
...
@@ -2724,7 +2728,7 @@ namespace Edu.Module.Course
if
(
sellOrderList
.
Any
())
{
//计算市场业绩
decimal
TotalYj
=
sellOrderList
.
Sum
(
x
=>
x
.
PreferPrice
-
x
.
DiscountMoney
);
decimal
TotalYj
=
sellOrderList
.
Sum
(
x
=>
x
.
PreferPrice
-
x
.
DiscountMoney
);
//查询老师的提成
decimal
teacherMoney
=
AchEmpList
.
Where
(
x
=>
x
.
Type
==
3
&&
sellOrderList
.
Select
(
y
=>
y
.
OrderId
).
Contains
(
x
.
OrderId
)).
Sum
(
x
=>
x
.
PushMoney
);
decimal
YjMoney
=
TotalYj
-
teacherMoney
;
//排除 老师的提成
...
...
@@ -2839,7 +2843,8 @@ namespace Edu.Module.Course
#
endregion
}
else
{
else
{
var
emoModel
=
sell_Achievements_EmpRepository
.
GetMonthSaleMoney
(
userInfo
.
Id
,
periodsModel
.
Id
,
userInfo
.
Group_Id
);
//查询本月提成
MonthCommission
=
emoModel
.
PushMoney
;
...
...
Edu.Module.Exam/CourseExamModule.cs
View file @
a577a949
...
...
@@ -849,6 +849,7 @@ namespace Edu.Module.Exam
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppQuestionCategoryListModule_listening:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppQuestionCategoryListModule_querty:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
query
));
}
}
if
(
item
.
QuestionTypeKey
!=
"listening"
&&
item
.
QuestionTypeKey
!=
"reading-comprehensio"
&&
item
.
Answer
!=
null
&&
!
string
.
IsNullOrEmpty
(
item
.
Answer
.
ToString
()))
...
...
@@ -1051,7 +1052,8 @@ namespace Edu.Module.Exam
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppQuestionCategoryListModule_listening:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppBankDetailsPageModule_listening:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppBankDetailsPageModule_query:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
query
));
}
}
if
(
item
.
QuestionTypeKey
!=
"listening"
&&
item
.
QuestionTypeKey
!=
"reading-comprehensio"
&&
!
string
.
IsNullOrEmpty
(
item
.
Answer
))
...
...
@@ -1364,7 +1366,8 @@ namespace Edu.Module.Exam
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAppQuestionCategoryListModule_listening:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetPracticeWrongPageModule_listening:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
item
));
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetPracticeWrongPageModule_query:"
+
Common
.
Plugin
.
JsonHelper
.
Serialize
(
query
));
}
}
if
(
tempQuestion
.
QuestionTypeKey
!=
"listening"
&&
tempQuestion
.
QuestionTypeKey
!=
"reading-comprehensio"
&&
!
string
.
IsNullOrEmpty
(
tempQuestion
.
Answer
))
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
a577a949
...
...
@@ -1222,6 +1222,10 @@ namespace Edu.WebApi.Controllers.Course
});
}
}
if
(!
list
.
Any
())
{
return
ApiResult
.
Failed
(
message
:
"没有要签到的学员!"
);
}
int
groupId
=
100000
;
int
Uid
=
1
;
if
(
base
.
UserInfo
!=
null
)
...
...
Edu.WebApi/Controllers/Course/SellAchievementsController.cs
View file @
a577a949
...
...
@@ -646,14 +646,15 @@ namespace Edu.WebApi.Controllers.Course
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSellCenterAchievementsStatistics
()
{
public
ApiResult
GetSellCenterAchievementsStatistics
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
Msg
.
ToString
());
string
Month
=
parms
.
GetStringValue
(
"Month"
);
if
(
string
.
IsNullOrEmpty
(
Month
))
{
if
(
string
.
IsNullOrEmpty
(
Month
))
{
return
ApiResult
.
ParamIsNull
();
}
Month
=
Convert
.
ToDateTime
(
Month
).
ToString
(
"yyyy-MM"
);
var
Robj
=
sellAchievementsModule
.
GetSellCenterAchievementsStatistics
(
Month
,
userInfo
);
return
ApiResult
.
Success
(
""
,
Robj
);
...
...
Edu.WebApi/Controllers/Exam/ExamController.cs
View file @
a577a949
...
...
@@ -1054,6 +1054,7 @@ namespace Edu.WebApi.Controllers.Exam
BankType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"BankType"
),
QCategoryId
=
string
.
Format
(
"{0}"
,
(
int
)
QuestionCategoryEnum
.
ReadingChoose
),
StartId
=
base
.
ParmJObj
.
GetInt
(
"StartId"
),
BankId
=
107
,
};
var
list
=
courseExamModule
.
GetAppQuestionCategoryListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
...
...
Edu.WebApi/Timers/TimedTaskServices.cs
View file @
a577a949
...
...
@@ -44,7 +44,7 @@ namespace Edu.WebApi.Timers
public
Task
StartAsync
(
CancellationToken
cancellationToken
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
"定时任务被启动"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"定时任务被启动"
);
int
Interval
=
0
;
Interval
=
60
;
//Interval = 1;
...
...
@@ -57,7 +57,7 @@ namespace Edu.WebApi.Timers
public
Task
StopAsync
(
CancellationToken
cancellationToken
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
"定时任务被关闭"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"定时任务被关闭"
);
_timer
?.
Change
(
Timeout
.
Infinite
,
0
);
return
Task
.
CompletedTask
;
}
...
...
@@ -69,51 +69,51 @@ namespace Edu.WebApi.Timers
/// <returns></returns>
private
void
DoWork
(
object
state
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
"定时任务被触发"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"定时任务被触发"
);
try
{
if
(
Interlocked
.
Exchange
(
ref
marketconsultant_Timer
,
1
)
==
0
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
"DealMarketConsultantData========Start"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"DealMarketConsultantData========Start"
);
var
today
=
DateTime
.
Now
;
var
currentDate
=
Common
.
ConvertHelper
.
FormatDate
(
today
);
var
startDate
=
Common
.
ConvertHelper
.
FormatDate
(
today
.
AddDays
(-
1
));
if
(!
marketConsultantModule
.
CheckConsultantDataModule
(
startDate
))
{
marketConsultantModule
.
CreateConsultantDataModule
(
today
);
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateConsultantDataModule:"
+
startDate
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"CreateConsultantDataModule:"
+
startDate
);
}
if
(!
marketConsultantModule
.
CheckMarketDataModule
(
startDate
))
{
marketConsultantModule
.
CreateMarketDataModule
(
today
);
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateMarketDataModule:"
+
startDate
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"CreateMarketDataModule:"
+
startDate
);
}
//缓存信息
UserInfo
user
=
UserReidsCache
.
GetUserLoginInfo
(
"1"
);
if
(!
studentStatModule
.
CheckStudentStaticModule
(
startDate
))
{
studentStatModule
.
CreateStudentStaticModule
(
user
,
startDate
,
currentDate
,
isInit
:
false
);
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateStudentStaticModule:"
+
startDate
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"CreateStudentStaticModule:"
+
startDate
);
}
if
(!
studentStatModule
.
CheckStudentMarketModule
(
startDate
))
{
studentStatModule
.
CreateStudentMarketModule
(
user
,
startDate
,
currentDate
,
isInit
:
false
);
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateStudentMarketModule:"
+
startDate
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"CreateStudentMarketModule:"
+
startDate
);
}
if
(!
studentStatModule
.
CheckStudentCompanyModule
(
startDate
))
{
studentStatModule
.
CreateStudentCompanyModule
(
user
,
startDate
,
currentDate
,
isInit
:
false
);
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateStudentCompanyModule:"
+
startDate
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"CreateStudentCompanyModule:"
+
startDate
);
}
if
(!
teacherStaticModule
.
CheckTeacherStaticExistsModule
(
startDate
))
{
teacherStaticModule
.
CreateTeacherStaticModule
(
user
,
startDate
,
currentDate
,
isInit
:
false
);
Common
.
Plugin
.
LogHelper
.
Write
(
"CreateTeacherStaticModule:"
+
startDate
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"CreateTeacherStaticModule:"
+
startDate
);
}
Common
.
Plugin
.
LogHelper
.
Write
(
"DealMarketConsultantData========End"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"DealMarketConsultantData========End"
);
educationContractModule
.
UpdateEducationAnomalyContractModule
();
Common
.
Plugin
.
LogHelper
.
Write
(
"更新合同金额========End"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"更新合同金额========End"
);
Interlocked
.
Exchange
(
ref
marketconsultant_Timer
,
0
);
}
...
...
@@ -126,7 +126,7 @@ namespace Edu.WebApi.Timers
public
void
Dispose
()
{
Common
.
Plugin
.
LogHelper
.
Write
(
"定时任务被释放闭"
);
Common
.
Plugin
.
LogHelper
.
Write
Info
(
"定时任务被释放闭"
);
_timer
?.
Dispose
();
//iis会回收这个定时任务,这边在回收的时候触发一个请求,来再次唤醒该服务
Thread
.
Sleep
(
5000
);
...
...
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