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
f1a9271f
Commit
f1a9271f
authored
Jun 16, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c57dc571
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
12 deletions
+67
-12
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+19
-0
RB_Duty_Item.cs
Edu.Model/Entity/Duty/RB_Duty_Item.cs
+5
-0
RB_Duty_Item_ViewModel.cs
Edu.Model/ViewModel/Duty/RB_Duty_Item_ViewModel.cs
+5
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+2
-0
DutyModule.cs
Edu.Module.Duty/DutyModule.cs
+2
-4
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+5
-3
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+14
-3
DutyController.cs
Edu.WebApi/Controllers/Duty/DutyController.cs
+15
-2
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
f1a9271f
...
...
@@ -382,6 +382,25 @@ namespace Edu.Common
return
age
<
0
?
0
:
age
;
}
/// <summary>
/// 获取时间段字符串
/// </summary>
/// <param name="objDate"></param>
/// <returns></returns>
public
static
string
GetTimeStr
(
object
objDate
)
{
string
str
=
""
;
if
(
objDate
!=
null
)
{
DateTime
date
=
Convert
.
ToDateTime
(
objDate
);
int
times
=
date
.
Hour
;
if
(
times
>=
0
&&
times
<
12
)
{
str
=
"早上"
;
}
if
(
times
>=
12
&&
times
<
17
)
{
str
=
"下午"
;
}
if
(
times
>=
17
&&
times
<
24
)
{
str
=
"晚上"
;
}
}
return
str
;
}
/// <summary>
/// 获取最近一个星期一
/// </summary>
...
...
Edu.Model/Entity/Duty/RB_Duty_Item.cs
View file @
f1a9271f
...
...
@@ -65,5 +65,10 @@ namespace Edu.Model.Entity.Duty
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 值班标准图片
/// </summary>
public
string
ItemImg
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Duty/RB_Duty_Item_ViewModel.cs
View file @
f1a9271f
...
...
@@ -34,5 +34,10 @@ namespace Edu.Model.ViewModel.Duty
/// 是否完成(1-已完成,0-未完成)
/// </summary>
public
int
IsChecked
{
get
;
set
;
}
/// <summary>
/// 值班项目图片列表
/// </summary>
public
List
<
string
>
ItemImgList
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
f1a9271f
...
...
@@ -2040,6 +2040,7 @@ namespace Edu.Module.Course
foreach
(
var
subItem
in
tempList
)
{
var
tempTimeList
=
timeList
?.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
subItem
.
ClassPlanId
)?.
ToList
()?.
OrderBy
(
qitem
=>
qitem
.
StartTime
);
var
currentDate
=
Common
.
ConvertHelper
.
FormatDate
(
ClassDate
)
+
" "
+(
tempTimeList
?.
FirstOrDefault
()?.
StartTime
??
""
);
subList
.
Add
(
new
{
subItem
.
ClassId
,
...
...
@@ -2047,6 +2048,7 @@ namespace Edu.Module.Course
subItem
.
CourseName
,
subItem
.
RoomName
,
subItem
.
TeacherName
,
TimeStr
=
Common
.
ConvertHelper
.
GetTimeStr
(
currentDate
),
StartTime
=
tempTimeList
?.
FirstOrDefault
()?.
StartTime
??
""
,
EndTime
=
tempTimeList
?.
LastOrDefault
()?.
EndTime
??
""
,
GuestList
=
guestList
.
Where
(
qitem
=>
qitem
.
ClassId
==
subItem
.
ClassId
)?.
Select
(
qitem
=>
new
{
qitem
.
GuestName
})
...
...
Edu.Module.Duty/DutyModule.cs
View file @
f1a9271f
...
...
@@ -92,6 +92,7 @@ namespace Edu.Module.Duty
{
nameof
(
RB_Duty_Item_ViewModel
.
ItemSchools
),
model
.
ItemSchools
},
{
nameof
(
RB_Duty_Item_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Duty_Item_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Duty_Item_ViewModel
.
ItemImg
),
model
.
ItemImg
},
};
return
dutyItemRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Duty_Item_ViewModel
.
Id
),
model
.
Id
));
}
...
...
@@ -110,8 +111,6 @@ namespace Edu.Module.Duty
#
endregion
#
region
值班设置
/// <summary>
...
...
@@ -231,7 +230,6 @@ namespace Edu.Module.Duty
}
#
endregion
#
region
班次设置
/// <summary>
/// 获取班次设置列表
...
...
@@ -307,4 +305,4 @@ namespace Edu.Module.Duty
}
#
endregion
}
}
}
\ No newline at end of file
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
f1a9271f
...
...
@@ -493,6 +493,10 @@ where sog.Account_Id={query.StuId} and c.ClassStatus in(1,2) and c.`Status`=0 an
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Plan_ViewModel
.
ClassRoomId
),
query
.
ClassRoomId
);
}
if
(
query
.
ClassId
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Plan_ViewModel
.
ClassId
),
query
.
ClassId
);
}
}
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
...
...
@@ -511,9 +515,7 @@ WHERE 1=1 AND A.`Status`=0 {0}
) AS A
GROUP BY A.ClassPlanId,A.ClassId ,A.ClassDate,A.ClassRoomId
"
,
where
.
ToString
());
builder
.
AppendFormat
(
" "
);
return
Get
<
RB_Class_Plan_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
f1a9271f
...
...
@@ -1879,7 +1879,8 @@ namespace Edu.WebApi.Controllers.Course
EndTime
=
endDate
,
TeacherId
=
base
.
ParmJObj
.
GetInt
(
"TeacherId"
),
ClassRoomId
=
base
.
ParmJObj
.
GetInt
(
"ClassRoomId"
),
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
};
var
obj
=
classModule
.
GetClassPlanStatisticalModule
(
query
);
return
ApiResult
.
Success
(
data
:
obj
);
...
...
@@ -1893,9 +1894,19 @@ namespace Edu.WebApi.Controllers.Course
{
var
startDate
=
base
.
ParmJObj
.
GetStringValue
(
"StartTime"
);
var
endDate
=
base
.
ParmJObj
.
GetStringValue
(
"EndTime"
);
if
(!
string
.
IsNullOrEmpty
(
endDate
))
DateTime
now
=
DateTime
.
Now
;
//获取当前月的第一天
DateTime
d1
=
new
DateTime
(
now
.
Year
,
now
.
Month
,
1
);
//当月最后一天
DateTime
d2
=
d1
.
AddMonths
(
1
).
AddDays
(-
1
);
if
(
string
.
IsNullOrEmpty
(
startDate
))
{
endDate
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
startDate
=
Common
.
ConvertHelper
.
FormatDate
(
d1
);
}
if
(
string
.
IsNullOrEmpty
(
endDate
))
{
endDate
=
Common
.
ConvertHelper
.
FormatDate
(
d2
);
}
else
{
...
...
Edu.WebApi/Controllers/Duty/DutyController.cs
View file @
f1a9271f
...
...
@@ -245,6 +245,15 @@ namespace Edu.WebApi.Controllers.Duty
Group_Id
=
base
.
UserInfo
.
Group_Id
,
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
};
query
.
ItemImgList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
base
.
ParmJObj
.
GetStringValue
(
"ItemImgList"
));
if
(
query
.
ItemImgList
!=
null
&&
query
.
ItemImgList
.
Count
>
0
)
{
query
.
ItemImg
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
query
.
ItemImgList
);
}
else
{
query
.
ItemImg
=
""
;
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
ItemName
))
{
return
ApiResult
.
Failed
(
"请输入值班事项名称"
);
...
...
@@ -287,6 +296,7 @@ namespace Edu.WebApi.Controllers.Duty
{
List
<
string
>
SchoolList
=
new
List
<
string
>();
List
<
string
>
ShiftList
=
new
List
<
string
>();
List
<
string
>
ImgList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
model
?.
ItemSchools
))
{
SchoolList
=
Common
.
ConvertHelper
.
StringToFileList
(
model
?.
ItemSchools
);
...
...
@@ -295,6 +305,10 @@ namespace Edu.WebApi.Controllers.Duty
{
ShiftList
=
Common
.
ConvertHelper
.
StringToFileList
(
model
?.
Shifts
);
}
if
(!
string
.
IsNullOrEmpty
(
model
?.
ItemImg
))
{
ImgList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
model
.
ItemImg
);
}
obj
=
new
{
model
.
Id
,
...
...
@@ -304,6 +318,7 @@ namespace Edu.WebApi.Controllers.Duty
SchoolList
,
model
?.
Shifts
,
ShiftList
,
ItemImgList
=
ImgList
};
}
return
ApiResult
.
Success
(
data
:
obj
);
...
...
@@ -323,7 +338,6 @@ namespace Edu.WebApi.Controllers.Duty
}
/// <summary>
/// 根据班次获取学校信息
/// </summary>
...
...
@@ -332,7 +346,6 @@ namespace Edu.WebApi.Controllers.Duty
public
ApiResult
GetSchoolListByFrequencyIds
()
{
var
Shifts
=
base
.
ParmJObj
.
GetStringValue
(
"Shifts"
);
var
list
=
schoolModule
.
GetSchoolListByFrequencyIds
(
base
.
UserInfo
.
Group_Id
,
Shifts
);
var
result
=
list
.
Select
(
x
=>
new
{
...
...
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