| | |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.pojo.InsReport; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.InsReportService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.vo.Result; |
| | |
| | | map.put("head", PrintChina.printChina(ReportPageDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageInsReport"); |
| | | if (map1.get("look") == 1) reportPageDto.setCreateUser(map1.get("userId")); |
| | | map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto))); |
| | | User user = userMapper.selectById(map1.get("userId"));//当前登录的人 |
| | | //获取当前人所属实验室id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) { |
| | | String[] split = departLimsId.split(","); |
| | | //查询对应架构名称(通信实验室,电力实验室,检测办) |
| | | String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("实验室")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto),laboratory)); |
| | | return map; |
| | | } |
| | | |