|
@@ -2,16 +2,22 @@ package org.jeecg.modules.system.app.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.jeecg.modules.system.app.entity.AppInstructor;
|
|
|
import org.jeecg.modules.system.app.mapper.AppInstructorMapper;
|
|
|
import org.jeecg.modules.system.app.service.IAppInstructorService;
|
|
|
import org.jeecg.modules.system.app.vo.staff.StaffRequestVO;
|
|
|
import org.jeecg.modules.system.app.vo.staff.StaffResponseVO;
|
|
|
+import org.jeecg.modules.system.app.vo.staff.StaffVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: 教练表
|
|
|
* @Author: jeecg-boot
|
|
@@ -30,4 +36,41 @@ public class AppInstructorServiceImpl extends ServiceImpl<AppInstructorMapper, A
|
|
|
public IPage<StaffResponseVO> findPage(Page<AppInstructor> page, StaffRequestVO staffRequestVO,String orgCode) {
|
|
|
return appInstructorMapper.findPage(page,staffRequestVO,orgCode);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public StaffVO findById(String id) {
|
|
|
+ StaffVO staffVO = appInstructorMapper.findByStaffId(id);
|
|
|
+ //处理部门
|
|
|
+ List<String> selecteddeparts = new ArrayList<>();
|
|
|
+ List<String> trainingPrograms = new ArrayList<>();
|
|
|
+ List<String> honor = new ArrayList<>();
|
|
|
+ if (staffVO!=null){
|
|
|
+ if (StringUtils.isNotEmpty(staffVO.getSelecteddeparts())){
|
|
|
+ if (staffVO.getSelecteddeparts().contains(",")){
|
|
|
+ selecteddeparts = Arrays.asList(staffVO.getSelecteddeparts().split(","));
|
|
|
+ }else {
|
|
|
+ selecteddeparts.add(staffVO.getSelecteddeparts());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(staffVO.getTrainingPrograms())){
|
|
|
+ if (staffVO.getTrainingPrograms().contains(",")){
|
|
|
+ trainingPrograms = Arrays.asList(staffVO.getTrainingPrograms().split(","));
|
|
|
+ }else {
|
|
|
+ trainingPrograms.add(staffVO.getTrainingPrograms());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(staffVO.getHonor())){
|
|
|
+ if (staffVO.getHonor().contains(",")){
|
|
|
+ honor = Arrays.asList(staffVO.getHonor().split(","));
|
|
|
+ }else {
|
|
|
+ honor.add(staffVO.getHonor());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ staffVO.setSelecteddepartsList(selecteddeparts);
|
|
|
+ staffVO.setTrainingProgramsList(trainingPrograms);
|
|
|
+ staffVO.setHonorList(honor);
|
|
|
+ }
|
|
|
+
|
|
|
+ return staffVO;
|
|
|
+ }
|
|
|
}
|