| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.PerformanceShiftAddDto; |
| | | import com.yuanchu.mom.dto.PerformanceShiftMapDto; |
| | | import com.yuanchu.mom.mapper.PerformanceShiftMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.Enums; |
| | | import com.yuanchu.mom.pojo.PerformanceShift; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.EnumService; |
| | | import com.yuanchu.mom.service.PerformanceShiftService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | |
| | | @Autowired |
| | | private EnumService enumService; |
| | | |
| | | @Autowired |
| | | GetLook getLook; |
| | | |
| | | @Autowired |
| | | UserMapper userMapper; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> performanceShiftPage(Page<Object> page, String time, String userName, String laboratory) { |
| | | //查询当前登录人员的架构 |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | //判断全部,个人,组织的权限 |
| | | User user = userMapper.selectById(userId);//当前登录的人 |
| | | //获取当前人所属实验室id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | if (com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) { |
| | | String[] split = departLimsId.split(","); |
| | | //查询对应架构名称(通信实验室,电力实验室,检测办) |
| | | String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("实验室")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | IPage<PerformanceShiftMapDto> mapIPage = baseMapper.performanceShiftPage(page, time, userName, laboratory); |
| | | List<Enums> shiftType = enumService.selectEnumByCategory("班次类型"); |
| | | List<Map<String, Object>> mapYearIPage = baseMapper.performanceShiftYearPage(time, userName, laboratory); |