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
3f02fb59
Commit
3f02fb59
authored
Nov 07, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改定时设置缺勤
parent
8b029b71
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
11 deletions
+50
-11
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+3
-4
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+2
-3
TrainSignConfig.java
src/main/java/org/rcisoft/config/TrainSignConfig.java
+5
-2
application-mt.yml
src/main/resources/application-mt.yml
+2
-2
BLessonMapper.xml
...esources/mapper/business/blesson/mapper/BLessonMapper.xml
+38
-0
No files found.
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
3f02fb59
...
...
@@ -309,7 +309,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
// "and su.del_flag = 0 and su.flag = 1 " +
"<if test= \" param.isApply != null and param.isApply != ''\">and is_apply = #{param.isApply} </if> "
+
"<if test= \" param.trainIsSign != null and param.trainIsSign != ''\">and train_is_sign = #{param.trainIsSign} </if> "
+
"and lesson_id = #{param.lessonId}</script>"
)
"and lesson_id = #{param.lessonId}"
+
"order by is_appoint desc</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
trainPersons
(
@Param
(
"param"
)
FindTrainPersonDTO
param
);
...
...
@@ -334,13 +335,11 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" train_is_sign = 1 "
,
" </set>"
,
"where 1=1 "
,
"<if test=\"lessonId!=null and lessonId != ''\">"
,
" and lesson_id in "
,
" <foreach item='item' collection='lessonIds' open='(' separator=',' close=')'> #{item} </foreach> "
,
"</if>"
,
"and train_is_sign != 2 "
,
"</script>"
})
int
selectByLessonIds
(
@Param
(
"lessonId
"
)
List
<
String
>
lessonIds
);
int
updateByLessonIds
(
@Param
(
"lessonIds
"
)
List
<
String
>
lessonIds
);
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
3f02fb59
...
...
@@ -1079,9 +1079,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"where 1=1 "
+
"and del_flag = 0 and flag = 1 "
+
"and lesson_type = 1 "
+
"AND #{nowDate} between SUBDATE(train_start_date,interval #{sec} second) and train_start_date </script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
String
>
selectByTrainStartBeforeNow
(
@Param
(
"nowDate"
)
Date
newDate
,
@Param
(
"sec"
)
String
sec
);
"AND #{nowDate} between train_over_date and SUBDATE(train_over_date,interval -#{sec} second) </script>"
)
List
<
String
>
selectByTrainNowBeforeOver
(
@Param
(
"nowDate"
)
Date
newDate
,
@Param
(
"sec"
)
String
sec
);
@Select
(
"select * from b_lesson where business_id = #{id}"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
...
src/main/java/org/rcisoft/config/TrainSignConfig.java
View file @
3f02fb59
...
...
@@ -11,6 +11,8 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.validation.Valid
;
import
java.util.Date
;
...
...
@@ -36,12 +38,13 @@ public class TrainSignConfig {
private
String
sec
;
@Scheduled
(
cron
=
"${eduJob.taskInterval}"
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
void
trainBegin
()
{
log
.
debug
(
"--------------正在将未签到的人员置为缺勤------------"
);
Date
newDate
=
new
Date
();
List
<
String
>
lessonIds
=
bLessonRepository
.
selectByTrain
StartBeforeNow
(
newDate
,
sec
);
List
<
String
>
lessonIds
=
bLessonRepository
.
selectByTrain
NowBeforeOver
(
newDate
,
sec
);
if
(
lessonIds
!=
null
&&
lessonIds
.
size
()
>
0
){
bLessonPersonRepository
.
select
ByLessonIds
(
lessonIds
);
bLessonPersonRepository
.
update
ByLessonIds
(
lessonIds
);
}
}
}
src/main/resources/application-mt.yml
View file @
3f02fb59
...
...
@@ -94,8 +94,8 @@ global:
eduJob
:
taskInterval
:
0 0/5 * * * ?
trainBegin
:
fals
e
sec
:
300
#培训
开始前
多少秒 之内的报名人员设置为缺勤
trainBegin
:
tru
e
sec
:
300
#培训
结束后
多少秒 之内的报名人员设置为缺勤
libreoffice
:
ip
:
mt_libre
...
...
src/main/resources/mapper/business/blesson/mapper/BLessonMapper.xml
View file @
3f02fb59
...
...
@@ -94,6 +94,44 @@
</collection>
</resultMap>
<resultMap
id=
"OnlyLessonInfoResultMap"
type=
"org.rcisoft.business.blesson.entity.BLesson"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"lesson_name"
jdbcType=
"VARCHAR"
property=
"lessonName"
/>
<result
column=
"default_url"
jdbcType=
"VARCHAR"
property=
"defaultUrl"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"class_hour"
jdbcType=
"VARCHAR"
property=
"classHour"
/>
<result
column=
"lecturer_id"
jdbcType=
"VARCHAR"
property=
"lecturerId"
/>
<result
column=
"release_state"
jdbcType=
"VARCHAR"
property=
"releaseState"
/>
<result
column=
"course_id"
jdbcType=
"VARCHAR"
property=
"courseId"
/>
<result
column=
"person_number"
jdbcType=
"VARCHAR"
property=
"personNumber"
/>
<result
column=
"course_time"
jdbcType=
"VARCHAR"
property=
"courseTime"
/>
<result
column=
"course_description"
jdbcType=
"VARCHAR"
property=
"courseDescription"
/>
<result
column=
"view_range"
jdbcType=
"VARCHAR"
property=
"viewRange"
/>
<result
column=
"release_date"
jdbcType=
"TIMESTAMP"
property=
"releaseDate"
/>
<result
column=
"close_date"
jdbcType=
"TIMESTAMP"
property=
"closeDate"
/>
<result
column=
"lesson_type"
jdbcType=
"VARCHAR"
property=
"lessonType"
/>
<result
column=
"discuss_number"
jdbcType=
"VARCHAR"
property=
"discussNumber"
/>
<result
column=
"recommend"
jdbcType=
"VARCHAR"
property=
"recommend"
/>
<result
column=
"collect_number"
jdbcType=
"VARCHAR"
property=
"collectNumber"
/>
<result
column=
"hot_number"
jdbcType=
"VARCHAR"
property=
"hotNumber"
/>
<!--培训-->
<result
column=
"apply_start_date"
jdbcType=
"TIMESTAMP"
property=
"applyStartDate"
/>
<result
column=
"apply_over_date"
jdbcType=
"TIMESTAMP"
property=
"applyOverDate"
/>
<result
column=
"train_start_date"
jdbcType=
"TIMESTAMP"
property=
"trainStartDate"
/>
<result
column=
"train_over_date"
jdbcType=
"TIMESTAMP"
property=
"trainOverDate"
/>
<result
column=
"max_apply_person"
jdbcType=
"VARCHAR"
property=
"maxApplyPerson"
/>
<result
column=
"train_address"
jdbcType=
"VARCHAR"
property=
"trainAddress"
/>
<result
column=
"train_sign_time"
jdbcType=
"VARCHAR"
property=
"trainSignTime"
/>
<result
column=
"qr_code"
jdbcType=
"VARCHAR"
property=
"qrCode"
/>
</resultMap>
<!--<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.blesson.entity.BLesson" extends="BaseResultMap">-->
<!--<association column="business_id" property="labelList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"></association>-->
<!--</resultMap>-->
...
...
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