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
0162a679
Commit
0162a679
authored
Nov 21, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
cf61ca46
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
8 deletions
+62
-8
ExamQueryDto.java
...n/java/org/rcisoft/business/blesson/dto/ExamQueryDto.java
+1
-1
BReleaseValueRepository.java
...t/business/breleasevalue/dao/BReleaseValueRepository.java
+4
-2
LessonValueDto.java
...rg/rcisoft/business/breleasevalue/dto/LessonValueDto.java
+10
-0
LessonValueSettingQueryDto.java
...usiness/breleasevalue/dto/LessonValueSettingQueryDto.java
+6
-0
BReleaseValueServiceImpl.java
.../breleasevalue/service/impl/BReleaseValueServiceImpl.java
+41
-5
No files found.
src/main/java/org/rcisoft/business/blesson/dto/ExamQueryDto.java
View file @
0162a679
...
@@ -53,6 +53,6 @@ public class ExamQueryDto {
...
@@ -53,6 +53,6 @@ public class ExamQueryDto {
@ApiModelProperty
(
value
=
"企业id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"企业id"
,
required
=
true
)
private
String
corpId
;
private
String
corpId
;
@ApiModelProperty
(
value
=
"用户id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"
详情
用户id"
,
required
=
true
)
private
String
personId
;
private
String
personId
;
}
}
src/main/java/org/rcisoft/business/breleasevalue/dao/BReleaseValueRepository.java
View file @
0162a679
...
@@ -103,8 +103,8 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
...
@@ -103,8 +103,8 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
* @return
* @return
*/
*/
@Select
(
"<script>"
+
@Select
(
"<script>"
+
"select bl.business_id businessId,bl.lesson_name lessonName,su.name name,"
+
"select bl.business_id businessId,bl.lesson_name lessonName,su.name name,
bl.release_state releaseState,
"
+
"bl.value_consume valueConsume,bl.value_gain valueGain ,bl.value_update_date updateDate "
+
"bl.value_consume valueConsume,bl.value_gain valueGain ,bl.value_update_date updateDate
,bl.train_start_date trainStart ,bl.train_over_date trainEnd
"
+
"from b_lesson bl "
+
"from b_lesson bl "
+
"left join s_user su on su.business_id = bl.lecturer_id "
+
"left join s_user su on su.business_id = bl.lecturer_id "
+
"where bl.del_flag !=1 and bl.flag = 1 "
+
"where bl.del_flag !=1 and bl.flag = 1 "
+
...
@@ -114,6 +114,8 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
...
@@ -114,6 +114,8 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
"<if test=\"dto.valueGainEnd!=null and dto.valueGainEnd != ''\"> and bl.value_gain <= #{dto.valueGainEnd} </if> "
+
"<if test=\"dto.valueGainEnd!=null and dto.valueGainEnd != ''\"> and bl.value_gain <= #{dto.valueGainEnd} </if> "
+
"<if test=\"dto.lessonName!=null and dto.lessonName != ''\"> and bl.lesson_name like concat('%',#{dto.lessonName},'%') </if> "
+
"<if test=\"dto.lessonName!=null and dto.lessonName != ''\"> and bl.lesson_name like concat('%',#{dto.lessonName},'%') </if> "
+
"<if test=\"dto.lecturerName!=null and dto.lecturerName != ''\"> and su.`name` like concat('%',#{dto.lecturerName},'%') </if> "
+
"<if test=\"dto.lecturerName!=null and dto.lecturerName != ''\"> and su.`name` like concat('%',#{dto.lecturerName},'%') </if> "
+
"<if test=\"dto.status!=null and dto.status != ''\"> and bl.release_state in(${dto.status}) </if> "
+
"<if test=\"dto.trainStatus!=null and dto.trainStatus != ''\"> and ( ${dto.trainStatus} )</if> "
+
"and bl.corp_id = #{curUser.corpId} "
+
"and bl.corp_id = #{curUser.corpId} "
+
"and bl.lesson_type = #{dto.type} "
+
"and bl.lesson_type = #{dto.type} "
+
"</script>"
)
"</script>"
)
...
...
src/main/java/org/rcisoft/business/breleasevalue/dto/LessonValueDto.java
View file @
0162a679
...
@@ -19,6 +19,16 @@ public class LessonValueDto {
...
@@ -19,6 +19,16 @@ public class LessonValueDto {
public
String
valueGain
;
public
String
valueGain
;
public
String
releaseState
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm"
)
public
Date
trainStart
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm"
)
public
Date
trainEnd
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm"
)
public
Date
updateDate
;
public
Date
updateDate
;
...
...
src/main/java/org/rcisoft/business/breleasevalue/dto/LessonValueSettingQueryDto.java
View file @
0162a679
...
@@ -24,6 +24,12 @@ public class LessonValueSettingQueryDto {
...
@@ -24,6 +24,12 @@ public class LessonValueSettingQueryDto {
@ApiModelProperty
(
value
=
"积分获得最大值"
)
@ApiModelProperty
(
value
=
"积分获得最大值"
)
public
String
valueGainEnd
;
public
String
valueGainEnd
;
@ApiModelProperty
(
value
=
"状态 0未发布 2已发布 4已关闭 (培训已发布后的状态===>)5培训未开始 6培训进行中 7培训已结束 "
)
public
String
status
;
@ApiModelProperty
(
value
=
"培训状态 0培训未开始 1培训进行中 2培训已结束 "
)
public
String
trainStatus
;
@ApiModelProperty
(
value
=
"0 课程 1培训"
)
@ApiModelProperty
(
value
=
"0 课程 1培训"
)
public
String
type
;
public
String
type
;
}
}
src/main/java/org/rcisoft/business/breleasevalue/service/impl/BReleaseValueServiceImpl.java
View file @
0162a679
...
@@ -26,10 +26,7 @@ import org.springframework.transaction.annotation.Propagation;
...
@@ -26,10 +26,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -108,7 +105,46 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
...
@@ -108,7 +105,46 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
}
}
return
bReleaseValueRepository
.
getLessonValue
(
curUser
,
dto
);
if
(
dto
.
getTrainStatus
()
!=
null
&&
!
""
.
equals
(
dto
.
getTrainStatus
())){
String
[]
trainStatus
=
dto
.
getTrainStatus
().
split
(
","
);
StringBuffer
sb
=
new
StringBuffer
(
" 1 != 1"
);
for
(
String
str
:
trainStatus
){
if
(
"0"
.
equals
(
str
)){
sb
.
append
(
" or bl.train_start_date > now()"
);
}
if
(
"1"
.
equals
(
str
)){
sb
.
append
(
" or now() BETWEEN bl.train_start_date and bl.train_over_date"
);
}
if
(
"2"
.
equals
(
str
)){
sb
.
append
(
" or bl.train_over_date < now() "
);
}
}
dto
.
setTrainStatus
(
sb
.
toString
());
}
else
{
dto
.
setTrainStatus
(
null
);
}
List
<
LessonValueDto
>
list
=
bReleaseValueRepository
.
getLessonValue
(
curUser
,
dto
);
for
(
LessonValueDto
valueDto
:
list
){
//0未发布 1审核 2已发布 3驳回 4关闭
if
(
"0"
.
equals
(
valueDto
.
getReleaseState
())){
valueDto
.
setReleaseState
(
"未发布"
);
}
else
if
(
"2"
.
equals
(
valueDto
.
getReleaseState
())){
if
(
"0"
.
equals
(
dto
.
getType
())){
valueDto
.
setReleaseState
(
"已发布"
);
}
else
{
if
(
valueDto
.
getTrainStart
().
after
(
new
Date
())){
valueDto
.
setReleaseState
(
"已发布(未开始)"
);
}
else
if
(
valueDto
.
getTrainStart
().
before
(
new
Date
())
&&
valueDto
.
getTrainEnd
().
after
(
new
Date
())){
valueDto
.
setReleaseState
(
"已发布(进行中)"
);
}
else
if
(
valueDto
.
getTrainEnd
().
before
(
new
Date
())){
valueDto
.
setReleaseState
(
"已发布(已结束)"
);
}
}
}
else
if
(
"4"
.
equals
(
valueDto
.
getReleaseState
())){
valueDto
.
setReleaseState
(
"已关闭"
);
}
}
return
list
;
}
}
@Override
@Override
...
...
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