Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-riskmanage
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 66ffc5e5
authored
Dec 10, 2025
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复编辑学习计划从立即锁定到限时锁定,已锁定人员未解锁
课程列表查询增加可屏蔽未分组的课程参数
1 parent
b38d42d5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
57 deletions
rpc-dj-riskmanage-api/src/main/java/cn/com/glsx/dj/riskmanage/dto/learningcenter/CourseSearchDTO.java
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/mapper/learningcenter/LearningCenterTrainingPlanPersonMapper.java
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanService.java
rpc-dj-riskmanage/src/main/resources/META-INF/orm/BeiSenCourseMapper.xml
rpc-dj-riskmanage/src/main/resources/META-INF/orm/LearningCenterTrainingPlanPersonMapper.xml
rpc-dj-riskmanage/src/test/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterCourseServiceTest.java
rpc-dj-riskmanage-api/src/main/java/cn/com/glsx/dj/riskmanage/dto/learningcenter/CourseSearchDTO.java
View file @
66ffc5e
...
@@ -17,6 +17,9 @@ public class CourseSearchDTO implements Serializable {
...
@@ -17,6 +17,9 @@ public class CourseSearchDTO implements Serializable {
@ApiModelProperty
(
notes
=
"课程分类id"
)
@ApiModelProperty
(
notes
=
"课程分类id"
)
private
Integer
courseCategoryId
;
private
Integer
courseCategoryId
;
@ApiModelProperty
(
notes
=
"排除未分类课程:1-排除"
)
private
Integer
excludeNullCategoryId
;
@ApiModelProperty
(
notes
=
"课程id列表"
)
@ApiModelProperty
(
notes
=
"课程id列表"
)
private
List
<
String
>
courseIds
;
private
List
<
String
>
courseIds
;
...
...
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/mapper/learningcenter/LearningCenterTrainingPlanPersonMapper.java
View file @
66ffc5e
...
@@ -18,4 +18,9 @@ public interface LearningCenterTrainingPlanPersonMapper extends OreMapper<Learni
...
@@ -18,4 +18,9 @@ public interface LearningCenterTrainingPlanPersonMapper extends OreMapper<Learni
* 超时未完成自动锁住开单权限
* 超时未完成自动锁住开单权限
*/
*/
void
autoLockOpenOrder
(
@Param
(
"trainingPlanId"
)
Integer
trainingPlanId
,
@Param
(
"updatedBy"
)
String
updatedBy
);
void
autoLockOpenOrder
(
@Param
(
"trainingPlanId"
)
Integer
trainingPlanId
,
@Param
(
"updatedBy"
)
String
updatedBy
);
/**
* 未超时未完成限时可开单
*/
void
autoOpenOrder
(
@Param
(
"planId"
)
Integer
planId
,
@Param
(
"updatedBy"
)
String
updatedBy
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanService.java
View file @
66ffc5e
...
@@ -683,6 +683,8 @@ public class LearningCenterTrainingPlanService {
...
@@ -683,6 +683,8 @@ public class LearningCenterTrainingPlanService {
}
else
{
}
else
{
// 开放,限时锁定:非白名单内且未完成计划且权限开放且超时,改为锁定
// 开放,限时锁定:非白名单内且未完成计划且权限开放且超时,改为锁定
trainingPlanPersonMapper
.
autoLockOpenOrder
(
planId
,
updatedBy
);
trainingPlanPersonMapper
.
autoLockOpenOrder
(
planId
,
updatedBy
);
// 开放,限时锁定::非白名单内且未完成计划且权限未开放且未超时,改为开放
trainingPlanPersonMapper
.
autoOpenOrder
(
planId
,
updatedBy
);
}
}
}
}
}
}
...
...
rpc-dj-riskmanage/src/main/resources/META-INF/orm/BeiSenCourseMapper.xml
View file @
66ffc5e
...
@@ -65,60 +65,63 @@
...
@@ -65,60 +65,63 @@
beisen_created_by, created_time, created_by, updated_time, updated_by, deleted_flag
beisen_created_by, created_time, created_by, updated_time, updated_by, deleted_flag
</sql>
</sql>
<sql
id=
"coursePageCondition"
>
<sql
id=
"coursePageCondition"
>
<where>
<where>
bc.deleted_flag = 'N'
bc.deleted_flag = 'N'
<if
test=
"courseCategoryId != null"
>
<if
test=
"courseCategoryId != null"
>
<choose>
<choose>
<when
test=
"courseCategoryId == 1"
>
<when
test=
"courseCategoryId == 1"
>
and (ccr.course_id = #{courseCategoryId} or ccr.id is null)
and (ccr.course_id = #{courseCategoryId} or ccr.id is null)
</when>
</when>
<otherwise>
<otherwise>
and (ccr.category_id = #{courseCategoryId} or ccr.parent_id = #{courseCategoryId})
and (ccr.category_id = #{courseCategoryId} or ccr.parent_id = #{courseCategoryId})
</otherwise>
</otherwise>
</choose>
</choose>
</if>
</if>
<if
test=
"title != null and title != ''"
>
<if
test=
"title != null and title != ''"
>
and bc.title like concat('%', #{title}, '%')
and bc.title like concat('%', #{title}, '%')
</if>
</if>
<if
test=
"courseFileType != null and courseFileType != ''"
>
<if
test=
"excludeNullCategoryId != null and excludeNullCategoryId == 1"
>
and bc.course_file_type = #{courseFileType}
and ccr.category_id IS NOT NULL
</if>
</if>
<if
test=
"courseStatus != null and courseStatus != ''"
>
<if
test=
"courseFileType != null and courseFileType != ''"
>
and bc.course_status = #{courseStatus}
and bc.course_file_type = #{courseFileType}
</if>
</if>
<if
test=
"createTimeStart != null"
>
<if
test=
"courseStatus != null and courseStatus != ''"
>
and bc.beisen_created_time
>
= #{createTimeStart}
and bc.course_status = #{courseStatus}
</if>
</if>
<if
test=
"createTimeEnd != null"
>
<if
test=
"createTimeStart != null"
>
and bc.beisen_created_time
<
= #{createTimeEnd}
and bc.beisen_created_time
>
= #{createTimeStart}
</if>
</if>
<if
test=
"courseIds != null and courseIds.size() > 0"
>
<if
test=
"createTimeEnd != null"
>
and bc.id in
and bc.beisen_created_time
<
= #{createTimeEnd}
<foreach
collection=
"courseIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
</if>
#{item}
<if
test=
"courseIds != null and courseIds.size() > 0"
>
</foreach>
and bc.id in
</if>
<foreach
collection=
"courseIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<if
test=
"statusList != null and statusList.size() > 0"
>
#{item}
and bc.course_status in
</foreach>
<foreach
collection=
"statusList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
</if>
#{item}
<if
test=
"statusList != null and statusList.size() > 0"
>
</foreach>
and bc.course_status in
</if>
<foreach
collection=
"statusList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<if
test=
"organizationIdList != null and organizationIdList.size() > 0"
>
#{item}
and bc.organization in
</foreach>
<foreach
collection=
"organizationIdList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
</if>
#{item}
<if
test=
"organizationIdList != null and organizationIdList.size() > 0"
>
</foreach>
and bc.organization in
</if>
<foreach
collection=
"organizationIdList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<if
test=
"userIdList != null and userIdList.size() > 0"
>
#{item}
and bc.beisen_created_by in
</foreach>
<foreach
collection=
"userIdList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
</if>
#{item}
<if
test=
"userIdList != null and userIdList.size() > 0"
>
</foreach>
and bc.beisen_created_by in
</if>
<foreach
collection=
"userIdList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
</where>
#{item}
</sql>
</foreach>
</if>
</where>
</sql>
<select
id=
"listCoursePageInfo"
resultMap=
"CoursePageMap"
parameterType=
"cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO"
>
<select
id=
"listCoursePageInfo"
resultMap=
"CoursePageMap"
parameterType=
"cn.com.glsx.dj.riskmanage.dto.learningcenter.CourseSearchDTO"
>
select bc.id, bc.title, bc.course_file_type,round(bc.total_duration) as total_duration, bc.course_status,
select bc.id, bc.title, bc.course_file_type,round(bc.total_duration) as total_duration, bc.course_status,
...
...
rpc-dj-riskmanage/src/main/resources/META-INF/orm/LearningCenterTrainingPlanPersonMapper.xml
View file @
66ffc5e
...
@@ -80,9 +80,33 @@
...
@@ -80,9 +80,33 @@
and p.order_permission_status = 1
and p.order_permission_status = 1
and p.order_permission_type = 2
and p.order_permission_type = 2
and find_in_set(pp.person_id, p.white_list) = 0
and find_in_set(pp.person_id, p.white_list) = 0
and DATEDIFF(now(), lep.created_date) > p.limit_time_param
and DATEDIFF(now(), lep.created_date)
<![CDATA[>]]
>
p.limit_time_param
<if
test=
"trainingPlanId != null"
>
<if
test=
"trainingPlanId != null"
>
and pp.plan_id = #{trainingPlanId}
and pp.plan_id = #{trainingPlanId}
</if>
</if>
</update>
</update>
<update
id=
"autoOpenOrder"
>
update dj_car_life_learning_center_training_plan_person pp
inner join dj_car_life_learning_center_training_plan p on pp.plan_id = p.id
inner join dj_car_life_learning_center_level_exam_person lep on p.exam_id = lep.exam_id and pp.person_id = lep.person_id and lep.deleted_flag = 'N'
set pp.open_order_status = 1, pp.updated_date = now()
<if
test=
"updatedBy == null"
>
, pp.updated_by = 'Job'
</if>
<if
test=
"updatedBy != null and updatedBy != ''"
>
, pp.updated_by = #{updatedBy}
</if>
where pp.deleted_flag = 'N'
and pp.is_completed = 0
and pp.open_order_status = 1
and p.deleted_flag = 'N'
and p.status = 1
and p.order_permission_status = 1
and p.order_permission_type = 2
and find_in_set(pp.person_id, p.white_list) = 0
and DATEDIFF(now(), lep.created_date)
<![CDATA[<]]>
p.limit_time_param
<if
test=
"planId != null"
>
and pp.plan_id = #{planId}
</if>
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-riskmanage/src/test/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterCourseServiceTest.java
View file @
66ffc5e
...
@@ -15,10 +15,11 @@ public class LearningCenterCourseServiceTest extends BaseServiceTest {
...
@@ -15,10 +15,11 @@ public class LearningCenterCourseServiceTest extends BaseServiceTest {
public
void
testPageCourse
()
{
public
void
testPageCourse
()
{
RpcPagination
<
CourseSearchDTO
>
pagination
=
new
RpcPagination
<>();
RpcPagination
<
CourseSearchDTO
>
pagination
=
new
RpcPagination
<>();
pagination
.
setPageNum
(
1
);
pagination
.
setPageNum
(
1
);
pagination
.
setPageSize
(
10
);
pagination
.
setPageSize
(
10
0
);
CourseSearchDTO
request
=
new
CourseSearchDTO
();
CourseSearchDTO
request
=
new
CourseSearchDTO
();
pagination
.
setCondition
(
request
);
pagination
.
setCondition
(
request
);
request
.
setTitle
(
"测试课程"
);
// request.setTitle("测试课程");
request
.
setExcludeNullCategoryId
(
1
);
request
.
setOrderByType
(
0
);
request
.
setOrderByType
(
0
);
Page
<
CoursePageInfo
>
res1
=
learningCenterCourseService
.
pageCourse
(
pagination
);
Page
<
CoursePageInfo
>
res1
=
learningCenterCourseService
.
pageCourse
(
pagination
);
System
.
out
.
println
(
res1
);
System
.
out
.
println
(
res1
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment