| | |
| | | */ |
| | | package me.zhengjie.modules.system.service.impl; |
| | | |
| | | import me.zhengjie.exception.BadRequestException; |
| | | import me.zhengjie.modules.system.domain.Job; |
| | | import me.zhengjie.modules.system.domain.SysLevel; |
| | | import me.zhengjie.modules.system.repository.JobRepository; |
| | | import me.zhengjie.modules.system.repository.SysUserLevelWageRepository; |
| | | import me.zhengjie.modules.system.repository.UserRepository; |
| | | import me.zhengjie.utils.ValidationUtil; |
| | | import me.zhengjie.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | import org.springframework.data.domain.Pageable; |
| | | import me.zhengjie.utils.PageUtil; |
| | | import me.zhengjie.utils.QueryHelp; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import java.util.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.function.Function; |
| | | |
| | | /** |
| | |
| | | private final SysLevelRepository sysLevelRepository; |
| | | private final SysLevelMapper sysLevelMapper; |
| | | private final JobRepository jobRepository; |
| | | private final UserRepository userRepository; |
| | | private final SysUserLevelWageRepository sysUserLevelWageRepository; |
| | | |
| | | @Override |
| | | public Map<String,Object> queryAll(SysLevelQueryCriteria criteria, Pageable pageable){ |
| | |
| | | } |
| | | FileUtil.downloadExcel(list, response); |
| | | } |
| | | |
| | | @Override |
| | | public void verification(Long[] ids) { |
| | | if(userRepository.countByLevels(ids) > 0){ |
| | | throw new BadRequestException("所选的级别中存在用户关联,请解除关联再试!"); |
| | | } |
| | | if(sysUserLevelWageRepository.countByLevels(ids) > 0){ |
| | | throw new BadRequestException("所选的级别中存在用户级别工资关联,请解除关联再试!"); |
| | | } |
| | | } |
| | | } |