ly 15 цаг өмнө
parent
commit
d7c7888d42

+ 1247 - 0
master/src/main/java/com/ruoyi/project/eoeg/controller/TEoegStaffmgrController.java

@@ -0,0 +1,1247 @@
+package com.ruoyi.project.eoeg.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.config.RuoYiConfig;
+import com.ruoyi.framework.interceptor.annotation.RepeatSubmit;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.common.domain.DataEntity;
+import com.ruoyi.project.eoeg.domain.TEoegStaffmgr;
+import com.ruoyi.project.eoeg.mapper.TEoegStaffmgrMapper;
+import com.ruoyi.project.eoeg.service.ITEoegStaffmgrService;
+import com.ruoyi.project.system.domain.SysDept;
+import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysDeptService;
+import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.ISysUserService;
+import com.ruoyi.project.training.domain.*;
+import com.ruoyi.project.training.mapper.TTrainingbccDeviceMapper;
+import com.ruoyi.project.training.service.*;
+import com.ruoyi.project.training.spec.service.ITStPlanService;
+import com.ruoyi.project.training.spec.service.ITStSuccessorService;
+import com.ruoyi.project.document.domain.TPlantproglist;
+import com.ruoyi.project.document.service.ITPlantproglistService;
+import com.ruoyi.project.common.domain.TCommonfile;
+import com.ruoyi.project.common.service.ITCommonfileService;
+import org.apache.commons.lang.StringUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+/**
+ * 人员管理Controller
+ *
+ * @author ruoyi
+ * @date 2020-11-25
+ */
+@RestController
+@RequestMapping("/eoeg/eoegStaffmgr")
+public class TEoegStaffmgrController extends BaseController {
+    @Autowired
+    private ITEoegStaffmgrService tStaffmgrService;
+
+    @Autowired
+    private ISysDeptService iSysDeptService;
+
+    @Autowired
+    private ISysDictTypeService iSysDictTypeService;
+
+    @Resource
+    private TEoegStaffmgrMapper tStaffmgrMapper;
+
+    @Autowired
+    private ITTrainingrecordsService tTrainingrecordsService;
+
+    @Autowired
+    private ITTrainingParticipantsService tTrainingParticipantsService;
+
+    @Autowired
+    private ITWorklicenseService tWorklicenseService;
+
+    @Autowired
+    private ITTrainingRegularService tTrainingRegularService;
+
+    @Autowired
+    private ITTrainingDeviceService tTrainingDeviceService;
+
+    @Autowired
+    private ITTrainingService tTrainingService;
+
+    @Autowired
+    private ITTrainingNonService tTrainingNonService;
+
+    @Autowired
+    private ISysUserService sysUserService;
+
+    @Autowired
+    private ITStSuccessorService stSuccessorService;
+
+    @Autowired
+    private ITStPlanService tStPlanService;
+    @Autowired
+    private ITTrainingMatrixService tTrainingMatrixService;
+    @Autowired
+    private ITTrainingbccRegularService tTrainingbccRegularService;
+    @Autowired
+    private ITTrainingbccService trainingbccService;
+    @Resource
+    private TTrainingbccDeviceMapper tTrainingbccDeviceMapper;
+    @Autowired
+    private ITTrainingbccDeviceService trainingbccDeviceService;
+    @Autowired
+    private ITPlantproglistService tPlantproglistService;
+    @Autowired
+    private ITCommonfileService tCommonfileService;
+
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/listEoegSaiInspectors")
+    public AjaxResult listEoegSaiInspectors() {
+        return AjaxResult.success(tStaffmgrService.selectEoegSaiInspectors());
+    }
+
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/listEoegSaiExecutors")
+    public AjaxResult listEoegSaiExecutors() {
+        return AjaxResult.success(tStaffmgrService.selectEoegSaiExecutors());
+    }
+
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/listEoegSaiAssessors")
+    public AjaxResult listEoegSaiAssessors() {
+        return AjaxResult.success(tStaffmgrService.selectEoegSaiAssessors());
+    }
+
+    /**
+     * 获取SAI整改负责人列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/listSaiExecutors")
+    public AjaxResult listSaiExecutors() {
+        List<TEoegStaffmgr> tStaffmgrs = tStaffmgrService.selectSaiExecutors();
+        // 添加字典配置的人员
+        List<SysDictData> dictDataList = iSysDictTypeService.selectDictDataByType("SAI_EXECUTOR_INSPECTOR");
+        for (SysDictData sysDictData : dictDataList) {
+            TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(sysDictData.getDictValue());
+            tStaffmgrs.add(staffmgr);
+        }
+        return AjaxResult.success(tStaffmgrs);
+    }
+
+    @GetMapping("/listStaffmgrByActualposts")
+    public AjaxResult listStaffmgrByActualposts(TEoegStaffmgr tStaffmgr) {
+        return AjaxResult.success(tStaffmgrService.selectUserInfoByStaffmgr(tStaffmgr));
+    }
+
+    /**
+     * 获取SAI验证人列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/listSaiInspectors")
+    public AjaxResult listSaiInspectors() {
+        List<TEoegStaffmgr> tStaffmgrs = tStaffmgrService.selectSaiInspectors();
+        // 添加字典配置的人员
+        List<SysDictData> dictDataList = iSysDictTypeService.selectDictDataByType("SAI_EXECUTOR_INSPECTOR");
+        for (SysDictData sysDictData : dictDataList) {
+            TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(sysDictData.getDictValue());
+            tStaffmgrs.add(staffmgr);
+        }
+        return AjaxResult.success(tStaffmgrs);
+    }
+
+    /**
+     * 获取人员管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:query')")
+    @GetMapping(value = "/loginStaffInfo")
+    public AjaxResult getLoginStaffInfo() {
+        Long userId = getUserId();
+        SysUser sysUser = sysUserService.selectUserById(userId);
+        String staffId = sysUser.getStaffId();
+        TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(staffId);
+        if (staffmgr != null) {
+            staffmgr.setUserId(userId.toString());
+            if (staffmgr.getActualpost().contains("14") || staffmgr.getActualpost().contains("12")) {
+                staffmgr.setChecker(true);
+            }
+        }
+        return AjaxResult.success(staffmgr);
+    }
+
+    /**
+     * 获取当前用户id
+     *
+     * @return 当前用户id
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:query')")
+    @GetMapping("/getStaffId")
+    public AjaxResult getStaffId() {
+        Long userId = getUserId();
+        SysUser sysUser = sysUserService.selectUserById(userId);
+        String staffId = sysUser.getStaffId();
+        return AjaxResult.success("操作成功", staffId);
+    }
+
+    /**
+     * 判断当前用户是否为导师
+     *
+     * @return 是否为导师
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:query')")
+    @GetMapping("/isMentor")
+    public AjaxResult isMentor() {
+        // 是否为导师
+        boolean isMentor = false;
+        ServletUtils.getParameter("sexs");
+        // 导师清单
+        List<TEoegStaffmgr> tStaffmgrs = tStaffmgrService.selectMentorList(null);
+        Long userId = getUserId();
+        SysUser sysUser = sysUserService.selectUserById(userId);
+        // 当前用户id
+        String staffId = sysUser.getStaffId();
+        for (TEoegStaffmgr staffmgr : tStaffmgrs) {
+            // 导师id=当前用户id
+            if (staffmgr.getStaffid().equals(staffId)) {
+                isMentor = true;
+            }
+        }
+        return AjaxResult.success("操作成功", isMentor);
+    }
+
+    /**
+     * 查询导师下拉列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/listMentors")
+    public AjaxResult listMentors(TEoegStaffmgr tStaffmgr) {
+        ServletUtils.getParameter("sexs");
+        return AjaxResult.success(tStaffmgrService.selectMentorList(tStaffmgr));
+    }
+
+    /**
+     * 查询人员管理列表--包含离职人员
+     */
+    @GetMapping("/listAll")
+    public TableDataInfo listAll(TEoegStaffmgr tStaffmgr) {
+        ServletUtils.getParameter("sexs");
+        startPage();
+        logger.info("staffmgr:" + tStaffmgr);
+        List<TEoegStaffmgr> list = tStaffmgrMapper.selectTStaffmgrListAll(tStaffmgr);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询人员管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TEoegStaffmgr tStaffmgr) {
+        ServletUtils.getParameter("sexs");
+        startPage();
+        logger.info("staffmgr:" + tStaffmgr);
+        List<TEoegStaffmgr> list = tStaffmgrService.selectTStaffmgrList(tStaffmgr);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/averageAge")
+    public AjaxResult averageAge(TEoegStaffmgr tStaffmgr) {
+        int sumAge = 0;
+        Calendar calendar = Calendar.getInstance();
+        List<TEoegStaffmgr> tStaffmgrs = tStaffmgrService.selectTStaffmgrList(tStaffmgr);
+        for (TEoegStaffmgr staffmgr : tStaffmgrs) {
+            if (staffmgr.getBirthday() != null) {
+                calendar.setTime(staffmgr.getBirthday());
+                int birthYear = calendar.get(Calendar.YEAR);
+                calendar.setTime(new Date());
+                int currentYear = calendar.get(Calendar.YEAR);
+                sumAge += (currentYear - birthYear);
+            }
+        }
+        int result = sumAge / tStaffmgrs.size();
+        return AjaxResult.success(result);
+    }
+
+
+    /**
+     * 通过部门查询人员列表
+     */
+    @GetMapping("/listByDeptAndTeam")
+    public TableDataInfo listByDeptAndTeam(TEoegStaffmgr tStaffmgr) {
+        startPage();
+        List<TEoegStaffmgr> list = tStaffmgrService.selectTStaffmgrListByDeptAndTeam(tStaffmgr);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 通过班长查询人员列表
+     */
+    @GetMapping("/listStaffByMonitor")
+    public AjaxResult listStaffByMonitor(TEoegStaffmgr tStaffmgr) {
+        List<TEoegStaffmgr> list = tStaffmgrService.selectStaffByMonitor(tStaffmgr);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询人员管理列表(包含离职)
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/getAllList")
+    public TableDataInfo getAllList(TEoegStaffmgr tStaffmgr) {
+        ServletUtils.getParameter("sexs");
+        startPage();
+        logger.info("staffmgr:" + tStaffmgr);
+        List<TEoegStaffmgr> list = tStaffmgrService.selectAllTStaffmgrList(tStaffmgr);
+        try {
+            //判断离职
+            if (!StringUtils.isEmpty(tStaffmgr.getLeftYear())) {
+                Iterator<TEoegStaffmgr> iterator = list.iterator();
+                while (iterator.hasNext()) {
+                    TEoegStaffmgr t = iterator.next();
+                    if (t.getLeftDate() != null && t.getDelFlag() == 9) {
+                        Calendar cal = Calendar.getInstance();
+                        cal.setTime(t.getLeftDate());
+                        Integer year = cal.get(Calendar.YEAR);//获取年
+                        if (year < Integer.parseInt(tStaffmgr.getLeftYear())) {
+                            logger.debug(t.getName() + "离职年份小于数据");
+                            iterator.remove();
+                        }
+                    }
+                }
+            }
+
+            // 使用一个 HashMap 来存储去重后的结果
+            Map<String, TEoegStaffmgr> map = new HashMap<>();
+
+            // 遍历列表并将每个 TStaffmgr 实例放入 Map 中
+            for (TEoegStaffmgr staffmgr : list) {
+                map.put(staffmgr.getStaffid(), staffmgr);
+            }
+            // 从 Map 中提取去重后的结果
+            list = new ArrayList<>(map.values());
+        } catch (Exception e) {
+            logger.error(e.toString());
+        }
+
+
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询人员公司级培训时间列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/selectTime")
+    public TableDataInfo selectTime(TEoegStaffmgr tStaffmgr) {
+        startPage();
+        List<TEoegStaffmgr> list = tStaffmgrService.selectRecordList(tStaffmgr);
+        try {
+            //判断离职
+            if (!StringUtils.isEmpty(tStaffmgr.getLeftYear())) {
+                Iterator<TEoegStaffmgr> iterator = list.iterator();
+                while (iterator.hasNext()) {
+                    TEoegStaffmgr t = iterator.next();
+                    if (t.getLeftDate() != null && t.getDelFlag() == 9) {
+                        Calendar cal = Calendar.getInstance();
+                        cal.setTime(t.getLeftDate());
+                        Integer year = cal.get(Calendar.YEAR);//获取年
+                        if (year < Integer.parseInt(tStaffmgr.getLeftYear())) {
+                            logger.debug(t.getName() + "离职年份小于数据");
+                            iterator.remove();
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.toString());
+        }
+        logger.info("selectTime 人员列表数量:{}", list.size());
+        List<TTrainingParticipants> tTrainingParticipants = tTrainingParticipantsService.selectTTrainingParticipantsList(new TTrainingParticipants());
+        logger.info("培训记录总数:{}", tTrainingParticipants.size());
+
+        if (list.isEmpty()) {
+            logger.warn("人员列表为空,无法计算培训时长");
+            return getDataTable(list);
+        }
+
+        if (tTrainingParticipants.isEmpty()) {
+            logger.warn("培训记录为空,所有人员培训时长将为0");
+        }
+
+        // 提前格式化当前年份,避免在线程中重复创建
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
+        String currentYear = sdf.format(new Date());
+        logger.info("统计年份:{}", currentYear);
+
+        //线程池
+        ExecutorService executorService = Executors.newFixedThreadPool(10);
+        final CountDownLatch latch = new CountDownLatch(list.size()); //相同线程数量的计数
+        for (int i = 0; i < list.size(); i++) {
+            int finalI = i;
+            executorService.execute(() -> {
+                try {
+                    TEoegStaffmgr staff = list.get(finalI);
+                    String staffId = staff.getStaffid();
+                    String staffName = staff.getName();
+                    double time = 0;
+                    int matchCount = 0; // 匹配到的记录数
+                    int currentYearCount = 0; // 当年的记录数
+
+                    for (TTrainingParticipants t : tTrainingParticipants) {
+                        // 空值判断,避免NPE
+                        if (t.getStaffId() == null || staffId == null) {
+                            continue;
+                        }
+
+                        if (t.getStaffId().equals(staffId)) {
+                            matchCount++;
+
+                            if (t.getStartDate() != null) {
+                                String trainingYear = sdf.format(t.getStartDate());
+
+                                if (trainingYear.equals(currentYear)) {
+                                    currentYearCount++;
+
+                                    if (t.getTrainingDuration() != null && !t.getTrainingDuration().trim().isEmpty()) {
+                                        try {
+                                            double duration = Double.parseDouble(t.getTrainingDuration().trim());
+                                            time = time + duration;
+                                            logger.debug("员工[{}]累加培训时长 {} 小时,累计 {} 小时", staffName, duration, time);
+                                        } catch (NumberFormatException e) {
+                                            logger.warn("员工[{}]培训时长格式错误:[{}]", staffName, t.getTrainingDuration());
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    staff.setTrainingTime(String.valueOf(time));
+                    logger.info("员工[{}({})] 计算完成:培训时长={} 小时,匹配记录={} 条,当年记录={} 条",
+                        staffName, staffId, time, matchCount, currentYearCount);
+
+                } catch (Exception e) {
+                    logger.error("计算员工培训时长异常,索引:{}", finalI, e);
+                } finally {
+                    latch.countDown(); //线程计数
+                }
+            });
+        }
+        try {
+            latch.await(); //线程计数完毕后继续执行
+        } catch (InterruptedException e) {
+            logger.error("等待线程池执行完毕时被中断", e);
+        }
+        executorService.shutdown();
+
+        logger.info("selectTime 接口执行完成,返回数据量:{}", list.size());
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询人员管理列表
+     *
+     * @return
+     */
+    @GetMapping("/ogzList")
+    public List<TEoegStaffmgr> ogzList(TEoegStaffmgr tStaffmgr) {
+        List<TEoegStaffmgr> list = tStaffmgrService.selectTStaffmgrList(tStaffmgr);
+        return list;
+    }
+
+    /**
+     * 上级领导字段查询人员管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/pIdList")
+    public AjaxResult pIdList(TEoegStaffmgr tStaffmgr) {
+        List<TEoegStaffmgr> list = tStaffmgrService.selectTStaffmgrList(tStaffmgr);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询离职人员管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:list')")
+    @GetMapping("/leftList")
+    public TableDataInfo leftList(TEoegStaffmgr tStaffmgr) {
+        startPage();
+        List<TEoegStaffmgr> list = tStaffmgrService.selectLeftTStaffmgrList(tStaffmgr);
+        return getDataTable(list);
+    }
+
+    //学历统计
+    @GetMapping("/eduData")
+    public List<DataEntity> eduData(TEoegStaffmgr param) {
+        List<DataEntity> list = tStaffmgrMapper.selectEduData(param);
+        List<SysDictData> education = iSysDictTypeService.selectDictDataByType("EDUCATION");
+        for (DataEntity d : list
+        ) {
+            for (SysDictData s : education
+            ) {
+                if (StringUtils.isBlank(d.getDataName())) {
+                    d.setDataName("未知");
+                    break;
+                }
+                if (s.getDictValue().equals(d.getDataName())) {
+                    d.setDataName(s.getDictLabel());
+                    break;
+                }
+            }
+        }
+        return list;
+    }
+
+    //年龄统计
+    @GetMapping("/ageData")
+    public List<DataEntity> ageData(TEoegStaffmgr param) {
+        List<DataEntity> list = tStaffmgrMapper.selectAgeData(param);
+        List<SysDictData> education = iSysDictTypeService.selectDictDataByType("EDUCATION");
+        for (DataEntity d : list
+        ) {
+            for (SysDictData s : education
+            ) {
+                if (StringUtils.isBlank(d.getDataName())) {
+                    d.setDataName("未知");
+                    break;
+                }
+                if (s.getDictValue().equals(d.getDataName())) {
+                    d.setDataName(s.getDictLabel());
+                    break;
+                }
+            }
+        }
+        return list;
+    }
+
+    //英语统计
+    @GetMapping("/engData")
+    public List<DataEntity> engData(TEoegStaffmgr param) {
+        List<DataEntity> list = tStaffmgrMapper.selectEngData(param);
+        List<SysDictData> englishability = iSysDictTypeService.selectDictDataByType("ENGLISHABILITY");
+        for (DataEntity d : list
+        ) {
+            for (SysDictData s : englishability
+            ) {
+                if (StringUtils.isBlank(d.getDataName())) {
+                    d.setDataName("未知");
+                    break;
+                }
+                if (s.getDictValue().equals(d.getDataName())) {
+                    d.setDataName(s.getDictLabel());
+                    break;
+                }
+            }
+        }
+        return list;
+    }
+
+    //班值统计
+    @GetMapping("/teamData")
+    public List<DataEntity> teamData(TEoegStaffmgr param) {
+        List<DataEntity> list = tStaffmgrMapper.selectTeamData(param);
+        List<SysDictData> englishability = iSysDictTypeService.selectDictDataByType("TEAM_DIVIDE");
+        for (DataEntity d : list
+        ) {
+            for (SysDictData s : englishability
+            ) {
+                if (StringUtils.isBlank(d.getDataName())) {
+                    d.setDataName("未知");
+                    break;
+                }
+                if (s.getDictValue().equals(d.getDataName())) {
+                    d.setDataName(s.getDictLabel());
+                    break;
+                }
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 导出人员管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:export')")
+    @Log(title = "人员管理", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TEoegStaffmgr tStaffmgr) {
+        List<TEoegStaffmgr> list = tStaffmgrService.selectTStaffmgrList(tStaffmgr);
+        ExcelUtil<TEoegStaffmgr> util = new ExcelUtil<TEoegStaffmgr>(TEoegStaffmgr.class);
+        return util.exportExcel(list, "staffmgr");
+    }
+
+    /**
+     * 获取人员管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrById(id);
+        return AjaxResult.success(staffmgr);
+    }
+
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:query')")
+    @GetMapping(value = "/staffid/{id}")
+    public AjaxResult getInfoByStaffId(@PathVariable("id") String id) {
+        TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(id);
+        return AjaxResult.success(staffmgr);
+    }
+
+    /**
+     * 为参培人员名单获取人员管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:query')")
+    @GetMapping("/byStaffId/{staffIds}")
+    public AjaxResult byStaffId(@PathVariable String[] staffIds) {
+        List<TEoegStaffmgr> staffmgrs = new ArrayList<TEoegStaffmgr>();
+        for (int i = 0; i < staffIds.length; i++) {
+            TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrByStaffId(staffIds[i]);
+            staffmgrs.add(staffmgr);
+        }
+        return AjaxResult.success(staffmgrs);
+    }
+
+    /**
+     * 新增人员管理
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:add')")
+    @Log(title = "人员管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TEoegStaffmgr tStaffmgr) {
+        //判断是否重复员工
+        TEoegStaffmgr tStaffmgr1 = tStaffmgrMapper.selectTStaffmgrByStaffId(tStaffmgr.getStaffid());
+        if (tStaffmgr1 != null) {
+            return AjaxResult.error("员工号已存在");
+        }
+
+        int insertResult = tStaffmgrService.insertTStaffmgr(tStaffmgr);
+        tStaffmgr.setCreaterCode(getUserId().toString());
+        //如果为BCC部门新员工,添加新员工培训
+        if (tStaffmgr.getIsNew() == 1 && tStaffmgr.getDeptId()==103l) {
+            TTrainingMatrix tTrainingMatrix = new TTrainingMatrix();
+            tTrainingMatrix.setDeptId(103l);
+            tTrainingMatrix.setTrainingLevel("14");
+            tTrainingMatrix.setIsNewstaff("1");
+            List<TTrainingMatrix> list = tTrainingMatrixService.selectTTrainingMatrixList(tTrainingMatrix);
+            int currentYear = LocalDate.now().getYear();
+            for (TTrainingMatrix matrix: list
+            ) {
+                //矩阵
+                TTrainingbccRegular tTrainingRegular = new TTrainingbccRegular();
+                tTrainingRegular.setDeptId(matrix.getDeptId());
+                tTrainingRegular.setActualpostId(matrix.getActualpostId());
+                tTrainingRegular.setCourseCode(matrix.getCourseCode());
+                tTrainingRegular.setItem(matrix.getItem());
+                tTrainingRegular.setHour(matrix.getHour());
+                tTrainingRegular.setInvolvedMoc("false");
+                tTrainingRegular.setNotPlan("false");
+                tTrainingRegular.setYear(String.valueOf(currentYear));
+                tTrainingRegular.setNewStaff(tStaffmgr.getStaffid());
+
+                // 通过课程代码搜索程序清单,获取培训人和培训文件(只查询一次)
+                String courseCode = matrix.getCourseCode();
+                String regularTrainer = null;
+                String trainer = null;
+                String fileUrl = "";
+                String fileName = "";
+                TPlantproglist plantproglist = null;
+
+                if (StringUtils.isNotEmpty(courseCode)) {
+                    TPlantproglist plantproglistParam = new TPlantproglist();
+                    plantproglistParam.setFileno(courseCode);
+                    List<TPlantproglist> plantproglistList = tPlantproglistService.selectList(plantproglistParam);
+
+                    if (plantproglistList != null && !plantproglistList.isEmpty()) {
+                        plantproglist = plantproglistList.get(0);
+                        logger.info("找到程序清单,文件编号: {}, 责任者: {}", courseCode, plantproglist.getResponsibility());
+
+                        // 获取培训文件
+                        TCommonfile fileParam = new TCommonfile();
+                        fileParam.setpId(plantproglist.getId());
+                        fileParam.setpType("plantproglist");
+                        List<TCommonfile> fileList = tCommonfileService.selectAllFileList(fileParam);
+                        if (fileList != null && !fileList.isEmpty()) {
+                            fileUrl = fileList.get(0).getFileUrl();
+                            fileName = fileList.get(0).getFileName();
+                            logger.info("找到培训文件: {}", fileName);
+                        }
+
+                        // 获取培训人:通过责任者查找员工编号
+                        String trainerName = plantproglist.getResponsibility();
+                        regularTrainer = trainerName; // 设置给regular
+
+                        if (StringUtils.isNotEmpty(trainerName)) {
+                            TEoegStaffmgr staffmgrParam = new TEoegStaffmgr();
+                            staffmgrParam.setName(trainerName);
+                            staffmgrParam.setDeptId(tTrainingRegular.getDeptId());
+                            staffmgrParam.setDelFlag(0L); // 未删除的员工
+                            TEoegStaffmgr staffmgr = tStaffmgrMapper.selectStaffmgrSingle(staffmgrParam);
+                            if (staffmgr != null && StringUtils.isNotEmpty(staffmgr.getStaffid())) {
+                                trainer = staffmgr.getStaffid();
+                                logger.info("通过责任者找到培训人: {} -> {}", trainerName, trainer);
+                            } else {
+                                logger.warn("未找到责任者对应的员工: {}", trainerName);
+                            }
+                        } else {
+                            logger.warn("程序清单责任者为空");
+                        }
+                    } else {
+                        logger.warn("未找到课程代码对应的程序清单: {}", courseCode);
+                    }
+                } else {
+                    logger.warn("课程代码为空,无法获取程序清单培训人");
+                }
+
+                // 设置regular的培训人
+                tTrainingRegular.setLecturer(trainer);
+                int doInsert = tTrainingbccRegularService.insertTTrainingbccRegular(tTrainingRegular);
+
+                logger.info("regular:" + tTrainingRegular);
+                tTrainingRegular.setDeptId(103l); //bcc专用
+                //新增培训计划定期类
+                TTrainingbcc tTraining = new TTrainingbcc();
+                tTraining.setTrainingType("10");
+                tTraining.setYears(tTrainingRegular.getYear());
+                tTraining.setCourse(tTrainingRegular.getItem());
+                tTraining.setCourseid(tTrainingRegular.getCourseCode());
+                tTraining.setDuration(tTrainingRegular.getHour());
+                tTraining.setPosition(tTrainingRegular.getActualpostId());
+                tTraining.setIsfinish(Long.parseLong("0"));
+                tTraining.setDeptId(tTrainingRegular.getDeptId());
+                tTraining.setRegularId(tTrainingRegular.getId());
+                tTraining.setPeriod(matrix.getFrequency());
+
+                // 设置培训人和文件信息
+                tTraining.setTrainer(trainer);
+                tTraining.setFileUrl(fileUrl);
+                tTraining.setFileName(fileName);
+                // 培训内容:去掉文件后缀
+                String content = fileName;
+                if (StringUtils.isNotEmpty(fileName) && fileName.contains(".")) {
+                    content = fileName.substring(0, fileName.lastIndexOf("."));
+                }
+                tTraining.setContent(content);
+                //添加学习时间
+                String hourText = matrix.getHour();
+                if (hourText != null && !hourText.trim().isEmpty() && !hourText.contains("按需")) {
+                    try {
+                        // 解析课时文本,支持 "1.5h"、"1.5小时"、"1.5" 等格式
+                        String cleanText = hourText.toLowerCase().replaceAll("[^0-9.]", "");
+                        if (!cleanText.isEmpty()) {
+                            double hours = Double.parseDouble(cleanText);
+                            int minutes = (int) Math.round(hours * 60); // 转换为分钟
+                            tTraining.setTimerNeed((long) minutes);
+                        }
+                    } catch (NumberFormatException e) {
+                        logger.warn("无法解析课时: " + hourText);
+                    }
+                }
+                trainingbccService.insertTTrainingbcc(tTraining);
+                Long trainingId = tTraining.getId();
+
+                //培训详情
+                TTrainingbccDevice tTrainingDevice = new TTrainingbccDevice();
+                tTrainingDevice.setStaffId(tStaffmgr.getStaffid());
+                tTrainingDevice.setRegularId(trainingId);
+                tTrainingDevice.setStartDate(tTrainingRegular.getPlanTrainingdate());
+                tTrainingDevice.setSupplementary("0");
+                // 设置初始完成时间为空,表示尚未完成
+                tTrainingDevice.setFinishDate(null);
+                trainingbccDeviceService.insertTTrainingbccDevice(tTrainingDevice);
+            }
+
+        }
+
+        if (tStaffmgr.getUnit().equals("10") || tStaffmgr.getUnit().equals("18") || tStaffmgr.getUnit().equals("20") || tStaffmgr.getUnit().equals("30")) {
+            TTrainingrecords tTrainingrecords = new TTrainingrecords();
+            tTrainingrecords.setStaffId(tStaffmgr.getId());
+            tTrainingrecords.setPlantCode(tStaffmgr.getPlantCode());
+            tTrainingrecords.setName(tStaffmgr.getName());
+            tTrainingrecords.setEmployeeid(tStaffmgr.getStaffid());
+            tTrainingrecords.setClasses(tStaffmgr.getTeam());
+            tTrainingrecords.setDeptId(tStaffmgr.getDeptId());
+            tTrainingrecordsService.insertTTrainingrecords(tTrainingrecords);
+        }
+        if (!tStaffmgr.getTeam().equals("18")) {
+            TWorklicense tWorklicense = new TWorklicense();
+            tWorklicense.setPlantCode(tStaffmgr.getPlantCode());
+            tWorklicense.setClasses(tStaffmgr.getTeam());
+            tWorklicense.setName(tStaffmgr.getName());
+            tWorklicense.setEmployeeid(tStaffmgr.getStaffid());
+            tWorklicense.setPost(tStaffmgr.getActualpost());
+            tWorklicense.setDeptId(tStaffmgr.getDeptId());
+            tWorklicenseService.insertTWorklicense(tWorklicense);
+        }
+        /*if (tStaffmgr.getUnit().equals("10")) {
+            SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy");
+            TTrainingRegular regular = new TTrainingRegular();
+            regular.setYear(sdfYear.format(new Date()));
+            List<TTrainingRegular> tTrainingRegulars = tTrainingRegularService.selectTTrainingRegularList(regular);
+            for (TTrainingRegular r : tTrainingRegulars) {
+                if (r.getNotPlan().equals("true")) {
+                    String[] posts = r.getActualpostId().split(",");
+                    for (String post : posts) {
+                        if (post.equals(tStaffmgr.getActualpost())) {
+                            TTraining training = tTrainingService.selectTTrainingByRegularId(r.getId());
+                            if (training.getStartDate() == null) {
+                                TTrainingDevice tTrainingDevice = new TTrainingDevice();
+                                tTrainingDevice.setStaffId(tStaffmgr.getStaffid());
+                                tTrainingDevice.setRegularId(training.getId());
+                                tTrainingDevice.setStartDate(r.getPlanTrainingdate());
+                                tTrainingDevice.setSupplementary("0");
+                                tTrainingDeviceService.insertTTrainingDevice(tTrainingDevice);
+                            } else {
+                                TTrainingDevice tTrainingDevice = new TTrainingDevice();
+                                tTrainingDevice.setStaffId(tStaffmgr.getStaffid());
+                                tTrainingDevice.setRegularId(training.getId());
+                                tTrainingDevice.setSupplementary("2");
+                                tTrainingDeviceService.insertTTrainingDevice(tTrainingDevice);
+                            }
+                            TTrainingNon tTrainingNon = new TTrainingNon();
+                            tTrainingNon.setStaffId(tStaffmgr.getStaffid());
+                            tTrainingNon.setTrainingId(training.getId());
+                            tTrainingNon.setIsNew("1");
+                            tTrainingNonService.insertTTrainingNon(tTrainingNon);
+                        }
+                    }
+                }
+            }
+        }*/
+        return toAjax(insertResult);
+    }
+
+    /**
+     * 修改人员管理
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:edit')")
+    @Log(title = "人员管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TEoegStaffmgr tStaffmgr) {
+        //判断是否重复员工
+        TEoegStaffmgr tStaffmgr1 = tStaffmgrMapper.selectTStaffmgrByStaffId(tStaffmgr.getStaffid());
+        if (tStaffmgr1 != null) {
+            if (!tStaffmgr1.getId().equals(tStaffmgr.getId())) {
+                return AjaxResult.error("员工号已存在");
+            }
+        }
+        tStaffmgr.setPhoto(null);
+        tStaffmgr.setUpdaterCode(getUserId().toString());
+        tStaffmgr.setUpdatedate(new Date());
+        TEoegStaffmgr oldStaffmgr = tStaffmgrService.selectTStaffmgrById(tStaffmgr.getId());
+        if (tStaffmgr.getUnit().equals("10") || tStaffmgr.getUnit().equals("18")) {
+            //部门为CBP/C或CBP的人员
+            TTrainingrecords tTrainingrecords = tTrainingrecordsService.selectTTrainingrecordsBystaffId(tStaffmgr.getId());
+            if (tTrainingrecords != null) {
+                tTrainingrecords.setPlantCode(tStaffmgr.getPlantCode());
+                tTrainingrecords.setName(tStaffmgr.getName());
+                tTrainingrecords.setEmployeeid(tStaffmgr.getStaffid());
+                tTrainingrecords.setClasses(tStaffmgr.getTeam());
+                tTrainingrecords.setDeptId(tStaffmgr.getDeptId());
+                tTrainingrecordsService.updateTTrainingrecords(tTrainingrecords);
+            }
+        }
+        if (!tStaffmgr.getTeam().equals("18")) {
+            //非W班组人员
+            TWorklicense tWorklicense = tWorklicenseService.selectTWorklicenseByEmployeeid(tStaffmgr.getStaffid());
+            if (tWorklicense == null) {
+                TWorklicense newWorklicense = new TWorklicense();
+                newWorklicense.setPlantCode(tStaffmgr.getPlantCode());
+                newWorklicense.setClasses(tStaffmgr.getTeam());
+                newWorklicense.setName(tStaffmgr.getName());
+                newWorklicense.setEmployeeid(tStaffmgr.getStaffid());
+                newWorklicense.setPost(tStaffmgr.getActualpost());
+                newWorklicense.setDeptId(tStaffmgr.getDeptId());
+                tWorklicenseService.insertTWorklicense(newWorklicense);
+            } else {
+                tWorklicense.setPlantCode(tStaffmgr.getPlantCode());
+                tWorklicense.setClasses(tStaffmgr.getTeam());
+                tWorklicense.setName(tStaffmgr.getName());
+                tWorklicense.setEmployeeid(tStaffmgr.getStaffid());
+                tWorklicense.setPost(tStaffmgr.getActualpost());
+                tWorklicense.setDeptId(tStaffmgr.getDeptId());
+                tWorklicenseService.updateTWorklicense(tWorklicense);
+            }
+        }
+        return toAjax(tStaffmgrService.updateTStaffmgr(tStaffmgr));
+    }
+
+    /**
+     * 修改人员管理
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:edit')")
+    @Log(title = "人员管理转岗", businessType = BusinessType.UPDATE)
+    @RepeatSubmit
+    @PutMapping("/updatePost")
+    public AjaxResult updatePost(@RequestBody TEoegStaffmgr tStaffmgr) {
+        TEoegStaffmgr old = tStaffmgrService.selectTStaffmgrById(tStaffmgr.getId());
+        if (old.getActualpost().equals(tStaffmgr.getActualpost()) ) {
+            return AjaxResult.error("已经是此岗位");
+        }
+        if (old.getDeptId() != 103) { //非bcc
+            return toAjax(tStaffmgrService.updateTStaffmgr(tStaffmgr));
+        }
+        //
+        TTrainingbccRegular regular = new TTrainingbccRegular();
+        regular.setActualpostId(tStaffmgr.getActualpost());
+        regular.setYear(String.valueOf(LocalDate.now().getYear()));
+        List<TTrainingbccRegular> regularList = tTrainingbccRegularService.selectTTrainingbccRegularList(regular);
+        for (TTrainingbccRegular r: regularList
+             ) {
+            TTrainingbccDevice bccDevice = new TTrainingbccDevice();
+            bccDevice.setStaffId(String.valueOf(tStaffmgr.getId()));
+            bccDevice.setRegularId(r.getId());
+            List<TTrainingbccDevice> deviceList = tTrainingbccDeviceMapper.selectTTrainingbccDeviceByReguar(bccDevice);
+            if (deviceList.size() == 0) { //新岗位需要培训
+                TTrainingbcc tTrainingbcc = new TTrainingbcc();
+                tTrainingbcc.setRegularId(r.getId());
+                List<TTrainingbcc> tTrainingbccList = trainingbccService.selectTTrainingbccList(tTrainingbcc);
+                if (tTrainingbccList.size() > 0) {
+                    TTrainingbcc t = tTrainingbccList.get(0);
+                    // 获取课程结束时间
+                    Date endDate = t.getCourseEnddate();
+                    // 获取当前时间
+                    Date now = new Date();
+                    if (endDate == null || endDate.after(now)) {
+                        System.out.println("课程未结束");
+                        TTrainingbccDevice tTrainingDevice = new TTrainingbccDevice();
+                        tTrainingDevice.setStaffId(old.getStaffid());
+                        tTrainingDevice.setRegularId(t.getId());
+                        tTrainingDevice.setStartDate(t.getCourseStartdate());
+                        tTrainingDevice.setSupplementary("0");
+                        trainingbccDeviceService.insertTTrainingbccDevice(tTrainingDevice);
+                    } else {
+                        System.out.println("课程已结束");
+                        TTrainingbccDevice tTrainingDevice = new TTrainingbccDevice();
+                        tTrainingDevice.setStaffId(old.getStaffid());
+                        tTrainingDevice.setRegularId(t.getId());
+                        tTrainingDevice.setStartDate(t.getCourseStartdate());
+                        tTrainingDevice.setSupplementary("1");
+                        trainingbccDeviceService.insertTTrainingbccDevice(tTrainingDevice);
+                    }
+                }
+            }
+        }
+
+        return toAjax(tStaffmgrService.updateTStaffmgr(tStaffmgr));
+    }
+
+    /**
+     * 删除人员管理
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:remove')")
+    @Log(title = "人员管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        for (int i = 0; i < ids.length; i++) {
+            TTrainingrecords tTrainingrecords = tTrainingrecordsService.selectTTrainingrecordsBystaffId(ids[i]);
+            if (tTrainingrecords != null) {
+                tTrainingrecords.setDelFlag(2l);
+                tTrainingrecordsService.updateTTrainingrecords(tTrainingrecords);
+            }
+            TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrById(ids[i]);
+            TTrainingDevice device = new TTrainingDevice();
+            device.setStaffId(staffmgr.getStaffid());
+            List<TTrainingDevice> devices = tTrainingDeviceService.selectTTrainingDeviceList(device);
+            if (devices.size() != 0) {
+                Long[] devicesIds = new Long[devices.size()];
+                for (int m = 0; m < devices.size(); m++) {
+                    devicesIds[m] = devices.get(m).getId();
+                }
+                tTrainingDeviceService.deleteTTrainingDeviceByIds(devicesIds);
+            }
+            TTrainingNon non = new TTrainingNon();
+            non.setStaffId(staffmgr.getStaffid());
+            List<TTrainingNon> nons = tTrainingNonService.selectTTrainingNonList(non);
+            if (nons.size() != 0) {
+                Long[] nonIds = new Long[nons.size()];
+                for (int n = 0; n < nons.size(); n++) {
+                    nonIds[n] = nons.get(n).getId();
+                }
+                tTrainingNonService.deleteTTrainingNonByIds(nonIds);
+            }
+        }
+        return toAjax(tStaffmgrService.deleteTStaffmgrByIds(ids));
+    }
+
+    /**
+     * 删除离职人员
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:remove')")
+    @Log(title = "人员管理", businessType = BusinessType.DELETE)
+    @GetMapping("/left/{id}")
+    public AjaxResult removeLeft(@PathVariable Long id) {
+        TTrainingrecords tTrainingrecords = tTrainingrecordsService.selectTTrainingrecordsBystaffId(id);
+        if (tTrainingrecords != null) {
+            tTrainingrecords.setDelFlag(9l);
+            tTrainingrecordsService.updateTTrainingrecords(tTrainingrecords);
+        }
+        // 王子文 2022年6月27日 添加
+        // 离职时修改继任者清单状态、培养计划状态
+        Long staffId = Long.parseLong(tStaffmgrService.selectTStaffmgrById(id).getStaffid());
+        stSuccessorService.updateStateByStaffId(staffId);
+        tStPlanService.updateStudyStateByStaffId(staffId);
+        return toAjax(tStaffmgrService.deleteLeftTStaffmgrByIds(id));
+    }
+
+    /**
+     * 删除退休人员
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:remove')")
+    @Log(title = "人员管理", businessType = BusinessType.DELETE)
+    @GetMapping("/retire/{id}")
+    public AjaxResult removeRetire(@PathVariable Long id) {
+        TTrainingrecords tTrainingrecords = tTrainingrecordsService.selectTTrainingrecordsBystaffId(id);
+        if (tTrainingrecords != null) {
+            tTrainingrecords.setDelFlag(9l);
+            tTrainingrecordsService.updateTTrainingrecords(tTrainingrecords);
+        }
+        // 王子文 2022年6月27日 添加
+        // 离职时修改继任者清单状态、培养计划状态
+        Long staffId = Long.parseLong(tStaffmgrService.selectTStaffmgrById(id).getStaffid());
+        stSuccessorService.updateStateByStaffId(staffId);
+        tStPlanService.updateStudyStateByStaffId(staffId);
+        return toAjax(tStaffmgrService.deleteRetireTStaffmgrByIds(id));
+    }
+
+    /**
+     * 复职离职人员
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:remove')")
+    @Log(title = "人员管理", businessType = BusinessType.DELETE)
+    @GetMapping("/reLeft/{id}")
+    public AjaxResult reLeft(@PathVariable Long id) {
+        TTrainingrecords tTrainingrecords = tTrainingrecordsService.selectTTrainingrecordsBystaffId(id);
+        if (tTrainingrecords != null) {
+            tTrainingrecords.setDelFlag(0l);
+            tTrainingrecordsService.updateTTrainingrecords(tTrainingrecords);
+        }
+        return toAjax(tStaffmgrService.reLeftTStaffmgrByIds(id));
+    }
+
+    /**
+     * 批量导入人员管理
+     */
+    @PreAuthorize("@ss.hasPermi('eoeg:eoegStaffmgr:add')")
+    @Log(title = "人员管理", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow = new ArrayList<Integer>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TEoegStaffmgr> list = new ArrayList<TEoegStaffmgr>();
+        //字典查询
+        List<SysDictData> plant = iSysDictTypeService.selectDictDataByType("PLANT_DIVIDE");
+        List<SysDictData> sex = iSysDictTypeService.selectDictDataByType("sys_user_sex");
+        List<SysDictData> staff = iSysDictTypeService.selectDictDataByType("STAFF_UNIT");
+        List<SysDictData> team = iSysDictTypeService.selectDictDataByType("TEAM_DIVIDE");
+        List<SysDictData> actualpost = iSysDictTypeService.selectDictDataByType("ACTUALPOST");
+        List<SysDictData> education = iSysDictTypeService.selectDictDataByType("EDUCATION");
+        List<SysDictData> enAbility = iSysDictTypeService.selectDictDataByType("ENGLISHABILITY");
+        //部门查询
+        List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 1; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TEoegStaffmgr entity = new TEoegStaffmgr();
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    if (cell == null) {
+                        continue;
+                    }
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        for (SysDictData p : plant) {
+                            if (p.getDictLabel().equals(cellValue)) {
+                                entity.setPlantCode(p.getDictValue());//装置名称
+                            }
+                        }
+                    } else if (j == 1) {
+                        entity.setStaffid(cellValue);//员工编号
+                    } else if (j == 2) {
+                        entity.setName(cellValue);//员工姓名
+                    } else if (j == 3) {
+                        for (SysDictData p : sex) {
+                            if (p.getDictLabel().equals(cellValue)) {
+                                entity.setSex(p.getDictValue());//性别
+
+                            }
+                        }
+                    } else if (j == 4) {
+                        if (cellValue.length() > 3) {
+                            entity.setBirthday(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));//出生日期
+                        }
+                    } else if (j == 5) {
+                        for (SysDictData p : staff) {
+                            if (p.getDictLabel().equals(cellValue)) {
+                                entity.setUnit(p.getDictValue());//部门
+                            }
+                        }
+                    } else if (j == 6) {
+                        for (SysDictData p : team) {
+                            if (p.getDictLabel().equals(cellValue.trim())) {
+                                entity.setTeam(p.getDictValue());//班值
+                            }
+                        }
+                    } else if (j == 7) {
+                        for (SysDictData p : actualpost) {
+                            if (p.getDictLabel().equals(cellValue)) {
+                                entity.setActualpost(p.getDictValue());//实际岗位
+                            }
+                        }
+                    } else if (j == 8) {
+                        entity.setContact(cellValue);//联系方式
+                    } else if (j == 9) {
+                        for (SysDictData p : education) {
+                            if (p.getDictLabel().equals(cellValue)) {
+                                entity.setEducation(p.getDictValue());//学历
+                            }
+                        }
+                    } else if (j == 10) {
+                        for (SysDictData p : enAbility) {
+                            if (p.getDictLabel().equals(cellValue)) {
+                                entity.setEnAbility(p.getDictValue());//英语能力
+                            }
+                        }
+                    } else if (j == 11) {
+                        entity.setMail(cellValue);//邮箱
+                    } else if (j == 12) {
+                        for (SysDept d : dept) {
+                            if (d.getDeptName().equals(cellValue)) {
+                                entity.setDeptId(d.getDeptId());//部门编号
+                            }
+                        }
+                    } else if (j == 13) {
+                        entity.setRemarks(cellValue);//备注
+                    }
+                }
+                entity.setCreaterCode(userId.toString());
+                logger.info("entity:" + entity);
+                list.add(entity);
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(i + 1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TEoegStaffmgr t : list
+        ) {
+            failNum++;
+            try {
+                tStaffmgrService.insertTStaffmgr(t);
+                if (t.getUnit().equals("10") || t.getUnit().equals("18") || t.getUnit().equals("20")) {
+                    TTrainingrecords tTrainingrecords = new TTrainingrecords();
+                    tTrainingrecords.setStaffId(t.getId());
+                    tTrainingrecords.setPlantCode(t.getPlantCode());
+                    tTrainingrecords.setName(t.getName());
+                    tTrainingrecords.setEmployeeid(t.getStaffid());
+                    tTrainingrecords.setClasses(t.getTeam());
+                    tTrainingrecords.setDeptId(t.getDeptId());
+                    tTrainingrecordsService.insertTTrainingrecords(tTrainingrecords);
+                }
+                if (!t.getTeam().equals("18")) {
+                    TWorklicense tWorklicense = new TWorklicense();
+                    tWorklicense.setPlantCode(t.getPlantCode());
+                    tWorklicense.setClasses(t.getTeam());
+                    tWorklicense.setName(t.getName());
+                    tWorklicense.setEmployeeid(t.getStaffid());
+                    tWorklicense.setPost(t.getActualpost());
+                    tWorklicense.setDeptId(t.getDeptId());
+                    tWorklicenseService.insertTWorklicense(tWorklicense);
+                }
+                if (t.getUnit().equals("10")) {
+                    SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy");
+                    TTrainingRegular regular = new TTrainingRegular();
+                    regular.setYear(sdfYear.format(new Date()));
+                    List<TTrainingRegular> tTrainingRegulars = tTrainingRegularService.selectTTrainingRegularList(regular);
+                    for (TTrainingRegular r : tTrainingRegulars) {
+                        if (r.getNotPlan().equals("true")) {
+                            String[] posts = r.getActualpostId().split(",");
+                            for (String post : posts) {
+                                if (post.equals(t.getActualpost())) {
+                                    TTraining training = tTrainingService.selectTTrainingByRegularId(r.getId());
+                                    if (training.getStartDate() == null) {
+                                        TTrainingDevice tTrainingDevice = new TTrainingDevice();
+                                        tTrainingDevice.setStaffId(t.getStaffid());
+                                        tTrainingDevice.setRegularId(training.getId());
+                                        tTrainingDevice.setStartDate(r.getPlanTrainingdate());
+                                        tTrainingDevice.setSupplementary("0");
+                                        tTrainingDeviceService.insertTTrainingDevice(tTrainingDevice);
+                                    } else {
+                                        TTrainingDevice tTrainingDevice = new TTrainingDevice();
+                                        tTrainingDevice.setStaffId(t.getStaffid());
+                                        tTrainingDevice.setRegularId(training.getId());
+                                        tTrainingDevice.setSupplementary("2");
+                                        tTrainingDeviceService.insertTTrainingDevice(tTrainingDevice);
+                                    }
+                                    TTrainingNon tTrainingNon = new TTrainingNon();
+                                    tTrainingNon.setStaffId(t.getStaffid());
+                                    tTrainingNon.setTrainingId(training.getId());
+                                    tTrainingNon.setIsNew("1");
+                                    tTrainingNonService.insertTTrainingNon(tTrainingNon);
+                                }
+                            }
+                        }
+                    }
+                }
+                successNumber++;
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(failNum + 1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" + String.valueOf(successNumber));
+        logger.info("failNumber:" + String.valueOf(failNumber));
+        logger.info("failRow:" + String.valueOf(failRow));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
+
+    /**
+     * 证件照上传
+     */
+    @PostMapping("/uploadPhoto")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, String pType, String pId) throws IOException {
+        if (!file.isEmpty()) {
+            String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/" + pType), file);
+            TEoegStaffmgr staffmgr = tStaffmgrService.selectTStaffmgrById(Long.parseLong(pId));
+            staffmgr.setPhoto(url);
+            tStaffmgrService.updateTStaffmgr(staffmgr);
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("上传失败,请联系管理员");
+    }
+}

+ 523 - 0
master/src/main/java/com/ruoyi/project/eoeg/domain/TEoegStaffmgr.java

@@ -0,0 +1,523 @@
+package com.ruoyi.project.eoeg.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 人员管理对象 t_staffmgr
+ *
+ * @author ruoyi
+ * @date 2020-11-25
+ */
+public class TEoegStaffmgr extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 唯一标识ID */
+    private Long id;
+
+    /** 装置名称 */
+    @Excel(name = "装置名称", dictType = "PLANT_DIVIDE")
+    private String plantCode;
+
+    /** 员工编号 */
+    @Excel(name = "员工编号")
+    private String staffid;
+
+    /** 用户编号 */
+    private String userId;
+
+    /** 员工姓名 */
+    @Excel(name = "员工姓名")
+    private String name;
+
+    /** 性别 */
+    @Excel(name = "性别", dictType = "sys_user_sex")
+    private String sex;
+
+    /** 出生日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date birthday;
+
+    /** 部门 */
+    @Excel(name = "部门", dictType = "STAFF_UNIT")
+    private String unit;
+    private String units;
+    /** 班值 */
+    @Excel(name = "班值", dictType = "TEAM_DIVIDE")
+    private String team;
+    private String teams;
+    /** 实际岗位 */
+    @Excel(name = "实际岗位", dictType = "ACTUALPOST")
+    private String actualpost;
+    private String actualposts;
+    /** 联系方式 */
+    @Excel(name = "联系方式")
+    private String contact;
+
+    /** 学历 */
+    @Excel(name = "学历", dictType = "EDUCATION")
+    private String education;
+
+    /** 学历 */
+    private String educations;
+
+    /** 英语能力 */
+    @Excel(name = "英语能力", dictType = "ENGLISHABILITY")
+    private String enAbility;
+    private String enAbilitys;
+    /** 隐患查找数量 */
+    @Excel(name = "隐患查找数量")
+    private Long accidentNum;
+
+    /** 邮箱 */
+    @Excel(name = "邮箱")
+    private String mail;
+
+    /** 技能评估得分 */
+    @Excel(name = "技能评估得分")
+    private String skillScore;
+
+    /** 状态 */
+    private Long delFlag;
+
+    /** 创建人 */
+    private String createrCode;
+
+    /** 创建时间 */
+    private Date createdate;
+
+    /** 修改人 */
+    private String updaterCode;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    private Date updatedate;
+
+    /** 部门编号 */
+    private Long deptId;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 岗位人员技能培训数据 */
+    private String skillevaluation;
+
+    /** 是否有邮箱 */
+    private Long haveEmail;
+
+    /** 培训时长 */
+    private String trainingTime;
+
+    /** 证件照地址 */
+    private String photo;
+
+    /** 父级领导ID */
+    private Long pId;
+
+    /** 特殊职能 */
+    private String specialDuty;
+
+    /** 离职日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    private Date leftDate;
+
+    private String leftYear;
+    /** 是否退休 */
+    private Integer isRetire;
+
+    /** 是否新员工 */
+    private Integer isNew;
+
+    /** 区域 */
+    private String region;
+
+
+    /** 裂解 */
+    private String boiler;
+
+    /** 压缩 */
+    private String cracking;
+
+    /** 分离 */
+    private String hotarea;
+
+    /** PGU */
+    private String coldarea;
+
+    private boolean isChecker;
+
+    public boolean isChecker() {
+        return isChecker;
+    }
+
+    public void setChecker(boolean checker) {
+        isChecker = checker;
+    }
+
+    public String getBoiler() {
+        return boiler;
+    }
+
+    public void setBoiler(String boiler) {
+        this.boiler = boiler;
+    }
+
+    public String getCracking() {
+        return cracking;
+    }
+
+    public void setCracking(String cracking) {
+        this.cracking = cracking;
+    }
+
+    public String getHotarea() {
+        return hotarea;
+    }
+
+    public void setHotarea(String hotarea) {
+        this.hotarea = hotarea;
+    }
+
+    public String getColdarea() {
+        return coldarea;
+    }
+
+    public void setColdarea(String coldarea) {
+        this.coldarea = coldarea;
+    }
+
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    public Date getLeftDate() {
+        return leftDate;
+    }
+
+    public void setLeftDate(Date leftDate) {
+        this.leftDate = leftDate;
+    }
+
+    public String getEducations() {
+        return educations;
+    }
+
+    public void setEducations(String educations) {
+        this.educations = educations;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setPlantCode(String plantCode)
+    {
+        this.plantCode = plantCode;
+    }
+
+    public String getPlantCode()
+    {
+        return plantCode;
+    }
+    public void setStaffid(String staffid)
+    {
+        this.staffid = staffid;
+    }
+
+    public String getStaffid()
+    {
+        return staffid;
+    }
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String getEducation() { return education; }
+    public void setEducation(String education) { this.education = education; }
+
+    public String getEnAbility() { return enAbility; }
+    public void setEnAbility(String enAbility) { this.enAbility = enAbility; }
+
+    public Long getAccidentNum() { return accidentNum; }
+    public void setAccidentNum(Long accidentNum) { this.accidentNum = accidentNum; }
+
+    public String getName()
+    {
+        return name;
+    }
+    public void setSex(String sex)
+    {
+        this.sex = sex;
+    }
+
+    public String getSex()
+    {
+        return sex;
+    }
+    public void setBirthday(Date birthday)
+    {
+        this.birthday = birthday;
+    }
+
+    public Date getBirthday()
+    {
+        return birthday;
+    }
+    public void setUnit(String unit)
+    {
+        this.unit = unit;
+    }
+
+    public String getUnit()
+    {
+        return unit;
+    }
+    public void setTeam(String team)
+    {
+        this.team = team;
+    }
+
+    public String getTeam()
+    {
+        return team;
+    }
+    public void setActualpost(String actualpost)
+    {
+        this.actualpost = actualpost;
+    }
+
+    public String getActualpost()
+    {
+        return actualpost;
+    }
+    public void setContact(String contact)
+    {
+        this.contact = contact;
+    }
+
+    public String getContact()
+    {
+        return contact;
+    }
+    public void setDelFlag(Long delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode)
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode()
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate)
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate()
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode)
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode()
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate)
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate()
+    {
+        return updatedate;
+    }
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+    public void setRemarks(String remarks)
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks()
+    {
+        return remarks;
+    }
+    public void setDeptName(String deptName)
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName()
+    {
+        return deptName;
+    }
+    public void setMail(String mail) { this.mail = mail; }
+
+    public String getMail() { return mail; }
+    public void setSkillScore(String skillScore) { this.skillScore = skillScore; }
+
+    public String getSkillScore() { return skillScore; }
+    public void setHaveEmail(Long haveEmail) { this.haveEmail = haveEmail; }
+
+    public Long getHaveEmail() { return haveEmail; }
+
+    public String getUnits() {
+        return units;
+    }
+
+    public void setUnits(String units) {
+        this.units = units;
+    }
+
+    public String getTeams() {
+        return teams;
+    }
+
+    public void setTeams(String teams) {
+        this.teams = teams;
+    }
+
+    public String getActualposts() {
+        return actualposts;
+    }
+
+    public void setActualposts(String actualposts) {
+        this.actualposts = actualposts;
+    }
+
+    public String getEnAbilitys() {
+        return enAbilitys;
+    }
+
+    public void setEnAbilitys(String enAbilitys) {
+        this.enAbilitys = enAbilitys;
+    }
+    public String getSkillevaluation() {
+        return skillevaluation;
+    }
+
+    public void setSkillevaluation(String skillevaluation) {
+        this.skillevaluation = skillevaluation;
+    }
+    public String getTrainingTime() { return trainingTime; }
+
+    public void setTrainingTime(String trainingTime) { this.trainingTime = trainingTime; }
+    public String getPhoto() { return photo; }
+
+    public void setPhoto(String photo) { this.photo = photo; }
+    public void setpId(Long pId) { this.pId = pId; }
+
+    public Long getpId() { return pId; }
+    public void setSpecialDuty(String specialDuty) { this.specialDuty = specialDuty; }
+
+    public String getSpecialDuty() { return specialDuty; }
+
+    public String getLeftYear() {
+        return leftYear;
+    }
+
+    public void setLeftYear(String leftYear) {
+        this.leftYear = leftYear;
+    }
+
+    public Integer getIsRetire() {
+        return isRetire;
+    }
+
+    public void setIsRetire(Integer isRetire) {
+        this.isRetire = isRetire;
+    }
+
+    public Integer getIsNew() {
+        return isNew;
+    }
+
+    public void setIsNew(Integer isNew) {
+        this.isNew = isNew;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("plantCode", getPlantCode())
+                .append("staffid", getStaffid())
+                .append("name", getName())
+                .append("sex", getSex())
+                .append("birthday", getBirthday())
+                .append("unit", getUnit())
+                .append("units", getUnits())
+                .append("team", getTeam())
+                .append("actualpost", getActualpost())
+                .append("actualposts", getActualposts())
+                .append("contact", getContact())
+                .append("education", getEducation())
+                .append("enAbility", getEnAbility())
+                .append("mail", getMail())
+                .append("skillScore", getSkillScore())
+                .append("accidentNum", getAccidentNum())
+                .append("delFlag", getDelFlag())
+                .append("createrCode", getCreaterCode())
+                .append("createdate", getCreatedate())
+                .append("updaterCode", getUpdaterCode())
+                .append("updatedate", getUpdatedate())
+                .append("deptId", getDeptId())
+                .append("remarks", getRemarks())
+                .append("deptName", getDeptName())
+                .append("haveEmail", getHaveEmail())
+                .append("trainingTime", getTrainingTime())
+                .append("photo", getPhoto())
+                .toString();
+    }
+}

+ 208 - 0
master/src/main/java/com/ruoyi/project/eoeg/mapper/TEoegStaffmgrMapper.java

@@ -0,0 +1,208 @@
+package com.ruoyi.project.eoeg.mapper;
+
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.common.domain.DataEntity;
+import com.ruoyi.project.eoeg.domain.TEoegStaffmgr;
+import com.ruoyi.project.system.domain.SysUser;
+
+import java.util.List;
+
+/**
+ * 人员管理Mapper接口
+ *
+ * @author ruoyi
+ * @date 2020-11-25
+ */
+public interface TEoegStaffmgrMapper
+{
+    /**
+     * 获取当班班长
+     */
+    public TEoegStaffmgr selectMonitor(TEoegStaffmgr tStaffmgr);
+    public List<TEoegStaffmgr> selectStaffByMonitor(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 获取OTS培训专员
+     */
+    public List<TEoegStaffmgr> selectOtsList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 获取EOEG SAI验证人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiInspectors();
+
+    /**
+     * 获取EOEG SAI整改负责人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiExecutors();
+
+    /**
+     * 获取EOEG SAI评估人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiAssessors();
+
+    /**
+     * 获取SAI验证人列表
+     */
+    public List<TEoegStaffmgr> selectSaiInspectors();
+
+    /**
+     * 获取SAI整改负责人列表
+     */
+    public List<TEoegStaffmgr> selectSaiExecutors();
+
+    /**
+     * 获取SAI评估人列表
+     */
+    public List<TEoegStaffmgr> selectSaiAssessor();
+
+    /**
+     * 查询导师下拉列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectMentorList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 查询人员管理
+     *
+     * @param staffid 人员管理员工编号
+     * @return 人员管理
+     */
+    public TEoegStaffmgr selectTStaffmgrByStaffId(String staffid);
+
+    /**
+     * 查询人员管理
+     *
+     * @param id 人员管理ID
+     * @return 人员管理
+     */
+    public TEoegStaffmgr selectTStaffmgrById(Long id);
+
+    /**
+     * 查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegStaffmgr> selectTStaffmgrList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectTStaffmgrListByDeptId(TEoegStaffmgr tStaffmgr);
+
+    @DataScope(deptAlias = "d")
+    public List<TEoegStaffmgr> selectAllTStaffmgrList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 查询人员管理列表(无数据权限过滤,供定时任务使用)
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectAllTStaffmgrListWithoutScope(TEoegStaffmgr tStaffmgr);
+
+    public List<TEoegStaffmgr> selectTStaffmgrListByDeptAndTeam(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectTStaffmgrListAll(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 定时任务查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegStaffmgr> selectList(TEoegStaffmgr tStaffmgr);
+
+    List<TEoegStaffmgr> selectTaskList(TEoegStaffmgr tStaffmgr);
+    /**
+     * 培训查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegStaffmgr> selectRecordList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 新增人员管理
+     *
+     * @param tStaffmgr 人员管理
+     * @return 结果
+     */
+    public int insertTStaffmgr(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 修改人员管理
+     *
+     * @param tStaffmgr 人员管理
+     * @return 结果
+     */
+    public int updateTStaffmgr(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 删除人员管理
+     *
+     * @param id 人员管理ID
+     * @return 结果
+     */
+    public int deleteTStaffmgrById(Long id);
+    public int deleteLeftTStaffmgrByIds(Long ids);
+    /**
+     * 批量删除人员管理
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTStaffmgrByIds(Long[] ids);
+
+    @DataScope(deptAlias = "d")
+    List<DataEntity> selectEduData(TEoegStaffmgr param);
+
+    @DataScope(deptAlias = "d")
+    List<DataEntity> selectEngData(TEoegStaffmgr param);
+
+    @DataScope(deptAlias = "d")
+    List<DataEntity> selectTeamData(TEoegStaffmgr param);
+
+    @DataScope(deptAlias = "d")
+    List<DataEntity> selectAgeData(TEoegStaffmgr param);
+
+    @DataScope(deptAlias = "d")
+    List<TEoegStaffmgr> selectLeftTStaffmgrList(TEoegStaffmgr tStaffmgr);
+
+
+    int reLeftTStaffmgrByIds(Long id);
+
+
+    List<TEoegStaffmgr> selectTStaffmgrByPost(SysUser sysUser);
+
+    List<TEoegStaffmgr> selectTMentorStaffmgrByPost(SysUser sysUser);
+    @DataScope(deptAlias = "d")
+    List<TEoegStaffmgr> selectUserInfoByStaffmgr(TEoegStaffmgr tStaffmgr);
+
+    int deleteRetireTStaffmgrByIds(Long id);
+
+    /**
+     * 通过人名、部门ID、删除标志查询单个员工信息
+     *
+     * @param tStaffmgr 查询参数(包含name、deptId、delFlag)
+     * @return 员工信息
+     */
+    TEoegStaffmgr selectStaffmgrSingle(TEoegStaffmgr tStaffmgr);
+
+
+}

+ 147 - 0
master/src/main/java/com/ruoyi/project/eoeg/service/ITEoegStaffmgrService.java

@@ -0,0 +1,147 @@
+package com.ruoyi.project.eoeg.service;
+
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.eoeg.domain.TEoegStaffmgr;
+import com.ruoyi.project.system.domain.SysUser;
+
+import java.util.List;
+
+/**
+ * 人员管理Service接口
+ *
+ * @author ruoyi
+ * @date 2020-11-25
+ */
+public interface ITEoegStaffmgrService
+{
+    /**
+     * 查询导师下拉列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TEoegStaffmgr> selectMentorList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 查询人员管理
+     *
+     * @param staffid 人员管理员工编号
+     * @return 人员管理
+     */
+    public TEoegStaffmgr selectTStaffmgrByStaffId(String staffid);
+
+    /**
+     * 查询人员管理
+     *
+     * @param id 人员管理ID
+     * @return 人员管理
+     */
+    public TEoegStaffmgr selectTStaffmgrById(Long id);
+
+    /**
+     * 查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectTStaffmgrList(TEoegStaffmgr tStaffmgr);
+    public List<TEoegStaffmgr> selectAllTStaffmgrList(TEoegStaffmgr tStaffmgr);
+    public List<TEoegStaffmgr> selectUserInfoByStaffmgr(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 查询人员管理列表(无数据权限过滤,供定时任务使用)
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectAllTStaffmgrListWithoutScope(TEoegStaffmgr tStaffmgr);
+    public List<TEoegStaffmgr> selectTStaffmgrListByDeptAndTeam(TEoegStaffmgr tStaffmgr);
+    public List<TEoegStaffmgr> selectStaffByMonitor(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 定时任务查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectList(TEoegStaffmgr tStaffmgr);
+
+    List<TEoegStaffmgr> selectTaskList(TEoegStaffmgr tStaffmgr);
+    /**
+     * 培训查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TEoegStaffmgr> selectRecordList(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 新增人员管理
+     *
+     * @param tStaffmgr 人员管理
+     * @return 结果
+     */
+    public int insertTStaffmgr(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 修改人员管理
+     *
+     * @param tStaffmgr 人员管理
+     * @return 结果
+     */
+    public int updateTStaffmgr(TEoegStaffmgr tStaffmgr);
+
+    /**
+     * 批量删除人员管理
+     *
+     * @param ids 需要删除的人员管理ID
+     * @return 结果
+     */
+    public int deleteTStaffmgrByIds(Long[] ids);
+
+    /**
+     * 删除人员管理信息
+     *
+     * @param id 人员管理ID
+     * @return 结果
+     */
+    public int deleteTStaffmgrById(Long id);
+    public int deleteLeftTStaffmgrByIds(Long ids);
+    List<TEoegStaffmgr> selectLeftTStaffmgrList(TEoegStaffmgr tStaffmgr);
+
+
+    int reLeftTStaffmgrByIds(Long id);
+
+
+    List<TEoegStaffmgr> selectTStaffmgrByPost(SysUser sysUser);
+
+    List<TEoegStaffmgr> selectTMentorStaffmgrByPost(SysUser sysUser);
+
+    int deleteRetireTStaffmgrByIds(Long id);
+
+    /**
+     * 获取SAI验证人列表
+     */
+    public List<TEoegStaffmgr> selectSaiInspectors();
+
+    /**
+     * 获取SAI整改负责人列表
+     */
+    public List<TEoegStaffmgr> selectSaiExecutors();
+
+    /**
+     * 获取EOEG SAI验证人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiInspectors();
+
+    /**
+     * 获取EOEG SAI整改负责人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiExecutors();
+
+    /**
+     * 获取EOEG SAI评估人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiAssessors();
+}

+ 230 - 0
master/src/main/java/com/ruoyi/project/eoeg/service/impl/TEoegStaffmgrServiceImpl.java

@@ -0,0 +1,230 @@
+package com.ruoyi.project.eoeg.service.impl;
+
+import com.ruoyi.project.eoeg.domain.TEoegStaffmgr;
+import com.ruoyi.project.eoeg.mapper.TEoegStaffmgrMapper;
+import com.ruoyi.project.eoeg.service.ITEoegStaffmgrService;
+import com.ruoyi.project.system.domain.SysUser;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 人员管理Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2020-11-25
+ */
+@Service
+public class TEoegStaffmgrServiceImpl implements ITEoegStaffmgrService
+{
+    @Resource
+    private TEoegStaffmgrMapper tStaffmgrMapper;
+
+    @Override
+    public List<TEoegStaffmgr> selectMentorList(TEoegStaffmgr tStaffmgr) {
+        return tStaffmgrMapper.selectMentorList(tStaffmgr);
+    }
+
+    /**
+     * 获取EOEG SAI验证人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiInspectors() {
+        return tStaffmgrMapper.selectEoegSaiInspectors();
+    }
+
+    /**
+     * 获取EOEG SAI整改负责人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiExecutors() {
+        return tStaffmgrMapper.selectEoegSaiExecutors();
+    }
+
+    /**
+     * 获取EOEG SAI评估人列表
+     */
+    public List<TEoegStaffmgr> selectEoegSaiAssessors() {
+        return tStaffmgrMapper.selectEoegSaiAssessors();
+    }
+
+    /**
+     * 获取SAI验证人列表
+     */
+    public List<TEoegStaffmgr> selectSaiExecutors() {
+        return tStaffmgrMapper.selectSaiExecutors();
+    }
+
+    /**
+     * 获取SAI整改负责人列表
+     */
+    public List<TEoegStaffmgr> selectSaiInspectors() {
+        return tStaffmgrMapper.selectSaiInspectors();
+    }
+
+    /**
+     * 查询人员管理
+     *
+     * @param staffid 人员管理员工编号
+     * @return 人员管理
+     */
+    @Override
+    public TEoegStaffmgr selectTStaffmgrByStaffId(String staffid) { return tStaffmgrMapper.selectTStaffmgrByStaffId(staffid); }
+
+    /**
+     * 查询人员管理
+     *
+     * @param id 人员管理ID
+     * @return 人员管理
+     */
+    @Override
+    public TEoegStaffmgr selectTStaffmgrById(Long id)
+    {
+        return tStaffmgrMapper.selectTStaffmgrById(id);
+    }
+
+    /**
+     * 查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理
+     */
+    @Override
+    public List<TEoegStaffmgr> selectTStaffmgrList(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.selectTStaffmgrList(tStaffmgr);
+    }
+    @Override
+    public List<TEoegStaffmgr> selectAllTStaffmgrList(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.selectAllTStaffmgrList(tStaffmgr);
+    }
+
+    @Override
+    public List<TEoegStaffmgr> selectUserInfoByStaffmgr(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.selectUserInfoByStaffmgr(tStaffmgr);
+    }
+
+    @Override
+    public List<TEoegStaffmgr> selectAllTStaffmgrListWithoutScope(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.selectAllTStaffmgrListWithoutScope(tStaffmgr);
+    }
+    @Override
+    public List<TEoegStaffmgr> selectTStaffmgrListByDeptAndTeam(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.selectTStaffmgrListByDeptAndTeam(tStaffmgr);
+    }
+    @Override
+    public List<TEoegStaffmgr> selectStaffByMonitor(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.selectStaffByMonitor(tStaffmgr);
+    }
+
+    /**
+     * 定时任务查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    @Override
+    public List<TEoegStaffmgr> selectList(TEoegStaffmgr tStaffmgr) {
+        return tStaffmgrMapper.selectList(tStaffmgr);
+    }
+
+    @Override
+    public List<TEoegStaffmgr> selectTaskList(TEoegStaffmgr tStaffmgr) {
+        return tStaffmgrMapper.selectTaskList(tStaffmgr);
+    }
+
+    /**
+     * 培训查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    @Override
+    public List<TEoegStaffmgr> selectRecordList(TEoegStaffmgr tStaffmgr) {
+        return tStaffmgrMapper.selectRecordList(tStaffmgr);
+    }
+
+    /**
+     * 新增人员管理
+     *
+     * @param tStaffmgr 人员管理
+     * @return 结果
+     */
+    @Override
+    public int insertTStaffmgr(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.insertTStaffmgr(tStaffmgr);
+    }
+
+    /**
+     * 修改人员管理
+     *
+     * @param tStaffmgr 人员管理
+     * @return 结果
+     */
+    @Override
+    public int updateTStaffmgr(TEoegStaffmgr tStaffmgr)
+    {
+        return tStaffmgrMapper.updateTStaffmgr(tStaffmgr);
+    }
+
+    /**
+     * 批量删除人员管理
+     *
+     * @param ids 需要删除的人员管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTStaffmgrByIds(Long[] ids)
+    {
+        return tStaffmgrMapper.deleteTStaffmgrByIds(ids);
+    }
+
+    @Override
+    public int deleteLeftTStaffmgrByIds(Long ids) {
+        return tStaffmgrMapper.deleteLeftTStaffmgrByIds(ids);
+    }
+    /**
+     * 删除人员管理信息
+     *
+     * @param id 人员管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTStaffmgrById(Long id)
+    {
+        return tStaffmgrMapper.deleteTStaffmgrById(id);
+    }
+
+
+
+    @Override
+    public List<TEoegStaffmgr> selectLeftTStaffmgrList(TEoegStaffmgr tStaffmgr) {
+        return tStaffmgrMapper.selectLeftTStaffmgrList(tStaffmgr);
+    }
+
+    @Override
+    public int reLeftTStaffmgrByIds(Long id) {
+        return tStaffmgrMapper.reLeftTStaffmgrByIds(id);
+    }
+
+    @Override
+    public List<TEoegStaffmgr> selectTStaffmgrByPost(SysUser sysUser) {
+        return tStaffmgrMapper.selectTStaffmgrByPost(sysUser);
+    }
+
+    @Override
+    public List<TEoegStaffmgr> selectTMentorStaffmgrByPost(SysUser sysUser) {
+        return tStaffmgrMapper.selectTMentorStaffmgrByPost(sysUser);
+    }
+
+    @Override
+    public int deleteRetireTStaffmgrByIds(Long id) {
+        return tStaffmgrMapper.deleteRetireTStaffmgrByIds(id);
+    }
+
+}

+ 928 - 0
master/src/main/resources/mybatis/eoeg/TEoegStaffmgrMapper.xml

@@ -0,0 +1,928 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.eoeg.mapper.TEoegStaffmgrMapper">
+
+    <resultMap type="TEoegStaffmgr" id="TStaffmgrResult">
+        <result property="id"    column="id"    />
+        <result property="plantCode"    column="plant_code"    />
+        <result property="staffid"    column="staffid"    />
+        <result property="name"    column="name"    />
+        <result property="sex"    column="sex"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="unit"    column="unit"    />
+        <result property="team"    column="team"    />
+        <result property="actualpost"    column="actualpost"    />
+        <result property="contact"    column="contact"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="deptName" column="dept_name" />
+        <result property="education"    column="education"    />
+        <result property="enAbility"    column="en_ability"    />
+        <result property="mail"    column="mail"    />
+        <result property="skillScore"    column="skill_score"    />
+        <result property="accidentNum"    column="accident_num"    />
+        <result property="photo"    column="photo"    />
+        <result property="pId"    column="p_id"    />
+        <result property="specialDuty"    column="special_duty"    />
+        <result property="leftDate"    column="left_date"    />
+        <result property="isRetire"    column="is_retire"    />
+        <result property="region"    column="region"    />
+        <result property="userId"    column="user_id"    />
+        <result property="isNew"    column="is_new"    />
+    </resultMap>
+
+    <sql id="selectTStaffmgrVo">
+         select d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region,d.is_new, s.dept_name from t_eoeg_staffmgr d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <!-- 查询导师下拉列表 -->
+    <select id="selectMentorList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        select d.id, s.DICT_LABEL,d.plant_code, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit,
+               d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code,
+               d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail,
+               d.skill_score, d.p_id , d.special_duty,d.region, s.dept_name
+
+        from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
+        LEFT JOIN SYS_DICT_DATA s2 on d.ACTUALPOST = s2.DICT_VALUE and s2.DICT_TYPE = 'ACTUALPOST'
+        LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
+
+        where
+        (s.DICT_LABEL like '%主管%'
+        or s.DICT_LABEL like '%经理%'
+        or s.DICT_LABEL like '%工程师%')
+        and d.DEL_FLAG!=9
+    </select>
+
+    <select id="selectUserInfoByStaffmgr" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        select d.id, d.plant_code, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit,
+        d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code,
+        d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail,
+        d.skill_score, d.p_id , d.special_duty,d.region, s.dept_name,u.user_id
+
+        from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        left join SYS_USER u on d.staffid=u.staffid
+        <where>
+            <if test="actualposts != null  and actualposts != ''">
+                and actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            and d.DEL_FLAG=0
+            and u.user_id is not null
+        </where>
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTStaffmgrListByDeptAndTeam" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        inner join sys_user u on d.staffid = u.staffid and u.del_flag = 0
+        <where>
+            <if test="deptId != null and deptId != ''"> and d.unit = #{deptId} </if>
+            <if test="unit != null and unit != ''"> and d.dept_id = #{unit} </if>
+            <if test="team != null  and team != ''"> and d.team = #{team} </if>
+            and d.del_flag = 0
+        </where>
+    </select>
+
+    <select id="selectSaiExecutors" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag,
+        d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score,
+        d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        inner join sys_user u on d.staffid = u.staffid
+        inner join SYS_USER_ROLE ur on u.USER_ID = ur.USER_ID
+        inner join SYS_ROLE r on ur.ROLE_ID = r.ROLE_ID
+        where (
+            d.dept_id in (10040, 108)
+            or (d.dept_id = 103 and d.team = 18)
+            or (d.dept_id = 103 and r.ROLE_ID = 20016)
+        )
+        and d.del_flag = 0
+    </select>
+
+    <select id="selectSaiInspectors" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact,
+        d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num,
+        d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        inner join sys_user u on d.staffid = u.staffid
+        where d.unit = 10 and d.team = 18 and d.del_flag = 0
+    </select>
+
+    <select id="selectSaiAssessor" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact,
+        d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num,
+        d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        inner join sys_user u on d.staffid = u.staffid
+        where d.unit = 38 and d.team in (10, 12, 14, 16) and d.ACTUALPOST= 12 and d.DEL_FLAG= 0
+    </select>
+
+    <select id="selectEoegSaiAssessors" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag,
+        d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score,
+        d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        inner join sys_user u on d.staffid = u.staffid and u.del_flag = 0
+        where d.unit = 38 and d.ACTUALPOST=12 and team in (10, 12, 14, 16) and d.DEL_FLAG=0
+    </select>
+
+    <select id="selectEoegSaiExecutors" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag,
+        d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score,
+        d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        inner join sys_user u on d.staffid = u.staffid and u.del_flag = 0
+        where (d.unit in (46, 48, 50, 52) or (d.unit = 38 and d.ACTUALPOST in (16, 15, 20, 18, 22))) and d.DEL_FLAG=0
+    </select>
+
+    <select id="selectEoegSaiInspectors" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag,
+               d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score,
+               d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+                                                                     left join sys_dept s on s.dept_id = d.dept_id
+                                                                     inner join sys_user u on d.staffid = u.staffid and u.del_flag = 0
+        where d.name in ('武琛珅', '金卫东') and d.DEL_FLAG=0
+    </select>
+
+    <select id="selectTStaffmgrList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
+        LEFT JOIN SYS_DICT_DATA s2 on d.ACTUALPOST = s2.DICT_VALUE and s2.DICT_TYPE = 'ACTUALPOST'
+        LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="isNew != null  and isNew != ''"> and isNew = #{is_new}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s2.DICT_SORT , d.staffid
+    </select>
+
+
+    <select id="selectTStaffmgrListByDeptId" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+
+        <where>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId} </if>
+            and d.del_flag = 0
+        </where>
+    </select>
+
+    <select id="selectAllTStaffmgrList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
+        LEFT JOIN SYS_DICT_DATA s2 on d.ACTUALPOST = s2.DICT_VALUE and s2.DICT_TYPE = 'ACTUALPOST'
+        LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+             </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+             </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+             </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="deptId != null  and deptId != ''"> and d.dept_id = #{deptId}</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and (d.del_flag = 0 or d.del_flag = 9)
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        ORDER BY d.del_flag, s0.DICT_SORT, s1.DICT_SORT ,s2.DICT_SORT
+    </select>
+
+    <select id="selectAllTStaffmgrListWithoutScope" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
+        LEFT JOIN SYS_DICT_DATA s2 on d.ACTUALPOST = s2.DICT_VALUE and s2.DICT_TYPE = 'ACTUALPOST'
+        LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+             </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+             </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+             </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="deptId != null  and deptId != ''"> and d.dept_id = #{deptId}</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and (d.del_flag = 0 or d.del_flag = 9)
+        </where>
+        ORDER BY d.del_flag, s0.DICT_SORT, s1.DICT_SORT ,s2.DICT_SORT
+    </select>
+
+    <select id="selectTStaffmgrListAll" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
+        LEFT JOIN SYS_DICT_DATA s2 on d.ACTUALPOST = s2.DICT_VALUE and s2.DICT_TYPE = 'ACTUALPOST'
+        LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
+        <where>
+            and d.del_flag in (0 , 9)
+        </where>
+        ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s2.DICT_SORT
+    </select>
+
+    <select id="selectRecordList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        LEFT JOIN SYS_DICT_DATA s1 on d.ACTUALPOST = s1.DICT_VALUE and s1.DICT_TYPE = 'ACTUALPOST'
+        <where>
+            <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId} </if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            and d.del_flag in (0 , 9)
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        ORDER BY s1.DICT_SORT, d.id
+    </select>
+
+    <select id="selectList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        <where>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTaskList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        <where>
+            and d.del_flag = 0
+        </where>
+    </select>
+
+
+    <select id="selectLeftTStaffmgrList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        <where>
+            and d.del_flag = 9
+            <if test="isRetire != null"> and is_retire = #{isRetire}</if>
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        order by d.left_date desc
+    </select>
+
+    <select id="selectTStaffmgrById" parameterType="Long" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectTStaffmgrByStaffId" parameterType="String" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        where d.staffid = #{staffid} and d.del_flag = 0
+    </select>
+
+    <select id="selectStaffByMonitor" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_eoeg_staffmgr d
+        left join sys_dept s on s.dept_id = d.dept_id
+        left join sys_user u on d.staffid = u.staffid
+        where d.p_id=(SELECT id FROM t_eoeg_staffmgr WHERE staffid = #{staffid})
+          and d.DEL_FLAG=0
+          and u.user_id is not null
+    </select>
+
+    <select id="selectMonitor" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        where d.dept_id = #{deptId}
+        and d.team = #{team}
+        and d.actualpost = '12'
+    </select>
+
+    <select id="selectOtsList" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        where d.dept_id = #{deptId}
+        and d.actualpost = '44'
+    </select>
+
+    <insert id="insertTStaffmgr" parameterType="TEoegStaffmgr" useGeneratedKeys="true" keyProperty="id">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_eoeg_staffmgr.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_eoeg_staffmgr
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="plantCode != null and plantCode != ''">plant_code,</if>
+            <if test="staffid != null and staffid != ''">staffid,</if>
+            <if test="name != null and name != ''">name,</if>
+            <if test="sex != null and sex != ''">sex,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="unit != null">unit,</if>
+            <if test="team != null">team,</if>
+            <if test="actualpost != null">actualpost,</if>
+            <if test="contact != null">contact,</if>
+            <if test="education != null">education,</if>
+            <if test="enAbility != null">en_ability,</if>
+            <if test="mail != null">mail,</if>
+            <if test="accidentNum != null">accident_num,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="skillScore != null">skill_score,</if>
+            <if test="photo != null">photo,</if>
+            <if test="pId != null">p_id,</if>
+            <if test="specialDuty != null">special_duty,</if>
+            <if test="region != null">region,</if>
+            <if test="isNew != null">is_new,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
+            <if test="staffid != null and staffid != ''">#{staffid},</if>
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="sex != null and sex != ''">#{sex},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="unit != null">#{unit},</if>
+            <if test="team != null">#{team},</if>
+            <if test="actualpost != null">#{actualpost},</if>
+            <if test="contact != null">#{contact},</if>
+            <if test="education != null">#{education},</if>
+            <if test="enAbility != null">#{enAbility},</if>
+            <if test="mail != null">#{mail},</if>
+            <if test="accidentNum != null">#{accidentNum},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="skillScore != null">#{skillScore},</if>
+            <if test="photo != null">#{photo},</if>
+            <if test="pId != null">#{pId},</if>
+            <if test="specialDuty != null">#{specialDuty},</if>
+            <if test="region != null">#{region},</if>
+            <if test="isNew != null">#{isNew},</if>
+
+        </trim>
+    </insert>
+
+    <update id="updateTStaffmgr" parameterType="TEoegStaffmgr">
+        update t_eoeg_staffmgr
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
+            <if test="staffid != null and staffid != ''">staffid = #{staffid},</if>
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="sex != null and sex != ''">sex = #{sex},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="unit != null">unit = #{unit},</if>
+            <if test="team != null">team = #{team},</if>
+            <if test="actualpost != null">actualpost = #{actualpost},</if>
+            <if test="contact != null">contact = #{contact},</if>
+            <if test="education != null">education = #{education},</if>
+            <if test="enAbility != null">en_ability = #{enAbility},</if>
+            <if test="accidentNum != null">accident_num = #{accidentNum},</if>
+            <if test="mail != null">mail = #{mail},</if>
+            <if test="skillScore != null">skill_score = #{skillScore},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="region != null">region = #{region},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="photo != null">photo = #{photo},</if>
+            <if test="pId != null">p_id = #{pId},</if>
+            <if test="specialDuty != null">special_duty = #{specialDuty},</if>
+            <if test="leftDate != null">left_date = #{leftDate},</if>
+            <if test="isNew != null">is_new = #{isNew},</if>
+
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTStaffmgrById" parameterType="Long">
+        update t_eoeg_staffmgr set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteLeftTStaffmgrByIds" parameterType="Long">
+        update t_eoeg_staffmgr set del_flag = 9 , LEFT_DATE = SYSDATE,is_retire = 0  where id = #{id}
+    </update>
+    <update id="deleteRetireTStaffmgrByIds" parameterType="Long">
+        update t_eoeg_staffmgr set del_flag = 9 , LEFT_DATE = SYSDATE ,is_retire = 1  where id = #{id}
+    </update>
+
+
+    <update id="reLeftTStaffmgrByIds" parameterType="Long">
+        update t_eoeg_staffmgr set del_flag = 0 , LEFT_DATE = null where id = #{id}
+    </update>
+    <update id="deleteTStaffmgrByIds" parameterType="String">
+        update t_eoeg_staffmgr set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+    <select id="selectEduData" resultType="com.ruoyi.project.common.domain.DataEntity">
+            SELECT count(1) as dataNum,d.EDUCATION as dataName FROM "T_EOEG_STAFFMGR" d
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        GROUP BY EDUCATION
+        order by dataName
+    </select>
+
+    <select id="selectEngData" resultType="com.ruoyi.project.common.domain.DataEntity">
+        SELECT count(1) as dataNum,d.en_ability as dataName FROM "T_EOEG_STAFFMGR" d
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        GROUP BY en_ability
+        order by dataName
+    </select>
+
+    <select id="selectTeamData" resultType="com.ruoyi.project.common.domain.DataEntity">
+        SELECT count(1) as dataNum,d.team as dataName FROM "T_EOEG_STAFFMGR" d
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        GROUP BY team
+        order by dataName
+    </select>
+
+    <select id="selectAgeData" resultType="com.ruoyi.project.common.domain.DataEntity">
+        SELECT
+        CASE
+        WHEN BIRTHDAY IS NULL THEN '未知'
+        WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 <![CDATA[<]]> 20 THEN '20以下'
+        WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 >= 60 THEN '60以上'
+        ELSE TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10) || '到' || TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 + 9)
+        END AS dataName,
+        COUNT(*) AS dataNum
+        FROM
+        T_EOEG_STAFFMGR d
+        <where>
+            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="specialDuty != null  and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
+            <if test="units != null  and units != ''">
+                and
+                unit in
+                <foreach collection="units.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="team != null  and team != ''"> and team = #{team}</if>
+            <if test="teams != null  and teams != ''">
+                and
+                team in
+                <foreach collection="teams.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+
+            </if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="educations != null  and educations != ''">
+                and
+                education in
+                <foreach collection="educations.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="enAbility != null  and enAbility != ''"> and en_ability = #{enAbility}</if>
+            <if test="enAbilitys != null  and enAbilitys != ''">
+                and
+                en_ability in
+                <foreach collection="enAbilitys.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="haveEmail != null  and haveEmail != ''"> and mail IS NOT NULL</if>
+            <if test="skillevaluation != null"> and team = 10
+                or team = 12
+                or team = 14
+                or team = 16
+            </if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+        GROUP BY
+        CASE
+        WHEN BIRTHDAY IS NULL THEN '未知'
+        WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 <![CDATA[<]]> 20 THEN '20以下'
+        WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 >= 60 THEN '60以上'
+        ELSE TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10) || '到' || TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 + 9)
+        END
+        ORDER BY
+        dataName
+
+    </select>
+
+
+
+
+    <select id="selectTMentorStaffmgrByPost"  resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+            LEFT JOIN SYS_DICT_DATA s1 on d.ACTUALPOST = s1.DICT_VALUE and s1.DICT_TYPE = 'ACTUALPOST'
+        where
+            d.dept_id = #{deptId}
+            and d.del_flag = 0
+            and (s1.DICT_LABEL like '%主管%'
+            or s1.DICT_LABEL like '%经理%'
+            or s1.DICT_LABEL like '%工程师%'
+            )
+    </select>
+
+    <select id="selectTStaffmgrByPost"  resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        LEFT JOIN SYS_DICT_DATA s1 on d.ACTUALPOST = s1.DICT_VALUE and s1.DICT_TYPE = 'ACTUALPOST'
+        where
+        d.dept_id = #{deptId}
+        and d.del_flag = 0
+        and (s1.DICT_LABEL like '%主操%'
+        or s1.DICT_LABEL like '%班长%'
+        or s1.DICT_LABEL like '%工长%'
+        )
+    </select>
+
+    <!-- 通过人名、部门ID、删除标志查询单个员工信息 -->
+    <select id="selectStaffmgrSingle" parameterType="TEoegStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+        where 2 > ROWNUM
+        <if test="name != null and name != ''">
+            AND d.name = #{name}
+        </if>
+        <if test="deptId != null and deptId != 0">
+            AND d.dept_id = #{deptId}
+        </if>
+        <if test="delFlag != null">
+            AND d.del_flag = #{delFlag}
+        </if>
+    </select>
+</mapper>

+ 288 - 0
ui/src/api/eoeg/eoegStaffmgr.js

@@ -0,0 +1,288 @@
+import request from '@/utils/request'
+
+export function listEoegSaiInspectors() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listEoegSaiInspectors',
+    method: 'get',
+  })
+}
+
+export function listEoegSaiExecutors() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listEoegSaiExecutors',
+    method: 'get',
+  })
+}
+
+export function listEoegSaiAssessors() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listEoegSaiAssessors',
+    method: 'get',
+  })
+}
+
+// 获取SAI执行人列表
+export function listSaiInspectors() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listSaiInspectors',
+    method: 'get',
+  })
+}
+
+// 获取SAI整改负责人列表
+export function listSaiExecutors() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listSaiExecutors',
+    method: 'get',
+  })
+}
+
+// 获取当前登录员工信息
+export function getLoginStaffInfo() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/loginStaffInfo',
+    method: 'get'
+  })
+}
+
+// 获取当前用户id
+export function getStaffId() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/getStaffId',
+    method: 'get',
+  })
+}
+
+// 判断当前用户是否为导师
+export function isMentor() {
+  return request({
+    url: '/eoeg/eoegStaffmgr/isMentor',
+    method: 'get',
+  })
+}
+
+// 查询导师下拉列表
+export function listMentors2(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listMentors',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询人员管理列表
+export function listStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/list',
+    method: 'get',
+    params: query
+  })
+}
+export function listStaffmgrByActualposts(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listStaffmgrByActualposts',
+    method: 'get',
+    params: query
+  })
+}
+export function listAllStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/getAllList',
+    method: 'get',
+    params: query
+  })
+}
+export function listStaffmgrByDeptAndTeam(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listByDeptAndTeam',
+    method: 'get',
+    params: query
+  })
+}
+export function listStaffByMonitor(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listStaffByMonitor',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询人员管理列表
+export function listStaffmgrAll(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询人员公司级培训时间列表
+export function selectTimeStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/selectTime',
+    method: 'get',
+    params: query
+  })
+}
+
+export function selectAverageAge(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/averageAge',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询组织架构人员管理列表
+export function listOgzStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/ogzList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 上级领导字段查询人员管理列表
+export function listpIdStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/pIdList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询离职人员管理列表
+export function listLeftStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/leftList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 学历统计
+export function eduData(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/eduData',
+    method: 'get',
+    params: query
+  })
+}
+
+// 英语统计
+export function engData(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/engData',
+    method: 'get',
+    params: query
+  })
+}
+
+// 年龄统计
+export function ageData(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/ageData',
+    method: 'get',
+    params: query
+  })
+}
+
+// 英语统计
+export function teamData(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/teamData',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询人员管理详细
+export function getStaffmgr(id) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/' + id,
+    method: 'get'
+  })
+}
+
+export function getStaffmgrByStaffid(id) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/staffid/' + id,
+    method: 'get'
+  })
+}
+
+// 删除人员管理
+export function selectByStaffId(staffIds) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/byStaffId/' + staffIds,
+    method: 'get',
+  })
+}
+
+// 新增人员管理
+export function addStaffmgr(data) {
+  return request({
+    url: '/eoeg/eoegStaffmgr',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改人员管理
+export function updateStaffmgr(data) {
+  return request({
+    url: '/eoeg/eoegStaffmgr',
+    method: 'put',
+    data: data
+  })
+}
+
+// 转岗人员管理
+export function updatePost(data) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/updatePost',
+    method: 'put',
+    data: data
+  })
+}
+
+
+// 删除人员管理
+export function delStaffmgr(id) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/' + id,
+    method: 'delete',
+  })
+}
+
+// 删除离职人员管理
+export function delLeftStaffmgr(id) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/left/' + id,
+    method: 'get',
+  })
+}
+
+// 删除退休人员管理
+export function delRetireStaffmgr(id) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/retire/' + id,
+    method: 'get',
+  })
+}
+
+// 复职人员管理
+export function reLeftStaffmgr(id) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/reLeft/' + id,
+    method: 'get',
+  })
+}
+// 导出人员管理
+export function exportStaffmgr(query) {
+  return request({
+    url: '/eoeg/eoegStaffmgr/export',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 1
ui/src/views/eoeg/eoegChange/index.vue

@@ -324,7 +324,7 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {listEoegLock} from "@/api/eoeg/eoegLock";
-import {listStaffmgrByActualposts} from "@/api/plant/staffmgr";
+import {listStaffmgrByActualposts} from "@/api/eoeg/eoegStaffmgr";
 import {getHistorylist} from "@/api/ehs/approvedanger";
 import {listLockApply} from "@/api/eoeg/lockApply";
 

+ 114 - 0
ui/src/views/eoeg/eoegStaffmgr/ageChart.vue

@@ -0,0 +1,114 @@
+<template>
+  <div>
+    <div id="ageChart" :style="{width:width,height:height}"></div>
+  </div>
+</template>
+
+<script>
+import {ageData, selectAverageAge} from "@/api/eoeg/eoegStaffmgr";
+
+export default {
+  props: {
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '200px'
+    },
+    queryParams: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {
+      option: {
+        title: [
+          {
+            text: '平均年龄',
+            x: 'center',
+            top: '35%',
+          },
+          {
+            text: 0,
+            x: 'center',
+            top: '50%',
+          },
+        ],
+        tooltip: {
+          trigger: 'item',
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
+        },
+        legend: {
+          orient: 'vertical',
+          left: 'left',
+          data: [this.$t('直接访问'), this.$t('邮件营销'), this.$t('联盟广告'), this.$t('视频广告'), this.$t('搜索引擎')]
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            mark: {show: true},
+            magicType: {
+              show: true,
+              type: ['pie', 'funnel']
+            },
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series: [
+          {
+            label: {
+              formatter: '{b}: ({d}%)'
+            },
+            name: '年龄段',
+            type: 'pie',
+            radius: ['50%', '70%'],
+            selectedMode: 'single',
+            data: [
+              {value: 335, name: this.$t('直接访问')},
+            ],
+            emphasis: {
+              label: {
+                show: true,
+                fontSize: '21',
+                fontWeight: 'bold'
+              }
+            },
+          }
+        ]
+      },
+      chart: null,
+      ageData: []
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      ageData(this.queryParams).then(response => {
+        this.ageData = response
+        for (let i = 0; i < this.ageData.length; i++) {
+          this.option.legend.data[i] = this.ageData[i].dataName
+          this.option.series[0].data[i] = {value: this.ageData[i].dataNum, name: this.ageData[i].dataName}
+        }
+        selectAverageAge(this.queryParams).then(response => {
+          this.option.title[1].text = response.data;
+          this.initChart()
+        })
+      });
+    })
+  },
+  methods: {
+    /** 获取当前年份 */
+    getNowTime() {
+      var now = new Date();
+    },
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('ageChart'))
+      this.chart.setOption(this.option)
+    }
+  }
+}
+</script>

+ 113 - 0
ui/src/views/eoeg/eoegStaffmgr/eduChart.vue

@@ -0,0 +1,113 @@
+<template>
+  <div>
+    <div id="eduChart" :style="{width:width,height:height}"></div>
+  </div>
+</template>
+
+<script>
+  import { eduData } from "@/api/eoeg/eoegStaffmgr";
+  export default {
+    props: {
+      width: {
+        type: String,
+        default: '100%'
+      },
+      height: {
+        type: String,
+        default: '200px'
+      },
+      queryParams : {
+        type: Object,
+        required: true
+      }
+    },
+    data() {
+      return {
+        option: {
+          title: {
+            subtext: this.$t('学历分布'),
+            left: 'center'
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '{a} <br/>{b} : {c} ({d}%)'
+          },
+          legend: {
+            orient: 'vertical',
+            left: 'left',
+            data: [this.$t('直接访问'), this.$t('邮件营销'), this.$t('联盟广告'), this.$t('视频广告'), this.$t('搜索引擎')]
+          },
+          toolbox: {
+            show: true,
+            feature: {
+              mark: {show: true},
+              magicType: {
+                show: true,
+                type: ['pie', 'funnel']
+              },
+              restore: {show: true},
+              saveAsImage: {show: true}
+            }
+          },
+          series: [
+            {
+              label: {
+                formatter: '{b}: ({d}%)'
+              },
+              name: this.$t('学历'),
+              type: 'pie',
+              radius: ['50%', '70%'],
+              selectedMode: 'single',
+              data: [
+                {value: 335, name: this.$t('直接访问')},
+              ],
+              emphasis: {
+                label: {
+                  show: true,
+                  fontSize: '21',
+                  fontWeight: 'bold'
+                }
+              },
+            }
+          ]
+        },
+
+        chart: null,
+        eduData : []
+      }
+    },
+    mounted() {
+      this.$nextTick(() => {
+        eduData(this.queryParams).then(response => {
+          this.eduData = response
+          for(let i = 0 ; i <this.eduData.length ; i++){
+            this.option.legend.data[i] = this.eduData[i].dataName
+            this.option.series[0].data[i] = {value:this.eduData[i].dataNum , name: this.eduData[i].dataName }
+          }
+          this.initChart()
+        });
+      })
+    },
+    methods: {
+      change(queryParams){
+        eduData(queryParams).then(response => {
+          this.eduData = response
+          for(let i = 0 ; i <this.eduData.length ; i++){
+            this.option.legend.data[i] = this.eduData[i].dataName
+            this.option.series[0].data[i] = {value:this.eduData[i].dataNum , name: this.eduData[i].dataName }
+          }
+          this.initChart()
+        });
+      },
+      /** 获取当前年份 */
+      getNowTime() {
+        var now = new Date();
+      },
+      initChart() {
+        // 基于准备好的dom,初始化echarts实例
+        this.chart = this.echarts.init(document.getElementById('eduChart'))
+        this.chart.setOption(this.option)
+      }
+    }
+  }
+</script>

+ 111 - 0
ui/src/views/eoeg/eoegStaffmgr/engChart.vue

@@ -0,0 +1,111 @@
+<template>
+  <div>
+    <div id="engChart" :style="{width:width,height:height}"></div>
+  </div>
+</template>
+
+<script>
+import {engData, teamData} from "@/api/eoeg/eoegStaffmgr";
+  export default {
+    props: {
+      width: {
+        type: String,
+        default: '100%'
+      },
+      height: {
+        type: String,
+        default: '200px'
+      },
+      queryParams : {
+        type: Object,
+        required: true
+      }
+    },
+    data() {
+      return {
+        option: {
+          title: {
+            left: 'center'
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '{a} <br/>{b} : {c} ({d}%)'
+          },
+          legend: {
+            orient: 'vertical',
+            left: 'left',
+            data: []
+          },
+          toolbox: {
+            show: true,
+            feature: {
+              mark: {show: true},
+              magicType: {
+                show: true,
+                type: ['pie', 'funnel']
+              },
+              restore: {show: true},
+              saveAsImage: {show: true}
+            }
+          },
+          series: [
+            {
+              label: {
+                formatter: '{b}: ({d}%)'
+              },
+              name: this.$t('英语'),
+              type: 'pie',
+              radius: ['50%', '70%'],
+              selectedMode: 'single',
+              data: [
+                {value: 335, name: this.$t('直接访问')},
+              ],
+              emphasis: {
+                label: {
+                  show: true,
+                  fontSize: '21',
+                  fontWeight: 'bold'
+                }
+              },
+            }
+          ]
+        },
+        chart: null,
+        engData : []
+      }
+    },
+    mounted() {
+      this.$nextTick(() => {
+        engData(this.queryParams).then(response => {
+          this.engData = response
+          for(let i = 0 ; i <this.engData.length ; i++){
+            this.option.legend.data[i] = this.engData[i].dataName
+              this.option.series[0].data[i] = {value:this.engData[i].dataNum , name: this.engData[i].dataName}
+          }
+          this.initChart()
+        });
+      })
+    },
+    methods: {
+      change(queryParams){
+        engData(queryParams).then(response => {
+          this.engData = response
+          for(let i = 0 ; i <this.engData.length ; i++){
+            this.option.legend.data[i] = this.engData[i].dataName
+            this.option.series[0].data[i] = {value:this.engData[i].dataNum , name: this.engData[i].dataName}
+          }
+          this.initChart()
+        });
+      },
+      /** 获取当前年份 */
+      getNowTime() {
+        var now = new Date();
+      },
+      initChart() {
+        // 基于准备好的dom,初始化echarts实例
+        this.chart = this.echarts.init(document.getElementById('engChart'))
+        this.chart.setOption(this.option)
+      }
+    }
+  }
+</script>

+ 1412 - 0
ui/src/views/eoeg/eoegStaffmgr/index.vue

@@ -0,0 +1,1412 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item :label="$t('员工姓名')" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          :placeholder="$t('请输入') + $t('员工姓名')"
+          clearable
+          size="small"
+          @input="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('性别')" prop="sex">
+        <el-select v-model="queryParams.sex" :placeholder="$t('请选择') + $t('性别')" clearable size="small" @change="handleQuery">
+          <el-option
+            v-for="dict in sexOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('部门')" prop="units">
+        <el-select v-model="units" :placeholder="$t('请选择') + $t('部门')" clearable size="small" multiple @change="handleQuery">
+          <el-option
+            v-for="dict in unitOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('班值')" prop="teams">
+        <el-select v-model="teams" :placeholder="$t('请选择') + $t('班值')" clearable size="small" multiple @change="handleQuery">
+          <el-option
+            v-for="dict in teamOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('实际岗位')" prop="actualposts" label-width="200">
+        <el-select v-model="actualposts" :placeholder="$t('请选择') + $t('实际岗位')" clearable size="small" multiple @change="handleQuery">
+          <el-option
+            v-for="dict in actualpostOptions"
+            :key="dict.dictValue"
+            :label="dict.dictValue+dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('学历')" prop="educations" label-width="200">
+        <el-select v-model="educations" :placeholder="$t('请选择') + $t('学历')" clearable size="small" multiple @change="handleQuery">
+          <el-option
+            v-for="dict in educationOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('英语能力')" prop="enAbilitys" label-width="200">
+        <el-select v-model="enAbilitys" :placeholder="$t('请选择') + $t('英语能力')" clearable size="small" multiple @change="handleQuery">
+          <el-option
+            v-for="dict in enAbilityOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('特殊职能')" prop="specialDuty" label-width="200">
+        <el-select v-model="queryParams.specialDuty" :placeholder="$t('请选择') + $t('特殊职能')" clearable size="small" @change="handleQuery">
+          <el-option
+            v-for="dict in specialDutyOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['eoeg:eoegStaffmgr:add']"
+        >{{ $t('新增') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['eoeg:eoegStaffmgr:edit']"
+        >{{ $t('修改') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['eoeg:eoegStaffmgr:remove']"
+        >{{ $t('删除') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['eoeg:eoegStaffmgr:edit']"
+        >{{ $t('导入') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['eoeg:eoegStaffmgr:export']"
+        >{{ $t('导出') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-s-data"
+          size="mini"
+          @click="handleData"
+        >{{ $t('数据分析') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-release"
+          size="mini"
+          @click="handleLeft(0)"
+        >{{ $t('离岗名单') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-s-release"
+          size="mini"
+          @click="handleLeft(1)"
+        >{{ $t('退休名单') }}</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="staffmgrList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :formatter="plantCodeFormat" />
+      <el-table-column :label="$t('员工编号')" align="center" prop="staffid" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('员工姓名')" align="center" prop="name" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.name  }}
+            <el-tag
+              v-if="scope.row.isNew == 1"
+              type="success"
+              size="mini"
+              class="tag-item"
+            >
+              新
+            </el-tag>
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column :label="$t('性别')" align="center" prop="sex" :formatter="sexFormat" />
+      <el-table-column :label="$t('出生日期')" align="center" prop="birthday" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('部门')" align="center" prop="unit" :formatter="unitFormat" />
+      <el-table-column :label="$t('班值')" align="center" prop="team" :formatter="teamFormat" />
+      <el-table-column :label="$t('实际岗位')" align="center" prop="actualpost" width="120" :formatter="actualpostFormat" />
+      <el-table-column :label="$t('联系方式')" align="center" prop="contact" width="150" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('学历')" align="center" prop="education" :formatter="educationFormat" />
+      <el-table-column :label="$t('英语能力')" align="center" prop="enAbility" :formatter="enAbilityFormat" />
+      <el-table-column :label="$t('邮箱')" align="center" prop="mail" width="230" :show-overflow-tooltip="true"/>
+      <!--<el-table-column :label="$t('隐患查找数量')" align="center" prop="accidentNum" width="100" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('技能评估得分')" align="center" prop="skillScore" width="100" :show-overflow-tooltip="true"/>-->
+      <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
+      <!--<el-table-column label="特殊职能" align="center" prop="specialDuty" :formatter="specialDutyFormat" />-->
+      <el-table-column :label="$t('操作')" align="center" fixed="right" width="270" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['eoeg:eoegStaffmgr:edit']"
+          >{{ $t('修改') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleChangePost(scope.row)"
+            v-hasPermi="['eoeg:eoegStaffmgr:edit']"
+          >转岗</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['eoeg:eoegStaffmgr:remove']"
+          >{{ $t('删除') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-s-release"
+            @click="handleLeftDelete(scope.row)"
+            v-hasPermi="['eoeg:eoegStaffmgr:remove']"
+          >{{ $t('离岗') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-s-release"
+            @click="handleRetireDelete(scope.row)"
+            v-hasPermi="['eoeg:eoegStaffmgr:remove']"
+          >{{ $t('退休') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-document"
+            @click="handleDoc(scope.row)"
+            v-hasPermi="['eoeg:eoegStaffmgr:edit']"
+          >{{ $t('附件') }}</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改人员管理对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag ref="dialog__wrapper" :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('装置名称')" prop="plantCode">
+              <el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置名称')">
+                <el-option
+                  v-for="dict in plantCodeOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('员工编号')" prop="staffid">
+              <el-input v-model="form.staffid" :placeholder="$t('请输入') + $t('员工编号')" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('员工姓名')" prop="name">
+              <el-input v-model="form.name" :placeholder="$t('请输入') + $t('员工姓名')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('性别')" prop="sex">
+              <el-select v-model="form.sex" :placeholder="$t('请选择') + $t('性别')">
+                <el-option
+                  v-for="dict in sexOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('出生日期')" prop="birthday">
+              <el-date-picker clearable size="small" style="width: 200px"
+                              v-model="form.birthday"
+                              type="date"
+                              value-format="yyyy-MM-dd"
+                              :placeholder="$t('请选择') + $t('出生日期')">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('部门')" prop="unit">
+              <el-select v-model="form.unit" :placeholder="$t('请选择') + $t('部门')">
+                <el-option
+                  v-for="dict in unitOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('班值')" prop="team">
+              <el-select v-model="form.team" :placeholder="$t('请选择') + $t('班值')">
+                <el-option
+                  v-for="dict in teamOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('实际岗位')" prop="actualpost">
+              <el-select v-model="form.actualpost" :placeholder="$t('请选择') + $t('实际岗位')">
+                <el-option
+                  v-for="dict in actualpostOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('联系方式')" prop="contact">
+              <el-input v-model="form.contact" :placeholder="$t('请输入') + $t('联系方式')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('学历')" prop="educations">
+              <el-select v-model="form.education" :placeholder="$t('请选择') + $t('学历')">
+                <el-option
+                  v-for="dict in educationOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('英语能力')" prop="enAbility">
+              <el-select v-model="form.enAbility" :placeholder="$t('请选择') + $t('英语能力')">
+                <el-option
+                  v-for="dict in enAbilityOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('邮箱')" prop="mail">
+              <el-input v-model="form.mail" :placeholder="$t('请输入') + $t('邮箱')" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('上级领导')" prop="pId">
+              <treeselect v-model="form.pId" :options="pIdOptions" :normalizer="normalizer" :placeholder="$t('请选择') + $t('上级领导')" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('归属部门')" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('特殊职能')" prop="specialDuty">
+              <el-select v-model="specialDutys" multiple :placeholder="$t('请选择') + $t('特殊职能')">
+                <el-option
+                  v-for="dict in specialDutyOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="form.delFlag == 9">
+            <el-form-item :label="$t('离岗日期')" prop="birthday">
+              <el-date-picker clearable size="small" style="width: 200px"
+                              v-model="form.leftDate"
+                              type="date"
+                              value-format="yyyy-MM-dd"
+                              :placeholder="$t('请选择') + $t('离岗日期')">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12"  v-else>
+            <el-form-item :label="$t('负责区域')" prop="region">
+              <el-select v-model="form.region" multiple :placeholder="$t('请选择') + $t('负责区域')">
+                <el-option
+                  v-for="dict in regionOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+          <el-form-item label="本年度新员工" prop="isNew" v-if="notPhoto === false">
+            <el-radio-group v-model="form.isNew">
+              <el-radio :label="1" border>是</el-radio>
+              <el-radio :label="0" border>否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('备注')" prop="remarks">
+              <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')" type="textarea" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t('证件照')" prop="photo" v-if="notPhoto === true">
+              <el-upload
+                ref="photo"
+                :headers="photo.headers"
+                :action="photo.url + '?pType=' + photo.pType + '&pId=' + photo.pId"
+                :show-file-list="false"
+                :on-success="handleAvatarSuccess"
+                list-type="picture-card">
+                <img v-if="photoUrl" :src="photoUrl" class="avatar">
+                <i v-else class="el-icon-plus "></i>
+              </el-upload>
+
+              <el-dialog  :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" append-to-body>
+                <img width="100%" :src="dialogImageUrl" alt="">
+              </el-dialog>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 修改岗位 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag ref="dialog__wrapper" :title="title" :visible.sync="postOpen" width="600px" append-to-body>
+      <el-form ref="postForm" :model="postForm"  label-width="110px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('实际岗位')" prop="actualpost">
+              <el-select v-model="postForm.actualpost" :placeholder="$t('请选择') + $t('实际岗位')">
+                <el-option
+                  v-for="dict in actualpostOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitPostForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="postOpen = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 用户导入对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+          <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
+        </div>
+        <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+          <input name="type" :value="upload.type" hidden />
+        </form>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 离职人员对话框 -->
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="left.title" :visible.sync="left.open" width="700px" append-to-body>
+      <el-table :data="left.staffmgrList" border>
+        <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :formatter="plantCodeFormat" />
+        <el-table-column :label="$t('员工编号')" align="center" prop="staffid" :show-overflow-tooltip="true"/>
+        <el-table-column :label="$t('员工姓名')" align="center" prop="name" :show-overflow-tooltip="true"/>
+        <el-table-column :label="$t('离岗日期')" align="center" prop="leftDate" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.leftDate, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['eoeg:eoegStaffmgr:edit']"
+            >{{ $t('修改') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              @click="handleReLeft(scope.row)"
+            >{{ $t('复职') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="retireTotal>0"
+        :total="retireTotal"
+        :page.sync="retireQueryParams.pageNum"
+        :limit.sync="retireQueryParams.pageSize"
+        @pagination="getLeftData(retireQueryParams.isRetire)"
+      />
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="left.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+      :title="$t('数据分析')"
+      size="600px"
+      :visible.sync="drawer"
+      :destroy-on-close = "true"
+      :direction="direction">
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('学历统计') }}</span>
+            </div>
+            <div class="text item">
+              <edu-chart :queryParams = "this.queryParams" ref="educhart"> </edu-chart>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>年龄统计</span>
+            </div>
+            <div class="text item">
+              <age-chart :queryParams = "this.queryParams" > </age-chart>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('英语统计') }}</span>
+            </div>
+            <div class="text item">
+              <eng-chart :queryParams = "this.queryParams" ref="engchart"> </eng-chart>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('班值统计') }}</span>
+            </div>
+            <div class="text item">
+              <team-chart :queryParams = "this.queryParams" ref="teamchart"> </team-chart>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+  import { listStaffmgr, listpIdStaffmgr, listLeftStaffmgr, getStaffmgr,delRetireStaffmgr, delStaffmgr, delLeftStaffmgr,reLeftStaffmgr ,addStaffmgr, updateStaffmgr,updatePost, exportStaffmgr } from "@/api/eoeg/eoegStaffmgr";
+  import { allFileList, listCommonfile, getCommonfile, delCommonfile, addCommonfile, updateCommonfile, exportCommonfile} from "@/api/common/commonfile";
+  import { treeselect } from "@/api/system/dept";
+  import { getToken } from "@/utils/auth";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import EduChart from "./eduChart";
+  import EngChart from "./engChart";
+  import TeamChart from "./teamChart";
+  import AgeChart from "./ageChart";
+
+  export default {
+    name: "EoegStaffmgr",
+    components: {TeamChart, EngChart, EduChart, Treeselect,AgeChart },
+    data() {
+      return {
+        drawer: false,
+        direction: 'rtl',
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: false,
+        // 总条数
+        total: 0,
+        retireTotal: 0,
+        // 人员管理表格数据
+        staffmgrList: [],
+        //目标措施树选项
+        pIdOptions: [],
+        // 弹出层标题
+        title: "",
+        // 部门树选项
+        deptOptions: undefined,
+        clientHeight:300,
+        // 是否显示弹出层
+        open: false,
+        postOpen: false,
+        // 装置名称字典
+        plantCodeOptions: [],
+        // 性别字典
+        sexOptions: [],
+        // 部门字典
+        unitOptions: [],
+        // 班值字典
+        teamOptions: [],
+        // 实际岗位字典
+        actualpostOptions: [],
+        // 学历字典
+        educationOptions: [],
+        // 英语能力字典
+        enAbilityOptions: [],
+        // 特殊职能字典
+        specialDutyOptions: [],
+        //负责区域字典
+        regionOptions: [],
+        //照片url
+        photoUrl: '',
+        //新增不可上传照片
+        notPhoto: false,
+        // 用户导入参数
+        upload: {
+          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+          //下载模板类型
+          type: "staffmgr",
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/eoeg/eoegStaffmgr/importData"
+        },
+        // 报告附件参数
+        doc: {
+          file: "",
+          // 是否显示弹出层(报告附件)
+          open: false,
+          // 弹出层标题(报告附件)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 报告附件上传位置编号
+          ids: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+          commonfileList: null,
+          queryParams: {
+            pId: null,
+            pType: 'eoegStaffmgr'
+          },
+          pType: 'eoegStaffmgr',
+          pId: null
+        },
+        // 人员证件照参数
+        photo: {
+          file: "",
+          // 报告附件上传位置编号
+          ids: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/eoeg/eoegStaffmgr/uploadPhoto",
+          pType: 'eoegStaffmgrPhoto',
+          pId: null
+        },
+        //证件照回显
+        dialogImageUrl: '',
+        dialogVisible: false,
+
+        pdf : {
+          title: '',
+          pdfUrl: '',
+          numPages: null,
+          open: false,
+          pageNum: 1,
+          pageTotalNum: 1,
+          loadedRatio: 0,
+        },
+        // 离职人员
+        left: {
+          file: "",
+          // 是否显示弹出层(报告附件)
+          open: false,
+          // 弹出层标题(报告附件)
+          title: "",
+          staffmgrList: []
+        },
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 20,
+          name: null,
+          sexs: null,
+          sex: [],
+          unit: null,
+          team: null,
+          actualpost: null,
+          education: null,
+          enAbility: null,
+          educations: null,
+          units: null,
+          teams: null,
+          actualposts: null,
+          enAbilitys: null,
+          photo: null,
+          specialDuty: null
+        },
+        // 离职查询参数
+        retireQueryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          isRetire: null
+        },
+        querypIdParams: {
+          units: this.$constants.DEFAULT_UNITS,
+        },
+        educations: [],
+        units: [],
+        teams: [],
+        actualposts: [],
+        enAbilitys: [],
+        specialDutys: [],
+        // 表单参数
+        form: {},
+        postForm: {},
+        // 表单校验
+        rules: {
+          plantCode: [
+            { required: true, message: this.$t('装置名称') + this.$t('不能为空'), trigger: "change" }
+          ],
+          staffid: [
+            { required: true, message: this.$t('员工编号') + this.$t('不能为空'), trigger: "blur" }
+          ],
+          name: [
+            { required: true, message: this.$t('员工姓名') + this.$t('不能为空'), trigger: "blur" }
+          ],
+          sex: [
+            { required: true, message: this.$t('性别') + this.$t('不能为空'), trigger: "change" }
+          ],
+          unit: [
+            { required: true, message: this.$t('部门') + this.$t('不能为空'), trigger: "change" }
+          ],
+          team: [
+            { required: true, message: this.$t('班值') + this.$t('不能为空'), trigger: "change" }
+          ],
+          actualpost: [
+            { required: true, message: this.$t('实际岗位') + this.$t('不能为空'), trigger: "change" }
+          ],
+          pId: [
+            { required: true, message: this.$t('上级领导') + this.$t('不能为空'), trigger: "change" }
+          ],
+          deptId: [
+            { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
+          ],
+        }
+      };
+    },
+    watch: {
+      // 根据名称筛选部门树
+      deptName(val) {
+        this.$refs.tree.filter(val);
+      }
+    },
+    created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+        this.clientHeight = (document.body.clientHeight - 80) * 0.8
+      })
+      this.getList();
+      this.getpIdTreeselect();
+      this.getTreeselect();
+      this.getDicts("PLANT_DIVIDE").then(response => {
+        this.plantCodeOptions = response.data;
+      });
+      this.getDicts("sys_user_sex").then(response => {
+        this.sexOptions = response.data;
+      });
+      this.getDicts("STAFF_UNIT").then(response => {
+        this.unitOptions = response.data;
+      });
+      this.getDicts("TEAM_DIVIDE").then(response => {
+        this.teamOptions = response.data;
+      });
+      this.getDicts("ACTUALPOST").then(response => {
+        this.actualpostOptions = response.data;
+      });
+      this.getDicts("EDUCATION").then(response => {
+        this.educationOptions = response.data;
+      });
+      this.getDicts("ENGLISHABILITY").then(response => {
+        this.enAbilityOptions = response.data;
+      });
+      this.getDicts("SPECIAL_DUTY").then(response => {
+        this.specialDutyOptions = response.data;
+      });
+      this.getDicts("region_type").then(response => {
+        this.regionOptions = response.data;
+      });
+    },
+    methods: {
+      /** 查询人员管理列表 */
+      getList() {
+        this.loading = true;
+        this.queryParams.educations = this.educations.join()
+        this.queryParams.units = this.units.join()
+        this.queryParams.teams = this.teams.join()
+        this.queryParams.actualposts = this.actualposts.join()
+        this.queryParams.enAbilitys = this.enAbilitys.join()
+        listStaffmgr(this.queryParams).then(response => {
+          this.staffmgrList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      /** 查询部门下拉树结构 */
+      getTreeselect() {
+        treeselect().then(response => {
+          this.deptOptions = response.data;
+        });
+      },
+      /** 转换目标录入数据结构 */
+      normalizer(node) {
+        if (node.children && !node.children.length) {
+          delete node.children;
+        }
+        return {
+          id: node.id,
+          label: node.name,
+          children: node.children
+        };
+      },
+      // 装置名称字典翻译
+      plantCodeFormat(row, column) {
+        return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
+      },
+      // 性别字典翻译
+      sexFormat(row, column) {
+        return this.selectDictLabel(this.sexOptions, row.sex);
+      },
+      // 部门字典翻译
+      unitFormat(row, column) {
+        return this.selectDictLabel(this.unitOptions, row.unit);
+      },
+      // 班值字典翻译
+      teamFormat(row, column) {
+        return this.selectDictLabel(this.teamOptions, row.team);
+      },
+      // 实际岗位字典翻译
+      actualpostFormat(row, column) {
+        return this.selectDictLabel(this.actualpostOptions, row.actualpost);
+      },
+      // 学历字典翻译
+      educationFormat(row, column) {
+        return this.selectDictLabel(this.educationOptions, row.education);
+      },
+      // 英语能力字典翻译
+      enAbilityFormat(row, column) {
+        return this.selectDictLabel(this.enAbilityOptions, row.enAbility);
+      },
+      // 特殊职能字典翻译
+      specialDutyFormat(row, column) {
+        return this.selectDictLabel(this.specialDutyOptions, row.specialDuty);
+      },
+      /** 查询列表下拉树结构 */
+      getpIdTreeselect() {
+        listpIdStaffmgr(this.querypIdParams).then(response => {
+          this.pIdOptions = [];
+          const data = { id: 0, name: this.$t('顶级节点'), children: [] };
+          data.children = this.handleTree(response.data, "id", "pId");
+          this.pIdOptions.push(data);
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.photoUrl= '';
+        this.specialDutys = [];
+        this.form = {
+          id: null,
+          plantCode: null,
+          staffid: null,
+          name: null,
+          sex: null,
+          birthday: null,
+          unit: null,
+          team: null,
+          actualpost: null,
+          contact: null,
+          education: null,
+          enAbility: null,
+          accidentNum: null,
+          mail: null,
+          delFlag: null,
+          createrCode: null,
+          photoUrl: '',
+          createdate: null,
+          updaterCode: null,
+          updatedate: null,
+          deptId: null,
+          skillScore: null,
+          remarks: null,
+          photo: null,
+          pId: null,
+          specialDuty: null,
+          region:null,
+          isNew: 0,
+        };
+        this.postForm = {
+          actualpost: null,
+          id: null,
+        }
+        this.resetForm("form");
+        this.resetForm("postForm");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.educations = []
+        this.units = []
+        this.teams = []
+        this.actualposts = []
+        this.enAbilitys = []
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id)
+        this.single = selection.length!==1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.notPhoto = false;
+        this.title = this.$t('新增') + " " +  this.$t('人员管理');
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const id = row.id || this.ids
+        getStaffmgr(id).then(response => {
+          this.form = response.data;
+          if (response.data.photo) {
+            this.photoUrl = process.env.VUE_APP_BASE_API + response.data.photo;
+          }
+          if (response.data.specialDuty) {
+            this.specialDutys = response.data.specialDuty.split(',');
+          }else {
+            this.specialDutys = [];
+          }
+          if (response.data.region){
+            this.form.region = response.data.region.split(',');
+          }
+          this.open = true;
+          this.notPhoto = true;
+          this.title = this.$t('修改') +  this.$t('人员管理');
+        });
+        this.photo.pId = row.id;
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            /*this.$refs.photo.submit();*/
+            this.form.specialDuty = this.specialDutys.join();
+            if (this.form.region) {
+              this.form.region = this.form.region.join(',');
+            }
+            if (this.form.id != null) {
+              updateStaffmgr(this.form).then(response => {
+                this.msgSuccess(this.$t('修改成功'));
+                this.open = false;
+                this.getList();
+                this.getLeftData()
+              });
+            } else {
+              addStaffmgr(this.form).then(response => {
+                this.msgSuccess(this.$t('新增成功'));
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      handleChangePost(row) {
+        const id = row.id
+        this.reset();
+        getStaffmgr(id).then(response => {
+          this.postForm = response.data;
+          this.postOpen = true;
+          this.title = '修改岗位';
+        });
+      },
+      submitPostForm(){
+        if (this.postForm.id != null) {
+          updatePost(this.postForm).then(response => {
+            this.msgSuccess(this.$t('修改成功'));
+            this.postOpen = false;
+            this.getList();
+          });
+        }
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = row.id || this.ids;
+        this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delStaffmgr(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('删除成功'));
+        })
+      },
+      /** 删除按钮操作 */
+      handleLeftDelete(row) {
+        const ids = row.id;
+        this.$confirm(this.$t('是否确认离岗?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delLeftStaffmgr(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('离岗成功'));
+        })
+      },
+
+      /** 删除按钮操作 */
+      handleRetireDelete(row) {
+        const ids = row.id;
+        this.$confirm(this.$t('是否确认退休?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delRetireStaffmgr(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('退休成功'));
+        })
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        const queryParams = this.queryParams;
+        this.$confirm(this.$t('是否确认导出所有人员管理数据项?'), this.$t('提示'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return exportStaffmgr(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        this.upload.title = this.$t('用户导入');
+        this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        if (response.data[0] != null) {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+        this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+        this.$refs.upload.submit();
+      },
+      /** 报告附件按钮操作 */
+      handleDoc(row) {
+        this.doc.id = row.id;
+        this.doc.title = row.name + this.$t('附件');
+        this.doc.open = true;
+        this.doc.queryParams.pId = row.id
+        this.doc.pId = row.id
+        this.getFileList()
+        this.$nextTick(() => {
+          this.$refs.doc.clearFiles()
+        })
+      },
+      getFileList (){
+        allFileList(this.doc.queryParams).then(response => {
+          this.doc.commonfileList = response;
+        });
+      },
+      //附件上传中处理
+      handleFileDocProgress(event, file, fileList) {
+        this.doc.file = file;
+        this.doc.isUploading = true;
+      },
+      //附件上传成功处理
+      handleFileDocSuccess(response, file, fileList) {
+        this.doc.isUploading = false;
+        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        this.getFileList()
+      },
+      /** 删除按钮操作 */
+      handleDeleteDoc(row) {
+        const ids = row.id || this.ids;
+        this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delCommonfile(ids);
+        }).then(() => {
+          this.getFileList()
+          this.msgSuccess(this.$t('删除成功'));
+        })
+      },
+      // 文件下载处理
+      handleDownload(row) {
+        var name = row.fileName;
+        var url = row.fileUrl;
+        var suffix = url.substring(url.lastIndexOf("."), url.length);
+        const a = document.createElement('a')
+        a.setAttribute('download', name)
+        a.setAttribute('target', '_blank')
+        a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+        a.click()
+      },
+      openPdf(){
+        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+      },
+      handleSee (row){
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
+      handleLeft(isRetire){
+        this.retireQueryParams.pageNum = 1
+        this.left.open = true;
+        isRetire == 0?this.left.title = this.$t('离岗人员信息'):this.left.title =this.$t('退休人员信息');
+        this.getLeftData(isRetire);
+      },
+      getLeftData(isRetire){
+          this.retireQueryParams.isRetire = isRetire
+        listLeftStaffmgr(this.retireQueryParams).then(response => {
+          this.left.staffmgrList = response.rows;
+          this.retireTotal = response.total
+        });
+      },
+      handleReLeft(row){
+        const ids = row.id;
+        this.$confirm(this.$t('是否确认复职?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return reLeftStaffmgr(ids);
+        }).then(() => {
+          this.getLeftData(row.isRetire);
+          this.getList();
+          this.msgSuccess(this.$t('复职成功'));
+        })
+      },
+      //数据分析
+      handleData(){
+        this.drawer = true
+      },
+      handleAvatarProgress(event, file, fileList) {
+        this.photo.file = file;
+        this.photoUrl = file;
+      },
+      handleAvatarSuccess (res, file, fileList) {
+        this.photoUrl =  URL.createObjectURL(file.raw);
+        this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      },
+      handlePictureCardPreview(file) {
+        console.info("111" + file.url)
+        this.dialogImageUrl = file.url;
+        this.dialogVisible = true;
+      },
+    }
+  };
+</script>
+<style>
+  .text {
+    font-size: 14px;
+  }
+  .item {
+    margin-bottom: 18px;
+  }
+  .clearfix {
+    color: #1e1e1e;
+  }
+  .clearfix:before,
+  .clearfix:after {
+    display: table;
+    content: "";
+  }
+  .clearfix:after {
+    clear: both
+  }
+
+  .box-card {
+    width: 100%;
+  }
+  .el-drawer__body {
+    overflow: auto;
+  }
+  .el-drawer__container ::-webkit-scrollbar {
+    display: none;
+  }
+
+  .avatar-uploader .el-upload {
+   border: 1px dashed #d9d9d9;
+   border-radius: 6px;
+   cursor: pointer;
+   position: relative;
+   overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+  .avatar {
+    width: 120px;
+    height: 140px;
+  }
+  .el-tag.el-tag--info {
+    color: #606266;
+  }
+</style>

+ 112 - 0
ui/src/views/eoeg/eoegStaffmgr/teamChart.vue

@@ -0,0 +1,112 @@
+<template>
+  <div>
+    <div id="teamChart" :style="{width:width,height:height}"></div>
+  </div>
+</template>
+
+<script>
+  import { teamData } from "@/api/eoeg/eoegStaffmgr";
+  export default {
+    props: {
+      width: {
+        type: String,
+        default: '100%'
+      },
+      height: {
+        type: String,
+        default: '200px'
+      },
+      queryParams : {
+        type: Object,
+        required: true
+      }
+    },
+    data() {
+      return {
+        option: {
+          title: {
+            left: 'center'
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '{a} <br/>{b} : {c} ({d}%)'
+          },
+          legend: {
+            orient: 'vertical',
+            left: 'left',
+            data: []
+          },
+          toolbox: {
+            show: true,
+            feature: {
+              mark: {show: true},
+              magicType: {
+                show: true,
+                type: ['pie', 'funnel']
+              },
+              restore: {show: true},
+              saveAsImage: {show: true}
+            }
+          },
+          series: [
+            {
+              label: {
+                formatter: '{b}: ({d}%)'
+              },
+              name: this.$t('班值'),
+              type: 'pie',
+              radius: ['50%', '70%'],
+              selectedMode: 'single',
+              data: [
+                {value: 335, name: this.$t('直接访问')},
+              ],
+              emphasis: {
+                label: {
+                  show: true,
+                  fontSize: '21',
+                  fontWeight: 'bold'
+                }
+              },
+            }
+          ]
+        },
+        // 查询参数
+        chart: null,
+        chartData : []
+      }
+    },
+    mounted() {
+      this.$nextTick(() => {
+        teamData(this.queryParams).then(response => {
+          this.chartData = response
+          for(let i = 0 ; i <this.chartData.length ; i++){
+            this.option.legend.data[i] = this.chartData[i].dataName
+            this.option.series[0].data[i] = {value:this.chartData[i].dataNum , name: this.chartData[i].dataName }
+          }
+          this.initChart()
+        });
+      })
+    },
+    methods: {
+      change(queryParams){
+        teamData(queryParams).then(response => {
+          this.chartData = response
+          for(let i = 0 ; i <this.chartData.length ; i++){
+            this.option.legend.data[i] = this.chartData[i].dataName
+            this.option.series[0].data[i] = {value:this.chartData[i].dataNum , name: this.chartData[i].dataName }
+          }
+          this.initChart()
+        });
+      },
+      /** 获取当前年份 */
+      getNowTime() {
+        var now = new Date();
+      },
+      initChart() {
+        // 基于准备好的dom,初始化echarts实例
+        this.chart = this.echarts.init(document.getElementById('teamChart'))
+        this.chart.setOption(this.option)
+      }
+    }
+  }
+</script>