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
05a239d6
Commit
05a239d6
authored
Dec 16, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
fb746447
fe8707c2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
212 additions
and
28 deletions
+212
-28
UserReidsCache.cs
Edu.Cache/User/UserReidsCache.cs
+2
-1
AppletCustomerInfo.cs
Edu.Common/API/AppletCustomerInfo.cs
+5
-0
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+10
-0
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+5
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+6
-5
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+61
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+35
-10
B2BAppController.cs
Edu.WebApi/Controllers/B2BApp/B2BAppController.cs
+3
-3
CustomerStudentController.cs
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
+75
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+10
-9
No files found.
Edu.Cache/User/UserReidsCache.cs
View file @
05a239d6
...
...
@@ -231,7 +231,8 @@ namespace Edu.Cache.User
Blacklist
=
0
,
GroupId
=
umodel
.
Group_Id
,
IsAdmin
=
0
,
AdminId
=
0
AdminId
=
0
,
SaleId
=
umodel
.
CreateBy
};
AppletCustomerSet
(
CacheKey
.
AppletB2B_Login_Info_
+
CustomerId
,
userInfo
,
Config
.
JwtExpirTime
);
}
...
...
Edu.Common/API/AppletCustomerInfo.cs
View file @
05a239d6
...
...
@@ -97,5 +97,10 @@ namespace Edu.Common.API
/// 小程序管理员编号
/// </summary>
public
int
AdminId
{
get
;
set
;
}
/// <summary>
/// 同行对应的销售编号
/// </summary>
public
int
SaleId
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Student.cs
View file @
05a239d6
...
...
@@ -191,5 +191,15 @@ namespace Edu.Model.Entity.User
/// 第三方平台名称
/// </summary>
public
string
PlatformName
{
get
;
set
;
}
/// <summary>
/// QQ号码
/// </summary>
public
string
QQ
{
get
;
set
;
}
/// <summary>
/// 微信号
/// </summary>
public
string
WeChatNo
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
05a239d6
...
...
@@ -229,5 +229,10 @@ namespace Edu.Model.ViewModel.User
/// 归属类型(1-全部,2-我负责的,3-我协同的)
/// </summary>
public
int
BelongType
{
get
;
set
;
}
/// <summary>
/// 操作类型(1-ERP后台操作,2-App小程序操作)
/// </summary>
public
int
OperateType
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
05a239d6
...
...
@@ -4866,9 +4866,9 @@ namespace Edu.Module.Course
QOrderGuestIds
=
guestIds
})?.
OrderByDescending
(
qitem
=>
qitem
.
ClassDate
)?.
ToList
();
var
groupList
=
checkList
.
GroupBy
(
qitem
=>
new
{
qitem
.
OrderId
,
qitem
.
ClassName
,
qitem
.
CourseName
,
qitem
.
RoomName
,
qitem
.
TeacherName
,
qitem
.
TeacherHead
})
var
groupList
=
checkList
.
GroupBy
(
qitem
=>
new
{
qitem
.
OrderId
,
qitem
.
ClassName
,
qitem
.
CourseName
,
})
.
OrderByDescending
(
qitem
=>
qitem
.
Key
.
OrderId
)
.
Select
(
qitem
=>
new
{
qitem
.
Key
.
OrderId
,
qitem
.
Key
.
ClassName
,
qitem
.
Key
.
CourseName
,
qitem
.
Key
.
RoomName
,
qitem
.
Key
.
TeacherName
,
qitem
.
Key
.
TeacherHead
});
.
Select
(
qitem
=>
new
{
qitem
.
Key
.
OrderId
,
qitem
.
Key
.
ClassName
,
qitem
.
Key
.
CourseName
});
foreach
(
var
item
in
groupList
)
{
List
<
object
>
subList
=
new
List
<
object
>();
...
...
@@ -4879,9 +4879,7 @@ namespace Edu.Module.Course
item
.
OrderId
,
item
.
ClassName
,
item
.
CourseName
,
item
.
RoomName
,
item
.
TeacherName
,
item
.
TeacherHead
,
TotalHours
=
tempOrder
?.
TotalHours
??
0
,
CompleteHours
=
tempOrder
?.
CompleteHours
??
0
,
SubList
=
tempSubList
?.
Select
(
qitem
=>
new
...
...
@@ -4889,6 +4887,9 @@ namespace Edu.Module.Course
ClassData
=
Common
.
ConvertHelper
.
FormatDate2
(
qitem
.
ClassDate
),
qitem
.
StartTime
,
qitem
.
EndTime
,
qitem
.
TeacherName
,
qitem
.
TeacherHead
,
qitem
.
RoomName
,
}),
});
}
...
...
Edu.Module.Customer/CustomerStudentModule.cs
View file @
05a239d6
...
...
@@ -69,6 +69,11 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_StageRepository
stageRepository
=
new
RB_StageRepository
();
/// <summary>
/// 客户类型仓储层对象
/// </summary>
private
readonly
RB_Student_TypeRepository
student_TypeRepository
=
new
RB_Student_TypeRepository
();
#
region
学员约访
...
...
@@ -720,5 +725,61 @@ namespace Edu.Module.Customer
bool
flag
=
stageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Stage
.
Id
),
Id
));
return
flag
;
}
/// <summary>
/// 获取客户类型列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Type_Extend
>
GetStudentTypeListModule
(
RB_Student_Type_Extend
query
)
{
var
list
=
student_TypeRepository
.
GetStudentTypeListRepository
(
query
);
return
list
;
}
/// <summary>
/// 新增修改客户类型
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStudentTypeModule
(
RB_Student_Type_Extend
model
)
{
bool
flag
=
false
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Type_Extend
.
No
),
model
.
No
},
{
nameof
(
RB_Student_Type_Extend
.
Name
),
model
.
Name
},
{
nameof
(
RB_Student_Type_Extend
.
Info
),
model
.
Info
},
{
nameof
(
RB_Student_Type_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Student_Type_Extend
.
UpdateTime
),
model
.
UpdateTime
},
};
flag
=
student_TypeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Type_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
student_TypeRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 删除客户类型
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemodeStudentTypeModule
(
int
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Type_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
bool
flag
=
student_TypeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Stage
.
Id
),
Id
));
return
flag
;
}
}
}
Edu.Repository/User/RB_StudentRepository.cs
View file @
05a239d6
...
...
@@ -357,6 +357,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
logContent
+=
string
.
Format
(
"客人来源:由【{0}】=>【{1}】,"
,
oldModel
.
CreateType
.
ToName
(),
model
.
CreateType
.
ToName
());
}
if
(
oldModel
.
StuSourceId
!=
model
.
StuSourceId
)
{
string
oldName
=
""
;
...
...
@@ -379,6 +380,20 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
}
logContent
+=
string
.
Format
(
"来源人:由【{0}】=>【{1}】,"
,
oldName
,
newName
);
}
if
(
oldModel
.
CustomerId
!=
model
.
CustomerId
)
{
string
oldName
=
customerRepository
.
GetEntity
(
oldModel
.
CustomerId
)?.
CustomerName
??
""
;
string
newName
=
customerRepository
.
GetEntity
(
model
.
CustomerId
)?.
CustomerName
??
""
;
logContent
+=
string
.
Format
(
"同行:由【{0}】=>【{1}】,"
,
oldName
,
newName
);
}
if
(
oldModel
.
QQ
!=
model
.
QQ
)
{
logContent
+=
string
.
Format
(
"QQ:由【{0}】=>【{1}】,"
,
oldModel
.
QQ
,
model
.
QQ
);
}
if
(
oldModel
.
WeChatNo
!=
model
.
WeChatNo
)
{
logContent
+=
string
.
Format
(
"微信号:由【{0}】=>【{1}】,"
,
oldModel
.
WeChatNo
,
model
.
WeChatNo
);
}
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
StuName
),
model
.
StuName
.
Trim
()
},
...
...
@@ -389,23 +404,33 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
nameof
(
RB_Student_ViewModel
.
ProviceId
),
model
.
ProviceId
},
{
nameof
(
RB_Student_ViewModel
.
CityId
),
model
.
CityId
},
{
nameof
(
RB_Student_ViewModel
.
AreaId
),
model
.
AreaId
},
{
nameof
(
RB_Student_ViewModel
.
Interest
),
model
.
Interest
},
{
nameof
(
RB_Student_ViewModel
.
JapanBaseInfo
),
model
.
JapanBaseInfo
},
{
nameof
(
RB_Student_ViewModel
.
StuProfession
),
model
.
StuProfession
},
{
nameof
(
RB_Student_ViewModel
.
StuEducation
),
model
.
StuEducation
},
{
nameof
(
RB_Student_ViewModel
.
StuPurpose
),
model
.
StuPurpose
},
{
nameof
(
RB_Student_ViewModel
.
StuSource
),
model
.
StuSource
},
{
nameof
(
RB_Student_ViewModel
.
StuAddress
),
model
.
StuAddress
},
{
nameof
(
RB_Student_ViewModel
.
StuContract
),
model
.
StuContract
},
{
nameof
(
RB_Student_ViewModel
.
StuContractMobile
),
model
.
StuContractMobile
},
{
nameof
(
RB_Student_ViewModel
.
StuIDCard
),
model
.
StuIDCard
},
{
nameof
(
RB_Student_ViewModel
.
StuIDCardAddress
),
model
.
StuIDCardAddress
},
{
nameof
(
RB_Student_ViewModel
.
StuStage
),
model
.
StuStage
},
{
nameof
(
RB_Student_ViewModel
.
StuChannel
),
model
.
StuChannel
},
{
nameof
(
RB_Student_ViewModel
.
PlatformName
),
model
.
PlatformName
},
{
nameof
(
RB_Student_ViewModel
.
CreateType
),
model
.
CreateType
},
{
nameof
(
RB_Student_ViewModel
.
StuSourceId
),
model
.
StuSourceId
}
{
nameof
(
RB_Student_ViewModel
.
CustomerId
),
model
.
CustomerId
},
{
nameof
(
RB_Student_ViewModel
.
QQ
),
model
.
QQ
},
{
nameof
(
RB_Student_ViewModel
.
WeChatNo
),
model
.
WeChatNo
},
};
//教育后台操作
if
(
model
.
OperateType
==
1
)
{
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuSourceId
),
model
.
StuSourceId
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuStage
),
model
.
StuStage
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuChannel
),
model
.
StuChannel
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
PlatformName
),
model
.
PlatformName
);
}
//App小程序操作
else
{
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuAddress
),
model
.
StuAddress
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuContract
),
model
.
StuContract
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuContractMobile
),
model
.
StuContractMobile
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuIDCard
),
model
.
StuIDCard
);
fileds
.
Add
(
nameof
(
RB_Student_ViewModel
.
StuIDCardAddress
),
model
.
StuIDCardAddress
);
}
flag
=
base
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
model
.
StuId
));
createBy
=
model
.
UpdateBy
;
}
...
...
Edu.WebApi/Controllers/B2BApp/B2BAppController.cs
View file @
05a239d6
...
...
@@ -62,8 +62,8 @@ namespace Edu.WebApi.Controllers.B2BApp
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
Q_StudentId
=
base
.
ParmJObj
.
GetInt
(
"Q_StudentId"
),
};
//
query.Q_StudentId = 0;
//
query.CustomerId = 0;
query
.
Q_StudentId
=
0
;
query
.
CustomerId
=
0
;
var
list
=
orderModule
.
GetMyOrderPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
List
<
RB_Class_Time_ViewModel
>
timeList
=
new
List
<
RB_Class_Time_ViewModel
>();
List
<
RB_Customer_BalanceDetail_ViewModel
>
balanceList
=
new
List
<
RB_Customer_BalanceDetail_ViewModel
>();
...
...
@@ -126,7 +126,7 @@ namespace Edu.WebApi.Controllers.B2BApp
{
var
customer
=
base
.
AppletCustomerInfo
;
int
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
);
//
StuId = 0;
StuId
=
0
;
var
obj
=
classModule
.
AppCustomerGetClassPlan
(
StuId
);
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
View file @
05a239d6
...
...
@@ -561,5 +561,80 @@ namespace Edu.WebApi.Controllers.Customer
bool
flag
=
customerStudentModule
.
RemodeStageModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取客户类型列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentTypeList
()
{
var
query
=
new
RB_Student_Type_Extend
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
};
var
list
=
customerStudentModule
.
GetStudentTypeListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取客户类型下拉列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentTypeDropdownList
()
{
var
query
=
new
RB_Student_Type_Extend
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
};
var
list
=
customerStudentModule
.
GetStudentTypeListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
.
Select
(
qitem
=>
new
{
Id
=
qitem
.
Id
,
Name
=
qitem
.
Name
}));
}
/// <summary>
/// 新增修改客户类型
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentType
()
{
var
model
=
new
RB_Student_Type_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
Name
=
base
.
ParmJObj
.
GetStringValue
(
"Name"
),
Info
=
base
.
ParmJObj
.
GetStringValue
(
"Info"
),
No
=
base
.
ParmJObj
.
GetInt
(
"No"
),
};
if
(
model
.
No
<=
0
)
{
return
ApiResult
.
Failed
(
message
:
"请填写排序编号!"
);
}
if
(
string
.
IsNullOrEmpty
(
model
.
Name
))
{
return
ApiResult
.
Failed
(
message
:
"请填写类型名称!"
);
}
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
UpdateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
bool
flag
=
customerStudentModule
.
SetStudentTypeModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号删除客户类型
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemodeStudentType
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
bool
flag
=
customerStudentModule
.
RemodeStudentTypeModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
}
Edu.WebApi/Controllers/User/UserController.cs
View file @
05a239d6
...
...
@@ -792,8 +792,10 @@ namespace Edu.WebApi.Controllers.User
PlatformName
=
base
.
ParmJObj
.
GetStringValue
(
"PlatformName"
),
CreateType
=(
StuCreateTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CreateType"
),
StuSourceId
=
base
.
ParmJObj
.
GetInt
(
"StuSourceId"
),
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
};
if
(
string
.
IsNullOrEmpty
(
extModel
.
StuTel
))
{
return
ApiResult
.
Failed
(
"请填写手机号码!"
);
...
...
@@ -811,8 +813,9 @@ namespace Edu.WebApi.Controllers.User
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
CustomerId
=
0
;
extModel
.
IsDisable
=
1
;
extModel
.
OperateType
=
1
;
if
(
studentModule
.
CheckStudentModule
(
extModel
))
{
return
ApiResult
.
Failed
(
"此学员手机号已绑定同行!请重新录入!"
);
...
...
@@ -895,23 +898,21 @@ namespace Edu.WebApi.Controllers.User
StuContractMobile
=
base
.
ParmJObj
.
GetStringValue
(
"StuContractMobile"
),
StuIDCard
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCard"
),
StuIDCardAddress
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCardAddress"
),
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
};
extModel
.
CreateType
=
StuCreateTypeEnum
.
CustomerInput
;
if
(
extModel
.
StuId
==
0
)
{
extModel
.
StuStage
=
1
;
}
extModel
.
Status
=
DateStateEnum
.
Normal
;
extModel
.
StuStatus
=
1
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
var
customer
=
base
.
AppletCustomerInfo
;
extModel
.
CreateBy
=
0
;
extModel
.
UpdateBy
=
0
;
extModel
.
CreateBy
=
customer
.
SaleId
;
extModel
.
UpdateBy
=
customer
.
SaleId
;
extModel
.
Group_Id
=
customer
.
GroupId
;
extModel
.
CustomerId
=
customer
.
CustomerId
;
extModel
.
IsDisable
=
1
;
extModel
.
OperateType
=
2
;
if
(
studentModule
.
CheckStudentModule
(
extModel
))
{
return
ApiResult
.
Failed
(
"此学员手机号已绑定同行!请重新录入!"
);
...
...
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