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
9ededce9
Commit
9ededce9
authored
Jan 20, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0dcb48d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
6 deletions
+82
-6
RB_Consultant_Goal_Extend.cs
...del/ViewModel/DataStatistics/RB_Consultant_Goal_Extend.cs
+14
-0
MarketConsultantModule.cs
Edu.Module.Customer/MarketConsultantModule.cs
+48
-5
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+20
-1
No files found.
Edu.Model/ViewModel/DataStatistics/RB_Consultant_Goal_Extend.cs
View file @
9ededce9
...
...
@@ -10,5 +10,19 @@ namespace Edu.Model.ViewModel.DataStatistics
/// </summary>
public
class
RB_Consultant_Goal_Extend
:
RB_Consultant_Goal
{
/// <summary>
/// 部门名称
/// </summary>
public
string
DeptName
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
/// <summary>
/// 创建时间字符串
/// </summary>
public
string
CreateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
CreateTime
);
}
}
}
}
Edu.Module.Customer/MarketConsultantModule.cs
View file @
9ededce9
...
...
@@ -66,6 +66,11 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_Consultant_GoalRepository
consultant_GoalRepository
=
new
RB_Consultant_GoalRepository
();
/// <summary>
/// 部门仓储层对象
/// </summary>
private
readonly
RB_DepartmentRepository
departmentRepository
=
new
RB_DepartmentRepository
();
/// <summary>
/// 清除数据
/// </summary>
...
...
@@ -732,6 +737,22 @@ namespace Edu.Module.Customer
public
List
<
RB_Consultant_Goal_Extend
>
GetConsultantGoalPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Consultant_Goal_Extend
query
)
{
var
list
=
consultant_GoalRepository
.
GetConsultantGoalPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
deptList
=
new
List
<
RB_Department_ViewModel
>();
string
deptIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
Dept_Id
));
if
(!
string
.
IsNullOrEmpty
(
deptIds
))
{
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
deptIds
});
}
foreach
(
var
item
in
list
)
{
item
.
DeptName
=
deptList
?.
FirstOrDefault
(
qitem
=>
qitem
.
DeptId
==
item
.
Dept_Id
)?.
DeptName
??
""
;
}
}
return
list
;
}
...
...
@@ -761,6 +782,7 @@ namespace Edu.Module.Customer
{
nameof
(
RB_Consultant_Goal_Extend
.
YearStr
),
model
.
YearStr
},
{
nameof
(
RB_Consultant_Goal_Extend
.
MonthStr
),
model
.
MonthStr
},
{
nameof
(
RB_Consultant_Goal_Extend
.
GoalMoney
),
model
.
GoalMoney
},
{
nameof
(
RB_Consultant_Goal_Extend
.
Dept_Id
),
model
.
Dept_Id
},
};
flag
=
consultant_GoalRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Consultant_Goal_Extend
.
Id
),
model
.
Id
));
}
...
...
@@ -775,16 +797,37 @@ namespace Edu.Module.Customer
/// <returns></returns>
public
bool
AddConsultantGoalModule
(
List
<
RB_Consultant_Goal_Extend
>
list
)
{
bool
flag
=
fals
e
;
bool
flag
=
tru
e
;
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
foreach
(
var
item
in
list
)
{
if
(!
flag
)
var
oldModel
=
consultant_GoalRepository
.
GetConsultantGoalListRepository
(
new
RB_Consultant_Goal_Extend
()
{
YearStr
=
item
.
YearStr
,
MonthStr
=
item
.
MonthStr
,
Dept_Id
=
item
.
Dept_Id
})?.
FirstOrDefault
();
item
.
Id
=
oldModel
?.
Id
??
0
;
if
(
flag
)
{
var
newId
=
consultant_GoalRepository
.
Insert
(
item
);
item
.
Id
=
newId
;
flag
=
newId
>
0
;
if
(
item
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Consultant_Goal_Extend
.
YearStr
),
item
.
YearStr
},
{
nameof
(
RB_Consultant_Goal_Extend
.
MonthStr
),
item
.
MonthStr
},
{
nameof
(
RB_Consultant_Goal_Extend
.
GoalMoney
),
item
.
GoalMoney
},
{
nameof
(
RB_Consultant_Goal_Extend
.
Dept_Id
),
item
.
Dept_Id
},
};
flag
=
consultant_GoalRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Consultant_Goal_Extend
.
Id
),
item
.
Id
));
}
else
{
var
newId
=
consultant_GoalRepository
.
Insert
(
item
);
item
.
Id
=
newId
;
flag
=
newId
>
0
;
}
}
}
}
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
9ededce9
...
...
@@ -2631,9 +2631,28 @@ namespace Edu.WebApi.Controllers.User
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
List
<
object
>
list
=
new
List
<
object
>();
var
data
=
marketConsultantModule
.
GetConsultantGoalPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
if
(
data
!=
null
&&
data
.
Count
>
0
)
{
foreach
(
var
item
in
data
)
{
string
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
list
.
Add
(
new
{
item
.
Id
,
item
.
YearStr
,
item
.
MonthStr
,
item
.
GoalMoney
,
CreateByName
,
item
.
CreateTimeStr
,
item
.
Dept_Id
,
item
.
DeptName
,
});
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
data
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
...
...
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