From 3647aa5008055528f075ee73002542a1399575ae Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 19 三月 2025 14:45:39 +0800 Subject: [PATCH] 单点登录调整 --- inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java | 25 +++++++------------------ 1 files changed, 7 insertions(+), 18 deletions(-) diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java index ae37bf8..2d1a5c8 100644 --- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java +++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java @@ -1029,6 +1029,7 @@ public List<Map<String, Object>> viewDetails(Map<String, Object> map) { List<Map<String, Object>> list = new ArrayList<>(); String inspectionItem = map.get("inspectionItem").toString(); // 妫�楠岄」 + String inspectionItemSubclass = map.get("inspectionItemSubclass").toString(); // 妫�楠屽瓙椤� if (inspectionItem.equals("鍗曟牴鍨傜洿鐕冪儳")) { ArrayList<Integer> numbers = new ArrayList<>(); InsProduct insProduct = insProductMapper.selectById(Integer.parseInt(map.get("insProductId").toString())); @@ -1144,10 +1145,9 @@ } else { // 鏉惧绠� 杩囨护鍑烘楠岄」鍚嶇О涓�鑷寸殑鏁版嵁 List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() - .eq(InsProduct::getInsSampleId, Integer.parseInt(map.get("insSampleId").toString()))) - .stream() - .filter(item -> item.getInspectionItem().equals(inspectionItem)) - .collect(Collectors.toList()); + .eq(InsProduct::getInspectionItem, inspectionItem) + .eq(StringUtils.isNotEmpty(inspectionItemSubclass),InsProduct::getInspectionItemSubclass, inspectionItemSubclass) + .eq(InsProduct::getInsSampleId, Integer.parseInt(map.get("insSampleId").toString()))); for (InsProduct product : productList) { HashMap<String, Object> map2 = new HashMap<>(); map2.put("entrustCode", map.get("entrustCode")); // 濮旀墭缂栧彿 @@ -1160,12 +1160,6 @@ color = insBushingMapper.selectById(product.getInsBushId()).getColor(); // 濂楃 } map2.put("color", color); // 濂楃棰滆壊 -// InsProductResult result = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() -// .eq(InsProductResult::getInsProductId, product.getId())); -// if(!Objects.isNull(result)) { -// List<Map> maps = JSONArray.parseArray(result.getInsValue(), Map.class); -// map2.put("insValue",maps.get(0).get("v").toString()); // 妫�楠岀粨鏋� -// } list.add(map2); } } @@ -1864,16 +1858,12 @@ @Override - public Map<String, Object> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto) { + public IPage<CostStatisticsDto> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto) { String dates = costStatisticsDto.getDates(); String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); costStatisticsDto.setDates(null); - Map<String, Object> map = new HashMap<>(); -// map.put("head", PrintChina.printChina(CostStatisticsDto.class)); - Map<String, Integer> map1 = new HashMap<>(); - if (map1.get("look") == 1) costStatisticsDto.setCreateUser(map1.get("userId")); // 鑾峰彇褰撳墠浜烘墍鍦ㄥ疄楠屽 - Integer userId = 1; + Integer userId = Integer.parseInt(SecurityUtils.getLoginUser().getUser().getUserId().toString()); String departLimsId = userMapper.selectById(userId).getDepartLimsId(); String laboratory = ""; if (StringUtils.isNotBlank(departLimsId)) { @@ -1900,8 +1890,7 @@ return dto; }).collect(Collectors.toList()); dtoIPage.setRecords(collect); - map.put("body", dtoIPage); - return map; + return dtoIPage; } @Override -- Gitblit v1.9.3