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
71cc80dc
Commit
71cc80dc
authored
Dec 21, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
564f6a20
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
8 deletions
+159
-8
RB_Customer_Extend.cs
Edu.Model/ViewModel/Customer/RB_Customer_Extend.cs
+5
-0
RB_Bonus_PlanExtend.cs
Edu.Model/ViewModel/Sell/RB_Bonus_PlanExtend.cs
+39
-6
BonusConfigModule.cs
Edu.Module.Course/BonusConfigModule.cs
+106
-2
BonusController.cs
Edu.WebApi/Controllers/Bonus/BonusController.cs
+3
-0
B2BCustomerController.cs
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
+6
-0
No files found.
Edu.Model/ViewModel/Customer/RB_Customer_Extend.cs
View file @
71cc80dc
...
...
@@ -93,5 +93,10 @@ namespace Edu.Model.ViewModel.Customer
/// 销售额
/// </summary>
public
decimal
OrderSales
{
get
;
set
;
}
/// <summary>
/// 查询创建人
/// </summary>
public
int
QCreateBy
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Sell/RB_Bonus_PlanExtend.cs
View file @
71cc80dc
...
...
@@ -37,18 +37,51 @@ namespace Edu.Model.ViewModel.Sell
}
/// <summary>
/// 适用人员列表
/// 适用人员
详情
列表
/// </summary>
public
List
<
int
>
SaleIdList
{
get
{
return
Common
.
ConvertHelper
.
StringToList
(
this
.
SaleIds
);
}
}
public
List
<
SaleManItem
>
SaleList
{
get
;
set
;
}
/// <summary>
/// 适用课程
编号列表
/// 适用课程
详情
/// </summary>
public
List
<
int
>
UseCourseIdList
{
get
{
return
Common
.
ConvertHelper
.
StringToList
(
this
.
UseCourseIds
);
}
}
public
List
<
CourseItem
>
UseCourseList
{
get
;
set
;
}
/// <summary>
/// 不适用课程
编号
列表
/// 不适用课程
详情
列表
/// </summary>
public
List
<
int
>
NotUseCourseIdList
{
get
{
return
Common
.
ConvertHelper
.
StringToList
(
this
.
NotUseCourseIds
);
}
}
public
List
<
CourseItem
>
NotUseCourseList
{
get
;
set
;
}
}
/// <summary>
/// 适用人员项目配置
/// </summary>
public
class
SaleManItem
{
/// <summary>
///人员编号
/// </summary>
public
int
SaleId
{
get
;
set
;
}
/// <summary>
/// 人员名称
/// </summary>
public
string
SaleManName
{
get
;
set
;
}
}
/// <summary>
/// 课程项目配置
/// </summary>
public
class
CourseItem
{
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
CourseName
{
get
;
set
;
}
}
}
Edu.Module.Course/BonusConfigModule.cs
View file @
71cc80dc
...
...
@@ -6,6 +6,10 @@ using System.Text;
using
System.Linq
;
using
VT.FW.DB
;
using
Edu.Common.Enum
;
using
Edu.Repository.User
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Course
;
using
Edu.Model.ViewModel.Course
;
namespace
Edu.Module.Course
{
...
...
@@ -24,6 +28,16 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_Bouns_PlanDetailRepository
bouns_PlanDetailRepository
=
new
RB_Bouns_PlanDetailRepository
();
/// <summary>
/// 员工账号仓储层对象
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 课程仓储层对象
/// </summary>
private
readonly
RB_CourseRepository
courseRepository
=
new
RB_CourseRepository
();
/// <summary>
/// 获取课程顾问、市场达标奖金配置分页列表
/// </summary>
...
...
@@ -42,8 +56,82 @@ namespace Edu.Module.Course
{
QPlanIds
=
Ids
});
//适用人员
string
saleIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>!
string
.
IsNullOrEmpty
(
qitem
.
SaleIds
)).
Select
(
qitem
=>
qitem
.
SaleIds
));
List
<
Employee_ViewModel
>
empList
=
new
List
<
Employee_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
saleIds
))
{
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
QIds
=
saleIds
});
}
List
<
int
>
courseIdList
=
new
List
<
int
>();
var
useCourseList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
!
string
.
IsNullOrEmpty
(
qitem
.
UseCourseIds
)).
Select
(
qitem
=>
qitem
.
UseCourseIds
)));
if
(
useCourseList
!=
null
)
{
courseIdList
.
AddRange
(
useCourseList
);
}
var
notUseCourseList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
!
string
.
IsNullOrEmpty
(
qitem
.
NotUseCourseIds
)).
Select
(
qitem
=>
qitem
.
NotUseCourseIds
)));
if
(
notUseCourseList
!=
null
)
{
courseIdList
.
AddRange
(
notUseCourseList
);
}
List
<
RB_Course_ViewModel
>
courseList
=
new
List
<
RB_Course_ViewModel
>();
if
(
courseIdList
!=
null
&&
courseIdList
.
Count
>
0
)
{
courseRepository
.
GetCourseListRepository
(
new
RB_Course_ViewModel
()
{
QCourseIds
=
string
.
Join
(
","
,
courseIdList
)
});
}
foreach
(
var
item
in
list
)
{
item
.
SaleList
=
new
List
<
SaleManItem
>();
item
.
UseCourseList
=
new
List
<
CourseItem
>();
item
.
NotUseCourseList
=
new
List
<
CourseItem
>();
var
saleList
=
Common
.
ConvertHelper
.
StringToList
(
item
.
SaleIds
);
foreach
(
var
sItem
in
saleList
)
{
var
tempEmp
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
sItem
);
if
(
tempEmp
!=
null
)
{
item
.
SaleList
.
Add
(
new
SaleManItem
()
{
SaleId
=
tempEmp
.
Id
,
SaleManName
=
tempEmp
.
EmployeeName
});
}
}
var
useList
=
Common
.
ConvertHelper
.
StringToList
(
item
.
UseCourseIds
);
foreach
(
var
cItem
in
useList
)
{
var
tempCourse
=
courseList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
cItem
);
if
(
tempCourse
!=
null
)
{
item
.
UseCourseList
.
Add
(
new
CourseItem
()
{
CourseId
=
tempCourse
.
CourseId
,
CourseName
=
tempCourse
.
CourseName
});
}
}
var
notuseList
=
Common
.
ConvertHelper
.
StringToList
(
item
.
NotUseCourseIds
);
foreach
(
var
cItem
in
notuseList
)
{
var
tempCourse
=
courseList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CourseId
==
cItem
);
if
(
tempCourse
!=
null
)
{
item
.
NotUseCourseList
.
Add
(
new
CourseItem
()
{
CourseId
=
tempCourse
.
CourseId
,
CourseName
=
tempCourse
.
CourseName
});
}
}
item
.
DetailList
=
detailsList
?.
Where
(
qitem
=>
qitem
.
PlanId
==
item
.
Id
)?.
ToList
();
}
}
...
...
@@ -139,7 +227,7 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Bonus_PlanExtend
GetBonusPlanModule
(
int
Id
)
public
object
GetBonusPlanModule
(
int
Id
)
{
var
extModel
=
bonus_PlanRepository
.
GetEntity
<
RB_Bonus_PlanExtend
>(
Id
);
if
(
extModel
!=
null
)
...
...
@@ -149,7 +237,23 @@ namespace Edu.Module.Course
PlanId
=
extModel
.
Id
});
}
return
extModel
;
var
obj
=
new
{
extModel
?.
Id
,
extModel
?.
PlanType
,
extModel
?.
PlanName
,
extModel
?.
BasicSalary
,
extModel
?.
OpenBonus
,
extModel
?.
WorkAgeSalary
,
extModel
?.
ClueNumSalary
,
extModel
?.
SaleIds
,
SaleIdList
=
Common
.
ConvertHelper
.
StringToList
(
extModel
?.
SaleIds
),
extModel
?.
UseCourseIds
,
UseCourseIdList
=
Common
.
ConvertHelper
.
StringToList
(
extModel
?.
UseCourseIds
),
NotUseCourseIdList
=
Common
.
ConvertHelper
.
StringToList
(
extModel
?.
NotUseCourseIds
),
DetailList
=
extModel
?.
DetailList
??
new
List
<
RB_Bouns_PlanDetail_Extend
>()
};
return
obj
;
}
/// <summary>
...
...
Edu.WebApi/Controllers/Bonus/BonusController.cs
View file @
71cc80dc
...
...
@@ -60,6 +60,9 @@ namespace Edu.WebApi.Controllers.Bonus
item
.
PlanTypeStr
,
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
DetailList
,
item
.
SaleList
,
item
.
UseCourseList
,
item
.
NotUseCourseList
,
});
}
pageModel
.
Count
=
rowsCount
;
...
...
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
View file @
71cc80dc
...
...
@@ -118,6 +118,7 @@ namespace Edu.WebApi.Controllers.Customer
model
.
ApproveState
=
1
;
model
.
ApproveId
=
base
.
UserInfo
.
Id
;
model
.
ApproveTime
=
DateTime
.
Now
;
model
.
CustomerState
=
CustomerStateEnum
.
Normal
;
var
flag
=
customerModule
.
SetCustomerModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -655,6 +656,11 @@ namespace Edu.WebApi.Controllers.Customer
ApproveState
=
1
,
QCustomerState
=
1
,
};
query
.
QCreateBy
=
base
.
ParmJObj
.
GetInt
(
"QCreateBy"
);
if
(
query
.
QCreateBy
>
0
)
{
query
.
CreateBy
=
base
.
UserInfo
.
Id
;
}
var
list
=
customerModule
.
GetCustomerListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
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