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
779cd5ee
Commit
779cd5ee
authored
3 years ago
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
63ab6877
b28c0573
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
73 additions
and
13 deletions
+73
-13
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
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+6
-0
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+5
-3
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+13
-2
DutyController.cs
Edu.WebApi/Controllers/Duty/DutyController.cs
+15
-2
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+0
-1
appsettings.json
Edu.WebApi/appsettings.json
+1
-1
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
779cd5ee
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Edu.Model/Entity/Duty/RB_Duty_Item.cs
View file @
779cd5ee
...
...
@@ -65,5 +65,10 @@ namespace Edu.Model.Entity.Duty
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 值班标准图片
/// </summary>
public
string
ItemImg
{
get
;
set
;
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/Duty/RB_Duty_Item_ViewModel.cs
View file @
779cd5ee
...
...
@@ -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
;
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Module.Course/ClassModule.cs
View file @
779cd5ee
...
...
@@ -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
})
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.Duty/DutyModule.cs
View file @
779cd5ee
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Edu.Module.Duty/DutyPlanModule.cs
View file @
779cd5ee
...
...
@@ -639,6 +639,11 @@ namespace Edu.Module.Duty
{
workIsFinish
=
c_workModel
?.
WorkIsFinish
??
0
;
}
List
<
string
>
ItemImgList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
ItemImg
))
{
ItemImgList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
item
.
ItemImg
);
}
var
pObj
=
new
{
Id
=
c_workModel
?.
Id
??
0
,
...
...
@@ -647,6 +652,7 @@ namespace Edu.Module.Duty
item
.
ItemType
,
IsChecked
=
workIsFinish
,
WorkContent
=
c_workModel
?.
WorkContent
??
""
,
ItemImgList
};
pList
.
Add
(
pObj
);
}
...
...
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
779cd5ee
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
779cd5ee
...
...
@@ -1897,6 +1897,7 @@ namespace Edu.WebApi.Controllers.Course
TeacherId
=
base
.
ParmJObj
.
GetInt
(
"TeacherId"
),
ClassRoomId
=
base
.
ParmJObj
.
GetInt
(
"ClassRoomId"
),
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
};
var
obj
=
classModule
.
GetClassPlanStatisticalModule
(
query
);
return
ApiResult
.
Success
(
data
:
obj
);
...
...
@@ -1910,9 +1911,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
))
{
startDate
=
Common
.
ConvertHelper
.
FormatDate
(
d1
);
}
if
(
string
.
IsNullOrEmpty
(
endDate
))
{
endDate
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
endDate
=
Common
.
ConvertHelper
.
FormatDate
(
d2
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Duty/DutyController.cs
View file @
779cd5ee
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
779cd5ee
...
...
@@ -283,7 +283,6 @@ namespace Edu.WebApi.Controllers.Duty
{
UserId
=
DutyMan
;
}
UserId
=
0
;
var
obj
=
dutyPlanModule
.
OnDutyModule
(
Id
,
Shift
,
UserId
,
isQueryWork
:
true
);
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/appsettings.json
View file @
779cd5ee
{
"ConnectionStrings"
:
{
"DefaultConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=
test
_edu;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=
reborn
_edu;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnection"
:
"server=192.168.20.214;user id=reborn;password=Reborn@2018;database=test_reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
...
...
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