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
3740f15b
Commit
3740f15b
authored
Nov 26, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
357a8386
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
12 deletions
+59
-12
pom.xml
pom.xml
+1
-1
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+10
-6
BDiscussServiceImpl.java
...t/business/bdiscuss/service/impl/BDiscussServiceImpl.java
+5
-0
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+20
-1
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+14
-0
UserLessonDTO.java
.../java/org/rcisoft/business/blesson/dto/UserLessonDTO.java
+3
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+1
-0
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+4
-0
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+1
-4
No files found.
pom.xml
View file @
3740f15b
...
...
@@ -439,7 +439,7 @@
<build>
<finalName>
edu
</finalName>
<finalName>
zx-education-1.0.0
</finalName>
<resources>
<resource>
<directory>
src/main/resources
</directory>
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
3740f15b
...
...
@@ -389,14 +389,16 @@ public class BChapterServiceImpl implements BChapterService {
double
newLearnProgress
=
Double
.
parseDouble
(
numberFormat
.
format
((
float
)
(
learnProgress
*
Integer
.
parseInt
(
bLesson
.
getClassHour
())
-
studentChapter
.
getProgress
())
/
Float
.
parseFloat
(
bLesson
.
getClassHour
())));
if
(
newLearnProgress
==
0
)
{
lessonPerson
.
setIsFinish
(
"0"
);
lessonPerson
.
setFinishDate
(
null
);
// lessonPerson.setFinishDate(null);
lessonPerson
.
setFinishDateSetNull
(
"1"
);
}
if
(
0
<
newLearnProgress
&&
newLearnProgress
<
1
)
{
lessonPerson
.
setIsFinish
(
"1"
);
lessonPerson
.
setFinishDate
(
null
);
// lessonPerson.setFinishDate(null);
lessonPerson
.
setFinishDateSetNull
(
"1"
);
}
lessonPerson
.
setLearnProgress
(
newLearnProgress
*
100
+
"%"
);
bLessonPersonRepository
.
update
ByPrimaryKeySelective
(
lessonPerson
);
bLessonPersonRepository
.
update
AtChapter
(
lessonPerson
);
studentChapter
.
setProgress
(
0
);
studentChapter
.
setCurrentLocation
(
0
);
brStudentChapterRepository
.
updateById
(
studentChapter
);
...
...
@@ -454,14 +456,16 @@ public class BChapterServiceImpl implements BChapterService {
}
if
(
0
==
Double
.
parseDouble
(
newLearnProgress
)){
lessonPerson
.
setIsFinish
(
"0"
);
lessonPerson
.
setFinishDate
(
null
);
// lessonPerson.setFinishDate(null);
lessonPerson
.
setFinishDateSetNull
(
"1"
);
}
else
{
if
(
learnProgress
>
0
&&
Double
.
parseDouble
(
newLearnProgress
)
<
0.01
)
{
newLearnProgress
=
"0.01"
;
}
if
(
"2"
.
equals
(
lessonPerson
.
getIsFinish
())
&&
Double
.
parseDouble
(
newLearnProgress
)
<
1
)
{
lessonPerson
.
setIsFinish
(
"1"
);
lessonPerson
.
setFinishDate
(
null
);
// lessonPerson.setFinishDate(null);
lessonPerson
.
setFinishDateSetNull
(
"1"
);
}
if
(
Double
.
parseDouble
(
newLearnProgress
)
>=
1
)
{
newLearnProgress
=
"1"
;
...
...
@@ -478,7 +482,7 @@ public class BChapterServiceImpl implements BChapterService {
lessonPerson
.
setLearnProgress
(
Float
.
parseFloat
(
newLearnProgress
)*
100
+
"%"
);
bLessonPersonRepository
.
update
ByPrimaryKeySelective
(
lessonPerson
);
bLessonPersonRepository
.
update
AtChapter
(
lessonPerson
);
}
}
...
...
src/main/java/org/rcisoft/business/bdiscuss/service/impl/BDiscussServiceImpl.java
View file @
3740f15b
package
org
.
rcisoft
.
business
.
bdiscuss
.
service
.
impl
;
import
org.rcisoft.business.bdiscuss.dto.BDiscussDto
;
import
org.rcisoft.business.blesson.dao.BLessonRepository
;
import
org.rcisoft.common.util.feignDto.MTUserGetsReqDTO
;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
...
...
@@ -37,6 +38,9 @@ public class BDiscussServiceImpl implements BDiscussService {
@Autowired
MTCotactApiRequestClient
mtCotactApiRequestClient
;
@Autowired
BLessonRepository
bLessonRepository
;
/**
* 保存 bDiscuss
* @param bDiscuss
...
...
@@ -50,6 +54,7 @@ public class BDiscussServiceImpl implements BDiscussService {
int
line
=
bDiscussRepository
.
insertSelective
(
bDiscuss
);
// log.info(UserUtil.getUserInfoProp(bDiscuss.getToken(),UserUtil.USER_USERNAME)+"新增了ID为"+
// bDiscuss.getBusinessId()+"的信息");
bLessonRepository
.
discussNumberReCount
(
bDiscuss
.
getLessonId
());
return
new
PersistModel
(
line
);
}
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
3740f15b
...
...
@@ -371,7 +371,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
"and bl.corp_id = #{param.corpId} "
+
"and blp.person_id = #{param.
user
Id} "
+
"and blp.person_id = #{param.
person
Id} "
+
"<if test= \" param.isAppoint != null and param.isAppoint != ''\">and blp.is_appoint = #{param.isAppoint} </if> "
+
"<if test=\" param.lessonTitle !=null and param.lessonTitle != ''\">and bl.lesson_name like CONCAT('%',#{param.lessonTitle},'%')</if>"
+
"<if test= \" param.isFinish != null and param.isFinish != ''\">and blp.is_finish = #{param.isFinish} </if> "
+
...
...
@@ -441,6 +441,25 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
"<if test= \" handInTimeSort != null and handInTimeSort != '' and handInTimeSort == '1'.toString()\">, a.e_endtime desc </if> "
+
"</script>"
)
List
<
ExamDto
>
userManageExam
(
ExamQueryDto
dto
);
@Update
({
"<script>"
,
"update b_lesson_person"
,
" <set>"
,
" <if test=\"updateBy != null and updateBy != ''\">update_by=#{updateBy},</if>"
,
" <if test=\"updateDate != null\">update_date=#{updateDate},</if>"
,
" <if test=\"delFlag != null and delFlag != ''\">del_flag=#{delFlag},</if>"
,
" <if test=\"flag != null and flag != ''\">flag=#{flag},</if>"
,
" <if test=\"remarks != null and remarks != ''\">remarks=#{remarks},</if>"
,
" <if test=\"personId != null and personId != ''\">person_id=#{personId},</if>"
,
" <if test=\"lessonId != null and lessonId != ''\">lesson_id=#{lessonId},</if>"
,
" <if test=\"learnProgress != null and learnProgress != ''\">learn_progress=#{learnProgress},</if>"
,
" <if test=\"isFinish != null and isFinish != ''\" >is_finish=#{isFinish},</if>"
,
" <if test=\"everFinished != null and everFinished != ''\">ever_finished=#{everFinished},</if>"
,
" <if test=\"finishDateSetNull != null and finishDateSetNull != '' and finishDateSetNull == '1'.toString()\">`finish_date` = NULL,</if>"
,
" </set>"
,
" where business_id=#{businessId}"
,
"</script>"
})
int
updateAtChapter
(
BLessonPerson
bLessonPerson
);
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
3740f15b
...
...
@@ -704,6 +704,20 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" </script>"
)
int
hotNumberReCount
(
String
lessonId
);
/**
* 重新统计评论数
*
*
* @param lessonId
* @return
*/
@Update
(
"<script>update b_lesson set discuss_number = "
+
"(select count(1) from b_discuss where 1=1 "
+
" and lesson_id = #{lessonId}) where 1=1 "
+
" and business_id = #{lessonId} "
+
" </script>"
)
int
discussNumberReCount
(
String
lessonId
);
/**
* 列表页分页查询全部课程
* @param model
...
...
src/main/java/org/rcisoft/business/blesson/dto/UserLessonDTO.java
View file @
3740f15b
...
...
@@ -9,6 +9,9 @@ import java.util.Date;
@Data
public
class
UserLessonDTO
{
@ApiModelProperty
(
value
=
"学员id"
)
private
String
personId
;
@ApiModelProperty
(
value
=
"课程标题"
)
private
String
lessonTitle
;
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
3740f15b
...
...
@@ -170,6 +170,7 @@ public class BLesson extends IdEntity<BLesson> {
private
String
trainDateState
;
@ApiModelProperty
(
value
=
"0 未开始 1签到中(进行中) 2已结束"
)
@Transient
private
String
trainType
;
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
3740f15b
...
...
@@ -145,6 +145,10 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
private
String
fullDept
;
@ApiModelProperty
(
value
=
"学完时间是否置空 1置空"
)
@Transient
private
String
finishDateSetNull
;
//初始化
public
void
initModel
(){
UserUtil
.
setCurrentPersistOperation
(
this
);
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
3740f15b
...
...
@@ -352,11 +352,8 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
if
(
bLesson
==
null
){
throw
new
ServiceException
(
ResultServiceEnums
.
NOT_LESSON_ERROR
);
}
if
(
bLessonPerson
==
null
&&
"0"
.
equals
(
bLesson
.
getLessonType
())){
throw
new
ServiceException
(
ResultServiceEnums
.
APPOINT_NOT_CLOSE
);
}
if
(
bLessonPerson
==
null
&&
"1"
.
equals
(
bLesson
.
getLessonType
())){
throw
new
ServiceException
(
ResultServiceEnums
.
LEARN_LESSO
N_NOT_EXISTS
);
throw
new
ServiceException
(
ResultServiceEnums
.
APPLY_TRAI
N_NOT_EXISTS
);
}
Date
now
=
new
Date
();
...
...
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