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 08586c60
authored
Dec 03, 2025
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:学习中心培训人员和培训计划查询
1 parent
b39cc3c2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
18 deletions
rpc-dj-riskmanage-api/src/main/java/cn/com/glsx/dj/riskmanage/dto/learningcenter/TrainingPlanPersonPageDTO.java
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/mapper/beisen/BeiSenCourseStaffMapper.java
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/beisen/BeiSenOrganizationService.java
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanCourseService.java
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanPersonService.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/BeiSenCourseStaffMapper.xml
rpc-dj-riskmanage-api/src/main/java/cn/com/glsx/dj/riskmanage/dto/learningcenter/TrainingPlanPersonPageDTO.java
View file @
08586c6
...
@@ -18,6 +18,9 @@ public class TrainingPlanPersonPageDTO implements Serializable {
...
@@ -18,6 +18,9 @@ public class TrainingPlanPersonPageDTO implements Serializable {
@ApiModelProperty
(
notes
=
"培训计划ID"
,
required
=
true
)
@ApiModelProperty
(
notes
=
"培训计划ID"
,
required
=
true
)
private
Integer
planId
;
private
Integer
planId
;
@ApiModelProperty
(
notes
=
"培训计划名称"
)
private
String
planName
;
/** 员工姓名(模糊) */
/** 员工姓名(模糊) */
@ApiModelProperty
(
notes
=
"员工姓名(支持模糊搜索)"
)
@ApiModelProperty
(
notes
=
"员工姓名(支持模糊搜索)"
)
private
String
personName
;
private
String
personName
;
...
@@ -59,13 +62,8 @@ public class TrainingPlanPersonPageDTO implements Serializable {
...
@@ -59,13 +62,8 @@ public class TrainingPlanPersonPageDTO implements Serializable {
@ApiModelProperty
(
notes
=
"入职日期"
)
@ApiModelProperty
(
notes
=
"入职日期"
)
private
Date
entryDate
;
private
Date
entryDate
;
/** 排序字段:entryDate */
@ApiModelProperty
(
notes
=
"0-入职时间升序,1-入职时间降序"
)
@ApiModelProperty
(
notes
=
"排序字段:entryDate"
)
private
Integer
orderByType
;
private
String
sortField
;
/** 排序方向:asc 或 desc(默认desc) */
@ApiModelProperty
(
notes
=
"排序方向:asc 或 desc(默认desc)"
)
private
String
sortOrder
;
@ApiModelProperty
(
notes
=
"北森用户Id集合"
)
@ApiModelProperty
(
notes
=
"北森用户Id集合"
)
private
List
<
Integer
>
personIds
;
private
List
<
Integer
>
personIds
;
...
@@ -73,7 +71,7 @@ public class TrainingPlanPersonPageDTO implements Serializable {
...
@@ -73,7 +71,7 @@ public class TrainingPlanPersonPageDTO implements Serializable {
@ApiModelProperty
(
notes
=
"北森用户Id"
)
@ApiModelProperty
(
notes
=
"北森用户Id"
)
private
Integer
personId
;
private
Integer
personId
;
/** 已完成课程数量
(支持排序)
*/
/** 已完成课程数量 */
@ApiModelProperty
(
notes
=
"已完成课程数量
(支持排序)
"
)
@ApiModelProperty
(
notes
=
"已完成课程数量"
)
private
Integer
completedCourseCount
;
private
Integer
completedCourseCount
;
}
}
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/mapper/beisen/BeiSenCourseStaffMapper.java
View file @
08586c6
package
cn
.
com
.
glsx
.
dj
.
riskmanage
.
mapper
.
beisen
;
package
cn
.
com
.
glsx
.
dj
.
riskmanage
.
mapper
.
beisen
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
...
@@ -22,4 +24,7 @@ public interface BeiSenCourseStaffMapper extends OreMapper<BeiSenCourseStaff> {
...
@@ -22,4 +24,7 @@ public interface BeiSenCourseStaffMapper extends OreMapper<BeiSenCourseStaff> {
int
insertListWithId
(
@Param
(
"list"
)
List
<
BeiSenCourseStaff
>
list
);
int
insertListWithId
(
@Param
(
"list"
)
List
<
BeiSenCourseStaff
>
list
);
List
<
CoursePageInfo
>
listRecommendedCoursePageInfo
(
CourseSearchDTO
condition
);
List
<
CoursePageInfo
>
listRecommendedCoursePageInfo
(
CourseSearchDTO
condition
);
@MapKey
(
"userId"
)
Map
<
Integer
,
Integer
>
countCompletedCourse
(
@Param
(
"userIdList"
)
List
<
Integer
>
userIdList
,
@Param
(
"courseIdList"
)
List
<
String
>
courseIdList
);
}
}
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/beisen/BeiSenOrganizationService.java
View file @
08586c6
...
@@ -3,6 +3,7 @@ package cn.com.glsx.dj.riskmanage.service.beisen;
...
@@ -3,6 +3,7 @@ package cn.com.glsx.dj.riskmanage.service.beisen;
import
cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListPageRequestDTO
;
import
cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListPageRequestDTO
;
import
cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListResponseDTO
;
import
cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListResponseDTO
;
import
cn.com.glsx.dj.riskmanage.mapper.beisen.BeiSenOrganizationMapper
;
import
cn.com.glsx.dj.riskmanage.mapper.beisen.BeiSenOrganizationMapper
;
import
cn.com.glsx.dj.riskmanage.model.BeiSenOrganization
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
...
@@ -33,6 +34,10 @@ public class BeiSenOrganizationService {
...
@@ -33,6 +34,10 @@ public class BeiSenOrganizationService {
return
beiSenOrganizationMapper
.
simpleListByCondition
(
requestDTO
);
return
beiSenOrganizationMapper
.
simpleListByCondition
(
requestDTO
);
}
}
public
List
<
BeiSenOrganization
>
selectByIds
(
List
<
Integer
>
ids
)
{
return
beiSenOrganizationMapper
.
selectByIds
(
ids
);
}
/**
/**
* 查询组织机构列表
* 查询组织机构列表
* @param pagination 查询参数
* @param pagination 查询参数
...
...
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanCourseService.java
View file @
08586c6
...
@@ -45,4 +45,12 @@ public class LearningCenterTrainingPlanCourseService {
...
@@ -45,4 +45,12 @@ public class LearningCenterTrainingPlanCourseService {
}
}
return
learningCenterTrainingPlanCourseMapper
.
selectByExample
(
example
);
return
learningCenterTrainingPlanCourseMapper
.
selectByExample
(
example
);
}
}
public
List
<
LearningCenterTrainingPlanCourse
>
findTransPlanCourseListByPlanId
(
Integer
planId
)
{
Example
example
=
new
Example
(
LearningCenterTrainingPlanCourse
.
class
);
example
.
createCriteria
()
.
andEqualTo
(
"planId"
,
planId
)
.
andEqualTo
(
"deletedFlag"
,
DeleteFlagEnum
.
N
.
getValue
());
return
learningCenterTrainingPlanCourseMapper
.
selectByExample
(
example
);
}
}
}
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanPersonService.java
View file @
08586c6
package
cn
.
com
.
glsx
.
dj
.
riskmanage
.
service
.
learningcenter
;
package
cn
.
com
.
glsx
.
dj
.
riskmanage
.
service
.
learningcenter
;
import
cn.com.glsx.dj.riskmanage.dto.beisen.OrganizationListResponseDTO
;
import
cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanPersonPageDTO
;
import
cn.com.glsx.dj.riskmanage.dto.learningcenter.TrainingPlanPersonPageDTO
;
import
cn.com.glsx.dj.riskmanage.mapper.beisen.BeiSenCourseStaffMapper
;
import
cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanMapper
;
import
cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanPersonMapper
;
import
cn.com.glsx.dj.riskmanage.mapper.learningcenter.LearningCenterTrainingPlanPersonMapper
;
import
cn.com.glsx.dj.riskmanage.model.BeiSenOrganization
;
import
cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlan
;
import
cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanCourse
;
import
cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson
;
import
cn.com.glsx.dj.riskmanage.model.learningcenter.LearningCenterTrainingPlanPerson
;
import
cn.com.glsx.dj.riskmanage.service.beisen.BeiSenOrganizationService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
...
@@ -12,9 +19,11 @@ import cn.com.glsx.scrm.equity.enums.DeleteFlagEnum;
...
@@ -12,9 +19,11 @@ import cn.com.glsx.scrm.equity.enums.DeleteFlagEnum;
import
cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO
;
import
cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO
;
import
cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO
;
import
cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.hutool.core.lang.Assert
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
...
@@ -29,6 +38,10 @@ public class LearningCenterTrainingPlanPersonService {
...
@@ -29,6 +38,10 @@ public class LearningCenterTrainingPlanPersonService {
private
final
LearningCenterTrainingPlanPersonMapper
learningCenterTrainingPlanPersonMapper
;
private
final
LearningCenterTrainingPlanPersonMapper
learningCenterTrainingPlanPersonMapper
;
private
final
MerchantStaffRemote
merchantStaffRemote
;
private
final
MerchantStaffRemote
merchantStaffRemote
;
private
final
LearningCenterTrainingPlanService
trainingPlanService
;
private
final
BeiSenOrganizationService
beisenOrganizationService
;
private
final
BeiSenCourseStaffMapper
beisenCourseStaffMapper
;
private
final
LearningCenterTrainingPlanCourseService
trainingPlanCourseService
;
/**
/**
* 根据培训计划ID和开单权限查询人员ID集合
* 根据培训计划ID和开单权限查询人员ID集合
...
@@ -36,6 +49,9 @@ public class LearningCenterTrainingPlanPersonService {
...
@@ -36,6 +49,9 @@ public class LearningCenterTrainingPlanPersonService {
public
Page
<
TrainingPlanPersonPageDTO
>
pageList
(
RpcPagination
<
TrainingPlanPersonPageDTO
>
pagination
)
{
public
Page
<
TrainingPlanPersonPageDTO
>
pageList
(
RpcPagination
<
TrainingPlanPersonPageDTO
>
pagination
)
{
TrainingPlanPersonPageDTO
condition
=
pagination
.
getCondition
();
TrainingPlanPersonPageDTO
condition
=
pagination
.
getCondition
();
RpcAssert
.
assertNotNull
(
condition
.
getPlanId
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"planId not be null"
);
RpcAssert
.
assertNotNull
(
condition
.
getPlanId
(),
DefaultErrorEnum
.
PARAMETER_NULL
,
"planId not be null"
);
// 查询培训计划
LearningCenterTrainingPlan
plan
=
trainingPlanService
.
getById
(
condition
.
getPlanId
());
Assert
.
notNull
(
plan
,
"培训计划不存在"
);
try
{
try
{
Example
example
=
new
Example
(
LearningCenterTrainingPlanPerson
.
class
);
Example
example
=
new
Example
(
LearningCenterTrainingPlanPerson
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
...
@@ -44,6 +60,7 @@ public class LearningCenterTrainingPlanPersonService {
...
@@ -44,6 +60,7 @@ public class LearningCenterTrainingPlanPersonService {
if
(
condition
.
getOpenOrderStatus
()
!=
null
)
{
if
(
condition
.
getOpenOrderStatus
()
!=
null
)
{
criteria
.
andEqualTo
(
"openOrderStatus"
,
condition
.
getOpenOrderStatus
());
criteria
.
andEqualTo
(
"openOrderStatus"
,
condition
.
getOpenOrderStatus
());
}
}
List
<
LearningCenterTrainingPlanPerson
>
persons
=
learningCenterTrainingPlanPersonMapper
.
selectByExample
(
example
);
List
<
LearningCenterTrainingPlanPerson
>
persons
=
learningCenterTrainingPlanPersonMapper
.
selectByExample
(
example
);
List
<
Integer
>
userIdList
=
persons
.
stream
().
map
(
LearningCenterTrainingPlanPerson:
:
getPersonId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
userIdList
=
persons
.
stream
().
map
(
LearningCenterTrainingPlanPerson:
:
getPersonId
).
collect
(
Collectors
.
toList
());
BeiSenEmployeeListRequestDTO
requestDTO
=
new
BeiSenEmployeeListRequestDTO
();
BeiSenEmployeeListRequestDTO
requestDTO
=
new
BeiSenEmployeeListRequestDTO
();
...
@@ -54,16 +71,15 @@ public class LearningCenterTrainingPlanPersonService {
...
@@ -54,16 +71,15 @@ public class LearningCenterTrainingPlanPersonService {
requestDTO
.
setOIdJobPostIds
(
Collections
.
singletonList
(
condition
.
getJobId
()));
requestDTO
.
setOIdJobPostIds
(
Collections
.
singletonList
(
condition
.
getJobId
()));
requestDTO
.
setStatus
(
condition
.
getPersonStatus
());
requestDTO
.
setStatus
(
condition
.
getPersonStatus
());
requestDTO
.
setEntryStartDate
(
condition
.
getEntryStartDate
());
requestDTO
.
setEntryStartDate
(
condition
.
getEntryStartDate
());
requestDTO
.
setSortField
(
condition
.
getSortField
());
// 排序字段 todo 使用orderByType排序
requestDTO
.
setSortOrder
(
condition
.
getSortOrder
());
RpcPagination
rpcPagination
=
new
RpcPagination
();
RpcPagination
rpcPagination
=
new
RpcPagination
();
rpcPagination
.
setPageNum
(
pagination
.
getPageNum
());
rpcPagination
.
setPageNum
(
pagination
.
getPageNum
());
rpcPagination
.
setPageSize
(
pagination
.
getPageSize
());
rpcPagination
.
setPageSize
(
pagination
.
getPageSize
());
rpcPagination
.
setCondition
(
r
pcPagination
);
rpcPagination
.
setCondition
(
r
equestDTO
);
RpcResponse
<
RpcPagination
<
BeiSenEmployeeListResonseDTO
>>
rpcResponse
=
merchantStaffRemote
.
getBeisenUserWithConditions
(
rpcPagination
);
RpcResponse
<
RpcPagination
<
BeiSenEmployeeListResonseDTO
>>
rpcResponse
=
merchantStaffRemote
.
getBeisenUserWithConditions
(
rpcPagination
);
// 检查响应结果
// 检查响应结果
if
(!
rpcResponse
.
isSuccess
()
||
rpcResponse
.
getResult
()
==
null
)
{
if
(!
rpcResponse
.
isSuccess
()
||
rpcResponse
.
getResult
()
==
null
||
CollectionUtils
.
isEmpty
(
rpcResponse
.
getResult
().
getList
())
)
{
log
.
warn
(
"query beisen user failed, planId: {}"
,
condition
.
getPlanId
());
log
.
warn
(
"query beisen user failed, planId: {}"
,
condition
.
getPlanId
());
return
new
Page
<>(
pagination
.
getPageNum
(),
pagination
.
getPageSize
());
return
new
Page
<>(
pagination
.
getPageNum
(),
pagination
.
getPageSize
());
}
}
...
@@ -77,6 +93,13 @@ public class LearningCenterTrainingPlanPersonService {
...
@@ -77,6 +93,13 @@ public class LearningCenterTrainingPlanPersonService {
// 构建人员ID与开单权限的映射关系
// 构建人员ID与开单权限的映射关系
Map
<
Integer
,
LearningCenterTrainingPlanPerson
>
personOpenOrderStatusMap
=
persons
.
stream
()
Map
<
Integer
,
LearningCenterTrainingPlanPerson
>
personOpenOrderStatusMap
=
persons
.
stream
()
.
collect
(
Collectors
.
toMap
(
LearningCenterTrainingPlanPerson:
:
getPersonId
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
LearningCenterTrainingPlanPerson:
:
getPersonId
,
Function
.
identity
()));
// 查询部门信息dj_beisen_course_staff根据部门ID集合
List
<
Integer
>
departIds
=
beisenPage
.
getList
().
stream
().
map
(
BeiSenEmployeeListResonseDTO:
:
getOIdDepartmentId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
BeiSenOrganization
>
departMap
=
beisenOrganizationService
.
selectByIds
(
departIds
).
stream
()
.
collect
(
Collectors
.
toMap
(
BeiSenOrganization:
:
getOId
,
Function
.
identity
()));
// 统计每个人的课程完成数(入参:userID集合、courseId集合)
List
<
LearningCenterTrainingPlanCourse
>
courseList
=
trainingPlanCourseService
.
findTransPlanCourseListByPlanId
(
condition
.
getPlanId
());
Map
<
Integer
,
Integer
>
completedCourseCountMap
=
beisenCourseStaffMapper
.
countCompletedCourse
(
userIdList
,
courseList
.
stream
().
map
(
LearningCenterTrainingPlanCourse:
:
getCourseId
).
collect
(
Collectors
.
toList
()));
// 转换数据并填充开单权限
// 转换数据并填充开单权限
List
<
TrainingPlanPersonPageDTO
>
resultList
=
new
ArrayList
<>();
List
<
TrainingPlanPersonPageDTO
>
resultList
=
new
ArrayList
<>();
...
@@ -84,22 +107,24 @@ public class LearningCenterTrainingPlanPersonService {
...
@@ -84,22 +107,24 @@ public class LearningCenterTrainingPlanPersonService {
for
(
BeiSenEmployeeListResonseDTO
employeeDTO
:
beisenPage
.
getList
())
{
for
(
BeiSenEmployeeListResonseDTO
employeeDTO
:
beisenPage
.
getList
())
{
TrainingPlanPersonPageDTO
dto
=
new
TrainingPlanPersonPageDTO
();
TrainingPlanPersonPageDTO
dto
=
new
TrainingPlanPersonPageDTO
();
dto
.
setPlanId
(
condition
.
getPlanId
());
dto
.
setPlanId
(
condition
.
getPlanId
());
dto
.
setPlanName
(
plan
.
getPlanName
());
dto
.
setPersonId
(
employeeDTO
.
getUserID
());
dto
.
setPersonId
(
employeeDTO
.
getUserID
());
dto
.
setPersonName
(
employeeDTO
.
getName
());
dto
.
setPersonName
(
employeeDTO
.
getName
());
dto
.
setPhoneNumber
(
employeeDTO
.
getMobilePhone
());
dto
.
setPhoneNumber
(
employeeDTO
.
getMobilePhone
());
dto
.
setDepartId
(
employeeDTO
.
getOIdDepartmentId
());
dto
.
setDepartId
(
employeeDTO
.
getOIdDepartmentId
());
// todo
if
(
departMap
.
containsKey
(
employeeDTO
.
getOIdDepartmentId
()))
{
dto
.
setDepartName
(
""
);
dto
.
setDepartName
(
departMap
.
get
(
employeeDTO
.
getOIdDepartmentId
()).
getName
());
}
dto
.
setJobId
(
employeeDTO
.
getOIdJobPostId
());
dto
.
setJobId
(
employeeDTO
.
getOIdJobPostId
());
dto
.
setJobName
(
employeeDTO
.
getOIdJobPost
());
dto
.
setJobName
(
employeeDTO
.
getOIdJobPost
());
dto
.
setPersonStatus
(
employeeDTO
.
getZzStatus
());
dto
.
setPersonStatus
(
employeeDTO
.
getZzStatus
());
// 设置开单权限状态
// 设置开单权限状态
Byte
openOrderStatus
=
personOpenOrderStatusMap
.
get
(
employeeDTO
.
getUserID
()).
getOpenOrderStatus
();
Byte
openOrderStatus
=
personOpenOrderStatusMap
.
get
(
employeeDTO
.
getUserID
()).
getOpenOrderStatus
();
dto
.
setOpenOrderStatus
(
openOrderStatus
!=
null
?
openOrderStatus
:
(
byte
)
0
);
dto
.
setOpenOrderStatus
(
openOrderStatus
);
dto
.
setEntryDate
(
employeeDTO
.
getEntryDate
());
dto
.
setEntryDate
(
employeeDTO
.
getEntryDate
());
// todo
dto
.
setCompletedCourseCount
(
completedCourseCountMap
.
get
(
employeeDTO
.
getUserID
()));
dto
.
setCompletedCourseCount
(
null
);
resultList
.
add
(
dto
);
resultList
.
add
(
dto
);
}
}
}
}
...
...
rpc-dj-riskmanage/src/main/java/cn/com/glsx/dj/riskmanage/service/learningcenter/LearningCenterTrainingPlanService.java
View file @
08586c6
...
@@ -313,6 +313,10 @@ public class LearningCenterTrainingPlanService {
...
@@ -313,6 +313,10 @@ public class LearningCenterTrainingPlanService {
}
}
}
}
public
LearningCenterTrainingPlan
getById
(
Integer
id
)
{
return
trainingPlanMapper
.
selectByPrimaryKey
(
id
);
}
public
TrainingPlanDetailDTO
trainingPlanDetail
(
Integer
id
)
{
public
TrainingPlanDetailDTO
trainingPlanDetail
(
Integer
id
)
{
LearningCenterTrainingPlan
trainingPlan
=
trainingPlanMapper
.
selectByPrimaryKey
(
id
);
LearningCenterTrainingPlan
trainingPlan
=
trainingPlanMapper
.
selectByPrimaryKey
(
id
);
TrainingPlanDetailDTO
detailDTO
=
BeanUtil
.
copyProperties
(
trainingPlan
,
TrainingPlanDetailDTO
.
class
);
TrainingPlanDetailDTO
detailDTO
=
BeanUtil
.
copyProperties
(
trainingPlan
,
TrainingPlanDetailDTO
.
class
);
...
...
rpc-dj-riskmanage/src/main/resources/META-INF/orm/BeiSenCourseStaffMapper.xml
View file @
08586c6
...
@@ -190,4 +190,26 @@
...
@@ -190,4 +190,26 @@
</if>
</if>
</select>
</select>
<select
id=
"countCompletedCourse"
resultType=
"java.util.Map"
>
SELECT
user_id AS userId,
COUNT(*) AS courseCount
FROM dj_beisen_course_staff
WHERE deleted_flag = 'N'
AND learn_status = '50'
<if
test=
"userIdList != null and userIdList.size() > 0"
>
AND user_id IN
<foreach
collection=
"userIdList"
item=
"userId"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</if>
<if
test=
"courseIdList != null and courseIdList.size() > 0"
>
AND course_id IN
<foreach
collection=
"courseIdList"
item=
"courseId"
open=
"("
separator=
","
close=
")"
>
#{courseId}
</foreach>
</if>
GROUP BY user_id
</select>
</mapper>
</mapper>
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