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
fd29a639
Commit
fd29a639
authored
Dec 03, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
5f820cdf
d80d6426
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
1237 additions
and
356 deletions
+1237
-356
ClassStyleEnum.cs
Edu.Common/Enum/Course/ClassStyleEnum.cs
+55
-0
StringHelper.cs
Edu.Common/Plugin/StringHelper.cs
+1
-146
RB_Class.cs
Edu.Model/Entity/Course/RB_Class.cs
+66
-0
RB_Class_Plan.cs
Edu.Model/Entity/Course/RB_Class_Plan.cs
+39
-0
RB_Class_Room.cs
Edu.Model/Entity/Course/RB_Class_Room.cs
+59
-0
RB_Class_StepPrice.cs
Edu.Model/Entity/Course/RB_Class_StepPrice.cs
+35
-0
RB_Class_Time.cs
Edu.Model/Entity/Course/RB_Class_Time.cs
+33
-0
RB_Course.cs
Edu.Model/Entity/Course/RB_Course.cs
+47
-2
RB_Course_StepPrice.cs
Edu.Model/Entity/Course/RB_Course_StepPrice.cs
+33
-0
RB_Notice_Dept.cs
Edu.Model/Entity/User/RB_Notice_Dept.cs
+30
-0
RB_Class_Plan_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
+15
-0
RB_Class_Room_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Room_ViewModel.cs
+12
-0
RB_Class_StepPrice_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_StepPrice_ViewModel.cs
+18
-0
RB_Class_Time_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Time_ViewModel.cs
+15
-0
RB_Class_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
+6
-0
RB_Course_StepPrice_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_StepPrice_ViewModel.cs
+15
-0
RB_Course_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_ViewModel.cs
+6
-0
DepartmentTree_ViewModel.cs
Edu.Model/ViewModel/User/DepartmentTree_ViewModel.cs
+10
-0
RB_Notice_ViewModel.cs
Edu.Model/ViewModel/User/RB_Notice_ViewModel.cs
+10
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+21
-3
ClassRoomModule.cs
Edu.Module.Course/ClassRoomModule.cs
+68
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+48
-3
MsgLogModule.cs
Edu.Module.System/MsgLogModule.cs
+4
-23
DepartmentModule.cs
Edu.Module.User/DepartmentModule.cs
+15
-65
NoticeModule.cs
Edu.Module.User/NoticeModule.cs
+107
-2
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+41
-0
RB_Class_RoomRepository.cs
Edu.Repository/Course/RB_Class_RoomRepository.cs
+85
-0
RB_Class_StepPriceRepository.cs
Edu.Repository/Course/RB_Class_StepPriceRepository.cs
+43
-0
RB_Class_TimeRepository.cs
Edu.Repository/Course/RB_Class_TimeRepository.cs
+42
-0
RB_Course_StepPriceRepository.cs
Edu.Repository/Course/RB_Course_StepPriceRepository.cs
+53
-0
RB_DepartmentRepository.cs
Edu.Repository/User/RB_DepartmentRepository.cs
+4
-0
RB_NoticeRepository.cs
Edu.Repository/User/RB_NoticeRepository.cs
+69
-1
RB_Notice_DeptRepository.cs
Edu.Repository/User/RB_Notice_DeptRepository.cs
+42
-0
Edu.ThirdCore.csproj
Edu.ThirdCore/Edu.ThirdCore.csproj
+4
-0
MessageCore.cs
Edu.ThirdCore/Message/MessageCore.cs
+18
-79
QueueHelper.cs
Edu.ThirdCore/Message/QueueHelper.cs
+1
-1
SMSService.cs
Edu.ThirdCore/Message/SMSService.cs
+29
-23
MsgController.cs
Edu.WebApi/Controllers/Public/MsgController.cs
+8
-6
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+30
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+0
-1
WorkFlowController.cs
Edu.WebApi/Controllers/User/WorkFlowController.cs
+0
-1
No files found.
Edu.Common/Enum/Course/ClassStyleEnum.cs
0 → 100644
View file @
fd29a639
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Course
{
/// <summary>
/// 排课方式枚举
/// </summary>
public
enum
ClassStyleEnum
{
/// <summary>
/// 按周排课
/// </summary>
[
EnumField
(
"按周排课"
)]
Week
=
1
,
/// <summary>
/// 按月排课
/// </summary>
[
EnumField
(
"按月排课"
)]
Month
=
2
,
/// <summary>
/// 固定日期
/// </summary>
[
EnumField
(
"固定日期"
)]
FixedDate
=
3
,
/// <summary>
/// 约课
/// </summary>
[
EnumField
(
"约课"
)]
OnLine
=
4
,
}
/// <summary>
/// 课程状态枚举
/// </summary>
public
enum
ClassStatusEnum
{
/// <summary>
/// 开课中
/// </summary>
[
EnumField
(
"开课中"
)]
OpenClass
=
1
,
/// <summary>
/// 节课
/// </summary>
[
EnumField
(
"节课"
)]
CloseClass
=
2
,
}
}
Edu.Common/Plugin/StringHelper.cs
View file @
fd29a639
...
...
@@ -175,25 +175,6 @@ namespace Edu.Common.Plugin
return
""
;
}
/// <summary>
/// 时间戳转换为时间
/// </summary>
/// <param name="ticks"></param>
/// <returns></returns>
public
static
DateTime
GetDateTimeByTicks
(
string
ticks
)
{
try
{
DateTime
startTime
=
TimeZone
.
CurrentTimeZone
.
ToLocalTime
(
new
System
.
DateTime
(
1970
,
1
,
1
));
// 当地时区
DateTime
dt
=
startTime
.
AddMilliseconds
(
long
.
Parse
(
ticks
));
return
dt
;
}
catch
(
Exception
)
{
return
new
DateTime
(
1970
,
1
,
1
);
}
}
/// <summary>
/// 获取年份月份中的最后一天
/// </summary>
...
...
@@ -205,25 +186,6 @@ namespace Edu.Common.Plugin
return
new
DateTime
(
year
,
month
,
1
).
AddMonths
(
1
).
AddDays
(-
1
);
}
/// <summary>
/// 是否为日期+时间型字符串
/// </summary>
/// <param name="StrSource"></param>
/// <returns></returns>
public
static
bool
IsDateTime
(
object
StrSource
)
{
DateTime
dt
=
DateTime
.
Now
;
if
(
DateTime
.
TryParse
(
StrSource
.
ToString
(),
out
dt
))
{
return
true
;
}
else
{
return
false
;
}
}
/// <summary>
/// 时间
/// </summary>
...
...
@@ -620,17 +582,6 @@ namespace Edu.Common.Plugin
return
Encoding
.
Default
.
GetString
(
Byt
);
}
/// <summary>
/// 截取指定长度HTML内容 (该方法未完成)
/// </summary>
/// <param name="html"></param>
/// <param name="len"></param>
/// <returns></returns>
public
static
string
SubstringHTML
(
string
html
,
int
len
)
{
return
""
;
}
/// <summary>
/// 截取指定长度字符
/// </summary>
...
...
@@ -1170,77 +1121,6 @@ namespace Edu.Common.Plugin
#
endregion
#
region
Url
获取
Get
参数
/// <summary>
/// 将查询字符串解析转换为名值集合.
/// </summary>
/// <param name="queryString"></param>
/// <returns></returns>
public
static
NameValueCollection
GetQueryString
(
string
queryString
)
{
return
GetQueryString
(
queryString
,
null
,
true
);
}
/// <summary>
/// 将查询字符串解析转换为名值集合.
/// </summary>
/// <param name="queryString"></param>
/// <param name="encoding"></param>
/// <param name="isEncoded"></param>
/// <returns></returns>
public
static
NameValueCollection
GetQueryString
(
string
queryString
,
Encoding
encoding
,
bool
isEncoded
)
{
queryString
=
queryString
.
TrimStart
(
'?'
);
NameValueCollection
result
=
new
NameValueCollection
(
StringComparer
.
OrdinalIgnoreCase
);
if
(!
string
.
IsNullOrEmpty
(
queryString
))
{
int
count
=
queryString
.
Length
;
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
int
startIndex
=
i
;
int
index
=
-
1
;
while
(
i
<
count
)
{
char
item
=
queryString
[
i
];
if
(
item
==
'='
)
{
if
(
index
<
0
)
{
index
=
i
;
}
}
else
if
(
item
==
'&'
)
{
break
;
}
i
++;
}
string
key
=
null
;
string
value
=
null
;
if
(
index
>=
0
)
{
key
=
queryString
.
Substring
(
startIndex
,
index
-
startIndex
);
value
=
queryString
.
Substring
(
index
+
1
,
(
i
-
index
)
-
1
);
}
else
{
key
=
queryString
.
Substring
(
startIndex
,
i
-
startIndex
);
}
if
(
isEncoded
)
{
result
[
MyUrlDeCode
(
key
,
encoding
)]
=
MyUrlDeCode
(
value
,
encoding
);
}
else
{
result
[
key
]
=
value
;
}
if
((
i
==
(
count
-
1
))
&&
(
queryString
[
i
]
==
'&'
))
{
result
[
key
]
=
string
.
Empty
;
}
}
}
return
result
;
}
/// <summary>
/// 解码URL.
...
...
@@ -1384,7 +1264,7 @@ namespace Edu.Common.Plugin
/// <returns></returns>
public
static
string
GetStarString
(
string
Input
)
{
string
Output
=
""
;
string
Output
;
switch
(
Input
.
Length
)
{
case
1
:
...
...
@@ -1433,31 +1313,6 @@ namespace Edu.Common.Plugin
return
str
;
}
/// <summary>
/// 获取缓存时间
/// </summary>
/// <returns></returns>
public
static
string
GetCacheDateTime
()
{
string
str
=
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmm"
);
int
lastM
=
Convert
.
ToInt32
(
str
.
Substring
(
str
.
Length
-
1
,
1
));
string
mType
=
"0"
;
if
(
lastM
>=
0
&&
lastM
<=
3
)
{
mType
=
"0"
;
}
if
(
lastM
>=
4
&&
lastM
<=
6
)
{
mType
=
"1"
;
}
if
(
lastM
>=
7
&&
lastM
<=
9
)
{
mType
=
"2"
;
}
string
newStr
=
str
.
Substring
(
0
,
str
.
Length
-
1
)
+
mType
;
return
newStr
;
}
/// <summary>
/// 繁体字转简体
/// </summary>
...
...
Edu.Model/Entity/Course/RB_Class.cs
View file @
fd29a639
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
System
;
using
VT.FW.DB
;
...
...
@@ -70,5 +71,70 @@ namespace Edu.Model.Entity.Course
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 招生人数
/// </summary>
public
int
ClassPersion
{
get
;
set
;
}
/// <summary>
/// 开班时间
/// </summary>
public
DateTime
OpenTime
{
get
;
set
;
}
/// <summary>
/// 截止报名时间
/// </summary>
public
DateTime
?
EndOrderTime
{
get
;
set
;
}
/// <summary>
/// 原价
/// </summary>
public
decimal
OriginalPrice
{
get
;
set
;
}
/// <summary>
/// 售价
/// </summary>
public
decimal
SellPrice
{
get
;
set
;
}
/// <summary>
/// 是否阶梯价(1-是)
/// </summary>
public
int
IsStepPrice
{
get
;
set
;
}
/// <summary>
/// 教室编号
/// </summary>
public
int
ClassRoomId
{
get
;
set
;
}
/// <summary>
/// 是否开启提成设置(1-是)
/// </summary>
public
int
IsOpenCommission
{
get
;
set
;
}
/// <summary>
/// 提成类型(1-人头,2-百分比)
/// </summary>
public
int
CommissionType
{
get
;
set
;
}
/// <summary>
/// 提成值
/// </summary>
public
decimal
CommissionValue
{
get
;
set
;
}
/// <summary>
/// 课时
/// </summary>
public
int
ClassHours
{
get
;
set
;
}
/// <summary>
/// 排课方式(1-周,2-月,3-固定日期,4-约课)
/// </summary>
public
ClassStyleEnum
ClassStyle
{
get
;
set
;
}
/// <summary>
/// 班级状态
/// </summary>
public
ClassStatusEnum
ClassStatus
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Class_Plan.cs
0 → 100644
View file @
fd29a639
using
Edu.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 班级上课计划实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Class_Plan
{
/// <summary>
/// 上课计划编号
/// </summary>
public
int
ClassPlanId
{
get
;
set
;
}
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 上课日期
/// </summary>
public
DateTime
ClassDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 教室编号
/// </summary>
public
int
ClassRoomId
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Class_Room.cs
0 → 100644
View file @
fd29a639
using
Edu.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 教室管理实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Class_Room
{
/// <summary>
/// 主键编号
/// </summary>
public
int
RoomId
{
get
;
set
;
}
/// <summary>
/// 教师名称
/// </summary>
public
string
RoomName
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 所属校区
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 更新人
/// </summary>
public
int
?
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Class_StepPrice.cs
0 → 100644
View file @
fd29a639
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 班级阶梯价实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Class_StepPrice
{
/// <summary>
/// 课程阶梯价主键编号
/// </summary>
public
int
ClassStepPriceId
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
int
?
PersionNum
{
get
;
set
;
}
/// <summary>
/// 价格
/// </summary>
public
decimal
PersionPrice
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Class_Time.cs
0 → 100644
View file @
fd29a639
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 班级上课时间实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Class_Time
{
/// <summary>
/// 上课时间编号
/// </summary>
public
int
ClassTimeId
{
get
;
set
;
}
/// <summary>
/// 上课计划编号
/// </summary>
public
int
ClassPlanId
{
get
;
set
;
}
/// <summary>
/// 上课开始时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 上课结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Course.cs
View file @
fd29a639
...
...
@@ -72,13 +72,58 @@ namespace Edu.Model.Entity.Course
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 教师编号
/// 教师编号
[逗号分隔]
/// </summary>
public
int
Teacher_Id
{
get
;
set
;
}
public
string
Teacher_Ids
{
get
;
set
;
}
/// <summary>
/// 是否显示章节编号
/// </summary>
public
int
IsShowChapterNo
{
get
;
set
;
}
/// <summary>
/// 课程特色
/// </summary>
public
string
CourseFeature
{
get
;
set
;
}
/// <summary>
/// 原价
/// </summary>
public
decimal
OriginalPrice
{
get
;
set
;
}
/// <summary>
/// 售价
/// </summary>
public
decimal
SellPrice
{
get
;
set
;
}
/// <summary>
/// 是否开启阶梯定价(1-开启)
/// </summary>
public
int
IsOpenStepPrice
{
get
;
set
;
}
/// <summary>
/// 是否可续费课程(1-是)
/// </summary>
public
int
IsRenew
{
get
;
set
;
}
/// <summary>
/// 续费原价
/// </summary>
public
decimal
RenewOgPrice
{
get
;
set
;
}
/// <summary>
/// 续费售价
/// </summary>
public
decimal
RenewSlPrice
{
get
;
set
;
}
/// <summary>
/// 上架端口(1-内部销售,2-学员App,3-网课端)
/// </summary>
public
string
Saleplat
{
get
;
set
;
}
/// <summary>
/// 是否是K12课程(1-是)
/// </summary>
public
int
IsKCourse
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Course_StepPrice.cs
0 → 100644
View file @
fd29a639
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 课程阶梯价格实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_StepPrice
{
/// <summary>
/// 主键
/// </summary>
public
int
CoursePriceId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
int
PersionNum
{
get
;
set
;
}
/// <summary>
/// 售价
/// </summary>
public
decimal
SellPrice
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Notice_Dept.cs
0 → 100644
View file @
fd29a639
using
Edu.Common.Enum
;
using
Edu.Common.Enum.User
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.User
{
/// <summary>
/// 公告部门实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Notice_Dept
{
/// <summary>
/// 主键
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 公告id
/// </summary>
public
int
NoticeId
{
get
;
set
;
}
/// <summary>
/// 部门id
/// </summary>
public
int
DeptId
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 班级上课计划视图实体类
/// </summary>
public
class
RB_Class_Plan_ViewModel
:
RB_Class_Plan
{
/// <summary>
/// 班级编号【查询使用,逗号分隔】
/// </summary>
public
string
QClassIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Class_Room_ViewModel.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 教室管理扩展实体类
/// </summary>
public
class
RB_Class_Room_ViewModel
:
RB_Class_Room
{
}
}
Edu.Model/ViewModel/Course/RB_Class_StepPrice_ViewModel.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 课程阶梯价实体类
/// </summary>
public
class
RB_Class_StepPrice_ViewModel
:
RB_Class_StepPrice
{
/// <summary>
/// 课程编号【查询使用】
/// </summary>
public
string
QClassIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Class_Time_ViewModel.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 班级上课时间视图实体类
/// </summary>
public
class
RB_Class_Time_ViewModel
:
RB_Class_Time
{
/// <summary>
/// 计划编号【查询使用,逗号分隔】
/// </summary>
public
string
QClassPlanIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
View file @
fd29a639
using
System
;
using
System.Collections.Generic
;
namespace
Edu.Model.ViewModel.Course
{
...
...
@@ -62,5 +63,10 @@ namespace Edu.Model.ViewModel.Course
/// 作业数量
/// </summary>
public
int
JobCount
{
get
;
set
;
}
/// <summary>
/// 班级阶梯价列表
/// </summary>
public
List
<
RB_Class_StepPrice_ViewModel
>
ClassStepPriceList
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Course_StepPrice_ViewModel.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 课程阶梯价格扩展实体类
/// </summary>
public
class
RB_Course_StepPrice_ViewModel
:
RB_Course_StepPrice
{
/// <summary>
/// 课程编号
/// </summary>
public
string
QCourseIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Course_ViewModel.cs
View file @
fd29a639
using
Edu.Common
;
using
System
;
using
System.Collections.Generic
;
namespace
Edu.Model.ViewModel.Course
{
...
...
@@ -38,5 +39,10 @@ namespace Edu.Model.ViewModel.Course
/// 分类编号【查询使用】
/// </summary>
public
string
QCateIds
{
get
;
set
;
}
/// <summary>
/// 课程阶梯价格列表
/// </summary>
public
List
<
RB_Course_StepPrice_ViewModel
>
StepPriceList
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/DepartmentTree_ViewModel.cs
View file @
fd29a639
...
...
@@ -23,6 +23,16 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public
int
ParentId
{
get
;
set
;
}
/// <summary>
/// 校区编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 是否校区 1是
/// </summary>
public
int
IsCompany
{
get
;
set
;
}
/// <summary>
/// 下级部门列表
...
...
Edu.Model/ViewModel/User/RB_Notice_ViewModel.cs
View file @
fd29a639
...
...
@@ -19,5 +19,15 @@ namespace Edu.Model.ViewModel.User
/// 文件列表
/// </summary>
public
List
<
FileModel
>
FileList
{
get
;
set
;
}
/// <summary>
/// 排序 1日期升序 2置顶升序
/// </summary>
public
int
OrderBy
{
get
;
set
;
}
/// <summary>
/// 部门id
/// </summary>
public
int
DeptId
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
fd29a639
...
...
@@ -62,8 +62,9 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetClassModule
(
RB_Class_ViewModel
model
)
public
virtual
bool
SetClassModule
(
RB_Class_ViewModel
model
)
{
bool
flag
=
false
;
if
(
model
.
ClassId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
@@ -72,15 +73,32 @@ namespace Edu.Module.Course
{
nameof
(
RB_Class_ViewModel
.
CouseId
),
model
.
CouseId
},
{
nameof
(
RB_Class_ViewModel
.
Teacher_Id
),
model
.
Teacher_Id
},
{
nameof
(
RB_Class_ViewModel
.
Assist_Id
),
model
.
Assist_Id
},
{
nameof
(
RB_Class_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Class_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Class_ViewModel
.
ClassPersion
),
model
.
ClassPersion
},
{
nameof
(
RB_Class_ViewModel
.
OpenTime
),
model
.
OpenTime
},
{
nameof
(
RB_Class_ViewModel
.
EndOrderTime
),
model
.
EndOrderTime
},
{
nameof
(
RB_Class_ViewModel
.
OriginalPrice
),
model
.
OriginalPrice
},
{
nameof
(
RB_Class_ViewModel
.
SellPrice
),
model
.
SellPrice
},
{
nameof
(
RB_Class_ViewModel
.
IsStepPrice
),
model
.
IsStepPrice
},
{
nameof
(
RB_Class_ViewModel
.
ClassRoomId
),
model
.
ClassRoomId
},
{
nameof
(
RB_Class_ViewModel
.
IsOpenCommission
),
model
.
IsOpenCommission
},
{
nameof
(
RB_Class_ViewModel
.
CommissionType
),
model
.
CommissionType
},
{
nameof
(
RB_Class_ViewModel
.
CommissionValue
),
model
.
CommissionValue
},
{
nameof
(
RB_Class_ViewModel
.
ClassHours
),
model
.
ClassHours
},
{
nameof
(
RB_Class_ViewModel
.
ClassStyle
),
model
.
ClassStyle
},
{
nameof
(
RB_Class_ViewModel
.
ClassStatus
),
model
.
ClassStatus
},
};
return
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
model
.
ClassId
));
flag
=
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
model
.
ClassId
));
}
else
{
var
newId
=
classRepository
.
Insert
(
model
);
model
.
ClassId
=
newId
;
return
newId
>
0
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
...
...
Edu.Module.Course/ClassRoomModule.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.ViewModel.Course
;
using
Edu.Repository.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.Course
{
/// <summary>
/// 教师管理处理类
/// </summary>
public
class
ClassRoomModule
{
/// <summary>
/// 教师管理仓储层对象
/// </summary>
private
readonly
RB_Class_RoomRepository
class_RoomRepository
=
new
RB_Class_RoomRepository
();
/// <summary>
/// 获取教室分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Room_ViewModel
>
GetClassRoomPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Class_Room_ViewModel
query
)
{
return
class_RoomRepository
.
GetClassRoomPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 获取教室列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Room_ViewModel
>
GetClassRoomListRepository
(
RB_Class_Room_ViewModel
query
)
{
return
class_RoomRepository
.
GetClassRoomListRepository
(
query
);
}
/// <summary>
/// 新增修改教室
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetClassRoomModule
(
RB_Class_Room_ViewModel
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
RoomId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_Room_ViewModel
.
RoomName
),
extModel
.
RoomName
},
};
flag
=
class_RoomRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Room_ViewModel
.
RoomId
),
extModel
.
RoomId
));
}
else
{
var
newId
=
class_RoomRepository
.
Insert
(
extModel
);
extModel
.
RoomId
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
}
}
Edu.Module.Course/CourseModule.cs
View file @
fd29a639
...
...
@@ -62,6 +62,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
CourseCategoryModule
courseCategoryModule
=
new
CourseCategoryModule
();
/// <summary>
/// 课程阶梯价格仓储层对象
/// </summary>
private
readonly
RB_Course_StepPriceRepository
course_StepPriceRepository
=
new
RB_Course_StepPriceRepository
();
#
region
课程管理
/// <summary>
...
...
@@ -102,16 +107,31 @@ namespace Edu.Module.Course
/// <returns></returns>
public
RB_Course_ViewModel
GetCourseModule
(
object
CourseId
)
{
return
courseRepository
.
GetEntity
<
RB_Course_ViewModel
>(
CourseId
);
var
extModel
=
courseRepository
.
GetEntity
<
RB_Course_ViewModel
>(
CourseId
);
if
(
extModel
!=
null
&&
extModel
.
CourseId
>
0
)
{
var
stepPriceList
=
course_StepPriceRepository
.
GetCourseStepPriceListRepository
(
new
RB_Course_StepPrice_ViewModel
()
{
CourseId
=
extModel
.
CourseId
});
extModel
.
StepPriceList
=
stepPriceList
??
new
List
<
RB_Course_StepPrice_ViewModel
>();
}
return
extModel
;
}
/// <summary>
/// 新增修改课程
/// </summary>
/// <returns></returns>
public
bool
SetCourseModule
(
RB_Course_ViewModel
model
)
public
virtual
bool
SetCourseModule
(
RB_Course_ViewModel
model
)
{
bool
flag
;
if
(
model
.
IsRenew
==
0
)
{
model
.
RenewOgPrice
=
0
;
model
.
RenewSlPrice
=
0
;
}
if
(
model
.
CourseId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
@@ -120,6 +140,18 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_ViewModel
.
CourseName
),
model
.
CourseName
},
{
nameof
(
RB_Course_ViewModel
.
CourseIntro
),
model
.
CourseIntro
},
{
nameof
(
RB_Course_ViewModel
.
CateId
),
model
.
CateId
},
{
nameof
(
RB_Course_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Course_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Course_ViewModel
.
Teacher_Ids
),
model
.
Teacher_Ids
},
{
nameof
(
RB_Course_ViewModel
.
CourseFeature
),
model
.
CourseFeature
},
{
nameof
(
RB_Course_ViewModel
.
OriginalPrice
),
model
.
OriginalPrice
},
{
nameof
(
RB_Course_ViewModel
.
SellPrice
),
model
.
SellPrice
},
{
nameof
(
RB_Course_ViewModel
.
IsOpenStepPrice
),
model
.
IsOpenStepPrice
},
{
nameof
(
RB_Course_ViewModel
.
IsRenew
),
model
.
IsRenew
},
{
nameof
(
RB_Course_ViewModel
.
RenewOgPrice
),
model
.
RenewOgPrice
},
{
nameof
(
RB_Course_ViewModel
.
RenewSlPrice
),
model
.
RenewSlPrice
},
{
nameof
(
RB_Course_ViewModel
.
Saleplat
),
model
.
Saleplat
},
{
nameof
(
RB_Course_ViewModel
.
IsKCourse
),
model
.
IsKCourse
},
};
flag
=
courseRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_ViewModel
.
CourseId
),
model
.
CourseId
));
}
...
...
@@ -129,6 +161,19 @@ namespace Edu.Module.Course
model
.
CourseId
=
newId
;
flag
=
newId
>
0
;
}
//没有设置阶梯价格,删除原来的价格
course_StepPriceRepository
.
DeleteStepPriceRepository
(
model
.
CourseId
);
if
(
model
.
IsOpenStepPrice
==
1
)
{
if
(
model
.
StepPriceList
!=
null
&&
model
.
StepPriceList
.
Count
>
0
)
{
foreach
(
var
item
in
model
.
StepPriceList
)
{
item
.
CourseId
=
model
.
CourseId
;
course_StepPriceRepository
.
Insert
(
item
);
}
}
}
return
flag
;
}
...
...
@@ -158,7 +203,7 @@ namespace Edu.Module.Course
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Course_ViewModel
.
Teacher_Id
),
Teacher_Id
},
{
nameof
(
RB_Course_ViewModel
.
Teacher_Id
s
),
Teacher_Id
},
};
bool
flag
=
courseRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_ViewModel
.
CourseId
),
CourseId
));
return
flag
;
...
...
Edu.Module.System/MsgLogModule.cs
View file @
fd29a639
...
...
@@ -28,8 +28,6 @@ namespace Edu.Module.System
/// </summary>
private
readonly
RB_Msg_BaseTemplateRepository
msgBaseTemplateRepository
=
new
RB_Msg_BaseTemplateRepository
();
#
region
短信记录
/// <summary>
/// 获取发送短信记录信息
...
...
@@ -120,7 +118,6 @@ namespace Edu.Module.System
}
#
endregion
#
region
短信模板配置
/// <summary>
/// 获取短信模板配置列表
...
...
@@ -200,8 +197,6 @@ namespace Edu.Module.System
#
region
发送短信统一方法
public
void
SendMsg
(
object
PhoneMessage
,
Common
.
Enum
.
System
.
BaseTemplateTypeEnum
BaseTemplateType
,
RB_Msg_Log
msgLogModel
)
{
//查询当前集团的短信基础配置
var
msgBaseList
=
msgBaseRepository
.
GetListRepository
(
new
RB_Msg_Base_Function_ViewModel
{
Group_Id
=
msgLogModel
.
Group_Id
});
//查询当前下面是否有模板
...
...
@@ -224,18 +219,13 @@ namespace Edu.Module.System
msgLogModel
.
StoreType
=
model
.
StoreType
;
msgLogModel
.
MsgConfigure
=
model
.
MsgConfigure
;
int
id
=
msgLogRepository
.
Insert
(
msgLogModel
);
model
.
MsgBase
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Msg_Base_ViewModel
>(
model
.
MsgConfigure
);
var
msgBaseTemplateList
=
allMsgBaseTemplateList
.
Where
(
x
=>
x
.
BaseTemplateType
==
BaseTemplateType
);
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
MsgBase
.
AccessKeyId
)
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
MsgBase
.
AccessSecret
)
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
MsgBase
.
Domain
)
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
MsgBase
.
RegionId
))
{
if
(
msgBaseTemplateList
!=
null
&&
msgBaseTemplateList
.
Any
(
x
=>
x
.
TemplateStaus
==
0
))
{
var
msgBaseTemplateModel
=
msgBaseTemplateList
.
Where
(
x
=>
x
.
TemplateStaus
==
0
).
FirstOrDefault
();
if
(
Common
.
Config
.
IsSendMsg
==
1
)
{
ThirdCore
.
Message
.
SMSService
.
SendMsg
(
msgLogModel
.
ReceiverPhone
,
PhoneMessage
,
msgBaseTemplateModel
.
TemplateId
,
msgBaseTemplateModel
.
Sign
,
model
.
MsgBase
.
Domain
,
model
.
MsgBase
.
AccessKeyId
,
model
.
MsgBase
.
AccessSecret
,
model
.
MsgBase
.
RegionId
,
id
.
ToString
());
...
...
@@ -244,10 +234,8 @@ namespace Edu.Module.System
}
}
}
}
}
// ThirdCore.Message.SMSService.SendMsg("13551132417", PhoneMessage, "SMS_201722097", "印象之旅", "dysmsapi.aliyuncs.com", "LTAIwE7l9dImZSa3", "j47Ajn0d0WzUCIX8Biyj3P2r8QDltI", "cn-hangzhou");
}
...
...
@@ -281,13 +269,12 @@ namespace Edu.Module.System
{
sendStatus
=
(
int
)(
modelSmsSendDetailDTO
.
SendStatus
??
1
);
}
if
(
sendStatus
>
1
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Msg_Log
.
SendStatus
),
sendStatus
}
};
{
{
nameof
(
RB_Msg_Log
.
SendStatus
),
sendStatus
}
};
msgLogRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Msg_Log
.
ID
),
Convert
.
ToInt32
(
modelSmsSendDetailDTO
.
OutId
)));
}
}
...
...
@@ -296,17 +283,11 @@ namespace Edu.Module.System
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"UpdateMsgSendStatus"
);
}
}
}
}
#
endregion
}
}
Edu.Module.User/DepartmentModule.cs
View file @
fd29a639
...
...
@@ -140,7 +140,6 @@ namespace Edu.Module.User
List
<
DepartmentTree_ViewModel
>
list
=
new
List
<
DepartmentTree_ViewModel
>();
//所有的部门列表
var
deptList
=
GetDepartmentListModule
(
query
);
var
schoolList
=
schoolRepository
.
GetSchoolListRepository
(
new
RB_School_ViewModel
()
{
Group_Id
=
query
.
Group_Id
});
var
empList
=
new
List
<
Employee_ViewModel
>();
if
(
deptList
==
null
)
{
...
...
@@ -150,44 +149,6 @@ namespace Edu.Module.User
{
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
query
.
Group_Id
});
}
//校区部门
List
<
DepartmentTree_ViewModel
>
schoolDeptList
=
new
List
<
DepartmentTree_ViewModel
>();
if
(
schoolList
!=
null
)
{
foreach
(
var
item
in
schoolList
)
{
DepartmentTree_ViewModel
tModel
=
new
DepartmentTree_ViewModel
()
{
DeptId
=
item
.
SId
,
DeptName
=
item
.
SName
,
ParentId
=
item
.
Dept_Id
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
};
#
region
添加员工信息
if
(
isQueryEmployee
&&
item
.
ManagerId
>
0
)
{
var
empModel
=
empList
?.
Where
(
qitem
=>
qitem
.
Id
==
item
.
ManagerId
)?.
FirstOrDefault
();
if
(
empModel
!=
null
&&
!
string
.
IsNullOrEmpty
(
empModel
.
EmployeeName
))
{
tModel
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
0
,
DeptName
=
empModel
.
EmployeeName
,
ParentId
=
0
});
}
}
#
endregion
var
currentSchoolDeptList
=
deptList
.
Where
(
qitem
=>
qitem
.
School_Id
==
item
.
SId
).
ToList
();
if
(
currentSchoolDeptList
!=
null
&&
currentSchoolDeptList
.
Count
>
0
)
{
var
currentSchoolDeptId
=
currentSchoolDeptList
?.
Min
(
qitem
=>
qitem
.
ParentId
)
??
0
;
tModel
.
ChildList
=
GetDeptTreeList
(
currentSchoolDeptId
,
currentSchoolDeptList
,
SchoolId
:
item
.
SId
,
schoolDeptList
:
null
,
empList
:
empList
);
}
schoolDeptList
.
Add
(
tModel
);
}
}
if
(
deptList
!=
null
&&
deptList
.
Count
>
0
)
{
...
...
@@ -201,7 +162,9 @@ namespace Edu.Module.User
DeptId
=
fItem
.
DeptId
,
DeptName
=
fItem
.
DeptName
,
ParentId
=
fItem
.
ParentId
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
fItem
.
School_Id
,
IsCompany
=
fItem
.
IsCompany
};
#
region
添加员工信息
...
...
@@ -214,25 +177,18 @@ namespace Edu.Module.User
{
tModel
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
0
,
DeptId
=
eItem
.
Id
,
DeptName
=
eItem
.
EmployeeName
,
ParentId
=
0
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
eItem
.
School_Id
});
}
}
}
#
endregion
tModel
.
ChildList
=
GetDeptTreeList
(
fItem
.
DeptId
,
deptList
.
Where
(
qitem
=>
qitem
.
School_Id
==
0
).
ToList
(),
SchoolId
:
0
,
schoolDeptList
:
schoolDeptList
,
empList
:
empList
);
if
(
schoolDeptList
!=
null
)
{
var
newSchoolDeptList
=
schoolDeptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
fItem
.
DeptId
)?.
ToList
();
if
(
newSchoolDeptList
!=
null
&&
newSchoolDeptList
.
Count
>
0
)
{
tModel
.
ChildList
.
AddRange
(
newSchoolDeptList
);
}
}
tModel
.
ChildList
=
GetDeptTreeList
(
fItem
.
DeptId
,
deptList
,
empList
:
empList
);
list
.
Add
(
tModel
);
}
}
...
...
@@ -246,13 +202,11 @@ namespace Edu.Module.User
/// </summary>
/// <param name="parentId">父节点编号</param>
/// <param name="sourceList">数据源列表</param>
/// <param name="SchoolId">学校编号</param>
/// <param name="schoolDeptList">学校部门列表</param>
/// <param name="empList">员工列表</param>
private
List
<
DepartmentTree_ViewModel
>
GetDeptTreeList
(
int
parentId
,
List
<
RB_Department_ViewModel
>
sourceList
,
int
SchoolId
=
0
,
List
<
DepartmentTree_ViewModel
>
schoolDeptList
=
null
,
List
<
Employee_ViewModel
>
empList
=
null
)
private
List
<
DepartmentTree_ViewModel
>
GetDeptTreeList
(
int
parentId
,
List
<
RB_Department_ViewModel
>
sourceList
,
List
<
Employee_ViewModel
>
empList
=
null
)
{
List
<
DepartmentTree_ViewModel
>
treeList
=
new
List
<
DepartmentTree_ViewModel
>();
foreach
(
var
item
in
sourceList
.
Where
(
qitem
=>
qitem
.
ParentId
==
parentId
&&
qitem
.
School_Id
==
SchoolId
))
foreach
(
var
item
in
sourceList
.
Where
(
qitem
=>
qitem
.
ParentId
==
parentId
))
{
DepartmentTree_ViewModel
model
=
new
DepartmentTree_ViewModel
()
{
...
...
@@ -260,6 +214,8 @@ namespace Edu.Module.User
DeptName
=
item
.
DeptName
,
ParentId
=
item
.
ParentId
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
item
.
School_Id
,
IsCompany
=
item
.
IsCompany
};
#
region
添加员工信息
if
(
empList
!=
null
&&
empList
.
Count
>
0
)
...
...
@@ -271,9 +227,10 @@ namespace Edu.Module.User
{
model
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
0
,
DeptId
=
eItem
.
Id
,
DeptName
=
eItem
.
EmployeeName
,
ParentId
=
0
,
School_Id
=
eItem
.
School_Id
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
});
}
...
...
@@ -281,15 +238,7 @@ namespace Edu.Module.User
}
#
endregion
model
.
ChildList
=
GetDeptTreeList
(
item
.
DeptId
,
sourceList
,
SchoolId
,
schoolDeptList
);
if
(
schoolDeptList
!=
null
)
{
var
newSchoolDeptList
=
schoolDeptList
.
Where
(
qitem
=>
qitem
.
ParentId
==
item
.
DeptId
)?.
ToList
();
if
(
newSchoolDeptList
!=
null
)
{
model
.
ChildList
.
AddRange
(
newSchoolDeptList
);
}
}
model
.
ChildList
=
GetDeptTreeList
(
item
.
DeptId
,
sourceList
);
treeList
.
Add
(
model
);
}
return
treeList
;
...
...
@@ -385,6 +334,7 @@ namespace Edu.Module.User
{
nameof
(
RB_Department_ViewModel
.
School_Id
),
extModel
.
School_Id
},
{
nameof
(
RB_Department_ViewModel
.
DeptTier
),
extModel
.
DeptTier
},
{
nameof
(
RB_Department_ViewModel
.
DeptSort
),
extModel
.
DeptSort
},
{
nameof
(
RB_Department_ViewModel
.
IsCompany
),
extModel
.
IsCompany
}
};
flag
=
departmentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Department_ViewModel
.
DeptId
),
extModel
.
DeptId
));
}
...
...
Edu.Module.User/NoticeModule.cs
View file @
fd29a639
...
...
@@ -31,6 +31,10 @@ namespace Edu.Module.User
/// </summary>
private
readonly
RB_Notice_ReadRepository
notice_ReadRepository
=
new
RB_Notice_ReadRepository
();
/// <summary>
/// 公告部门
/// </summary>
private
readonly
RB_Notice_DeptRepository
notice_DeptRepository
=
new
RB_Notice_DeptRepository
();
/// <summary>
/// 部门
/// </summary>
private
readonly
RB_DepartmentRepository
departmentRepository
=
new
RB_DepartmentRepository
();
...
...
@@ -115,8 +119,57 @@ namespace Edu.Module.User
//查询阅读人数
string
NoticeIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
readList
=
notice_ReadRepository
.
GetNoticeReadNumList
(
NoticeIds
);
//var dList = notice_DeptRepository.GetList(new RB_Notice_Dept() { }, NoticeIds);
foreach
(
var
item
in
list
)
{
item
.
ReadNum
=
readList
.
Where
(
x
=>
x
.
NoticeId
==
item
.
Id
).
FirstOrDefault
()?.
ReadNum
??
0
;
//var idList = dList.Where(x => x.NoticeId == item.Id).ToList();
//if (idList.Any())
//{
// item.To = string.Join(",", idList.Select(x => x.DeptId));
//}
//else
//{
// item.To = "-1";
//}
}
}
return
list
;
}
/// <summary>
/// 获取我的公告分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Notice_ViewModel
>
GetMyNoticePageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Notice_ViewModel
dmodel
)
{
#
region
我的上级部门
var
dlist
=
departmentRepository
.
GetAllSuperiorDepartmentListRepository
(
dmodel
.
DeptId
);
if
(
dlist
.
Any
())
{
dmodel
.
To
=
string
.
Join
(
","
,
dlist
.
Select
(
x
=>
x
.
DeptId
));
}
#
endregion
var
list
=
noticeRepository
.
GetMyPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
dmodel
);
if
(
list
.
Any
())
{
//查询阅读人数
string
NoticeIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
readList
=
notice_ReadRepository
.
GetNoticeReadNumList
(
NoticeIds
);
//var dList = notice_DeptRepository.GetList(new RB_Notice_Dept() { }, NoticeIds);
foreach
(
var
item
in
list
)
{
item
.
ReadNum
=
readList
.
Where
(
x
=>
x
.
NoticeId
==
item
.
Id
).
FirstOrDefault
()?.
ReadNum
??
0
;
//var idList = dList.Where(x => x.NoticeId == item.Id).ToList();
//if (idList.Any())
//{
// item.To = string.Join(",", idList.Select(x => x.DeptId));
//}
//else {
// item.To = "-1";
//}
}
}
return
list
;
...
...
@@ -131,6 +184,11 @@ namespace Edu.Module.User
{
var
model
=
noticeRepository
.
GetEntity
<
RB_Notice_ViewModel
>(
noticeId
);
if
(
model
==
null
)
{
return
ApiResult
.
ParamIsNull
();
}
var
dList
=
notice_DeptRepository
.
GetList
(
new
RB_Notice_Dept
()
{
NoticeId
=
noticeId
},
""
);
model
.
To
=
"-1"
;
if
(
dList
.
Any
())
{
model
.
To
=
string
.
Join
(
","
,
dList
.
Select
(
x
=>
x
.
DeptId
));
}
List
<
object
>
DepartmentList
=
new
List
<
object
>()
{
new
{
DepartmentId
=
-
1
,
DeptName
=
"全公司"
}
};
if
(!
string
.
IsNullOrEmpty
(
model
.
To
)
&&
model
.
To
!=
"-1"
)
{
//查询所有的部门
...
...
@@ -145,7 +203,7 @@ namespace Edu.Module.User
}
}
List
<
object
>
CopyPeopleList
=
new
List
<
object
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
CopyPeople
))
{
if
(!
string
.
IsNullOrEmpty
(
model
.
CopyPeople
)
&&
model
.
CopyPeople
!=
"-1"
)
{
//查询所有人
var
elist
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
model
.
Group_Id
,
QIds
=
model
.
CopyPeople
});
foreach
(
var
item
in
elist
)
{
...
...
@@ -295,6 +353,37 @@ namespace Edu.Module.User
}
};
bool
flag
=
noticeRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//更新部门
var
dList
=
notice_DeptRepository
.
GetList
(
new
RB_Notice_Dept
()
{
NoticeId
=
demodel
.
Id
},
""
);
if
(
demodel
.
To
!=
"-1"
)
{
List
<
int
>
ToList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
demodel
.
To
+
"]"
);
var
insertList
=
ToList
.
Where
(
x
=>
!
dList
.
Select
(
z
=>
z
.
DeptId
).
Contains
(
x
)).
ToList
();
var
delList
=
dList
.
Where
(
x
=>
!
ToList
.
Contains
(
x
.
DeptId
)).
ToList
();
foreach
(
var
item
in
insertList
)
{
notice_DeptRepository
.
Insert
(
new
RB_Notice_Dept
()
{
Id
=
0
,
DeptId
=
item
,
NoticeId
=
demodel
.
Id
});
}
foreach
(
var
item
in
delList
)
{
notice_DeptRepository
.
Delete
(
item
);
}
}
else
{
//删除部门关联
foreach
(
var
item
in
dList
)
{
notice_DeptRepository
.
Delete
(
item
);
}
}
}
if
(
flag
&&
oldModel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Draft
&&
demodel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Publish
)
{
//推送消息
...
...
@@ -336,7 +425,23 @@ namespace Edu.Module.User
}
}
bool
flag
=
noticeRepository
.
Insert
(
demodel
)
>
0
;
int
Id
=
noticeRepository
.
Insert
(
demodel
);
bool
flag
=
Id
>
0
;
if
(
flag
)
{
//更新部门
if
(
demodel
.
To
!=
"-1"
)
{
List
<
int
>
ToList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
demodel
.
To
+
"]"
);
foreach
(
var
item
in
ToList
)
{
notice_DeptRepository
.
Insert
(
new
RB_Notice_Dept
()
{
Id
=
0
,
DeptId
=
item
,
NoticeId
=
Id
});
}
}
}
if
(
flag
&&
demodel
.
NoticeState
==
Common
.
Enum
.
User
.
NoticeStateEnum
.
Publish
)
{
//推送消息
...
...
Edu.Repository/Course/RB_Class_PlanRepository.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 班级上课计划仓储层
/// </summary>
public
class
RB_Class_PlanRepository
:
BaseRepository
<
RB_Class_Plan
>
{
/// <summary>
/// 获取班级上课计划列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Plan_ViewModel
>
GetClassPlanListRepository
(
RB_Class_Plan_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Class_Plan
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
ClassId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_Plan_ViewModel
.
ClassId
),
query
.
ClassId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QClassIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Class_Plan_ViewModel
.
ClassId
),
query
.
QClassIds
);
}
}
return
Get
<
RB_Class_Plan_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Course/RB_Class_RoomRepository.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 教室管理仓储层
/// </summary>
public
class
RB_Class_RoomRepository
:
BaseRepository
<
RB_Class_Room
>
{
/// <summary>
/// 获取教室分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Room_ViewModel
>
GetClassRoomPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Class_Room_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Class_Room AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
parameters
.
Add
(
"RoomName"
,
"%"
+
query
.
RoomName
.
Trim
()
+
"%"
);
}
}
return
GetPage
<
RB_Class_Room_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取教室列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Room_ViewModel
>
GetClassRoomListRepository
(
RB_Class_Room_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Class_Room AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
parameters
.
Add
(
"RoomName"
,
"%"
+
query
.
RoomName
.
Trim
()
+
"%"
);
}
}
return
Get
<
RB_Class_Room_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/Course/RB_Class_StepPriceRepository.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 课程阶梯价格仓储层
/// </summary>
public
class
RB_Class_StepPriceRepository
:
BaseRepository
<
RB_Class_StepPrice
>
{
/// <summary>
/// 获取课程阶梯价格列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_StepPrice_ViewModel
>
GetClassStepPriceListRepository
(
RB_Class_StepPrice_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Class_StepPrice
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
ClassId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_StepPrice_ViewModel
.
ClassId
),
query
.
ClassId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QClassIds
))
{
builder
.
AppendFormat
(
" AND {0} IN ({1}) "
,
nameof
(
RB_Class_StepPrice_ViewModel
.
ClassId
),
query
.
QClassIds
);
}
}
return
Get
<
RB_Class_StepPrice_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Course/RB_Class_TimeRepository.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 班级上课时间仓储层
/// </summary>
public
class
RB_Class_TimeRepository
:
BaseRepository
<
RB_Class_Time
>
{
/// <summary>
/// 获取班级上课时间列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Class_Time_ViewModel
>
GetClassTimeListRepository
(
RB_Class_Time_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Class_Time
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
ClassPlanId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_Time_ViewModel
.
ClassPlanId
),
query
.
ClassPlanId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QClassPlanIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Class_Time_ViewModel
.
ClassPlanId
),
query
.
QClassPlanIds
);
}
}
return
Get
<
RB_Class_Time_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Course/RB_Course_StepPriceRepository.cs
0 → 100644
View file @
fd29a639
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 课程阶梯价格仓储层
/// </summary>
public
class
RB_Course_StepPriceRepository
:
BaseRepository
<
RB_Course_StepPrice
>
{
/// <summary>
/// 获取课程阶梯价格列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Course_StepPrice_ViewModel
>
GetCourseStepPriceListRepository
(
RB_Course_StepPrice_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT *
FROM RB_Course_StepPrice
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
CourseId
>
0
)
{
builder
.
AppendFormat
(
@" AND {0}={1} "
,
nameof
(
RB_Course_StepPrice_ViewModel
.
CourseId
),
query
.
CourseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QCourseIds
))
{
builder
.
AppendFormat
(
@" AND {0} IN({1}) "
,
nameof
(
RB_Course_StepPrice_ViewModel
.
CourseId
),
query
.
QCourseIds
);
}
}
return
Get
<
RB_Course_StepPrice_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 根据课程编号删除课程阶梯价格
/// </summary>
/// <param name="CourseId"></param>
/// <returns></returns>
public
bool
DeleteStepPriceRepository
(
int
CourseId
)
{
bool
flag
=
base
.
DeleteOne
(
new
VT
.
FW
.
DB
.
WhereHelper
(
nameof
(
RB_Course_StepPrice_ViewModel
.
CourseId
),
CourseId
));
return
flag
;
}
}
}
Edu.Repository/User/RB_DepartmentRepository.cs
View file @
fd29a639
...
...
@@ -55,6 +55,10 @@ WHERE 1=1
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
DeptId
)}
=
{
query
.
DeptId
}
"
);
}
if
(
query
.
IsCompany
==
1
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
IsCompany
)}
=1 "
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
DeptName
))
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
DeptName
)}
LIKE @DeptName "
);
...
...
Edu.Repository/User/RB_NoticeRepository.cs
View file @
fd29a639
...
...
@@ -54,7 +54,16 @@ namespace Edu.Repository.User
where
+=
$@" and
{
nameof
(
RB_Notice
.
UpdateBy
)}
=
{
demodel
.
UpdateBy
}
"
;
}
string
sql
=
$@" select * from RB_Notice where
{
where
}
order by Id desc"
;
string
OrderBy
=
" Id desc"
;
if
(
demodel
.
OrderBy
==
1
)
{
OrderBy
=
" UpdateTime desc"
;
}
else
if
(
demodel
.
OrderBy
==
2
)
{
OrderBy
=
" Is_Top asc,UpdateTime desc"
;
}
string
sql
=
$@" select * from RB_Notice where
{
where
}
order by
{
OrderBy
}
"
;
return
GetPage
<
RB_Notice_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
@@ -106,5 +115,64 @@ namespace Edu.Repository.User
return
obj
.
ToString
();
}
}
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Notice_ViewModel
>
GetMyPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Notice_ViewModel
demodel
)
{
string
where
=
$@" 1=1 and n.
{
nameof
(
RB_Notice
.
Status
)}
=0 "
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Title
))
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
Title
)}
like '%
{
demodel
.
Title
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Number
))
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
Number
)}
like '%
{
demodel
.
Number
}
%'"
;
}
if
(
demodel
.
NoticeState
>
0
)
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
NoticeState
)}
=
{(
int
)
demodel
.
NoticeState
}
"
;
}
if
(
demodel
.
Is_Top
>
0
)
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
Is_Top
)}
=
{
demodel
.
Is_Top
}
"
;
}
if
(
demodel
.
UpdateBy
>
0
)
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
UpdateBy
)}
=
{
demodel
.
UpdateBy
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
To
))
{
where
+=
$@" and (FIND_IN_SET(n.DeptId,'
{
demodel
.
To
}
') or n.DeptId =-1)"
;
}
string
OrderBy
=
" n.Id desc"
;
if
(
demodel
.
OrderBy
==
1
)
{
OrderBy
=
" n.UpdateTime desc"
;
}
else
if
(
demodel
.
OrderBy
==
2
)
{
OrderBy
=
" n.Is_Top asc,n.UpdateTime desc"
;
}
string
sql
=
$@" select n.* from RB_Notice n
left join rb_notice_dept d on n.Id = d.NoticeId
where
{
where
}
group by n.Id order by
{
OrderBy
}
"
;
return
GetPage
<
RB_Notice_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/User/RB_Notice_DeptRepository.cs
0 → 100644
View file @
fd29a639
using
Edu.Common.Enum
;
using
Edu.Model.Entity.User
;
using
Edu.Model.ViewModel.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.User
{
/// <summary>
/// 公告部门仓储层
/// </summary>
public
class
RB_Notice_DeptRepository
:
BaseRepository
<
RB_Notice_Dept
>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Notice_Dept
>
GetList
(
RB_Notice_Dept
demodel
,
string
NoticeIds
)
{
string
where
=
"1=1"
;
if
(
demodel
.
NoticeId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Notice_Dept
.
NoticeId
)}
=
{
demodel
.
NoticeId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
NoticeIds
))
{
where
+=
$@" and
{
nameof
(
RB_Notice_Dept
.
NoticeId
)}
in(
{
NoticeIds
}
)"
;
}
if
(
demodel
.
DeptId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Notice_Dept
.
DeptId
)}
=
{
demodel
.
DeptId
}
"
;
}
string
sql
=
$@" select * from RB_Notice_Dept where
{
where
}
"
;
return
Get
<
RB_Notice_Dept
>(
sql
).
ToList
();
}
}
}
\ No newline at end of file
Edu.ThirdCore/Edu.ThirdCore.csproj
View file @
fd29a639
...
...
@@ -14,6 +14,10 @@
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Edu.Common\Edu.Common.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="aliyun-net-sdk-core">
<HintPath>lib\aliyun-net-sdk-core.dll</HintPath>
...
...
Edu.ThirdCore/Message/MessageCore.cs
View file @
fd29a639
This diff is collapsed.
Click to expand it.
Edu.ThirdCore/Message/QueueHelper.cs
View file @
fd29a639
...
...
@@ -17,7 +17,7 @@ namespace Edu.ThirdCore.Message
/// <summary>
/// 线程锁
/// </summary>
private
static
object
locker
=
new
object
();
private
static
readonly
object
locker
=
new
object
();
/// <summary>
/// 添加消息到队列
...
...
Edu.ThirdCore/Message/SMSService.cs
View file @
fd29a639
...
...
@@ -20,16 +20,18 @@ namespace Edu.ThirdCore.Message
/// <param name="code">验证码</param>
public
static
void
SendCode
(
string
phoneNumber
,
string
code
,
string
templateCode
,
string
SignName
,
string
Domain
,
string
AccessKeyId
,
string
AccessKeySecret
,
string
RegionId
,
string
OutId
)
{
JObject
obj
=
new
JObject
();
obj
[
"cmd"
]
=
"sms"
;
obj
[
"phoneNumber"
]
=
phoneNumber
;
obj
[
"templateCode"
]
=
templateCode
;
obj
[
"SignName"
]
=
SignName
;
obj
[
"Domain"
]
=
Domain
;
obj
[
"AccessKeyId"
]
=
AccessKeyId
;
obj
[
"AccessKeySecret"
]
=
AccessKeySecret
;
obj
[
"RegionId"
]
=
RegionId
;
var
TemplateParam
=
new
{
code
=
code
};
JObject
obj
=
new
JObject
{
[
"cmd"
]
=
"sms"
,
[
"phoneNumber"
]
=
phoneNumber
,
[
"templateCode"
]
=
templateCode
,
[
"SignName"
]
=
SignName
,
[
"Domain"
]
=
Domain
,
[
"AccessKeyId"
]
=
AccessKeyId
,
[
"AccessKeySecret"
]
=
AccessKeySecret
,
[
"RegionId"
]
=
RegionId
};
var
TemplateParam
=
new
{
code
};
obj
[
"OutId"
]
=
OutId
;
obj
[
"templateParam"
]
=
JsonConvert
.
SerializeObject
(
TemplateParam
);
QueueHelper
.
EnqueueTask
(
JsonConvert
.
SerializeObject
(
obj
));
...
...
@@ -43,15 +45,17 @@ namespace Edu.ThirdCore.Message
/// <param name="templateCode"></param>
public
static
void
SendMsg
(
string
phoneNumber
,
string
content
,
string
templateCode
,
string
SignName
,
string
Domain
,
string
AccessKeyId
,
string
AccessKeySecret
,
string
RegionId
,
string
OutId
)
{
JObject
obj
=
new
JObject
();
obj
[
"cmd"
]
=
"sms"
;
obj
[
"phoneNumber"
]
=
phoneNumber
;
obj
[
"templateCode"
]
=
templateCode
;
obj
[
"SignName"
]
=
SignName
;
obj
[
"Domain"
]
=
Domain
;
obj
[
"AccessKeyId"
]
=
AccessKeyId
;
obj
[
"RegionId"
]
=
RegionId
;
obj
[
"AccessKeySecret"
]
=
AccessKeySecret
;
JObject
obj
=
new
JObject
{
[
"cmd"
]
=
"sms"
,
[
"phoneNumber"
]
=
phoneNumber
,
[
"templateCode"
]
=
templateCode
,
[
"SignName"
]
=
SignName
,
[
"Domain"
]
=
Domain
,
[
"AccessKeyId"
]
=
AccessKeyId
,
[
"RegionId"
]
=
RegionId
,
[
"AccessKeySecret"
]
=
AccessKeySecret
};
var
TemplateParam
=
new
{
content
};
obj
[
"OutId"
]
=
OutId
;
obj
[
"templateParam"
]
=
JsonConvert
.
SerializeObject
(
TemplateParam
);
...
...
@@ -67,10 +71,12 @@ namespace Edu.ThirdCore.Message
/// <param name="templateCode"></param>
public
static
void
SendMsg
(
string
phoneNumber
,
object
templateParam
,
string
templateCode
,
string
SignName
,
string
Domain
,
string
AccessKeyId
,
string
AccessKeySecret
,
string
RegionId
,
string
OutId
)
{
JObject
obj
=
new
JObject
();
obj
[
"cmd"
]
=
"sms"
;
obj
[
"phoneNumber"
]
=
phoneNumber
;
obj
[
"templateCode"
]
=
templateCode
;
JObject
obj
=
new
JObject
{
[
"cmd"
]
=
"sms"
,
[
"phoneNumber"
]
=
phoneNumber
,
[
"templateCode"
]
=
templateCode
};
var
TemplateParam
=
templateParam
;
obj
[
"SignName"
]
=
SignName
;
obj
[
"Domain"
]
=
Domain
;
...
...
Edu.WebApi/Controllers/Public/MsgController.cs
View file @
fd29a639
...
...
@@ -116,12 +116,14 @@ namespace Edu.WebApi.Controllers.Public
public
ApiResult
SetMsgBase
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Msg_Base_Function_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
model
=
new
RB_Msg_Base
();
model
.
CreateDate
=
DateTime
.
Now
;
model
.
CreateBy
=
UserInfo
.
Id
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
ID
=
extModel
.
ID
;
model
.
StoreType
=
extModel
.
StoreType
;
var
model
=
new
RB_Msg_Base
{
CreateDate
=
DateTime
.
Now
,
CreateBy
=
UserInfo
.
Id
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ID
=
extModel
.
ID
,
StoreType
=
extModel
.
StoreType
};
if
(
extModel
.
MsgBase
!=
null
)
{
model
.
MsgConfigure
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
extModel
.
MsgBase
);
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
fd29a639
...
...
@@ -229,6 +229,36 @@ namespace Edu.WebApi.Controllers.User
}));
}
/// <summary>
/// 获取我的公告分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyNoticePageList
()
{
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
JsonHelper
.
DeserializeObject
<
RB_Notice_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
DeptId
=
base
.
UserInfo
.
DeptId
;
var
list
=
noticeModule
.
GetMyNoticePageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
From
,
x
.
Number
,
x
.
Title
,
x
.
NoticeState
,
NoticeStateName
=
x
.
NoticeState
.
ToName
(),
x
.
Is_Top
,
x
.
ReadNum
,
x
.
UpdateBy
,
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
UpdateBy
)?.
AccountName
??
""
,
UpdateTime
=
x
.
UpdateTime
.
HasValue
?
x
.
UpdateTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
#
endregion
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
fd29a639
...
...
@@ -881,7 +881,6 @@ namespace Edu.WebApi.Controllers.User
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择部门编号!"
);
}
var
groupId
=
base
.
UserInfo
.
Group_Id
;
var
list
=
departmentModule
.
GetCurrentAndChildDepartmentListModule
(
DeptId
);
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
Edu.WebApi/Controllers/User/WorkFlowController.cs
View file @
fd29a639
...
...
@@ -652,7 +652,6 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
ApiResult
AskForLeaveSubmit
()
{
//RequestParm.Uid = "1972";
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
Rb_Workflow_Askforleave_Extend
askforleave
=
JsonConvert
.
DeserializeObject
<
Rb_Workflow_Askforleave_Extend
>(
RequestParm
.
Msg
.
ToString
());
if
(
askforleave
.
StartTime
>
askforleave
.
EndTime
)
...
...
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