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
99a72f2b
Commit
99a72f2b
authored
Jun 29, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c61157e8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
18 deletions
+88
-18
RB_Class_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
+5
-0
RB_Duty_Content_ViewModel.cs
Edu.Model/ViewModel/Duty/RB_Duty_Content_ViewModel.cs
+5
-0
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+68
-9
RB_ClassRepository.cs
Edu.Repository/Course/RB_ClassRepository.cs
+1
-1
RB_Duty_PlanRepository.cs
Edu.Repository/Duty/RB_Duty_PlanRepository.cs
+4
-4
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+1
-0
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+4
-4
No files found.
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
View file @
99a72f2b
...
...
@@ -34,6 +34,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
string
CourseName
{
get
;
set
;
}
/// <summary>
/// 课程特色
/// </summary>
public
string
CourseFeature
{
get
;
set
;
}
/// <summary>
/// 课程分类
/// </summary>
...
...
Edu.Model/ViewModel/Duty/RB_Duty_Content_ViewModel.cs
View file @
99a72f2b
...
...
@@ -36,6 +36,11 @@ namespace Edu.Model.ViewModel.Duty
/// </summary>
public
string
CreateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTimeStr
(
this
.
CreateTime
);
}
}
/// <summary>
/// 创建时间
/// </summary>
public
string
CreateTimeStr2
{
get
;
set
;
}
/// <summary>
/// 值班事项名称
/// </summary>
...
...
Edu.Module.Duty/DutyPlanModule.cs
View file @
99a72f2b
...
...
@@ -770,23 +770,47 @@ namespace Edu.Module.Duty
}
//当前班次
var
currentModel
=
new
RB_Duty_PlanDetails_ViewModel
();
List
<
RB_Duty_Content_ViewModel
>
otherContentList
=
new
List
<
RB_Duty_Content_ViewModel
>();
if
(
model
.
PlanDetails
!=
null
&&
model
.
PlanDetails
.
Count
>
0
)
{
//查找当前人员索引
int
currentIndex
=
CalcCurrentDutyManIndexModule_V2
(
model
);
if
(
currentIndex
==
0
)
//currentIndex == 0 &&
if
(
Common
.
ConvertHelper
.
FormatDate
(
model
.
Date
)==
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
)
)
{
var
yestoday
=
model
.
Date
.
AddDays
(-
1
);
var
yestodayList
=
GetMyDutyPlanPageModule
(
1
,
1
,
out
_
,
new
RB_Duty_Plan_ViewModel
()
List
<
RB_Duty_PlanDetails_ViewModel
>
y_PlanDetails
=
new
List
<
RB_Duty_PlanDetails_ViewModel
>();
var
yestodayList
=
GetMyDutyPlanPageModule
(
1
,
1000
,
out
_
,
new
RB_Duty_Plan_ViewModel
()
{
QStartDate
=
Common
.
ConvertHelper
.
FormatDate
(
yestoday
),
QEndDate
=
Common
.
ConvertHelper
.
FormatDate
(
yestoday
),
Group_Id
=
model
.
Group_Id
});
});
foreach
(
var
yItem
in
yestodayList
)
{
if
(
yItem
.
PlanDetails
!=
null
&&
yItem
.
PlanDetails
.
Count
>
0
)
{
y_PlanDetails
.
AddRange
(
yItem
.
PlanDetails
);
}
}
if
(
y_PlanDetails
!=
null
&&
y_PlanDetails
.
Count
>
0
)
{
string
maxTime
=
y_PlanDetails
.
Max
(
qitem
=>
qitem
.
StartTime
);
if
(!
string
.
IsNullOrEmpty
(
maxTime
))
{
var
tempContent
=
y_PlanDetails
.
Where
(
qitem
=>
qitem
.
StartTime
==
maxTime
)?.
FirstOrDefault
();
if
(
tempContent
!=
null
)
{
otherContentList
=
duty_ContentRepository
.
GetDutyContentListRepository
(
new
RB_Duty_Content_ViewModel
()
{
PlanId
=
Convert
.
ToInt32
(
tempContent
.
PlanId
),
PlanShift
=
Convert
.
ToInt32
(
tempContent
.
Shift
),
PlanType
=
2
});
}
}
}
}
//当前班次
currentModel
=
model
.
PlanDetails
[
currentIndex
];
}
...
...
@@ -853,11 +877,21 @@ namespace Edu.Module.Duty
List
<
Employee_ViewModel
>
empList
=
new
List
<
Employee_ViewModel
>();
if
(
contentList
!=
null
)
{
var
tempStr
=
""
;
string
accountIdStr
=
string
.
Join
(
","
,
contentList
.
Select
(
qitem
=>
qitem
.
CreateBy
));
string
accountIdStr2
=
string
.
Join
(
","
,
otherContentList
.
Select
(
qitem
=>
qitem
.
CreateBy
));
if
(!
string
.
IsNullOrEmpty
(
accountIdStr
))
{
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Model
.
ViewModel
.
User
.
Employee_ViewModel
()
{
QIds
=
accountIdStr
});
tempStr
+=
accountIdStr
;
}
if
(!
string
.
IsNullOrEmpty
(
accountIdStr2
))
{
tempStr
+=
","
+
accountIdStr2
;
}
if
(!
string
.
IsNullOrEmpty
(
tempStr
))
{
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Model
.
ViewModel
.
User
.
Employee_ViewModel
()
{
QIds
=
tempStr
});
}
}
foreach
(
var
item
in
contentList
)
{
...
...
@@ -869,7 +903,7 @@ namespace Edu.Module.Duty
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"OnDutyModule_FileList"
);
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"OnDutyModule_
V2_
FileList"
);
}
}
}
...
...
@@ -1063,6 +1097,32 @@ namespace Edu.Module.Duty
}
}
}
//上一天最后一个班次交接内容
if
(
otherContentList
!=
null
&&
otherContentList
.
Count
>
0
)
{
foreach
(
var
hItem
in
otherContentList
)
{
try
{
if
(!
string
.
IsNullOrEmpty
(
hItem
.
FileURL
))
{
hItem
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
hItem
.
FileURL
);
}
else
{
hItem
.
FileList
=
new
List
<
string
>();
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"OnDutyModule_V2_FileList"
);
}
hItem
.
IsOperate
=
2
;
hItem
.
CreateByName
=
empList
?.
Where
(
qitem
=>
qitem
.
Id
==
hItem
.
CreateBy
)?.
FirstOrDefault
()?.
EmployeeName
??
""
;
hItem
.
CreateTimeStr2
=
Common
.
ConvertHelper
.
FormatDate
(
hItem
.
CreateTime
)
+
" "
+
hItem
.
CreateTimeStr
;
HandoverList
.
Insert
(
0
,
hItem
);
}
}
result
.
Add
(
"HandoverList"
,
HandoverList
);
result
.
Add
(
"HandoverRuleList"
,
dutyItemList
.
Where
(
qitem
=>
qitem
.
DutyCategory
==
3
&&
qitem
.
DutyType
==
1
).
Select
(
qitem
=>
new
{
...
...
@@ -1070,7 +1130,6 @@ namespace Edu.Module.Duty
qitem
.
ItemImgList
,
qitem
.
ItemName
}));
}
return
result
;
}
...
...
Edu.Repository/Course/RB_ClassRepository.cs
View file @
99a72f2b
...
...
@@ -280,7 +280,7 @@ WHERE A.ClassId={0}
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,B.CourseName,D.TeacherName,IFNULL(D.TeacherHead,'') AS TeacherHead,E.SName AS SchoolName,R.RoomName
SELECT A.*,B.CourseName,
B.CourseFeature,
D.TeacherName,IFNULL(D.TeacherHead,'') AS TeacherHead,E.SName AS SchoolName,R.RoomName
,IFNULL(t.GuestNum,0) AS OrderStudentCount,IFNULL(B.SellPrice,0) AS CourseSellPrice,IFNULL(B.OriginalPrice,0) AS CourseOriginalPrice
FROM rb_class AS A LEFT JOIN rb_course AS B ON A.CouseId=B.CourseId
LEFT JOIN rb_teacher AS D ON A.Teacher_Id=D.TId
...
...
Edu.Repository/Duty/RB_Duty_PlanRepository.cs
View file @
99a72f2b
...
...
@@ -25,14 +25,14 @@ namespace Edu.Repository.Duty
{
rowsCount
=
0
;
string
joinTable
=
""
;
if
(
query
!=
null
&&
(!
string
.
IsNullOrEmpty
(
query
.
QDutyMan
)
||
query
.
QDutyStatus
>-
1
||
query
.
QAttendanceStatus
>
0
))
if
(
query
!=
null
&&
(!
string
.
IsNullOrEmpty
(
query
.
QDutyMan
)
||
query
.
QDutyStatus
>
-
1
||
query
.
QAttendanceStatus
>
0
))
{
string
joinWhere
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
QDutyMan
))
{
joinWhere
+=
string
.
Format
(
" AND DutyMan IN({0}) "
,
query
.
QDutyMan
);
}
if
(
query
.
QDutyStatus
>-
1
)
if
(
query
.
QDutyStatus
>
-
1
)
{
joinWhere
+=
string
.
Format
(
" AND Status={0} "
,
query
.
QDutyStatus
);
}
...
...
@@ -66,7 +66,7 @@ SELECT A.* ,IFNULL(B.SName,'') AS SchoolName
FROM RB_Duty_Plan AS A LEFT JOIN rb_school AS B ON A.School_Id=B.SId
{0}
WHERE 1=1
"
,
joinTable
);
"
,
joinTable
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Duty_Plan_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
...
...
@@ -162,7 +162,7 @@ WHERE 1=1 AND A.`Status`=0
{
builder
.
AppendFormat
(
@" AND B.{0}={1} "
,
nameof
(
RB_Duty_PlanDetails_ViewModel
.
DutyMan
),
query
.
QDutyMan
);
}
if
(
query
.
QShift
>
0
)
if
(
query
.
QShift
>
0
)
{
builder
.
AppendFormat
(
@" AND B.{0}={1} "
,
nameof
(
RB_Duty_PlanDetails_ViewModel
.
Shift
),
query
.
QShift
);
}
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
99a72f2b
...
...
@@ -67,6 +67,7 @@ namespace Edu.WebApi.Controllers.Course
x
.
ClassId
,
x
.
ClassName
,
x
.
CourseName
,
x
.
CourseFeature
,
x
.
ClassHours
,
x
.
TeacherName
,
x
.
TeacherHead
,
...
...
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
99a72f2b
...
...
@@ -432,10 +432,10 @@ namespace Edu.WebApi.Controllers.Duty
{
model
.
FileURL
=
""
;
}
//if (model.PlanType == 1
&& string.IsNullOrEmpty(model.WorkContent))
//
{
//
return ApiResult.Failed(message: "请填写完成内容!");
//
}
if
(
model
.
PlanType
==
1
&&
model
.
ItemType
==
2
&&
string
.
IsNullOrEmpty
(
model
.
WorkContent
))
{
return
ApiResult
.
Failed
(
message
:
"请填写完成内容!"
);
}
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
...
...
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