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
2843775e
Commit
2843775e
authored
Nov 26, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
70cf7be1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+6
-2
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+17
-12
No files found.
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
2843775e
...
@@ -102,7 +102,11 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -102,7 +102,11 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
@Override
public
List
<
BLesson
>
queryLearnBLessonsByPagination
(
PageUtil
pageUtil
,
ILearnLessonDTO
model
)
{
public
List
<
BLesson
>
queryLearnBLessonsByPagination
(
PageUtil
pageUtil
,
ILearnLessonDTO
model
)
{
return
bLessonPersonRepository
.
queryLearnBLessons
(
model
);
List
<
BLesson
>
bLessonList
=
bLessonPersonRepository
.
queryLearnBLessons
(
model
);
if
(
"1"
.
equals
(
model
.
getLessonType
())){
return
bLessonServiceImpl
.
setTrainTypeByList
(
bLessonList
);
}
return
bLessonList
;
}
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
...
@@ -126,7 +130,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -126,7 +130,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
Date
signStart
=
new
Date
(
bLesson
.
getTrainStartDate
().
getTime
()
-
time
);
Date
signStart
=
new
Date
(
bLesson
.
getTrainStartDate
().
getTime
()
-
time
);
if
(
now
.
before
(
signStart
)){
if
(
now
.
before
(
signStart
)){
trainType
=
"0"
;
trainType
=
"0"
;
}
else
if
(
bLesson
.
getTrainOverDate
().
before
(
now
)
){
}
else
if
(
bLesson
.
getTrainOverDate
().
before
(
now
)){
trainType
=
"2"
;
trainType
=
"2"
;
}
else
{
}
else
{
trainType
=
"1"
;
trainType
=
"1"
;
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
2843775e
...
@@ -173,18 +173,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -173,18 +173,7 @@ public class BLessonServiceImpl implements BLessonService {
public
List
<
BLesson
>
queryBLessonsByPagination
(
PageUtil
pageUtil
,
MyReleaseDTO
myReleaseDTO
)
{
public
List
<
BLesson
>
queryBLessonsByPagination
(
PageUtil
pageUtil
,
MyReleaseDTO
myReleaseDTO
)
{
List
<
BLesson
>
bLessonList
=
bLessonRepository
.
queryBLessons
(
myReleaseDTO
);
List
<
BLesson
>
bLessonList
=
bLessonRepository
.
queryBLessons
(
myReleaseDTO
);
if
(
"1"
.
equals
(
myReleaseDTO
.
getLessonType
())){
if
(
"1"
.
equals
(
myReleaseDTO
.
getLessonType
())){
Date
now
=
new
Date
();
return
setTrainTypeByList
(
bLessonList
);
bLessonList
.
forEach
(
bLesson
->
{
Long
time
=
Long
.
parseLong
(
bLesson
.
getTrainSignTime
())
*
60
*
1000
;
Date
signStart
=
new
Date
(
bLesson
.
getTrainStartDate
().
getTime
()
-
time
);
if
(
now
.
before
(
signStart
)){
bLesson
.
setTrainType
(
"0"
);
}
else
if
(
bLesson
.
getTrainOverDate
().
before
(
now
)
){
bLesson
.
setTrainType
(
"2"
);
}
else
{
bLesson
.
setTrainType
(
"1"
);
}
});
}
}
return
bLessonList
;
return
bLessonList
;
}
}
...
@@ -1556,4 +1545,20 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1556,4 +1545,20 @@ public class BLessonServiceImpl implements BLessonService {
}
}
}
}
List
<
BLesson
>
setTrainTypeByList
(
List
<
BLesson
>
bLessonList
){
Date
now
=
new
Date
();
bLessonList
.
forEach
(
bLesson
->
{
Long
time
=
Long
.
parseLong
(
bLesson
.
getTrainSignTime
())
*
60
*
1000
;
Date
signStart
=
new
Date
(
bLesson
.
getTrainStartDate
().
getTime
()
-
time
);
if
(
now
.
before
(
signStart
)){
bLesson
.
setTrainType
(
"0"
);
}
else
if
(
bLesson
.
getTrainOverDate
().
before
(
now
)
){
bLesson
.
setTrainType
(
"2"
);
}
else
{
bLesson
.
setTrainType
(
"1"
);
}
});
return
bLessonList
;
}
}
}
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