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
27b0428d
Commit
27b0428d
authored
Oct 28, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
330be126
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
14 deletions
+44
-14
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+1
-2
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+4
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+39
-12
No files found.
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
27b0428d
...
...
@@ -140,7 +140,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@Select
(
"<script>select business_id,person_id from b_lesson_person where 1=1 "
+
"and del_flag = 0 and flag = 1 "
+
"AND person_id IN"
+
"<foreach item='item'
index='index'
collection='appointPersonList' open='(' close=')' separator=','> "
+
"<foreach item='item' collection='appointPersonList' open='(' close=')' separator=','> "
+
"#{item} "
+
"</foreach>"
+
"and lesson_id = #{lessonId}</script>"
)
...
...
@@ -177,7 +177,6 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" blp.appoint_id=#{appointId},"
+
" </set>"
+
" where 1=1 "
+
" and blp.is_finish != '0' "
+
" and ba.lesson_id = #{lessonId} "
+
"</script>"
)
int
cancelAppointByPersons
(
BLessonPerson
param
);
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
27b0428d
...
...
@@ -152,6 +152,10 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
List
<
BTrainFile
>
bTrainFileList
;
@ApiModelProperty
(
value
=
"时间状态 0 我开始签到 1 已开始签到 2课程结束"
)
@Transient
private
String
trainDateState
;
//-------------------------------------
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
27b0428d
...
...
@@ -581,9 +581,11 @@ public class BLessonServiceImpl implements BLessonService {
//获取部门中人员
List
<
String
>
inDepartPerson
=
new
ArrayList
<>();
List
<
GetAllRspDTO
>
departPersons
=
cotactApiRequestClient
.
getUserByDeptIds
(
appointLessonDTO
.
getCorpId
(),
appointLessonDTO
.
getAppointDepart
());
departPersons
.
forEach
(
departPerson
->{
inDepartPerson
.
add
(
departPerson
.
getId
());
});
if
(
departPersons
!=
null
&&
departPersons
.
size
()>
0
){
departPersons
.
forEach
(
departPerson
->{
inDepartPerson
.
add
(
departPerson
.
getId
());
});
}
//-------------
if
(
StringUtils
.
isEmpty
(
appointLessonDTO
.
getAppointPerson
())
&&
StringUtils
.
isEmpty
(
appointLessonDTO
.
getAppointDepart
()))
{
...
...
@@ -638,7 +640,10 @@ public class BLessonServiceImpl implements BLessonService {
//插入b_lesson_person表
appointLessonDTO
.
setAppointPersonList
(
userIdSet
);
//查询已学该课程的学习business_id
List
<
BLessonPerson
>
inLessonPersons
=
bLessonPersonRepository
.
selectPersonIdByLessonId
(
appointLessonDTO
);
List
<
BLessonPerson
>
inLessonPersons
=
new
ArrayList
<>();
if
(
appointLessonDTO
.
getAppointPersonList
()
!=
null
&&
appointLessonDTO
.
getAppointPersonList
().
size
()>
0
){
inLessonPersons
=
bLessonPersonRepository
.
selectPersonIdByLessonId
(
appointLessonDTO
);
}
if
(
inLessonPersons
!=
null
&&
inLessonPersons
.
size
()
>
0
)
{
List
<
String
>
inLessonIds
=
new
ArrayList
<>();
for
(
BLessonPerson
inLessonPerson
:
inLessonPersons
)
{
...
...
@@ -667,8 +672,13 @@ public class BLessonServiceImpl implements BLessonService {
bLessonPerson
.
setPersonId
(
userId
);
bLessonPersonOthers
.
add
(
bLessonPerson
);
});
int
line
=
bLessonPersonRepository
.
insertList
(
bLessonPersonOthers
);
int
line
;
if
(
bLessonPersonOthers
!=
null
&&
bLessonPersonOthers
.
size
()
>
0
){
line
=
bLessonPersonRepository
.
insertList
(
bLessonPersonOthers
);
}
else
{
line
=
1
;
}
return
new
PersistModel
(
line
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
}
...
...
@@ -695,13 +705,15 @@ public class BLessonServiceImpl implements BLessonService {
public
ILessonCountDTO
trainPersonCount
(
String
lessonId
)
{
ILessonCountDTO
iLessonCountDTO
=
bLessonRepository
.
trainPersonCount
(
lessonId
);
BLesson
bLesson
=
bLessonRepository
.
selectInfoById
(
lessonId
);
Date
now
=
new
Date
();
if
(
now
.
before
(
bLesson
.
getTrainStartDate
())){
iLessonCountDTO
.
setTrainType
(
"0"
);
}
else
if
(
bLesson
.
getTrainOverDate
().
before
(
now
)
){
iLessonCountDTO
.
setTrainType
(
"2"
);
}
else
{
iLessonCountDTO
.
setTrainType
(
"1"
);
if
(
bLesson
!=
null
){
Date
now
=
new
Date
();
if
(
now
.
before
(
bLesson
.
getTrainStartDate
())){
iLessonCountDTO
.
setTrainType
(
"0"
);
}
else
if
(
bLesson
.
getTrainOverDate
().
before
(
now
)
){
iLessonCountDTO
.
setTrainType
(
"2"
);
}
else
{
iLessonCountDTO
.
setTrainType
(
"1"
);
}
}
return
iLessonCountDTO
;
}
...
...
@@ -1006,6 +1018,21 @@ public class BLessonServiceImpl implements BLessonService {
}
else
{
bLesson
.
setIsCollect
(
"0"
);
}
//判断签到是否开始
if
(
bLesson
.
getTrainStartDate
()
!=
null
&&
StringUtils
.
isNotEmpty
(
bLesson
.
getTrainSignTime
())){
Date
nowDate
=
new
Date
();
Long
time
=
Long
.
parseLong
(
bLesson
.
getTrainSignTime
())
*
60
*
1000
;
Date
signStart
=
new
Date
(
bLesson
.
getTrainStartDate
().
getTime
()
-
time
);
if
(
signStart
.
before
(
nowDate
)
&&
nowDate
.
before
(
bLesson
.
getTrainOverDate
())){
bLesson
.
setTrainDateState
(
"1"
);
}
if
(
nowDate
.
before
(
signStart
)){
bLesson
.
setTrainDateState
(
"0"
);
}
if
(
bLesson
.
getTrainOverDate
().
before
(
nowDate
)){
bLesson
.
setTrainDateState
(
"2"
);
}
}
return
bLesson
;
}
...
...
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