| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | //获取检验下单数据 |
| | | @Override |
| | | public Map<String, Object> selectInsOrderParameter(Page<InsOrder> page, SampleOrderDto sampleOrderDto) { |
| | | public IPage<SampleOrderDto> selectInsOrderParameter(Page<InsOrder> page, SampleOrderDto sampleOrderDto) { |
| | | page.setOptimizeCountSql(false); |
| | | List<String> startAndEndTime = sampleOrderDto.getStartAndEndTime(); |
| | | String startTime = ""; |
| | |
| | | startTime = startAndEndTime.get(0) + " 00:00:00"; |
| | | endTime = startAndEndTime.get(1) + " 23:59:59"; |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //// map.put("head", PrintChina.printChina(SampleOrderDto.class)); |
| | | // //判断全部,个人,组织的权限 |
| | | // Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | // User user = userMapper.selectById(map1.get("userId"));//当前登录的人 |
| | | // Integer roleId = user.getRoleId(); |
| | | User user = userMapper.selectById(SecurityUtils.getUserId());;//当前登录的人 |
| | | // //获取当前人所属实验室id |
| | | // String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | // if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | // String[] split = departLimsId.split(","); |
| | | // //查询对应架构名称(通信实验室,电力实验室,检测办) |
| | | // String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | // if (departLims.contains("实验室")) { |
| | | // laboratory = departLims; |
| | | // } |
| | | // } |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = ""; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | String[] split = departLimsId.split(","); |
| | | //查询对应架构名称(通信实验室,电力实验室,检测办) |
| | | String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("实验室")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | // //判断是否是全部权限 |
| | | // SecurityUtils.hasPermi(""); |
| | | // Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "selectAllInsOrderParameter")); |
| | | // if (ObjectUtils.isEmpty(power)) { |
| | | // if (map1.get("look") == 1) { |
| | |
| | | i.setSampleCode(split[0]); |
| | | } |
| | | }); |
| | | map.put("body", sampleOrderDtoIPage); |
| | | return map; |
| | | return sampleOrderDtoIPage; |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void exportChecked(Map<String, Object> data, HttpServletResponse response) { |
| | | // Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | Integer userId = Integer.valueOf(String.valueOf(SecurityUtils.getLoginUser().getUserId())); |
| | | User user = userMapper.selectById(userId); |
| | | User user = userMapper.selectById(SecurityUtils.getLoginUser().getUserId()); |
| | | List<String> names = null; |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | |
| | | } |
| | | temperatureCyclingList = temperatureCyclingList.stream().distinct().collect(Collectors.toList()); |
| | | //查询全色谱,过滤色标并排序 |
| | | List<String> colorList = dictTypeService.selectDictDataByType("color_type").stream() |
| | | List<String> colorList = dictTypeService.selectDictDataByType("fiber_color_type").stream() |
| | | .sorted(Comparator.comparing(SysDictData::getDictSort)) |
| | | .map(SysDictData::getDictLabel) |
| | | .collect(Collectors.toList()); |