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
bf15939d
Commit
bf15939d
authored
Nov 27, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
5d9f6422
9075a70c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
20 deletions
+36
-20
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+15
-9
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+19
-9
ResultServiceEnums.java
...main/java/org/rcisoft/core/result/ResultServiceEnums.java
+1
-1
LogUtil.java
src/main/java/org/rcisoft/core/util/LogUtil.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
bf15939d
...
...
@@ -194,12 +194,13 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
PersistModel
cancelAppoint
(
CancelAppointDTO
cancelAppointDTO
)
{
String
bAppointId
=
bLessonPersonRepository
.
selectAppointIdById
(
cancelAppointDTO
);
if
(
StringUtils
.
isEmpty
(
bAppointId
)){
// String bAppointId = bLessonPersonRepository.selectAppointIdById(cancelAppointDTO);
BLessonPerson
bLessonPerson
=
bLessonPersonRepository
.
selectById
(
cancelAppointDTO
.
getBusinessId
());
if
(
bLessonPerson
==
null
||
StringUtils
.
isEmpty
(
bLessonPerson
.
getAppointId
())){
throw
new
ServiceException
(
ResultServiceEnums
.
APPOINT_NOT_CANCEL
);
}
BAppoint
bAppoint
=
bAppointRepository
.
selectById
(
b
AppointId
);
BAppoint
bAppoint
=
bAppointRepository
.
selectById
(
b
LessonPerson
.
getAppointId
()
);
//改变bAppoint 值
if
(
bAppoint
==
null
){
throw
new
ServiceException
(
ResultServiceEnums
.
NOT_APPOINT_INFO
);
...
...
@@ -221,12 +222,12 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
// bAppoint.setDesignatedId(designatedIdRes);
//查询是否在学习
BLesson
bLesson
=
bLessonRepository
.
selectByPrimaryKey
(
cancelAppointDTO
.
getLessonId
());
BLesson
bLesson
=
bLessonRepository
.
selectByPrimaryKey
(
bLessonPerson
.
getLessonId
());
// String isFinish = bLessonPersonRepository.selectIsFinish(cancelAppointDTO);
BLessonPerson
bLessonPerson
=
bLessonPersonRepository
.
selectById
(
cancelAppointDTO
.
getBusinessId
());
// BLessonPerson bLessonPerson1
= bLessonPersonRepository.selectById(cancelAppointDTO.getBusinessId());
int
result
=
0
;
//课程
if
(
bLesson
!=
null
&&
"0"
.
equals
(
bLesson
.
getLessonType
())
&&
bLessonPerson
!=
null
&&
"0"
.
equals
(
bLessonPerson
.
getIsFinish
())){
if
(
bLesson
!=
null
&&
"0"
.
equals
(
bLesson
.
getLessonType
())
&&
"0"
.
equals
(
bLessonPerson
.
getIsFinish
())){
//未开始执行删除
bLessonPerson
.
setDelFlag
(
"1"
);
//将加入学习时间置空
...
...
@@ -235,7 +236,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
bLessonPerson
.
setIsAppoint
(
"0"
);
result
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
}
if
(
bLesson
!=
null
&&
"0"
.
equals
(
bLesson
.
getLessonType
())
&&
bLessonPerson
!=
null
&&
(
"1"
.
equals
(
bLessonPerson
.
getIsFinish
())
||
"2"
.
equals
(
bLessonPerson
.
getIsFinish
()))){
if
(
bLesson
!=
null
&&
"0"
.
equals
(
bLesson
.
getLessonType
())
&&
(
"1"
.
equals
(
bLessonPerson
.
getIsFinish
())
||
"2"
.
equals
(
bLessonPerson
.
getIsFinish
()))){
//已开始执行更新
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
bLessonPerson
.
setIsAppoint
(
"0"
);
...
...
@@ -243,7 +244,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
result
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
}
//培训
if
(
bLesson
!=
null
&&
"1"
.
equals
(
bLesson
.
getLessonType
())
&&
bLessonPerson
!=
null
){
if
(
bLesson
!=
null
&&
"1"
.
equals
(
bLesson
.
getLessonType
())){
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
bLessonPerson
.
setIsAppoint
(
"0"
);
...
...
@@ -394,10 +395,15 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Override
public
int
selectByPersonAndLesson
(
LessonAndUserDTO
lessonAndUserDTO
)
{
List
<
BLessonPerson
>
bLessonPersonList
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
lessonAndUserDTO
);
BLesson
bLesson
=
bLessonRepository
.
selectByPrimaryKey
(
lessonAndUserDTO
.
getLessonId
());
int
result
=
0
;
if
(
bLessonPersonList
==
null
||
bLessonPersonList
.
size
()
<
1
||
lessonAndUserDTO
.
getUserId
().
equals
(
bLessonPersonList
.
get
(
0
).
getLecturerId
())
){
if
(
bLessonPersonList
==
null
||
bLessonPersonList
.
size
()
<
1
){
result
=
1
;
}
if
(
bLesson
!=
null
&&
lessonAndUserDTO
.
getUserId
().
equals
(
bLesson
.
getLecturerId
())){
result
=
0
;
}
return
result
;
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
bf15939d
...
...
@@ -1291,8 +1291,13 @@ public class BLessonServiceImpl implements BLessonService {
}
else
{
bLesson
.
setIsCollect
(
"0"
);
}
//判断签到是否开始
setDateState
(
bLesson
);
if
(
"1"
.
equals
(
bLesson
.
getLessonType
())){
Date
now
=
new
Date
();
return
setTrainType
(
bLesson
,
now
);
}
return
bLesson
;
}
...
...
@@ -1549,17 +1554,22 @@ 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"
);
}
bLesson
=
setTrainType
(
bLesson
,
now
);
});
return
bLessonList
;
}
BLesson
setTrainType
(
BLesson
bLesson
,
Date
now
){
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
bLesson
;
}
}
src/main/java/org/rcisoft/core/result/ResultServiceEnums.java
View file @
bf15939d
...
...
@@ -215,7 +215,7 @@ public enum ResultServiceEnums {
NOT_MORE_COUNT
(
114
,
"添加超过规定个数"
),
APPOINT_NOT_CLOSE
(
115
,
"必修不能退出"
),
STATE_NOT_RELEASE
(
116
,
"该课程状态不能发布"
),
APPOINT_NOT_CANCEL
(
117
,
"
该课程
不能取消指派"
),
APPOINT_NOT_CANCEL
(
117
,
"不能取消指派"
),
INVALID_PARAMETER_VALUE
(
118
,
"参数值无效"
),
NOT_RECOMMEND
(
119
,
"该课程未推荐"
),
NO_DATA
(
120
,
"该数据不存在"
),
...
...
src/main/java/org/rcisoft/core/util/LogUtil.java
View file @
bf15939d
...
...
@@ -6,6 +6,6 @@ import lombok.extern.slf4j.Slf4j;
public
class
LogUtil
{
//文件转换日志打印
public
static
void
fileChangeLog
(
String
message
){
log
.
info
(
message
);
log
.
debug
(
message
);
}
}
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