From 825be642d9f7bfe3cad24a70dff3e5a014fde8b0 Mon Sep 17 00:00:00 2001 From: quyixiao <2621048238@qq.com> Date: Tue, 10 Nov 2020 14:18:07 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/flow/StaffRoleMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/flow/StaffRoleMapper.xml b/src/main/resources/mapper/flow/StaffRoleMapper.xml index fce0e7eb..48e8d35e 100644 --- a/src/main/resources/mapper/flow/StaffRoleMapper.xml +++ b/src/main/resources/mapper/flow/StaffRoleMapper.xml @@ -91,7 +91,7 @@ - update lz_staff_role set is_delete = 1 where id=#{id} limit 1 + delete from lz_staff_role where id=#{id} limit 1 @@ -165,9 +165,9 @@ From 26e1247663d92b561e3e455a7a65c3f75a3d1d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Tue, 10 Nov 2020 14:52:03 +0800 Subject: [PATCH 2/9] fix --- .../impl/AssessManagerServiceImpl.java | 16 ++++++++++++-- .../service/impl/ChartResultServiceImpl.java | 21 +++++++++++++++---- .../sys/dao/app/ResultRecordMapper.java | 2 +- .../mapper/app/ResultRecordMapper.xml | 8 +++---- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/lz/modules/performance/service/impl/AssessManagerServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/AssessManagerServiceImpl.java index 02ac4fc5..c8a901a2 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/AssessManagerServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/AssessManagerServiceImpl.java @@ -116,9 +116,15 @@ public class AssessManagerServiceImpl implements AssessManagerService { res.setCycleTime(name.substring(0,name.lastIndexOf("绩效考核"))); } //过滤非自己管理的人员 - int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds); ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId()); - res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "等人"); + //没有管理的部门 + if(mandepartmentIds!=null && mandepartmentIds.size()==0){ + res.setJoinNum("0人"); + }else { + int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds); + res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "等人"); + } + data.add(res); }); PageUtils pages = new PageUtils(); @@ -136,6 +142,12 @@ public class AssessManagerServiceImpl implements AssessManagerService { if(StringUtil.isNotBlank(req.getEvaluationIds())){ req.setCopyEvaluationIds(evaluationGroupService.getEvaluationCopyIdsByEvaluationIds(req.getEvaluationIds(),req.getStartId())); } + List mandepartmentIds = assessService.roleDepartments(req.getLoginUserId()); + //没有管理的部门 + if(mandepartmentIds!=null && mandepartmentIds.size()==0){ + return new PageUtils(); + } + req.setDepartmentIds(mandepartmentIds); PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect( page -> resultRecordMapper.selectAssessListByStartId(page,req) ); diff --git a/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java index a0329ee3..bf009aff 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java @@ -93,6 +93,9 @@ public class ChartResultServiceImpl implements ChartResultService { } //自己管理的部门 List mandepartmentIds = assessService.roleDepartments(staffId); + if(mandepartmentIds!=null && mandepartmentIds.size()==0){ + return Lists.newArrayList(); + } List data = Lists.newArrayList(); ChartStatisticalRes res; @@ -187,12 +190,19 @@ public class ChartResultServiceImpl implements ChartResultService { //自己管理的和所有的部门交集 log.info("selectChartDetailList 管理部门:" + JSON.toJSONString(allDeparmentIds)); List mandepartmentIds = assessService.roleDepartments(req.getLoginUserId()); - log.info("selectChartDetailList 管理部门:" + JSON.toJSONString(mandepartmentIds)); - mandepartmentIds.retainAll(allDeparmentIds); + if(mandepartmentIds!=null ){ + if(mandepartmentIds.size()==0){ + return new PageUtils(); + } + log.info("selectChartDetailList 管理部门:" + JSON.toJSONString(mandepartmentIds)); + mandepartmentIds.retainAll(allDeparmentIds); + if(mandepartmentIds.size()==0){ + return new PageUtils(); + } + } log.info("selectChartDetailList 交集部门:" + JSON.toJSONString(mandepartmentIds)); - List ids = staffService.staffsByAllDeparmentIds(mandepartmentIds); PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect( - page -> resultRecordMapper.selectChartDetailList(page,ids,req.getStartId(),req.getScoreLevel()) + page -> resultRecordMapper.selectChartDetailList(page,mandepartmentIds,req.getStartId(),req.getScoreLevel()) ); return pageUtils; } @@ -228,6 +238,9 @@ public class ChartResultServiceImpl implements ChartResultService { req.setCopyEvaluationIds(evaluationGroupService.getEvaluationCopyIdsByEvaluationIds(req.getEvaluationIds(),req.getStartId())); //获取自己管理的部门 List mandepartmentIds = assessService.roleDepartments(req.getLoginUserId()); + if(mandepartmentIds!=null && mandepartmentIds.size()==0){ + return Lists.newArrayList(); + } req.setDepartmentIds(mandepartmentIds); List process = resultRecordMapper.countAssessNumByFlowProcess(req); List data = buildProcess(process, req.getStartId(),mandepartmentIds,req); diff --git a/src/main/java/com/lz/modules/sys/dao/app/ResultRecordMapper.java b/src/main/java/com/lz/modules/sys/dao/app/ResultRecordMapper.java index 4b129a6c..5b84502d 100644 --- a/src/main/java/com/lz/modules/sys/dao/app/ResultRecordMapper.java +++ b/src/main/java/com/lz/modules/sys/dao/app/ResultRecordMapper.java @@ -79,7 +79,7 @@ public interface ResultRecordMapper extends BaseMapper { List countNumByScoreLevel(@Param("startId") Long startId,@Param("evaluationIds")List evaluationIds,@Param("departmentIds")List departmentIds); - List selectChartDetailList(@Param("page") IPage page, @Param("staffIds") List staffIds, @Param("startId")Long startId,@Param("scoreLevel")Long scoreLevel); + List selectChartDetailList(@Param("page") IPage page, @Param("departmentIds") List departmentIds, @Param("startId")Long startId,@Param("scoreLevel")Long scoreLevel); int batchDeleteByStartId(@Param("startId")Long startId); diff --git a/src/main/resources/mapper/app/ResultRecordMapper.xml b/src/main/resources/mapper/app/ResultRecordMapper.xml index 5f0d2b69..96ca166f 100644 --- a/src/main/resources/mapper/app/ResultRecordMapper.xml +++ b/src/main/resources/mapper/app/ResultRecordMapper.xml @@ -404,10 +404,10 @@ on r.staff_id = s.id where r.is_delete =0 and s.is_delete=0 and r.start_id = #{startId} - - and r.staff_id in ( - - #{staff_id} + + and r.department_id in ( + + #{department_id} ) From 0b93cceee96313b6de71861f66f830c08b8119b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Tue, 10 Nov 2020 15:32:08 +0800 Subject: [PATCH 3/9] fix --- .../controller/ChartController.java | 2 +- .../service/impl/ChartResultServiceImpl.java | 29 ++++++++----------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/lz/modules/performance/controller/ChartController.java b/src/main/java/com/lz/modules/performance/controller/ChartController.java index 2ea6de62..062cb7a6 100644 --- a/src/main/java/com/lz/modules/performance/controller/ChartController.java +++ b/src/main/java/com/lz/modules/performance/controller/ChartController.java @@ -91,7 +91,7 @@ public class ChartController extends AbstractController{ - @RequestMapping("/own/result") + @PostMapping("/own/result") @ApiOperation("获取个人成长曲线") @ApiResponses({@ApiResponse(code = 200,message = "成功",response = OwnResultResp.class)}) public R ownResult(Long userId){ diff --git a/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java index bf009aff..05b77272 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java @@ -9,6 +9,7 @@ import com.lz.common.utils.R; import com.lz.common.utils.StringUtil; import com.lz.modules.app.entity.DepartmentsEntity; import com.lz.modules.app.entity.DepartmentsStaffRelateEntity; +import com.lz.modules.app.entity.StaffEntity; import com.lz.modules.app.service.DepartmentsService; import com.lz.modules.app.service.DepartmentsStaffRelateService; import com.lz.modules.app.service.StaffService; @@ -38,6 +39,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * @Author: djc @@ -123,24 +126,16 @@ public class ChartResultServiceImpl implements ChartResultService { data.add(res); //如果不是默认,获得发起考核信息 - if(flowStart == null){ - flowStart = flowStartMapper.selectFlowStartById(startId); - } - String[] split = flowStart.getGroupIds().split(","); - Set staffIds = new HashSet<>(); - for(String s:split){ - List strings = evaluationGroupService.selectAllStaffIdsByGroupId(Long.valueOf(s)); - staffIds.addAll(strings); - } - log.info("chartReport 所有人员:" + JSON.toJSONString(staffIds)); - //自己管理的和发起的人员交集 - List manstaffIds = staffService.staffsByAllDeparmentIds(mandepartmentIds); - log.info("chartReport 管理人员:" + JSON.toJSONString(manstaffIds)); - manstaffIds.retainAll(staffIds); - log.info("chartReport 交集人员:" + JSON.toJSONString(manstaffIds)); - List all = new ArrayList<>(manstaffIds); - List depstaff = this.countDepartmentAndStaffNum(all); + List objects = resultRecordService.listObjs(new QueryWrapper() + .eq("is_delete", 0) + .eq("start_id", startId) + .in(mandepartmentIds != null, "department_id", mandepartmentIds).select("staff_id")); + if(CollectionUtils.isEmpty(objects)){ + return data; + } + List collect = objects.stream().map(o -> String.valueOf(o)).collect(Collectors.toList()); + List depstaff = this.countDepartmentAndStaffNum(collect); res = new ChartStatisticalRes(); res.setType(2); res.setStatisticals(buildDepStaffs(depstaff)); From bac11e73e92b4e486e06dc22e05f3f92fb838397 Mon Sep 17 00:00:00 2001 From: quyixiao <2621048238@qq.com> Date: Tue, 10 Nov 2020 15:38:32 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lz/config/ShiroConfig.java | 1 + .../app/controller/StaffRoleController.java | 16 ++++++++++++++-- .../com/lz/modules/app/resp/StaffRoleModel.java | 4 ---- .../flow/dao/StaffRoleEvaluationGroupMapper.java | 2 ++ .../com/lz/modules/flow/dao/StaffRoleMapper.java | 2 ++ .../service/StaffRoleEvaluationGroupService.java | 2 ++ .../modules/flow/service/StaffRoleService.java | 2 ++ .../StaffRoleEvaluationGroupServiceImpl.java | 8 +++++++- .../flow/service/impl/StaffRoleServiceImpl.java | 6 ++++++ .../flow/StaffRoleEvaluationGroupMapper.xml | 5 +++++ .../resources/mapper/flow/StaffRoleMapper.xml | 6 ++++++ 11 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/lz/config/ShiroConfig.java b/src/main/java/com/lz/config/ShiroConfig.java index 1fe3d0c6..7ea36211 100644 --- a/src/main/java/com/lz/config/ShiroConfig.java +++ b/src/main/java/com/lz/config/ShiroConfig.java @@ -54,6 +54,7 @@ public class ShiroConfig { filterMap.put("/file/**", "anon"); filterMap.put("/user/lzstaffrole/role/**", "anon"); filterMap.put("/user/lzresultrecord/**", "anon"); + filterMap.put("/user/lzstaffrole/listByGroupId/**", "anon"); filterMap.put("/test/**", "anon"); filterMap.put("/druid/**", "anon"); filterMap.put("/app/**", "anon"); diff --git a/src/main/java/com/lz/modules/app/controller/StaffRoleController.java b/src/main/java/com/lz/modules/app/controller/StaffRoleController.java index a368def7..17d6f218 100644 --- a/src/main/java/com/lz/modules/app/controller/StaffRoleController.java +++ b/src/main/java/com/lz/modules/app/controller/StaffRoleController.java @@ -8,6 +8,7 @@ import com.lz.common.utils.R; import com.lz.modules.app.entity.DepartmentsEntity; import com.lz.modules.app.entity.DepartmentsStaffRelateEntity; import com.lz.modules.app.entity.StaffEntity; +import com.lz.modules.app.enums.RoleEnums; import com.lz.modules.app.model.RoleModel; import com.lz.modules.app.resp.StaffRoleModel; import com.lz.modules.app.service.DepartmentsService; @@ -16,9 +17,11 @@ import com.lz.modules.app.service.StaffService; import com.lz.modules.flow.entity.RecordRole; import com.lz.modules.flow.entity.StaffRole; import com.lz.modules.flow.entity.StaffRoleDepartment; +import com.lz.modules.flow.entity.StaffRoleEvaluationGroup; import com.lz.modules.flow.req.StaffRoleRequest; import com.lz.modules.flow.service.RecordRoleService; import com.lz.modules.flow.service.StaffRoleDepartmentService; +import com.lz.modules.flow.service.StaffRoleEvaluationGroupService; import com.lz.modules.flow.service.StaffRoleService; import com.lz.modules.sys.entity.SysMenuEntity; import com.lz.modules.sys.entity.SysRoleEntity; @@ -63,6 +66,8 @@ public class StaffRoleController { @Autowired private DepartmentsStaffRelateService departmentsStaffRelateService; +@Autowired + private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService; /** * 列表 @@ -80,7 +85,7 @@ public class StaffRoleController { // http://localhost:8080/lz_management/user/lzstaffrole/listByGroupId?groupId=3 @ApiImplicitParam(name = "groupId",value = "组id",defaultValue = "1",required = true, dataType = "Long",paramType = "query") public R listByGroupId( Long groupId ) { - List staffRoleList = staffRoleService.selectByGroupId(groupId); + List staffRoleList = staffRoleService.selectAllStaffRoleByDepartmentLevel(Arrays.asList(new String[]{RoleEnums.MASTER_PM.getName(),RoleEnums.CHILD_PM.getName()})); List staffRoles = new ArrayList<>(); for(StaffRole staffRole:staffRoleList){ StaffRoleModel staffRoleModel = new StaffRoleModel(); @@ -93,6 +98,14 @@ public class StaffRoleController { staffRoleModel.setStaffName(staffRoleModel.getStaffName() + " "+departmentsEntity.getDepartmentName()); } } + StaffRoleEvaluationGroup staffRoleEvaluationGroup = staffRoleEvaluationGroupService.selectEvaluationGroupIdsByRoleIdGroupId(staffRole.getId(),groupId); + staffRoleModel.setIsSelect(0); + if(staffRoleEvaluationGroup !=null){ + staffRoleModel.setIsSelect(1); + } + if(staffRole.getDepartmentLevel().equals(RoleEnums.MASTER_PM.getName())){ + staffRoleModel.setIsSelect(1); + } staffRoles.add(staffRoleModel); } return R.ok().put("data", staffRoles); @@ -185,7 +198,6 @@ public class StaffRoleController { } } } - if (req.getId() == null || req.getId() <= 0) { staffRoleService.insertStaffRole(staffRole); } else { diff --git a/src/main/java/com/lz/modules/app/resp/StaffRoleModel.java b/src/main/java/com/lz/modules/app/resp/StaffRoleModel.java index 9e060205..9b16b41e 100644 --- a/src/main/java/com/lz/modules/app/resp/StaffRoleModel.java +++ b/src/main/java/com/lz/modules/app/resp/StaffRoleModel.java @@ -21,10 +21,6 @@ public class StaffRoleModel { @ApiModelProperty(value = "组id", name = "evaluationGroupId") private Long evaluationGroupId; - - - - //是否是必选 @ApiModelProperty(value = "是否是必选,0不是必选,1必选", name = "isSelect") private Integer isSelect; diff --git a/src/main/java/com/lz/modules/flow/dao/StaffRoleEvaluationGroupMapper.java b/src/main/java/com/lz/modules/flow/dao/StaffRoleEvaluationGroupMapper.java index f9c7dc00..66a1a3a4 100644 --- a/src/main/java/com/lz/modules/flow/dao/StaffRoleEvaluationGroupMapper.java +++ b/src/main/java/com/lz/modules/flow/dao/StaffRoleEvaluationGroupMapper.java @@ -39,4 +39,6 @@ public interface StaffRoleEvaluationGroupMapper extends BaseMapper { List selectAllByStaffId(@Param("staffId") Long staffId); List selectAllMenus(@Param("userId") Long userId); + + List selectAllStaffRoleByDepartmentLevel(@Param("departmentLevels") List departmentLevels); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/StaffRoleEvaluationGroupService.java b/src/main/java/com/lz/modules/flow/service/StaffRoleEvaluationGroupService.java index 14c86c65..6f4ba810 100644 --- a/src/main/java/com/lz/modules/flow/service/StaffRoleEvaluationGroupService.java +++ b/src/main/java/com/lz/modules/flow/service/StaffRoleEvaluationGroupService.java @@ -38,4 +38,6 @@ public interface StaffRoleEvaluationGroupService extends IService selectStaffRoleEvaluationGroupBy(Long id); void deleteStaffRoleEvaluationGroupByRoleId(Long roleId); + + StaffRoleEvaluationGroup selectEvaluationGroupIdsByRoleIdGroupId(Long roleId, Long groupId); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/StaffRoleService.java b/src/main/java/com/lz/modules/flow/service/StaffRoleService.java index 1f7f8467..60f3f864 100644 --- a/src/main/java/com/lz/modules/flow/service/StaffRoleService.java +++ b/src/main/java/com/lz/modules/flow/service/StaffRoleService.java @@ -65,4 +65,6 @@ public interface StaffRoleService extends IService { List selectAllByStaffId(Long userId); Map getRoleByUserId(Long userId); + + List selectAllStaffRoleByDepartmentLevel(List asList); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleEvaluationGroupServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleEvaluationGroupServiceImpl.java index e9f7d0d0..9a93f962 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleEvaluationGroupServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleEvaluationGroupServiceImpl.java @@ -71,7 +71,13 @@ public class StaffRoleEvaluationGroupServiceImpl extends ServiceImpl selectEvaluationGroupIdsByRoleId(Long roleId) { return staffRoleEvaluationGroupMapper.selectEvaluationGroupIdsByRoleId(roleId); } diff --git a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java index 4b4ba480..ffe69a08 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java @@ -503,6 +503,12 @@ public class StaffRoleServiceImpl extends ServiceImpl selectAllStaffRoleByDepartmentLevel(List asList) { + + return staffRoleMapper.selectAllStaffRoleByDepartmentLevel(asList); + } + public void insertPM(StaffRole staffRole, Long parentId, StaffEntity staffEntity) { staffRole.setEvaluationGroupId(EvaluationGroupEnums.ALL.getType());//全部考评组 staffRole.setDepartmentId(DepartmentPMEnums.ALL.getType());//所有部门 diff --git a/src/main/resources/mapper/flow/StaffRoleEvaluationGroupMapper.xml b/src/main/resources/mapper/flow/StaffRoleEvaluationGroupMapper.xml index f7b1c1c8..59dde81b 100644 --- a/src/main/resources/mapper/flow/StaffRoleEvaluationGroupMapper.xml +++ b/src/main/resources/mapper/flow/StaffRoleEvaluationGroupMapper.xml @@ -97,5 +97,10 @@ select evaluation_group_id from lz_staff_role_evaluation_group where is_delete = 0 and role_id = #{roleId} and is_select = 1 + + diff --git a/src/main/resources/mapper/flow/StaffRoleMapper.xml b/src/main/resources/mapper/flow/StaffRoleMapper.xml index 48e8d35e..8f44cb4f 100644 --- a/src/main/resources/mapper/flow/StaffRoleMapper.xml +++ b/src/main/resources/mapper/flow/StaffRoleMapper.xml @@ -169,6 +169,12 @@ select menu_id from lz_staff_role_menu where role_id in ( select id from lz_staff_role where staff_id = #{userId} and is_delete=0) and is_delete = 0 ) and is_delete = 0 + From 7282fe67c8e5440e6b0c1ae613de1e556084a4ac Mon Sep 17 00:00:00 2001 From: quyixiao <2621048238@qq.com> Date: Tue, 10 Nov 2020 15:52:38 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lz/modules/flow/dao/StaffRoleMapper.java | 2 ++ .../flow/service/impl/StaffRoleServiceImpl.java | 15 ++++++++++----- .../resources/mapper/flow/StaffRoleMapper.xml | 7 +++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/lz/modules/flow/dao/StaffRoleMapper.java b/src/main/java/com/lz/modules/flow/dao/StaffRoleMapper.java index e145585e..f98b77b8 100644 --- a/src/main/java/com/lz/modules/flow/dao/StaffRoleMapper.java +++ b/src/main/java/com/lz/modules/flow/dao/StaffRoleMapper.java @@ -60,4 +60,6 @@ public interface StaffRoleMapper extends BaseMapper { List selectAllMenus(@Param("userId") Long userId); List selectAllStaffRoleByDepartmentLevel(@Param("departmentLevels") List departmentLevels); + + StaffRole selectStaffRolesByStaffIdDepartmentLevelList(@Param("staffId") Long staffId, @Param("departmentLevels") List departmentLevels); } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java index ffe69a08..40117b34 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/StaffRoleServiceImpl.java @@ -37,10 +37,8 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.lang.reflect.Array; +import java.util.*; import java.util.stream.Collectors; /** @@ -411,7 +409,14 @@ public class StaffRoleServiceImpl extends ServiceImpl + + From c88a023d5de18d1e2064ff7cff33478ed076d977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Tue, 10 Nov 2020 15:52:47 +0800 Subject: [PATCH 6/9] fix --- .../java/com/lz/modules/performance/res/ChartStatistical.java | 3 +++ src/main/resources/mapper/app/ResultRecordMapper.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/lz/modules/performance/res/ChartStatistical.java b/src/main/java/com/lz/modules/performance/res/ChartStatistical.java index 4e936326..5f4929b7 100644 --- a/src/main/java/com/lz/modules/performance/res/ChartStatistical.java +++ b/src/main/java/com/lz/modules/performance/res/ChartStatistical.java @@ -21,5 +21,8 @@ public class ChartStatistical { @ApiModelProperty(value = "提示",name = "tip") private String tip; + @ApiModelProperty(value = "等级",name = "scoreLevel") + private Long scoreLevel; + } \ No newline at end of file diff --git a/src/main/resources/mapper/app/ResultRecordMapper.xml b/src/main/resources/mapper/app/ResultRecordMapper.xml index 96ca166f..c0c48620 100644 --- a/src/main/resources/mapper/app/ResultRecordMapper.xml +++ b/src/main/resources/mapper/app/ResultRecordMapper.xml @@ -379,7 +379,7 @@