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
bf088ae5
Commit
bf088ae5
authored
Oct 25, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
684b24aa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
23 deletions
+61
-23
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+4
-1
StudentTrackingRspDTO.java
...g/rcisoft/business/blesson/dto/StudentTrackingRspDTO.java
+22
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+8
-0
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+25
-19
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+2
-3
No files found.
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
bf088ae5
...
...
@@ -79,7 +79,10 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" bl.lesson_name LessonTitle , su.name personName, "
+
" blp.is_appoint isAppoint , blp.is_finish isFinish ,"
+
" blp.learn_progress learnProgress ,ba.create_date appointDate ,"
+
" blp.finish_date finishDate "
+
" blp.finish_date finishDate , "
+
" blp.apply_date applyDate , "
+
" blp.sign_date signDate , "
+
" blp.train_is_sign trainIsSign "
+
"from b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id "
+
"left join s_user su on blp.person_id = su.business_id "
+
"left join b_appoint ba on ba.business_id = blp.appoint_id "
+
...
...
src/main/java/org/rcisoft/business/blesson/dto/StudentTrackingRspDTO.java
View file @
bf088ae5
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.persistence.Transient
;
import
java.util.Date
;
@Data
...
...
@@ -37,4 +40,23 @@ public class StudentTrackingRspDTO {
@ApiModelProperty
(
value
=
"完成时间"
)
private
Date
finishDate
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"报名时间"
)
@Transient
private
Date
applyDate
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"签到日期"
)
@Transient
private
String
signDate
;
@ApiModelProperty
(
value
=
"培训状态(0 待参加 1 缺勤 2 已签到"
)
@Transient
private
String
trainIsSign
;
}
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
bf088ae5
...
...
@@ -209,6 +209,8 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
String
trainIsSign
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"签到日期"
)
@Transient
private
String
signDate
;
...
...
@@ -221,6 +223,12 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
String
applyIsFull
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"报名时间"
)
@Transient
private
Date
applyDate
;
public
void
initModel
(){
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
UserUtil
.
setCurrentPersistOperation
(
this
);
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
bf088ae5
...
...
@@ -57,9 +57,13 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
if
(
"1"
.
equals
(
bLessonPerson
.
getIsAppoint
())){
throw
new
ServiceException
(
ResultServiceEnums
.
APPOINT_NOT_CLOSE
);
}
bLessonPerson
.
setDelFlag
(
"1"
);
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
// int line = bLessonPersonRepository.quit(quitLessonDTO.getBusinessId());
int
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
//重新统计在学人数
bLessonRepository
.
personNumberReCount
(
quitLessonDTO
.
getLessonId
());
return
new
PersistModel
(
1
,
bLessonPersonRepository
.
quit
(
quitLessonDTO
.
getBusinessId
())
);
return
new
PersistModel
(
line
);
}
@Override
...
...
@@ -75,11 +79,13 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Override
public
List
<
StudentTrackingRspDTO
>
studentTrackingByPagination
(
PageUtil
pageUtil
,
StudentTrackingDTO
studentTrackingDTO
)
{
List
<
Long
>
deptIds
=
new
ArrayList
<>();
deptIds
.
add
(
Long
.
parseLong
(
studentTrackingDTO
.
getDepartId
()));
List
<
MTGetUserByDeptIdsRspDTO
>
datas
=
mtCotactApiRequestClient
.
userGetUserByDeptIds
(
studentTrackingDTO
.
getCorpId
(),
deptIds
);
datas
.
forEach
(
data
->{
studentTrackingDTO
.
getUserIdsInDepart
().
add
(
data
.
getId
());
});
if
(
StringUtils
.
isNotEmpty
(
studentTrackingDTO
.
getDepartId
())){
deptIds
.
add
(
Long
.
parseLong
(
studentTrackingDTO
.
getDepartId
()));
List
<
MTGetUserByDeptIdsRspDTO
>
datas
=
mtCotactApiRequestClient
.
userGetUserByDeptIds
(
studentTrackingDTO
.
getCorpId
(),
deptIds
);
datas
.
forEach
(
data
->{
studentTrackingDTO
.
getUserIdsInDepart
().
add
(
data
.
getId
());
});
}
List
<
StudentTrackingRspDTO
>
studentTrackingRspDTOs
=
bLessonPersonRepository
.
studentTrackingByPagination
(
studentTrackingDTO
);
List
<
String
>
uids
=
new
ArrayList
<>();
studentTrackingRspDTOs
.
forEach
(
studentTrackingRspDTO
->{
...
...
@@ -129,20 +135,20 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
//查询是否在学习
String
isFinish
=
bLessonPersonRepository
.
selectIsFinish
(
cancelAppointDTO
);
int
result
=
0
;
if
(
"0"
.
equals
(
isFinish
)){
//未开始执行删除
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
setBusinessId
(
cancelAppointDTO
.
getBusinessId
());
result
=
bLessonPersonRepository
.
logicalDelete
(
bLessonPerson
);
}
else
if
(
"1"
.
equals
(
isFinish
)
||
"2"
.
equals
(
isFinish
)){
//
if ("0".equals(isFinish)){
//
//未开始执行删除
//
BLessonPerson bLessonPerson = new BLessonPerson();
//
bLessonPerson.setBusinessId(cancelAppointDTO.getBusinessId());
//
result = bLessonPersonRepository.logicalDelete(bLessonPerson);
//
}else if ("1".equals(isFinish) || "2".equals(isFinish)){
//已开始执行更新
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
setBusinessId
(
cancelAppointDTO
.
getBusinessId
());
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
bLessonPerson
.
setIsAppoint
(
"0"
);
bLessonPerson
.
setAppointId
(
""
);
result
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
}
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
setBusinessId
(
cancelAppointDTO
.
getBusinessId
());
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
bLessonPerson
.
setIsAppoint
(
"0"
);
bLessonPerson
.
setAppointId
(
""
);
result
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
//
}
return
new
PersistModel
(
1
,
result
);
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
bf088ae5
...
...
@@ -807,11 +807,10 @@ public class BLessonServiceImpl implements BLessonService {
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
setTrainIsSign
(
SetTrainIsSignDTO
setTrainIsSignDTO
)
{
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
setBusinessId
(
setTrainIsSignDTO
.
getBusinessId
());
BLessonPerson
bLessonPerson
=
bLessonPersonRepository
.
selectById
(
setTrainIsSignDTO
.
getBusinessId
());
bLessonPerson
.
setTrainIsSign
(
setTrainIsSignDTO
.
getTrainIsSign
());
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
int
line
=
bLessonPersonRepository
.
insert
Selective
(
bLessonPerson
);
int
line
=
bLessonPersonRepository
.
updateByPrimaryKey
Selective
(
bLessonPerson
);
return
new
PersistModel
(
line
);
}
...
...
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