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
37ffbd48
Commit
37ffbd48
authored
Jan 19, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
5eeec128
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
252 additions
and
0 deletions
+252
-0
RB_Consultant_Goal.cs
Edu.Model/Entity/DataStatistics/RB_Consultant_Goal.cs
+66
-0
RB_Consultant_Goal_Extend.cs
...del/ViewModel/DataStatistics/RB_Consultant_Goal_Extend.cs
+14
-0
MarketConsultantModule.cs
Edu.Module.Customer/MarketConsultantModule.cs
+89
-0
RB_Consultant_GoalRepository.cs
...Repository/DataStatistics/RB_Consultant_GoalRepository.cs
+83
-0
No files found.
Edu.Model/Entity/DataStatistics/RB_Consultant_Goal.cs
0 → 100644
View file @
37ffbd48
using
Edu.Common.Enum
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.DataStatistics
{
/// <summary>
/// 课程顾问部月目标实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Consultant_Goal
{
/// <summary>
/// 主键
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 年份
/// </summary>
public
int
YearStr
{
get
;
set
;
}
/// <summary>
/// 月份
/// </summary>
public
int
MonthStr
{
get
;
set
;
}
/// <summary>
/// 目标金额
/// </summary>
public
decimal
GoalMoney
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 校区编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 部门编号
/// </summary>
public
int
Dept_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/DataStatistics/RB_Consultant_Goal_Extend.cs
0 → 100644
View file @
37ffbd48
using
Edu.Model.Entity.DataStatistics
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.DataStatistics
{
/// <summary>
/// 课程顾问部月目标扩展实体类
/// </summary>
public
class
RB_Consultant_Goal_Extend
:
RB_Consultant_Goal
{
}
}
Edu.Module.Customer/MarketConsultantModule.cs
View file @
37ffbd48
...
...
@@ -11,6 +11,8 @@ using Edu.Repository.DataStatistics;
using
Edu.Model.ViewModel.User
;
using
Edu.Model.ViewModel.DataStatistics
;
using
Edu.Model.ViewModel.Reserve
;
using
VT.FW.DB
;
using
Edu.Common.Enum
;
namespace
Edu.Module.Customer
{
...
...
@@ -59,6 +61,11 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_Consultant_DataRepository
consultant_DataRepository
=
new
RB_Consultant_DataRepository
();
/// <summary>
/// 课程顾问部目标仓储层对象
/// </summary>
private
readonly
RB_Consultant_GoalRepository
consultant_GoalRepository
=
new
RB_Consultant_GoalRepository
();
/// <summary>
/// 清除数据
/// </summary>
...
...
@@ -689,5 +696,87 @@ namespace Edu.Module.Customer
};
return
obj
;
}
#
region
课程顾问部目标设置
/// <summary>
/// 获取课程顾问部目标分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
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
);
return
list
;
}
/// <summary>
/// 获取课程顾问部目标列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Consultant_Goal_Extend
>
GetConsultantGoalListModule
(
RB_Consultant_Goal_Extend
query
)
{
var
list
=
consultant_GoalRepository
.
GetConsultantGoalListRepository
(
query
);
return
list
;
}
/// <summary>
/// 新增修改课程顾问部目标
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetConsultantGoalModule
(
RB_Consultant_Goal_Extend
model
)
{
bool
flag
=
false
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Consultant_Goal_Extend
.
YearStr
),
model
.
YearStr
},
{
nameof
(
RB_Consultant_Goal_Extend
.
MonthStr
),
model
.
MonthStr
},
{
nameof
(
RB_Consultant_Goal_Extend
.
GoalMoney
),
model
.
GoalMoney
},
};
flag
=
consultant_GoalRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Consultant_Goal_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
consultant_GoalRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 根据编号获取课程顾问部目标
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Consultant_Goal_Extend
GetConsultantGoalModule
(
object
Id
)
{
var
extModel
=
consultant_GoalRepository
.
GetEntity
<
RB_Consultant_Goal_Extend
>(
Id
);
return
extModel
;
}
/// <summary>
/// 根据编号删除课程顾问部目标
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveConsultantGoalModule
(
object
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Consultant_Goal_Extend
.
Status
)
,(
int
)
DateStateEnum
.
Delete
}
};
bool
flag
=
consultant_GoalRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Consultant_Goal_Extend
.
Id
),
Id
));
return
flag
;
}
#
endregion
}
}
\ No newline at end of file
Edu.Repository/DataStatistics/RB_Consultant_GoalRepository.cs
0 → 100644
View file @
37ffbd48
using
Edu.Common.Enum
;
using
Edu.Model.Entity.DataStatistics
;
using
Edu.Model.ViewModel.DataStatistics
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.DataStatistics
{
/// <summary>
/// 课程顾问部月目标仓储层
/// </summary>
public
class
RB_Consultant_GoalRepository
:
BaseRepository
<
RB_Consultant_Goal
>
{
/// <summary>
/// 获取课程顾问部目标分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Consultant_Goal_Extend
>
GetConsultantGoalPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Consultant_Goal_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT A.*
FROM RB_Consultant_Goal AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
YearStr
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
YearStr
),
query
.
YearStr
);
}
if
(
query
.
MonthStr
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
MonthStr
),
query
.
MonthStr
);
}
}
return
GetPage
<
RB_Consultant_Goal_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取课程顾问部目标列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Consultant_Goal_Extend
>
GetConsultantGoalListRepository
(
RB_Consultant_Goal_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT A.*
FROM RB_Consultant_Goal AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
YearStr
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
YearStr
),
query
.
YearStr
);
}
if
(
query
.
MonthStr
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Consultant_Goal_Extend
.
MonthStr
),
query
.
MonthStr
);
}
}
return
Get
<
RB_Consultant_Goal_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
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