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
ee71389f
Commit
ee71389f
authored
Feb 24, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0f91ea8f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
363 additions
and
91 deletions
+363
-91
RB_Consultant_Data_Extend.cs
...del/ViewModel/DataStatistics/RB_Consultant_Data_Extend.cs
+11
-0
CustomerModule.cs
Edu.Module.Customer/CustomerModule.cs
+44
-5
MarketConsultantModule.cs
Edu.Module.Customer/MarketConsultantModule.cs
+111
-43
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+21
-5
B2BCustomerController.cs
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
+28
-14
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+148
-24
No files found.
Edu.Model/ViewModel/DataStatistics/RB_Consultant_Data_Extend.cs
View file @
ee71389f
using
Edu.Model.Entity.DataStatistics
;
using
Edu.Model.ViewModel.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
...
...
@@ -24,5 +25,15 @@ namespace Edu.Model.ViewModel.DataStatistics
/// 创建人
/// </summary>
public
string
QCreateByIds
{
get
;
set
;
}
/// <summary>
/// 本周学员名单
/// </summary>
public
List
<
RB_Student_ViewModel
>
CurWeekStuList
{
get
;
set
;
}
/// <summary>
/// 本月学员名单
/// </summary>
public
List
<
RB_Student_ViewModel
>
CurMonthStuList
{
get
;
set
;
}
}
}
Edu.Module.Customer/CustomerModule.cs
View file @
ee71389f
...
...
@@ -352,12 +352,15 @@ namespace Edu.Module.Customer
var
empName
=
UserReidsCache
.
GetUserLoginInfo
(
empId
)?.
AccountName
??
""
;
foreach
(
var
item
in
clist
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Customer_Extend
.
CreateBy
),
empId
},
{
nameof
(
RB_Customer_Extend
.
UpdateTime
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Customer_Extend
.
CustomerId
),
FiledValue
=
item
.
CustomerId
,
OperatorEnum
=
OperatorEnum
.
Equal
...
...
@@ -576,6 +579,42 @@ namespace Edu.Module.Customer
return
list
;
}
/// <summary>
/// 检测同行联系人是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
CheckCustomerModule
(
RB_Customer_Extend
model
,
int
checkType
)
{
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>
{
new
WhereHelper
(
nameof
(
RB_Customer_Extend
.
Status
),
0
),
new
WhereHelper
(
nameof
(
RB_Customer_Extend
.
Group_Id
),
model
.
Group_Id
)
};
if
(
checkType
==
1
&&!
string
.
IsNullOrEmpty
(
model
.
ContactNumber
))
{
list
.
Add
(
new
WhereHelper
(
nameof
(
RB_Customer_Extend
.
ContactNumber
),
model
.
ContactNumber
));
}
if
(
checkType
==
2
&&
!
string
.
IsNullOrEmpty
(
model
.
QQ
))
{
list
.
Add
(
new
WhereHelper
(
nameof
(
RB_Customer_Extend
.
QQ
),
model
.
QQ
));
}
if
(
checkType
==
3
&&
!
string
.
IsNullOrEmpty
(
model
.
WeChatNo
))
{
list
.
Add
(
new
WhereHelper
(
nameof
(
RB_Customer_Extend
.
WeChatNo
),
model
.
WeChatNo
));
}
if
(
model
.
CustomerId
>
0
)
{
list
.
Add
(
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Customer_Category_Extend
.
CategoryId
),
FiledValue
=
model
.
CustomerId
,
OperatorEnum
=
OperatorEnum
.
NotEqual
});
}
return
customerRepository
.
Exists
(
list
);
}
/// <summary>
/// 检测同行是否存在
/// </summary>
...
...
Edu.Module.Customer/MarketConsultantModule.cs
View file @
ee71389f
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_StudentRepository.cs
View file @
ee71389f
...
...
@@ -60,12 +60,17 @@ namespace Edu.Repository.User
/// </summary>
private
readonly
RB_NeedsRepository
needsRepository
=
new
RB_NeedsRepository
();
/// <summary>
/// 学员协助人员仓储层对象
/// </summary>
private
readonly
RB_Student_AssistRepository
student_AssistRepository
=
new
RB_Student_AssistRepository
();
/// <summary>
/// 获取学生列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetStudentListRepository
(
RB_Student_ViewModel
query
,
bool
isQueryCreateType
=
false
)
public
List
<
RB_Student_ViewModel
>
GetStudentListRepository
(
RB_Student_ViewModel
query
,
bool
isQueryCreateType
=
false
,
bool
isQueryAssist
=
false
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
...
...
@@ -140,7 +145,7 @@ WHERE 1=1
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QCreateBys
))
{
builder
.
AppendFormat
(
@" AND (t.CreateBy IN({0}) OR t.StuId IN(SELECT StuId FROM rb_student_assist WHERE AssistId IN({0}) AND `Status`= 0) ) "
,
query
.
QCreateBys
);
}
//根据订单编号查询学员
if
(!
string
.
IsNullOrEmpty
(
query
.
QOrderIds
))
...
...
@@ -167,7 +172,6 @@ WHERE 1=1
List
<
RB_Account_ViewModel
>
accountList
=
new
List
<
RB_Account_ViewModel
>();
if
(
stuList
!=
null
&&
stuList
.
Count
>
0
)
{
List
<
int
>
customerIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
stuList
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
customerIdList
!=
null
&&
customerIdList
.
Count
>
0
)
{
...
...
@@ -223,6 +227,18 @@ WHERE 1=1
}
}
}
if
(
isQueryAssist
)
{
if
(
stuList
!=
null
&&
stuList
.
Count
>
0
)
{
string
stuIds
=
string
.
Join
(
","
,
stuList
.
Select
(
qitem
=>
qitem
.
StuId
));
List
<
RB_Student_Assist_Extend
>
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
QStuIds
=
stuIds
});
foreach
(
var
item
in
stuList
)
{
item
.
AssistList
=
assistList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
()
??
new
List
<
RB_Student_Assist_Extend
>();
}
}
}
return
stuList
;
}
...
...
@@ -290,7 +306,7 @@ WHERE 1=1
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StuTel
))
{
builder
.
AppendFormat
(
" AND t.{0} LIKE @StuTel "
,
nameof
(
RB_Student_ViewModel
.
Stu
Tel
));
builder
.
AppendFormat
(
" AND t.{0} LIKE @StuTel "
,
nameof
(
RB_Student_ViewModel
.
Stu
RealMobile
));
parameters
.
Add
(
"StuTel"
,
"%"
+
query
.
StuTel
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
QQ
))
...
...
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
View file @
ee71389f
...
...
@@ -102,9 +102,9 @@ namespace Edu.WebApi.Controllers.Customer
{
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
),
CustomerName
=
base
.
ParmJObj
.
GetStringValue
(
"CustomerName"
),
ContactNumber
=
base
.
ParmJObj
.
GetStringValue
(
"ContactNumber"
),
ContactNumber
=
base
.
ParmJObj
.
GetStringValue
(
"ContactNumber"
)
.
Trim
()
,
Fax
=
base
.
ParmJObj
.
GetStringValue
(
"Fax"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
)
.
Trim
()
,
Email
=
base
.
ParmJObj
.
GetStringValue
(
"Email"
),
Address
=
base
.
ParmJObj
.
GetStringValue
(
"Address"
),
Sex
=
base
.
ParmJObj
.
GetInt
(
"Sex"
),
...
...
@@ -120,9 +120,19 @@ namespace Edu.WebApi.Controllers.Customer
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
EnterpriseName
=
base
.
ParmJObj
.
GetStringValue
(
"EnterpriseName"
),
CustomerType
=
(
CatetoryTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CustomerType"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
)
.
Trim
()
,
CategoryId
=
base
.
ParmJObj
.
GetInt
(
"CategoryId"
),
};
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
UpdateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
base
.
UserInfo
.
School_Id
;
model
.
ApproveState
=
1
;
model
.
ApproveId
=
base
.
UserInfo
.
Id
;
model
.
ApproveTime
=
DateTime
.
Now
;
model
.
CustomerState
=
CustomerStateEnum
.
Normal
;
if
(
string
.
IsNullOrEmpty
(
model
.
CustomerName
))
{
return
ApiResult
.
ParamIsNull
(
message
:
"请填写客户名称!"
);
...
...
@@ -133,6 +143,18 @@ namespace Edu.WebApi.Controllers.Customer
return
ApiResult
.
Failed
(
"手机号码、QQ号码、微信号码至少填写一项!"
);
}
if
(!
string
.
IsNullOrEmpty
(
model
.
ContactNumber
)
&&
customerModule
.
CheckCustomerModule
(
model
,
1
))
{
return
ApiResult
.
Failed
(
"此联系人手机号码已注册!"
);
}
if
(!
string
.
IsNullOrEmpty
(
model
.
QQ
)
&&
customerModule
.
CheckCustomerModule
(
model
,
2
))
{
return
ApiResult
.
Failed
(
"此联系人QQ号码已注册!"
);
}
if
(!
string
.
IsNullOrEmpty
(
model
.
WeChatNo
)
&&
customerModule
.
CheckCustomerModule
(
model
,
3
))
{
return
ApiResult
.
Failed
(
"此联系人微信号已注册!"
);
}
var
categoryModel
=
new
RB_Customer_Category_Extend
()
{
CategoryId
=
0
,
...
...
@@ -152,16 +174,7 @@ namespace Edu.WebApi.Controllers.Customer
model
.
CategoryId
=
categoryModel
.
CategoryId
;
}
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
UpdateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
base
.
UserInfo
.
School_Id
;
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
();
}
...
...
@@ -928,6 +941,7 @@ namespace Edu.WebApi.Controllers.Customer
{
item
.
CategoryId
,
item
.
CategoryName
,
item
.
CreateBy
,
CreateByName
=
item
.
CreateByName
,
item
.
CatetoryType
,
item
.
LinkManCount
,
...
...
@@ -1053,7 +1067,7 @@ namespace Edu.WebApi.Controllers.Customer
var
extModel
=
new
RB_Customer_Category_Extend
()
{
CategoryId
=
CategoryId
,
CategoryName
=
base
.
ParmJObj
.
GetStringValue
(
"CategoryName"
),
CategoryName
=
base
.
ParmJObj
.
GetStringValue
(
"CategoryName"
)
.
Trim
()
,
CatetoryType
=
(
CatetoryTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CatetoryType"
),
};
var
linkMan
=
base
.
ParmJObj
.
GetStringValue
(
"linkMan"
);
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
ee71389f
This diff is collapsed.
Click to expand it.
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