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
a27c1b6f
Commit
a27c1b6f
authored
Feb 14, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
55becc4e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
301 additions
and
102 deletions
+301
-102
RB_Student_Advisor.cs
Edu.Model/Entity/Customer/RB_Student_Advisor.cs
+11
-46
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+15
-0
RB_Student_Advisor_Extend.cs
Edu.Model/ViewModel/Customer/RB_Student_Advisor_Extend.cs
+15
-0
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+2
-1
StudentModule.cs
Edu.Module.User/StudentModule.cs
+51
-43
RB_Student_AdvisorConfigRepository.cs
...Repository/Customer/RB_Student_AdvisorConfigRepository.cs
+8
-0
RB_Student_AdvisorRepository.cs
Edu.Repository/Customer/RB_Student_AdvisorRepository.cs
+4
-4
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+195
-8
No files found.
Edu.Model/Entity/Customer/RB_Student_Advisor.cs
View file @
a27c1b6f
...
...
@@ -22,69 +22,34 @@ namespace Edu.Model.Entity.Customer
/// </summary>
public
int
StuId
{
get
;
set
;
}
/// <summary>
/// 期望达成日期
/// </summary>
public
string
ExpectDate
{
get
;
set
;
}
/// <summary>
/// 胜率
/// </summary>
public
decimal
?
WinRate
{
get
;
set
;
}
/// <summary>
/// 跟进状态
/// </summary>
public
int
?
AdvisorStatus
{
get
;
set
;
}
/// <summary>
/// 疑似日期
/// </summary>
public
string
SuspectedDate
{
get
;
set
;
}
/// <summary>
/// 疑似备注
/// </summary>
public
string
SuspectedRemark
{
get
;
set
;
}
/// <summary>
/// 潜在日期
/// </summary>
public
string
PotentialDate
{
get
;
set
;
}
/// <summary>
/// 潜在备注
/// </summary>
public
string
PotentialRemark
{
get
;
set
;
}
/// <summary>
/// 接近日期
/// </summary>
public
string
NearDate
{
get
;
set
;
}
public
int
AdvisorStatus
{
get
;
set
;
}
/// <summary>
///
接近备注
///
跟进日期
/// </summary>
public
string
NearRemark
{
get
;
set
;
}
public
string
AdvisorDate
{
get
;
set
;
}
/// <summary>
///
谈判时间
///
跟进备注
/// </summary>
public
string
NegotiationDate
{
get
;
set
;
}
public
string
AdvisorRemark
{
get
;
set
;
}
/// <summary>
///
谈判备注
///
创建人
/// </summary>
public
string
NegotiationRemark
{
get
;
set
;
}
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
///
达成协议
时间
///
创建
时间
/// </summary>
public
string
ReachDat
e
{
get
;
set
;
}
public
DateTime
CreateTim
e
{
get
;
set
;
}
/// <summary>
///
达成协议备注
///
集团编号
/// </summary>
public
string
ReachRemark
{
get
;
set
;
}
public
int
Group_Id
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Student.cs
View file @
a27c1b6f
...
...
@@ -251,5 +251,20 @@ namespace Edu.Model.Entity.User
/// 首次报名时间
/// </summary>
public
DateTime
?
FirstEnrollDate
{
get
;
set
;
}
/// <summary>
/// 课程顾问跟进状态
/// </summary>
public
int
AdvisorStatus
{
get
;
set
;
}
/// <summary>
/// 课程顾问胜率
/// </summary>
public
decimal
AdvisorWinRate
{
get
;
set
;
}
/// <summary>
/// 课程顾问期望达成协议日期
/// </summary>
public
string
AdvisorExpectDate
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Customer/RB_Student_Advisor_Extend.cs
View file @
a27c1b6f
...
...
@@ -14,5 +14,20 @@ namespace Edu.Model.ViewModel.Customer
/// 学员编号
/// </summary>
public
string
QStuIds
{
get
;
set
;
}
/// <summary>
/// 跟进状态名称
/// </summary>
public
string
AdvisorStatusName
{
get
;
set
;
}
/// <summary>
/// 跟进状态完成百分比
/// </summary>
public
decimal
AdvisorRate
{
get
;
set
;
}
/// <summary>
/// 课程顾问期望达成协议日期
/// </summary>
public
string
AdvisorExpectDate
{
get
;
set
;
}
}
}
Edu.Module.Customer/CustomerStudentModule.cs
View file @
a27c1b6f
...
...
@@ -169,6 +169,7 @@ namespace Edu.Module.Customer
var
assistModel
=
assistList
.
Where
(
x
=>
x
.
AssistId
==
model
.
CreateBy
).
FirstOrDefault
();
var
AssistType
=
assistModel
?.
AssistType
??
0
;
#
endregion
student_FollowRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Follow
()
{
StuId
=
model
.
StuId
,
...
...
@@ -177,7 +178,7 @@ namespace Edu.Module.Customer
CreateTime
=
model
.
CreateTime
,
Group_Id
=
model
.
Group_Id
,
Id
=
0
,
Remark
=
$"客人约访:约访时间【
{
model
.
AppointmentTime
.
ToString
(
"yyyy-MM-dd HH:mm"
)}
】,约访地点【
{
model
.
AppointmentPoint
}
】,备注【
{
model
.
Remark
}
】"
,
Remark
=
$"客人约访:约访时间【
{
Common
.
ConvertHelper
.
FormatTimeStr2
(
model
.
AppointmentTime
)}
】,约访地点【
{
model
.
AppointmentPoint
}
】,备注【
{
model
.
Remark
}
】"
,
Status
=
DateStateEnum
.
Normal
,
UpdateBy
=
model
.
UpdateBy
,
UpdateTime
=
model
.
UpdateTime
...
...
Edu.Module.User/StudentModule.cs
View file @
a27c1b6f
...
...
@@ -350,7 +350,7 @@ namespace Edu.Module.User
OperatorEnum
=
OperatorEnum
.
NotEqual
});
}
var
NewId
=
studentRepository
.
Exists
(
"StuId"
,
where
);
var
NewId
=
studentRepository
.
Exists
(
"StuId"
,
where
);
return
NewId
>
0
;
}
...
...
@@ -404,9 +404,9 @@ namespace Edu.Module.User
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
}
}
return
flag
;
}
...
...
@@ -469,15 +469,17 @@ namespace Edu.Module.User
extModel
.
StuPurposeName
=
learningGoalsRepository
.
GetLearningGoalsExtEntityRepository
(
extModel
.
StuPurpose
)?.
Name
??
""
;
extModel
.
StuChannelName
=
channelRepository
.
GetChannelExtEntityRepository
(
extModel
.
StuChannel
)?.
Name
??
""
;
extModel
.
StuNeedsName
=
needsRepository
.
GetNeedsExtEntityRepository
(
extModel
.
StuNeeds
)?.
Name
??
""
;
if
(
extModel
.
CustomerId
>
0
)
{
extModel
.
CustomerName
=
customerRepository
.
GetEntity
(
extModel
.
CustomerId
)?.
CustomerName
??
""
;
}
if
(
extModel
.
StuSourceId
>
0
)
//
if (extModel.CustomerId > 0)
//
{
//
extModel.CustomerName = customerRepository.GetEntity(extModel.CustomerId)?.CustomerName ?? "";
//
}
if
(
extModel
.
StuSourceId
>
0
)
{
if
(
extModel
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
)
{
extModel
.
StuSourceIdName
=
customerRepository
.
GetEntity
(
extModel
.
StuSourceId
)?.
CustomerName
??
""
;
var
customerName
=
customerRepository
.
GetEntity
(
extModel
.
StuSourceId
)?.
CustomerName
??
""
;
extModel
.
StuSourceIdName
=
customerName
;
extModel
.
CustomerName
=
customerName
;
}
else
if
(
extModel
.
CreateType
==
StuCreateTypeEnum
.
EmployeeInput
)
{
...
...
@@ -617,8 +619,6 @@ namespace Edu.Module.User
}
#
endregion
/// <summary>
/// 根据学生id获取同班账户,必须是未开班/学习中的
/// </summary>
...
...
@@ -629,8 +629,6 @@ namespace Edu.Module.User
return
studentRepository
.
GetListByStudentId
(
Student_Id
,
Group_Id
);
}
/// <summary>
/// 根据学生id获取学生的班级课程学校信息
/// </summary>
...
...
@@ -679,7 +677,7 @@ namespace Edu.Module.User
Title
=
"同业查重通知"
,
Platform
=
5
,
};
if
(
customerModel
!=
null
&&
customerModel
.
CreateBy
>
0
)
if
(
customerModel
!=
null
&&
customerModel
.
CreateBy
>
0
)
{
var
queryTargetWorkId
=
accountModule
.
GetWorkUserIdModule
(
customerModel
.
CreateBy
);
modelWork
.
ReceiveId
=
queryTargetWorkId
;
...
...
@@ -722,16 +720,16 @@ namespace Edu.Module.User
var
addList
=
studentRepository
.
GetStudentStaticRepository
(
createBy
.
ToString
(),
startDate
,
today
);
int
days
=
(
DateTime
.
Now
-
startTime
).
Days
;
List
<
object
>
dayList
=
new
List
<
object
>();
//今日新增名单
int
todayAdd
=
addList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
today
)?.
ClueCount
??
0
;
int
todayAdd
=
addList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
today
)?.
ClueCount
??
0
;
//到访名单
var
visitList
=
student_VisitRepository
.
GetStudentVisitStaticRepository
(
new
RB_Student_Visit_Extend
()
{
CreateBy
=
createBy
,
StartDate
=
startDate
,
EndDate
=
today
EndDate
=
today
});
//今日到访
int
todayVisit
=
visitList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
today
)?.
VisitCount
??
0
;
...
...
@@ -761,7 +759,7 @@ namespace Edu.Module.User
{
CreateBy
=
createBy
,
StartClassDate
=
startDate
,
EndClassDate
=
today
EndClassDate
=
today
});
//今日试听
var
trialLessonCount
=
trialLessonList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
today
)?.
TrialLessonCount
??
0
;
...
...
@@ -783,7 +781,7 @@ namespace Edu.Module.User
VisitCount
=
visitList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
newDate
))?.
VisitCount
??
0
,
appointmentCount
=
appointmentList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
newDate
))?.
AppointmentCount
??
0
,
customerCount
=
customerList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
newDate
))?.
CustomerCount
??
0
,
trialLessonCount
=
trialLessonList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
newDate
))?.
TrialLessonCount
??
0
,
trialLessonCount
=
trialLessonList
?.
FirstOrDefault
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
newDate
))?.
TrialLessonCount
??
0
,
});
}
...
...
@@ -823,7 +821,8 @@ namespace Edu.Module.User
{
//获取正在学习的课程
var
model
=
student_OrderGuestRepository
.
GetLearningCourseInfo
(
accountId
,
group_Id
,
1
);
if
(
model
==
null
)
{
if
(
model
==
null
)
{
model
=
student_OrderGuestRepository
.
GetLearningCourseInfo
(
accountId
,
group_Id
,
2
);
}
return
model
;
...
...
@@ -833,7 +832,7 @@ namespace Edu.Module.User
public
void
UpdateTel
()
{
var
list
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
());
var
list
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
());
foreach
(
var
item
in
list
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
@@ -875,7 +874,8 @@ namespace Edu.Module.User
{
logContent
+=
$"咨询结果由【
{
oldModel
.
ConsultingResults
}
】修改为【
{
demodel
.
ConsultingResults
}
】;"
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
ConsultDate
),
demodel
.
ConsultDate
},
{
nameof
(
RB_Student_ViewModel
.
PlanPrice
),
demodel
.
PlanPrice
},
{
nameof
(
RB_Student_ViewModel
.
BaseCondition
),
demodel
.
BaseCondition
},
...
...
@@ -885,15 +885,18 @@ namespace Edu.Module.User
{
nameof
(
RB_Student_ViewModel
.
UpdateBy
),
userInfo
.
Id
},
{
nameof
(
RB_Student_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Student_ViewModel
.
StuId
),
FiledValue
=
demodel
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
demodel
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
studentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
if
(
flag
)
{
student_LogRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Log
()
{
LogId
=
0
,
...
...
@@ -910,7 +913,7 @@ namespace Edu.Module.User
return
flag
?
""
:
"出错了,请联系管理员"
;
}
#
region
#
region
课程顾问跟进管理
/// <summary>
/// 获取课程顾问跟进配置分页列表
...
...
@@ -931,7 +934,7 @@ namespace Edu.Module.User
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_AdvisorConfig_Extend
>
GetStudentAdvisorConfigList
Repository
(
RB_Student_AdvisorConfig_Extend
query
)
public
List
<
RB_Student_AdvisorConfig_Extend
>
GetStudentAdvisorConfigList
Module
(
RB_Student_AdvisorConfig_Extend
query
)
{
var
list
=
student_AdvisorConfigRepository
.
GetStudentAdvisorConfigListRepository
(
query
);
return
list
;
...
...
@@ -954,6 +957,7 @@ namespace Edu.Module.User
{
nameof
(
RB_Student_AdvisorConfig_Extend
.
Num
),
model
.
Num
},
{
nameof
(
RB_Student_AdvisorConfig_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Student_AdvisorConfig_Extend
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Student_AdvisorConfig_Extend
.
Rate
),
model
.
Rate
},
};
flag
=
student_AdvisorConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_AdvisorConfig_Extend
.
Id
),
model
.
Id
));
}
...
...
@@ -1001,7 +1005,7 @@ namespace Edu.Module.User
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Advisor_Extend
>
GetStudentAdvisorPage
Repository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Advisor_Extend
query
)
public
List
<
RB_Student_Advisor_Extend
>
GetStudentAdvisorPage
Module
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Advisor_Extend
query
)
{
var
list
=
student_AdvisorRepository
.
GetStudentAdvisorPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
return
list
;
...
...
@@ -1012,7 +1016,7 @@ namespace Edu.Module.User
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Advisor_Extend
>
GetStudentAdvisorList
Repository
(
RB_Student_Advisor_Extend
query
)
public
List
<
RB_Student_Advisor_Extend
>
GetStudentAdvisorList
Module
(
RB_Student_Advisor_Extend
query
)
{
var
list
=
student_AdvisorRepository
.
GetStudentAdvisorListRepository
(
query
);
return
list
;
...
...
@@ -1026,24 +1030,28 @@ namespace Edu.Module.User
public
bool
SetStudentAdvisorModule
(
RB_Student_Advisor_Extend
model
)
{
bool
flag
=
false
;
var
oldStudent
=
studentRepository
.
GetEntity
<
RB_Student_ViewModel
>(
model
.
StuId
);
if
(
oldStudent
!=
null
)
{
Dictionary
<
string
,
object
>
stuFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
AdvisorStatus
),
model
.
AdvisorStatus
},
{
nameof
(
RB_Student_ViewModel
.
AdvisorWinRate
),
model
.
AdvisorRate
},
};
if
(
string
.
IsNullOrEmpty
(
oldStudent
.
AdvisorExpectDate
))
{
stuFileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
AdvisorExpectDate
),
model
.
AdvisorExpectDate
);
}
flag
=
studentRepository
.
Update
(
stuFileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
model
.
StuId
));
}
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Advisor_Extend
.
StuId
),
model
.
StuId
},
{
nameof
(
RB_Student_Advisor_Extend
.
ExpectDate
),
model
.
ExpectDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
WinRate
),
model
.
WinRate
},
{
nameof
(
RB_Student_Advisor_Extend
.
AdvisorStatus
),
model
.
AdvisorStatus
},
{
nameof
(
RB_Student_Advisor_Extend
.
SuspectedDate
),
model
.
SuspectedDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
SuspectedRemark
),
model
.
SuspectedRemark
},
{
nameof
(
RB_Student_Advisor_Extend
.
PotentialDate
),
model
.
PotentialDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
PotentialRemark
),
model
.
PotentialRemark
},
{
nameof
(
RB_Student_Advisor_Extend
.
NearDate
),
model
.
NearDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
NearRemark
),
model
.
NearRemark
},
{
nameof
(
RB_Student_Advisor_Extend
.
NegotiationDate
),
model
.
NegotiationDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
NegotiationRemark
),
model
.
NegotiationRemark
},
{
nameof
(
RB_Student_Advisor_Extend
.
ReachDate
),
model
.
ReachDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
ReachRemark
),
model
.
ReachRemark
},
{
nameof
(
RB_Student_Advisor_Extend
.
AdvisorDate
),
model
.
AdvisorDate
},
{
nameof
(
RB_Student_Advisor_Extend
.
AdvisorRemark
),
model
.
AdvisorRemark
},
};
flag
=
student_AdvisorRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Advisor_Extend
.
Id
),
model
.
Id
));
}
...
...
Edu.Repository/Customer/RB_Student_AdvisorConfigRepository.cs
View file @
a27c1b6f
...
...
@@ -34,6 +34,10 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_AdvisorConfig_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_AdvisorConfig_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Student_AdvisorConfig_Extend
.
Name
));
...
...
@@ -61,6 +65,10 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_AdvisorConfig_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_AdvisorConfig_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Student_AdvisorConfig_Extend
.
Name
));
...
...
Edu.Repository/Customer/RB_Student_AdvisorRepository.cs
View file @
a27c1b6f
...
...
@@ -24,8 +24,8 @@ namespace Edu.Repository.Customer
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Advisor AS A
SELECT A.*
,B.Name AS AdvisorStatusName,B.Rate AS AdvisorRate
FROM RB_Student_Advisor AS A
LEFT JOIN rb_student_advisorconfig AS B ON A.AdvisorStatus=B.Id
WHERE 1=1
"
);
if
(
query
!=
null
)
...
...
@@ -52,8 +52,8 @@ WHERE 1=1
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Advisor AS A
SELECT A.*
,B.Name AS AdvisorStatusName,B.Rate AS AdvisorRate
FROM RB_Student_Advisor AS A
LEFT JOIN rb_student_advisorconfig AS B ON A.AdvisorStatus=B.Id
WHERE 1=1
"
);
if
(
query
!=
null
)
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
a27c1b6f
...
...
@@ -1493,19 +1493,21 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentConsultResults
()
{
public
ApiResult
SetStudentConsultResults
()
{
var
userInfo
=
base
.
UserInfo
;
RB_Student_ViewModel
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Student_ViewModel
>(
base
.
RequestParm
.
Msg
.
ToString
());
if
(
demodel
.
StuId
<=
0
)
{
if
(
demodel
.
StuId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递学员ID"
);
}
string
msg
=
studentModule
.
SetStudentConsultResults
(
demodel
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
...
...
@@ -2277,10 +2279,6 @@ namespace Edu.WebApi.Controllers.User
var
flag
=
departmentModule
.
RemoveDepartmentModule
(
DeptId
,
Status
,
token
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
岗位管理
...
...
@@ -2552,6 +2550,195 @@ namespace Edu.WebApi.Controllers.User
var
flag
=
managerModule
.
SetEmployeeTypeModule
(
targetAccountType
,
AccountId
,
AccountType
,
Remark
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
课程顾问跟进学员信息
/// <summary>
/// 获取课程顾问跟进配置分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAdvisorConfigPage
()
{
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Student_AdvisorConfig_Extend
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
)
};
var
list
=
studentModule
.
GetStudentAdvisorConfigPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
List
<
object
>
result
=
new
List
<
object
>();
foreach
(
var
item
in
list
)
{
string
Name
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
result
.
Add
(
new
{
item
.
Id
,
item
.
Name
,
item
.
Num
,
item
.
Rate
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateByName
=
Name
});
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取课程顾问跟进配置列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAdvisorConfigList
()
{
var
query
=
new
RB_Student_AdvisorConfig_Extend
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
)
};
var
list
=
studentModule
.
GetStudentAdvisorConfigListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 新增修改课程顾问配置
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentAdvisorConfig
()
{
var
model
=
new
RB_Student_AdvisorConfig_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Num
=
base
.
ParmJObj
.
GetInt
(
"Num"
),
Rate
=
base
.
ParmJObj
.
GetDecimal
(
"Rate"
),
};
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
UpdateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Status
=
DateStateEnum
.
Normal
;
bool
flag
=
studentModule
.
SetStudentAdvisorConfigModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取课程顾问配置信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAdvisorConfig
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
extModel
=
studentModule
.
GetStudentAdvisorConfigModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 根据编号删除课程顾问配置信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudentAdvisorConfig
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
bool
flag
=
studentModule
.
RemoveStudentAdvisorConfigModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取课程顾问跟进分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAdvisorPage
()
{
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Student_Advisor_Extend
()
{
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
};
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
studentModule
.
GetStudentAdvisorPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
string
Name
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
result
.
Add
(
new
{
item
.
Id
,
item
.
StuId
,
item
.
AdvisorStatusName
,
item
.
AdvisorDate
,
item
.
AdvisorRemark
,
item
.
AdvisorStatus
,
item
.
AdvisorRate
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateByName
=
Name
});
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取课程顾问跟进列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAdvisorList
()
{
var
query
=
new
RB_Student_Advisor_Extend
()
{
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
};
var
list
=
studentModule
.
GetStudentAdvisorListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 新增修改课程顾问跟进记录
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentAdvisor
()
{
var
model
=
new
RB_Student_Advisor_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
AdvisorStatus
=
base
.
ParmJObj
.
GetInt
(
"AdvisorStatus"
),
AdvisorDate
=
base
.
ParmJObj
.
GetStringValue
(
"AdvisorDate"
),
AdvisorRemark
=
base
.
ParmJObj
.
GetStringValue
(
"AdvisorRemark"
),
AdvisorExpectDate
=
base
.
ParmJObj
.
GetStringValue
(
"AdvisorExpectDate"
),
AdvisorRate
=
base
.
ParmJObj
.
GetDecimal
(
"AdvisorRate"
),
};
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
bool
flag
=
studentModule
.
SetStudentAdvisorModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取课程顾问跟进记录
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAdvisor
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
extModel
=
studentModule
.
GetStudentAdvisorModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
#
endregion
}
}
\ No newline at end of file
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