package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base.bu;

import cn.estsh.i3plus.ext.mes.api.busi.bu.IMesPersonnelSkillsKanbanService;
import cn.estsh.i3plus.ext.mes.pojo.bean.*;
import cn.estsh.i3plus.ext.mes.pojo.model.bu.*;
import cn.estsh.i3plus.ext.mes.pojo.repository.*;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.*;
import java.util.stream.Collectors;

@Service
public class MesPersonnelSkillsKanbanService implements IMesPersonnelSkillsKanbanService {

    //人员与工序关系
    @Autowired
    private MesEmployeeAndProcessBindRepository employeeAndProcessBindRepository;

    //员工技能管理
    @Autowired
    private MesEmployeeSkillsManagementRepository employeeSkillsManagementRepository;

    //技能管理基准
    @Autowired
    private MesSkillsManagementBenchmarkRepository skillsManagementBenchmarkRepository;

    //工序标签标示
    @Autowired
    private MesProcessLabelMarkingRepository processLabelMarkingRepository;

    //技能看板工序信息
    @Autowired
    private MesSkillKanbanProcessInformationRepository skillKanbanProcessInformationRepository;

    //员工性质
    @Autowired
    private MesEmployeeNatureRepository employeeNatureRepository;

    //团队管理介绍
    @Autowired
    private MesTeamManagementIntroduceExtRepository teamManagementIntroduceExtRepository;

    /**
     * 技能水平人数查询
     *
     * @param workCenterCode
     * @param organizeCode
     * @return
     */
    @Override
    public List<MesSkillLevelNumberModel> getSkillLevelNumber(String workCenterCode, String organizeCode) {

        //查询产线下所有人员
        DdlPackBean packBeanPeopleByCenter = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getStringEqualPack(workCenterCode, MesExtConstWords.WORK_CENTER_CODE, packBeanPeopleByCenter);
        List<MesEmployeeAndProcessBind> employeeAndProcessBindListByCenter = employeeAndProcessBindRepository.findByHqlWhere(packBeanPeopleByCenter);

        //查询所有技能管理基准
        DdlPackBean packBeanSkillManager = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{"skillLevel"}, packBeanSkillManager);
        List<MesSkillsManagementBenchmark> skillsManagementBenchmarkList = skillsManagementBenchmarkRepository.findByHqlWhere(packBeanSkillManager);

        //员工人数
        List<String> employeeCodeList = employeeAndProcessBindListByCenter.stream().map(MesEmployeeAndProcessBind::getEmployeeCode).distinct().collect(Collectors.toList());

        //员工技能管理 集合
        List<MesEmployeeSkillsManagement> employeeSkillsManagementList = getMesEmployeeSkillsManagements(organizeCode, employeeCodeList);

        List<MesSkillLevelNumberModel> skillLevelNumberModelList = new ArrayList<>();

        MesSkillLevelNumberModel skillLevelNumberModelNum = new MesSkillLevelNumberModel();
        skillLevelNumberModelNum.setPeopleNumSum(employeeSkillsManagementList.size());
        skillLevelNumberModelNum.setA("A");
        skillLevelNumberModelNum.setB("B");
        skillLevelNumberModelNum.setC("C");
        skillLevelNumberModelNum.setD("D");
        skillLevelNumberModelList.add(skillLevelNumberModelNum);

        MesSkillLevelNumberModel skillLevelNumberModel = new MesSkillLevelNumberModel();
        skillLevelNumberModel.setPeopleNumSum(employeeSkillsManagementList.size());
        skillsManagementBenchmarkList.forEach(s -> {
            switch (s.getSkillLevel()) {
                case "A":
                    List<MesEmployeeSkillsManagement> levelPeopleA = employeeSkillsManagementList.stream().filter(e -> e.getSkillLevel().equals("A")).collect(Collectors.toList());
                    skillLevelNumberModel.setA(Integer.toString(levelPeopleA.size()));
                    break;
                case "B":
                    List<MesEmployeeSkillsManagement> levelPeopleB = employeeSkillsManagementList.stream().filter(e -> e.getSkillLevel().equals("B")).collect(Collectors.toList());
                    skillLevelNumberModel.setB(Integer.toString(levelPeopleB.size()));
                case "C":
                    List<MesEmployeeSkillsManagement> levelPeopleC = employeeSkillsManagementList.stream().filter(e -> e.getSkillLevel().equals("C")).collect(Collectors.toList());
                    skillLevelNumberModel.setC(Integer.toString(levelPeopleC.size()));
                case "D":
                    List<MesEmployeeSkillsManagement> levelPeopleD = employeeSkillsManagementList.stream().filter(e -> e.getSkillLevel().equals("D")).collect(Collectors.toList());
                    skillLevelNumberModel.setD(Integer.toString(levelPeopleD.size()));
                    break;
                default:
            }
            //peopleNumLevels.put(s.getSkillLevel(),levelPeople.size());
        });
        skillLevelNumberModelList.add(skillLevelNumberModel);

        return skillLevelNumberModelList;
    }

    private List<MesEmployeeSkillsManagement> getMesEmployeeSkillsManagements(String organizeCode, List<String> EmployeeCodeList) {
        List<MesEmployeeSkillsManagement> employeeSkillsManagementList;
        DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getInPackList(EmployeeCodeList, "employeeCode", packBean);
        employeeSkillsManagementList = employeeSkillsManagementRepository.findByHqlWhere(packBean);
        return employeeSkillsManagementList;
    }

    /**
     * 人员查询
     *
     * @param workCenterCode
     * @param organizeCode
     * @return
     */
    @Override
    public List<MesEmployeeNature> getPeople(String workCenterCode, String organizeCode) {

        DdlPackBean packBeanProcess = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getStringEqualPack(workCenterCode, MesExtConstWords.WORK_CENTER_CODE, packBeanProcess);
        DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{MesExtConstWords.MODIFY_DATE_TIME}, packBeanProcess);
        List<MesEmployeeAndProcessBind> employeeAndProcessBindList = employeeAndProcessBindRepository.findByHqlWhere(packBeanProcess);

        List<MesEmployeeNature> processLabelMarkingList = new ArrayList<>();

        employeeAndProcessBindList.forEach(e -> {

            DdlPackBean packBeanPeopleSkill = DdlPackBean.getDdlPackBean(organizeCode);
            DdlPreparedPack.getStringEqualPack(e.getEmployeeCode(), "employeeCode", packBeanPeopleSkill);
            MesEmployeeSkillsManagement employeeSkillsManagement = employeeSkillsManagementRepository.getByProperty(packBeanPeopleSkill);

            DdlPackBean packBeanPeopleInfo = DdlPackBean.getDdlPackBean(organizeCode);
            DdlPreparedPack.getStringEqualPack(employeeSkillsManagement.getEmployeeNatureCode(), "employeeNatureCode", packBeanPeopleInfo);
            MesEmployeeNature employeeNature = employeeNatureRepository.getByProperty(packBeanPeopleInfo);
            employeeNature.setEmployeeName(employeeSkillsManagement.getEmployeeName());
            employeeNature.setEmployeeCode(employeeSkillsManagement.getEmployeeCode());
            processLabelMarkingList.add(employeeNature);

        });

        return processLabelMarkingList;
    }

    /**
     * 表格数据查询
     *
     * @param workCenterCode
     * @param organizeCode
     * @return
     */
    @Override
    public PersonnelSkillsKanbanDataModel getTableData(String workCenterCode, String organizeCode, Pager pager) {

        Pager pager1 = new Pager();
        pager1.setCurrentPage(1);
        pager1.setPageSize(27);

        //通过分页查询工序表头数据
        //看板工序信息
        DdlPackBean packBeanProcess = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getStringEqualPack(workCenterCode, MesExtConstWords.WORK_CENTER_CODE, packBeanProcess);
        DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{MesExtConstWords.SEQ}, packBeanProcess);
        List<MesSkillKanbanProcessInformation> skillKanbanProcessInformationLists1 = skillKanbanProcessInformationRepository.findByHqlWhere(packBeanProcess);

        //人员与工序关系
        DdlPackBean packBeanPeople = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getStringEqualPack(workCenterCode, MesExtConstWords.WORK_CENTER_CODE, packBeanPeople);
        List<MesEmployeeAndProcessBind> employeeAndProcessBindList1 = employeeAndProcessBindRepository.findByHqlWhere(packBeanPeople);

        List<ProcessLabelMarkingModel> skillKanbanProcessInformationLists2 = new ArrayList<>();

        //筛选出只有关联表中的数据
        skillKanbanProcessInformationLists1.forEach(s -> {
            List<MesEmployeeAndProcessBind> employeeAndProcessBindList = employeeAndProcessBindList1.stream().filter(e -> e.getSkillKanbanProcessCode().equals(s.getSkillKanbanProcessCode())).collect(Collectors.toList());
            if (!CollectionUtils.isEmpty(employeeAndProcessBindList)) {
                ProcessLabelMarkingModel processLabelMarkingModel = new ProcessLabelMarkingModel();
                BeanUtils.copyProperties(s, processLabelMarkingModel);
                skillKanbanProcessInformationLists2.add(processLabelMarkingModel);
            }
        });

        List<ProcessLabelMarkingModel> skillKanbanProcessInformationLists = null;
        if (skillKanbanProcessInformationLists2.size() >= 27) {
            skillKanbanProcessInformationLists = skillKanbanProcessInformationLists2.subList(0, 27);
        } else {
            skillKanbanProcessInformationLists = skillKanbanProcessInformationLists2;
        }

        //封装工序model
        List<ProcessLabelMarkingModel> processLabelMarkingLists = new ArrayList<>();

        skillKanbanProcessInformationLists.forEach(s -> {

            ProcessLabelMarkingModel processLabelMarkingModel = new ProcessLabelMarkingModel();

            DdlPackBean packBeanProcessInfo = DdlPackBean.getDdlPackBean(organizeCode);
            DdlPreparedPack.getStringEqualPack(s.getProcessLabelCode(), "processLabelCode", packBeanProcessInfo);
            MesProcessLabelMarking processLabelMarking = processLabelMarkingRepository.getByProperty(packBeanProcessInfo);

            processLabelMarking.setSkillKanbanProcessName(s.getSkillKanbanProcessName());
            processLabelMarking.setSkillKanbanProcessCode(s.getSkillKanbanProcessCode());
            processLabelMarkingModel.setSeq(s.getSeq());

            BeanUtils.copyProperties(processLabelMarking, processLabelMarkingModel);

            switch (processLabelMarkingModel.getColor()) {
                case "黄底红字":
                    processLabelMarkingModel.setBgColor("yellow");
                    processLabelMarkingModel.setTextColor("red");
                    break;
                case "蓝底白字":
                    processLabelMarkingModel.setBgColor("blue");
                    processLabelMarkingModel.setTextColor("white");
                    break;
                case "黄底黑字":
                    processLabelMarkingModel.setBgColor("yellow");
                    processLabelMarkingModel.setTextColor("black");
                    break;
                case "灰底黑字":
                    processLabelMarkingModel.setBgColor("#d9d9d9");
                    processLabelMarkingModel.setTextColor("black");
                    break;
            }
            processLabelMarkingLists.add(processLabelMarkingModel);
        });
        List<ProcessLabelMarkingModel> processLabelMarkingList = skillKanbanProcessInformationLists.stream().sorted(Comparator.comparing(ProcessLabelMarkingModel::getSeq)).collect(Collectors.toList());

        for (int i = 0; i < processLabelMarkingLists.size(); i++) {
            processLabelMarkingLists.get(i).setAddress("address" + Integer.toString(i + 1));
        }

        //查询员工表头信息
        DdlPackBean packBeanPeopleInfo = DdlPackBean.getDdlPackBean(organizeCode);
        List<MesEmployeeNature> employeeNatureList = employeeNatureRepository.findByHqlWhere(packBeanPeopleInfo);
        Map<String, MesEmployeeNature> employeeNatureMap = employeeNatureList.stream().collect(Collectors.toMap(MesEmployeeNature::getEmployeeNatureCode, t -> t));

        DdlPackBean packBeanEmployee = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()}, new String[]{MesExtConstWords.SEQ}, packBeanEmployee);
        List<MesEmployeeSkillsManagement> employeeSkillsManagementList = employeeSkillsManagementRepository.findByHqlWhere(packBeanEmployee);
        Map<String, MesEmployeeSkillsManagement> employeeSkillManagerMap = employeeSkillsManagementList.stream().collect(Collectors.toMap(MesEmployeeSkillsManagement::getEmployeeCode, t -> t));

        List<EmployeeNatureModel> employeeNatureModelListmodel = new ArrayList<>();
        employeeSkillsManagementList.forEach(e -> {
            List<MesEmployeeAndProcessBind> collect = employeeAndProcessBindList1.stream().filter(b -> b.getEmployeeCode().equals(e.getEmployeeCode())).collect(Collectors.toList());
            if (!CollectionUtils.isEmpty(collect)) {
                EmployeeNatureModel employeeNatureModel = new EmployeeNatureModel();
                BeanUtils.copyProperties(e, employeeNatureModel);
                employeeNatureModelListmodel.add(employeeNatureModel);
            }
        });

        pager = PagerHelper.getPager(pager, employeeNatureModelListmodel.size());

        List<EmployeeNatureModel> employeeNatureModelList = null;

        int pageSize = pager.getPageSize();
        int currentPage = pager.getCurrentPage();
        int size = employeeNatureModelListmodel.size();

        if (size - (pageSize * (currentPage - 1)) < pageSize) {
            employeeNatureModelList = employeeNatureModelListmodel.subList(pageSize * (currentPage - 1), size);
        } else {
            employeeNatureModelList = employeeNatureModelListmodel.subList(pageSize * (currentPage - 1), pageSize * currentPage);
        }

        //封装员工model

        List<EmployeeNatureModel> employeeNatureModelLists = new ArrayList<>();

        employeeNatureModelList.forEach(e -> {

            EmployeeNatureModel employeeNatureModel = new EmployeeNatureModel();

            MesEmployeeSkillsManagement employeeSkillsManagement = employeeSkillManagerMap.get(e.getEmployeeCode());

            MesEmployeeNature employeeNature = null;

            if (null != employeeSkillsManagement) {
                employeeNature = employeeNatureMap.get(employeeSkillsManagement.getEmployeeNatureCode());
            }

            if (null != employeeNature) {
                employeeNature.setEmployeeName(employeeSkillsManagement.getEmployeeName());
                employeeNature.setEmployeeCode(employeeSkillsManagement.getEmployeeCode());

                BeanUtils.copyProperties(employeeNature, employeeNatureModel);
                switch (employeeNatureModel.getColor()) {
                    case "红底白字":
                        employeeNatureModel.setBgColor("red");
                        employeeNatureModel.setTextColor("white");
                        break;
                    case "蓝底黑字":
                        employeeNatureModel.setBgColor("#98cbfc");
                        employeeNatureModel.setTextColor("black");
                        break;
                    case "灰底黑字":
                        employeeNatureModel.setBgColor("#d9d9d9");
                        employeeNatureModel.setTextColor("black");
                        break;
                    case "粉底黑字":
                        employeeNatureModel.setBgColor("pink");
                        employeeNatureModel.setTextColor("black");
                        break;
                }
                employeeNatureModel.setSeq(employeeSkillsManagement.getSeq());
                employeeNatureModelLists.add(employeeNatureModel);
            }

        });

        //查询表格数据
        List<List<String>> dataList = new ArrayList<>();

        //通过工序分组(纵向分组)
//        Map<String, List<ProcessLabelMarkingModel>> employeeAndProcessMap = processLabelMarkingList.stream().collect(Collectors.groupingBy(ProcessLabelMarkingModel::getSkillKanbanProcessCode));
        List<EmployeeNatureModel> finalEmployeeNatureModelList = employeeNatureModelList;
        processLabelMarkingList.forEach(p -> {

            List<MesEmployeeAndProcessBind> employeeAndProcessBindList = employeeAndProcessBindList1.stream().filter(e -> e.getSkillKanbanProcessCode().equals(p.getSkillKanbanProcessCode())).collect(Collectors.toList());
            List<String> dataLineList = new ArrayList<>();
            finalEmployeeNatureModelList.forEach(e -> {
                List<MesEmployeeAndProcessBind> collect = employeeAndProcessBindList.stream().filter(e1 -> e1.getEmployeeCode().equals(e.getEmployeeCode())).collect(Collectors.toList());
                if (CollectionUtils.isEmpty(collect)) {
                    dataLineList.add("");
                } else {
                    dataLineList.add(MesExtEnumUtil.SKILLS_MANAGEMENT_BENCHMARK_SKTLLS_LEVEL.valueOfDescription(employeeSkillManagerMap.get(collect.get(0).getEmployeeCode()).getSkillLevel()));
                }
            });
            dataList.add(dataLineList);
        });

        PersonnelSkillsKanbanDataModel personnelSkillsKanbanDataModel = new PersonnelSkillsKanbanDataModel();
        personnelSkillsKanbanDataModel.setProcessLabelMarkingList(processLabelMarkingLists);

        personnelSkillsKanbanDataModel.setEmployeeNatureModelList(employeeNatureModelLists);
        personnelSkillsKanbanDataModel.setDataList(dataList);

        personnelSkillsKanbanDataModel.setPagerList(new ListPager(employeeNatureModelLists, pager));

        return personnelSkillsKanbanDataModel;

    }

    /**
     * 查询看板基础数据
     *
     * @param workCenterCode
     * @param organizeCode
     * @return
     */
    @Override
    public Object getBaseData(String workCenterCode, String organizeCode) {
        PersonnelSkillsKanbanBaseDataModel personnelSkillsKanbanBaseDataModel = new PersonnelSkillsKanbanBaseDataModel();

        //获取团队管理介绍
        DdlPackBean packBeanTeamManager = DdlPackBean.getDdlPackBean(organizeCode);
        DdlPreparedPack.getStringEqualPack(workCenterCode, MesExtConstWords.WORK_CENTER_CODE, packBeanTeamManager);
        MesTeamManagementIntroduceExt teamManagementIntroduceExt = teamManagementIntroduceExtRepository.getByProperty(packBeanTeamManager);

        MesTeamManagementIntroduceVo mesTeamManagementIntroduceVo = new MesTeamManagementIntroduceVo();
        if (null != teamManagementIntroduceExt) {
            mesTeamManagementIntroduceVo.setShiftPhotoUrl(teamManagementIntroduceExt.getUrlShift());
            mesTeamManagementIntroduceVo.setTeamPhotoUrl(teamManagementIntroduceExt.getUrlTeam());
            BeanUtils.copyProperties(teamManagementIntroduceExt, mesTeamManagementIntroduceVo);
            personnelSkillsKanbanBaseDataModel.setTeamManagementIntroduceVo(mesTeamManagementIntroduceVo);
        }

        //获取技能管理基准
        DdlPackBean packBeanSkillManager = DdlPackBean.getDdlPackBean(organizeCode);
        List<MesSkillsManagementBenchmark> skillsManagementBenchmarkList = skillsManagementBenchmarkRepository.findByHqlWhere(packBeanSkillManager);
        if (!CollectionUtils.isEmpty(skillsManagementBenchmarkList)) {
            skillsManagementBenchmarkList.forEach(s -> {
                s.setSkillLevelName(StringUtils.isEmpty(s.getSkillLevel()) ? null : MesExtEnumUtil.SKILLS_MANAGEMENT_BENCHMARK_SKTLLS_LEVEL.valueOfDescription(s.getSkillLevel()));
            });
            personnelSkillsKanbanBaseDataModel.setSkillsManagementBenchmarkList(skillsManagementBenchmarkList);
        }

        //获取工序标签标示
        DdlPackBean packBeanprodMark = DdlPackBean.getDdlPackBean(organizeCode);
        List<MesProcessLabelMarking> processLabelMarkingList = processLabelMarkingRepository.findByHqlWhere(packBeanprodMark);
        List<ProcessLabelMarkingModel> processLabelMarkingModelList = new ArrayList<>();
        List<ProcessLabelMarkingModel> collect = null;
        if (!CollectionUtils.isEmpty(processLabelMarkingList)) {
            processLabelMarkingList.forEach(s -> {
                ProcessLabelMarkingModel processLabelMarkingModel = new ProcessLabelMarkingModel();
                BeanUtils.copyProperties(s, processLabelMarkingModel);
                processLabelMarkingModel.setLocationName(StringUtils.isEmpty(s.getLocation()) ? null : MesExtEnumUtil.PROCESS_LABEL_MARKING_LOCATION.valueOfDescription(s.getLocation()));
                switch (processLabelMarkingModel.getColor()) {
                    case "黄底红字":
                        processLabelMarkingModel.setBgColor("yellow");
                        processLabelMarkingModel.setTextColor("red");
                        break;
                    case "蓝底白字":
                        processLabelMarkingModel.setBgColor("blue");
                        processLabelMarkingModel.setTextColor("white");
                        break;
                    case "黄底黑字":
                        processLabelMarkingModel.setBgColor("yellow");
                        processLabelMarkingModel.setTextColor("black");
                        break;
                    case "灰底黑字":
                        processLabelMarkingModel.setBgColor("#d9d9d9");
                        processLabelMarkingModel.setTextColor("black");
                        break;
                }
                switch (processLabelMarkingModel.getLocation()) {
                    case "左上":
                        processLabelMarkingModel.setSeq(1);
                        break;
                    case "右上":
                        processLabelMarkingModel.setSeq(2);
                        break;
                    case "左下":
                        processLabelMarkingModel.setSeq(3);
                        break;
                    case "右下":
                        processLabelMarkingModel.setSeq(4);
                        break;
                }
                processLabelMarkingModelList.add(processLabelMarkingModel);
            });
            collect = processLabelMarkingModelList.stream().sorted(Comparator.comparing(ProcessLabelMarkingModel::getSeq)).collect(Collectors.toList());
        }

        personnelSkillsKanbanBaseDataModel.setProcessLabelMarkingList(collect);

        //获取员工性质
        DdlPackBean packBeanEmployeeNature = DdlPackBean.getDdlPackBean(organizeCode);
        packBeanEmployeeNature.setOrderByStr(" order by modifyDatetime desc ");
        List<MesEmployeeNature> employeeNatureList = employeeNatureRepository.findByHqlWhere(packBeanEmployeeNature);
        List<EmployeeNatureModel> employeeNatureModelList = new ArrayList<>();
        if (!CollectionUtils.isEmpty(employeeNatureList)) {
            employeeNatureList.forEach(s -> {
                EmployeeNatureModel employeeNatureModel = new EmployeeNatureModel();
                BeanUtils.copyProperties(s, employeeNatureModel);
                switch (employeeNatureModel.getColor()) {
                    case "红底白字":
                        employeeNatureModel.setBgColor("red");
                        employeeNatureModel.setTextColor("white");
                        break;
                    case "蓝底黑字":
                        employeeNatureModel.setBgColor("#98cbfc");
                        employeeNatureModel.setTextColor("black");
                        break;
                    case "灰底黑字":
                        employeeNatureModel.setBgColor("#d9d9d9");
                        employeeNatureModel.setTextColor("black");
                        break;
                    case "粉底黑字":
                        employeeNatureModel.setBgColor("pink");
                        employeeNatureModel.setTextColor("black");
                        break;
                }
                employeeNatureModelList.add(employeeNatureModel);
            });
            personnelSkillsKanbanBaseDataModel.setEmployeeNatureList(employeeNatureModelList);
        }

        return personnelSkillsKanbanBaseDataModel;
    }

}
