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
6ed9df02
Commit
6ed9df02
authored
Jan 20, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
2955df7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
5 deletions
+146
-5
MarketConsultantModule.cs
Edu.Module.Customer/MarketConsultantModule.cs
+23
-5
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+123
-0
No files found.
Edu.Module.Customer/MarketConsultantModule.cs
View file @
6ed9df02
...
...
@@ -725,7 +725,7 @@ namespace Edu.Module.Customer
}
/// <summary>
///
新增
修改课程顾问部目标
/// 修改课程顾问部目标
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
...
...
@@ -742,11 +742,29 @@ namespace Edu.Module.Customer
};
flag
=
consultant_GoalRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Consultant_Goal_Extend
.
Id
),
model
.
Id
));
}
else
return
flag
;
}
/// <summary>
/// 批量添加课程顾问部目标
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
bool
AddConsultantGoalModule
(
List
<
RB_Consultant_Goal_Extend
>
list
)
{
bool
flag
=
false
;
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
newId
=
consultant_GoalRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
foreach
(
var
item
in
list
)
{
if
(!
flag
)
{
var
newId
=
consultant_GoalRepository
.
Insert
(
item
);
item
.
Id
=
newId
;
flag
=
newId
>
0
;
}
}
}
return
flag
;
}
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
6ed9df02
...
...
@@ -13,6 +13,7 @@ using Edu.Common.Enum.User;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.Public
;
using
Edu.Model.ViewModel.DataStatistics
;
using
Edu.Model.ViewModel.User
;
using
Edu.Module.Course
;
using
Edu.Module.Customer
;
...
...
@@ -2552,6 +2553,7 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowRepeatAttribute
]
public
ApiResult
MarketStatic
()
{
string
startTime
=
base
.
ParmJObj
.
GetStringValue
(
"startTime"
);
...
...
@@ -2584,6 +2586,7 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowRepeatAttribute
]
public
ApiResult
ConsultantStatic
()
{
string
startTime
=
base
.
ParmJObj
.
GetStringValue
(
"startTime"
);
...
...
@@ -2614,6 +2617,126 @@ namespace Edu.WebApi.Controllers.User
#
region
课程顾问部目标
/// <summary>
/// 获取课程顾问部目标分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetConsultantGoalPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Consultant_Goal_Extend
()
{
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
),
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
data
=
marketConsultantModule
.
GetConsultantGoalPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
data
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 修改课程顾问部目标
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
UpdateConsultantGoal
()
{
var
model
=
new
RB_Consultant_Goal_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
),
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
),
GoalMoney
=
base
.
ParmJObj
.
GetDecimal
(
"GoalMoney"
),
Dept_Id
=
base
.
ParmJObj
.
GetInt
(
"Dept_Id"
),
};
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
base
.
UserInfo
.
School_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
bool
flag
=
marketConsultantModule
.
SetConsultantGoalModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 新增课程顾问部目标
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
AddConsultantGoal
()
{
List
<
RB_Consultant_Goal_Extend
>
list
=
new
List
<
RB_Consultant_Goal_Extend
>();
var
timeListStr
=
base
.
ParmJObj
.
GetStringValue
(
"TimeList"
);
if
(!
string
.
IsNullOrEmpty
(
timeListStr
))
{
List
<
string
>
timeList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
timeListStr
);
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
foreach
(
var
item
in
timeList
)
{
var
tempArray
=
item
.
Split
(
'-'
);
if
(
tempArray
!=
null
&&
tempArray
.
Length
==
2
)
{
Int32
.
TryParse
(
tempArray
[
0
],
out
int
YearStr
);
Int32
.
TryParse
(
tempArray
[
1
],
out
int
MonthStr
);
var
model
=
new
RB_Consultant_Goal_Extend
()
{
Id
=
0
,
YearStr
=
YearStr
,
MonthStr
=
MonthStr
,
GoalMoney
=
base
.
ParmJObj
.
GetDecimal
(
"GoalMoney"
),
Dept_Id
=
base
.
ParmJObj
.
GetInt
(
"Dept_Id"
),
};
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
base
.
UserInfo
.
School_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
if
(
YearStr
>
0
&&
MonthStr
>
0
)
{
list
.
Add
(
model
);
}
}
}
}
}
bool
flag
=
marketConsultantModule
.
AddConsultantGoalModule
(
list
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取目标
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetConsultantGoal
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
extModel
=
marketConsultantModule
.
GetConsultantGoalModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 根据编号删除目标
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveConsultantGoal
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
extModel
=
marketConsultantModule
.
RemoveConsultantGoalModule
(
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