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
c205450c
Commit
c205450c
authored
Nov 15, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into zql
parents
cae017db
f8010709
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
117 additions
and
31 deletions
+117
-31
BPersonValueController.java
...iness/bpersonvalue/controller/BPersonValueController.java
+3
-3
BReleaseValueController.java
...ess/breleasevalue/controller/BReleaseValueController.java
+3
-4
BReleaseValueRepository.java
...t/business/breleasevalue/dao/BReleaseValueRepository.java
+19
-12
LessonValueSettingQueryDto.java
...usiness/breleasevalue/dto/LessonValueSettingQueryDto.java
+29
-0
BReleaseValueService.java
.../business/breleasevalue/service/BReleaseValueService.java
+3
-1
BReleaseValueServiceImpl.java
.../breleasevalue/service/impl/BReleaseValueServiceImpl.java
+22
-2
ResultServiceEnums.java
...main/java/org/rcisoft/core/result/ResultServiceEnums.java
+1
-0
QuerySysUserDTO.java
src/main/java/org/rcisoft/sys/user/dto/QuerySysUserDTO.java
+3
-0
SysUserServiceImpl.java
...org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
+34
-9
No files found.
src/main/java/org/rcisoft/business/bpersonvalue/controller/BPersonValueController.java
View file @
c205450c
...
...
@@ -69,12 +69,12 @@ public class BPersonValueController extends PaginationController<BPersonValue> {
@ApiOperation
(
value
=
"1603 用户明细带总积分"
,
notes
=
" 用户明细带总积分"
,
response
=
BPersonValue
.
class
)
@GetMapping
(
value
=
"/queryPersonValueByPagination"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"用户id"
,
required
=
true
,
dataType
=
"varchar"
)
public
Result
queryPersonValueByPagination
(
CurUser
curUser
,
String
businessId
)
{
bPersonValueServiceImpl
.
queryByPagination
(
getPaginationUtility
(),
curUser
.
getCorpId
(),
businessId
);
public
Result
queryPersonValueByPagination
(
CurUser
curUser
)
{
bPersonValueServiceImpl
.
queryByPagination
(
getPaginationUtility
(),
curUser
.
getCorpId
(),
curUser
.
getUserId
()
);
GridModel
gridModel
=
getGridModelResponse
();
Map
<
String
,
Object
>
map
=
new
HashedMap
();
map
.
put
(
"details"
,
gridModel
);
map
.
put
(
"userValue"
,
bPersonValueServiceImpl
.
getUserValue
(
curUser
.
getCorpId
(),
businessId
));
map
.
put
(
"userValue"
,
bPersonValueServiceImpl
.
getUserValue
(
curUser
.
getCorpId
(),
curUser
.
getUserId
()
));
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
...
...
src/main/java/org/rcisoft/business/breleasevalue/controller/BReleaseValueController.java
View file @
c205450c
...
...
@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.rcisoft.business.bbanner.dto.FindBannerPaginDTO
;
import
org.rcisoft.business.bbanner.entity.BBanner
;
import
org.rcisoft.business.breleasevalue.dto.BReleaseValueDto
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueSettingQueryDto
;
import
org.rcisoft.common.controller.PaginationController
;
import
org.rcisoft.common.model.GridModel
;
import
org.rcisoft.sys.user.bean.CurUser
;
...
...
@@ -76,11 +77,9 @@ public class BReleaseValueController extends PaginationController<BReleaseValue>
}
@ApiOperation
(
value
=
"1504 分页查询课程、培训积分设置页面"
,
notes
=
"分页查询课程、培训积分设置页面"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"keyWord"
,
value
=
"模糊查询关键字"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"0课程 1培训"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryLessonValue"
)
public
Result
queryLessonValue
(
CurUser
curUser
,
String
keyWord
,
String
type
)
{
bReleaseValueServiceImpl
.
queryLessonValueByPagination
(
getPaginationUtility
(),
keyWord
,
curUser
.
getCorpId
(),
type
);
public
Result
queryLessonValue
(
CurUser
curUser
,
@Valid
LessonValueSettingQueryDto
dto
,
BindingResult
bindingResult
)
{
bReleaseValueServiceImpl
.
queryLessonValueByPagination
(
getPaginationUtility
(),
curUser
,
dto
);
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
src/main/java/org/rcisoft/business/breleasevalue/dao/BReleaseValueRepository.java
View file @
c205450c
...
...
@@ -2,10 +2,12 @@ package org.rcisoft.business.breleasevalue.dao;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueDto
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueSettingQueryDto
;
import
org.rcisoft.business.breleasevalue.dto.UserValueDto
;
import
org.rcisoft.business.breleasevalue.entity.BReleaseValueSon
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.business.breleasevalue.entity.BReleaseValue
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -71,20 +73,25 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
/**
* 查询课程或培训积分设置
* @param keyWord
* @param corpId
* @param type
* @param curUser
* @param dto
* @return
*/
@Select
(
"<script> select bl.business_id businessId,bl.lesson_name lessonName,su.name name,bl.value_consume valueConsume,bl.value_gain valueGain "
+
" from b_lesson bl "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" where bl.del_flag !=1 and bl.flag = 1 "
+
"<if test=\"keyWord!=null and keyWord != ''\"> "
+
" and bl.lesson_name like concat('%',#{keyWord},'%') or su.name like concat('%',#{keyWord},'%') </if>"
+
" and bl.corp_id = #{corpId} "
+
"and bl.lesson_type = #{type}</script>"
)
List
<
LessonValueDto
>
getLessonValue
(
@Param
(
"keyWord"
)
String
keyWord
,
@Param
(
"corpId"
)
String
corpId
,
@Param
(
"type"
)
String
type
);
@Select
(
"<script>"
+
"select bl.business_id businessId,bl.lesson_name lessonName,su.name name,bl.value_consume valueConsume,bl.value_gain valueGain "
+
"from b_lesson bl "
+
"left join s_user su on su.business_id = bl.lecturer_id "
+
"where bl.del_flag !=1 and bl.flag = 1 "
+
"<if test=\"dto.valueConsumeStart!=null and dto.valueConsumeStart != ''\"> and bl.value_consume >= #{dto.valueConsumeStart} </if> "
+
"<if test=\"dto.valueConsumeEnd!=null and dto.valueConsumeEnd != ''\"> and bl.value_consume <= #{dto.valueConsumeEnd} </if> "
+
"<if test=\"dto.valueGainStart!=null and dto.valueGainStart != ''\"> and bl.value_gain >= #{dto.valueGainStart} </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.lecturerName!=null and dto.lecturerName != ''\"> and su.`name` like concat('%',#{dto.lecturerName},'%') </if> "
+
"and bl.corp_id = #{curUser.corpId} "
+
"and bl.lesson_type = #{dto.type} "
+
"</script>"
)
List
<
LessonValueDto
>
getLessonValue
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"dto"
)
LessonValueSettingQueryDto
dto
);
/**
* 设置课程或培训 积分
...
...
src/main/java/org/rcisoft/business/breleasevalue/dto/LessonValueSettingQueryDto.java
0 → 100644
View file @
c205450c
package
org
.
rcisoft
.
business
.
breleasevalue
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
LessonValueSettingQueryDto
{
@ApiModelProperty
(
value
=
"课程、培训名"
)
public
String
lessonName
;
@ApiModelProperty
(
value
=
"讲师名"
)
public
String
lecturerName
;
@ApiModelProperty
(
value
=
"积分消耗起始值"
)
public
String
valueConsumeStart
;
@ApiModelProperty
(
value
=
"积分消耗最大值"
)
public
String
valueConsumeEnd
;
@ApiModelProperty
(
value
=
"积分获得起始值"
)
public
String
valueGainStart
;
@ApiModelProperty
(
value
=
"积分获得最大值"
)
public
String
valueGainEnd
;
@ApiModelProperty
(
value
=
"0 课程 1培训"
)
public
String
type
;
}
src/main/java/org/rcisoft/business/breleasevalue/service/BReleaseValueService.java
View file @
c205450c
...
...
@@ -4,10 +4,12 @@ import org.rcisoft.business.bbanner.dto.FindBannerPaginDTO;
import
org.rcisoft.business.bbanner.entity.BBanner
;
import
org.rcisoft.business.breleasevalue.dto.BReleaseValueDto
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueDto
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueSettingQueryDto
;
import
org.rcisoft.business.breleasevalue.dto.UserValueDto
;
import
org.rcisoft.business.breleasevalue.entity.BReleaseValue
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
java.util.List
;
...
...
@@ -22,7 +24,7 @@ public interface BReleaseValueService {
PersistModel
delete
(
String
businessId
,
String
corpId
);
List
<
LessonValueDto
>
queryLessonValueByPagination
(
PageUtil
pageUtil
,
String
keyWord
,
String
corpId
,
String
LessonType
);
List
<
LessonValueDto
>
queryLessonValueByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
LessonValueSettingQueryDto
dto
);
PersistModel
updateLessonValue
(
String
businessId
,
String
valueConsume
,
String
valueGain
);
...
...
src/main/java/org/rcisoft/business/breleasevalue/service/impl/BReleaseValueServiceImpl.java
View file @
c205450c
...
...
@@ -2,11 +2,14 @@ package org.rcisoft.business.breleasevalue.service.impl;
import
org.rcisoft.business.breleasevalue.dto.BReleaseValueDto
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueDto
;
import
org.rcisoft.business.breleasevalue.dto.LessonValueSettingQueryDto
;
import
org.rcisoft.business.breleasevalue.dto.UserValueDto
;
import
org.rcisoft.business.breleasevalue.entity.BReleaseValueSon
;
import
org.rcisoft.common.util.feignDto.MTUserGetsReqDTO
;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.util.IdGen
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.aop.PageUtil
;
...
...
@@ -16,6 +19,7 @@ import org.rcisoft.business.breleasevalue.entity.BReleaseValue;
import
org.rcisoft.business.breleasevalue.service.BReleaseValueService
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -86,8 +90,24 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
}
@Override
public
List
<
LessonValueDto
>
queryLessonValueByPagination
(
PageUtil
pageUtil
,
String
keyWord
,
String
corpId
,
String
LessonType
)
{
return
bReleaseValueRepository
.
getLessonValue
(
keyWord
,
corpId
,
LessonType
);
public
List
<
LessonValueDto
>
queryLessonValueByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
LessonValueSettingQueryDto
dto
)
{
try
{
if
(
dto
.
getValueConsumeEnd
()!=
null
&&
!
""
.
equals
(
dto
.
getValueConsumeEnd
())){
Integer
.
parseInt
(
dto
.
getValueConsumeEnd
());
}
if
(
dto
.
getValueConsumeStart
()!=
null
&&
!
""
.
equals
(
dto
.
getValueConsumeStart
())){
Integer
.
parseInt
(
dto
.
getValueConsumeStart
());
}
if
(
dto
.
getValueGainEnd
()!=
null
&&
!
""
.
equals
(
dto
.
getValueGainEnd
())){
Integer
.
parseInt
(
dto
.
getValueGainEnd
());
}
if
(
dto
.
getValueGainStart
()!=
null
&&
!
""
.
equals
(
dto
.
getValueGainStart
())){
Integer
.
parseInt
(
dto
.
getValueGainStart
());
}
}
catch
(
Exception
e
){
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
}
return
bReleaseValueRepository
.
getLessonValue
(
curUser
,
dto
);
}
@Override
...
...
src/main/java/org/rcisoft/core/result/ResultServiceEnums.java
View file @
c205450c
...
...
@@ -240,6 +240,7 @@ public enum ResultServiceEnums {
NOT_TRAIN_TYPE
(
140
,
"课程类型不正确"
),
VALUE_IS_ERROR
(
141
,
"扣除积分大于当前积分"
),
USER_IS_NULL
(
142
,
"请选择用户"
),
NUM_IS_ERROR
(
143
,
"积分输入格式错误"
),
;
private
Integer
code
;
...
...
src/main/java/org/rcisoft/sys/user/dto/QuerySysUserDTO.java
View file @
c205450c
...
...
@@ -15,6 +15,9 @@ public class QuerySysUserDTO {
@ApiModelProperty
(
value
=
"用户启用状态 0未启用 1启用"
)
private
String
flag
;
@ApiModelProperty
(
value
=
"0 包含子部门 1不包含子部门"
)
private
String
type
;
@ApiModelProperty
(
value
=
"用户角色"
)
private
String
roleName
;
...
...
src/main/java/org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
View file @
c205450c
...
...
@@ -33,6 +33,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.lang.reflect.Array
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.Instant
;
...
...
@@ -77,15 +78,39 @@ public class SysUserServiceImpl implements SysUserService {
*/
public
List
<
SysUser
>
qusers
(
QuerySysUserDTO
dto
)
{
//step1:调用外部接口 查询出 该部门下所有人(取id)
if
(
"0"
.
equals
(
dto
.
getType
())){
//包含子部门
if
(
dto
.
getDept
()!=
null
){
List
<
String
>
deptIds
=
new
ArrayList
<>();
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ids
=
""
;
deptIds
.
add
(
dto
.
getDept
());
Set
<
String
>
deptSets
=
new
HashSet
<
String
>(
deptIds
);
Set
<
String
>
deptSets
=
new
HashSet
<
>(
deptIds
);
List
<
String
>
data
=
mtCotactApiRequestClient
.
getSubUserIdsByDeptIds
(
dto
.
getCorpId
(),
deptSets
);
if
(
data
.
size
()
!=
0
){
dto
.
setUserIds
(
data
);
}
else
{
dto
.
setUserIds
(
Arrays
.
asList
(
""
));
}
}
}
else
{
//不包含子部门
if
(
dto
.
getDept
()!=
null
){
List
<
Long
>
deptIds
=
new
ArrayList
<>();
deptIds
.
add
(
Long
.
parseLong
(
dto
.
getDept
()));
List
<
MTGetUserByDeptIdsRspDTO
>
data
=
mtCotactApiRequestClient
.
userGetUserByDeptIds
(
dto
.
getCorpId
(),
deptIds
);
List
<
String
>
uids
=
new
ArrayList
<>();
if
(
data
!=
null
){
for
(
MTGetUserByDeptIdsRspDTO
uid
:
data
)
{
uids
.
add
(
uid
.
getId
());
}
if
(
uids
.
size
()
!=
0
){
dto
.
setUserIds
(
uids
);
}
else
{
dto
.
setUserIds
(
Arrays
.
asList
(
""
));
}
}
else
{
dto
.
setUserIds
(
Arrays
.
asList
(
""
));
}
}
}
//step2:先查出符合条件的所有人
List
<
SysUser
>
users
=
sysUserMapper
.
queryUsers
(
dto
);
...
...
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