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
f24996eb
Commit
f24996eb
authored
May 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8133a53d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
14 deletions
+81
-14
RB_Visitor.cs
Edu.Model/Entity/Duty/RB_Visitor.cs
+5
-0
RB_Duty_Plan_ViewModel.cs
Edu.Model/ViewModel/Duty/RB_Duty_Plan_ViewModel.cs
+24
-0
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+18
-1
RB_Duty_PlanRepository.cs
Edu.Repository/Duty/RB_Duty_PlanRepository.cs
+1
-1
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+33
-12
No files found.
Edu.Model/Entity/Duty/RB_Visitor.cs
View file @
f24996eb
...
...
@@ -85,5 +85,10 @@ namespace Edu.Model.Entity.Duty
/// 值班编号
/// </summary>
public
int
PlanId
{
get
;
set
;
}
/// <summary>
/// 到访时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Duty/RB_Duty_Plan_ViewModel.cs
View file @
f24996eb
...
...
@@ -39,5 +39,29 @@ namespace Edu.Model.ViewModel.Duty
/// 班次
/// </summary>
public
int
QShift
{
get
;
set
;
}
/// <summary>
/// 值班状态(0-未开始,1-值班中,2-值班完成)
/// </summary>
public
int
DutyStatus
{
get
;
set
;
}
/// <summary>
/// 值班状态字符串
/// </summary>
public
string
DutyStatusStr
{
get
{
string
str
=
""
;
switch
(
this
.
DutyStatus
)
{
case
0
:
str
=
"未开始"
;
break
;
case
1
:
str
=
"值班中"
;
break
;
case
2
:
str
=
"值班完成"
;
break
;
}
return
str
;
}
}
}
}
Edu.Module.Duty/DutyPlanModule.cs
View file @
f24996eb
...
...
@@ -329,7 +329,8 @@ namespace Edu.Module.Duty
var
c_workModel
=
currentPlanContetList
?.
Where
(
qitem
=>
qitem
.
ItemId
==
item
.
Id
)?.
FirstOrDefault
();
var
pObj
=
new
{
item
.
Id
,
Id
=
c_workModel
?.
Id
??
0
,
ItemId
=
item
.
Id
,
item
.
ItemName
,
item
.
ItemType
,
IsChecked
=
c_workModel
?.
WorkIsFinish
??
0
,
...
...
@@ -403,6 +404,19 @@ namespace Edu.Module.Duty
public
bool
SetDutyContentModule
(
RB_Duty_Content_ViewModel
model
)
{
bool
flag
=
false
;
if
(
model
.
PlanType
==
1
)
{
model
.
FileURL
=
""
;
model
.
OtherContent
=
""
;
model
.
OtherRemark
=
""
;
}
else
{
model
.
WorkContent
=
""
;
model
.
ItemId
=
0
;
model
.
WorkIsFinish
=
0
;
}
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
@@ -476,6 +490,9 @@ namespace Edu.Module.Duty
{
nameof
(
RB_Visitor_ViewModel
.
CourseName
),
model
.
CourseName
},
{
nameof
(
RB_Visitor_ViewModel
.
StudyTime
),
model
.
StudyTime
},
{
nameof
(
RB_Visitor_ViewModel
.
LevelType
),
model
.
LevelType
},
{
nameof
(
RB_Visitor_ViewModel
.
Evaluate
),
model
.
Evaluate
},
{
nameof
(
RB_Visitor_ViewModel
.
Remark
),
model
.
Remark
},
{
nameof
(
RB_Visitor_ViewModel
.
VisitorStatus
),
model
.
VisitorStatus
},
};
flag
=
visitorRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Visitor_ViewModel
.
Id
),
model
.
Id
));
}
...
...
Edu.Repository/Duty/RB_Duty_PlanRepository.cs
View file @
f24996eb
...
...
@@ -66,7 +66,7 @@ WHERE 1=1
SELECT A.ID,A.Date,IFNULL(C.SName,'') AS SchoolName,A.CreateBy,A.School_Id
FROM RB_Duty_Plan AS A INNER JOIN rb_duty_plandetails AS B ON A.Id=B.PlanId
INNER JOIN rb_school AS C ON A.School_Id=C.SId
WHERE 1=1 AND A.`Status`=0
AND B.`Status`=0
WHERE 1=1 AND A.`Status`=0
"
);
if
(
query
==
null
)
{
...
...
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
f24996eb
...
...
@@ -84,7 +84,7 @@ namespace Edu.WebApi.Controllers.Duty
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Duty_Plan_ViewModel
()
{
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
,
};
query
.
QDutyMan
=
base
.
UserInfo
.
Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
...
...
@@ -124,6 +124,21 @@ namespace Edu.WebApi.Controllers.Duty
nextModel
=
item
.
PlanDetails
[
nextIndex
];
}
}
var
dutyStartTime
=
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
currentModel
.
StartTime
);
var
dutyEndTime
=
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
currentModel
.
EndTime
);
if
(
DateTime
.
Now
>
dutyEndTime
)
{
item
.
DutyStatus
=
2
;
}
else
if
(
DateTime
.
Now
>=
dutyStartTime
&&
DateTime
.
Now
<=
dutyEndTime
)
{
item
.
DutyStatus
=
1
;
}
else
{
item
.
DutyStatus
=
0
;
}
result
.
Add
(
new
{
item
.
Id
,
...
...
@@ -137,6 +152,8 @@ namespace Edu.WebApi.Controllers.Duty
ReciveMan
=
nextModel
?.
DutyManName
??
""
,
GiveMan
=
previousModel
?.
DutyManName
??
""
,
item
.
CreateByName
,
item
.
DutyStatus
,
item
.
DutyStatusStr
,
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -236,15 +253,15 @@ namespace Edu.WebApi.Controllers.Duty
var
model
=
new
RB_Duty_Content_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
PlanShift
=
base
.
ParmJObj
.
GetInt
(
"PlanShift"
),
PlanType
=
base
.
ParmJObj
.
GetInt
(
"PlanType"
),
PlanId
=
base
.
ParmJObj
.
GetInt
(
"PlanId"
),
PlanShift
=
base
.
ParmJObj
.
GetInt
(
"PlanShift"
),
PlanType
=
base
.
ParmJObj
.
GetInt
(
"PlanType"
),
PlanId
=
base
.
ParmJObj
.
GetInt
(
"PlanId"
),
FileURL
=
base
.
ParmJObj
.
GetStringValue
(
"FileURL"
),
OtherContent
=
base
.
ParmJObj
.
GetStringValue
(
"OtherContent"
),
OtherRemark
=
base
.
ParmJObj
.
GetStringValue
(
"OtherRemark"
),
WorkContent
=
base
.
ParmJObj
.
GetStringValue
(
"WorkContent"
),
OtherContent
=
base
.
ParmJObj
.
GetStringValue
(
"OtherContent"
),
OtherRemark
=
base
.
ParmJObj
.
GetStringValue
(
"OtherRemark"
),
WorkContent
=
base
.
ParmJObj
.
GetStringValue
(
"WorkContent"
),
WorkIsFinish
=
base
.
ParmJObj
.
GetInt
(
"WorkIsFinish"
),
ItemId
=
base
.
ParmJObj
.
GetInt
(
"ItemId"
),
ItemId
=
base
.
ParmJObj
.
GetInt
(
"ItemId"
),
};
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
...
...
@@ -304,7 +321,8 @@ namespace Edu.WebApi.Controllers.Duty
item
.
VisitorStatusStr
,
item
.
Evaluate
,
item
.
VisitTimes
,
item
.
Remark
item
.
Remark
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
CreateTime
)
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -329,12 +347,15 @@ namespace Edu.WebApi.Controllers.Duty
CourseName
=
base
.
ParmJObj
.
GetStringValue
(
"CourseName"
),
StudyTime
=
base
.
ParmJObj
.
GetStringValue
(
"StudyTime"
),
LevelType
=
base
.
ParmJObj
.
GetStringValue
(
"LevelType"
),
PlanId
=
base
.
ParmJObj
.
GetInt
(
"PlanId"
),
PlanId
=
base
.
ParmJObj
.
GetInt
(
"PlanId"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
Evaluate
=
base
.
ParmJObj
.
GetStringValue
(
"Evaluate"
),
VisitorStatus
=
base
.
ParmJObj
.
GetInt
(
"VisitorStatus"
)
};
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
VisitorStatus
=
1
;
model
.
CreateTime
=
DateTime
.
Now
;
bool
flag
=
dutyPlanModule
.
SetVisitorModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -348,7 +369,7 @@ namespace Edu.WebApi.Controllers.Duty
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
int
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
);
var
model
=
dutyPlanModule
.
RemoveVisitorModule
(
Id
,
Status
);
var
model
=
dutyPlanModule
.
RemoveVisitorModule
(
Id
,
Status
);
return
ApiResult
.
Success
(
data
:
model
);
}
...
...
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