shudonghui 1 an în urmă
părinte
comite
317618ea9c

+ 4 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/QualityAnalyseServiceImpl.java

@@ -57,7 +57,7 @@ public class QualityAnalyseServiceImpl extends ServiceImpl<QualityAnalyseMapper,
                 v.stream().filter(map1 -> map1.get("Influence_degree") != null).collect(Collectors.groupingBy(map1 -> map1.get("Influence_degree"))).forEach((k1, v1) -> {
                     map.put(k1.toString(), v1.size());
                 });
-                map.put("id", v.get(0).get("region_id"));
+                map.put("id", v.get(0).get("region_id").toString());
                 result.put(k.toString(), map);
             });
         } else if (group.equals(QualityAnalyseGroupEnum.INFLUENCE_SUPPLIER)) {
@@ -67,7 +67,7 @@ public class QualityAnalyseServiceImpl extends ServiceImpl<QualityAnalyseMapper,
                 v.stream().filter(map1 -> map1.get("supplier") != null).collect(Collectors.groupingBy(map1 -> map1.get("supplier"))).forEach((k1, v1) -> {
                     JSONObject map1 = new JSONObject();
                     map1.put("value", v1.size());
-                    map1.put("id", v.get(0).get("supplier_id"));
+                    map1.put("id", v.get(0).get("supplier_id").toString());
                     map.put(k1.toString(), map1);
                 });
                 result.put(k.toString(), map);
@@ -79,7 +79,7 @@ public class QualityAnalyseServiceImpl extends ServiceImpl<QualityAnalyseMapper,
                 v.stream().filter(map1 -> map1.get("Influence_degree") != null).collect(Collectors.groupingBy(map1 -> map1.get("Influence_degree"))).forEach((k1, v1) -> {
                     map.put(k1.toString(), v1.size());
                 });
-                map.put("id", v.get(0).get("region_id"));
+                map.put("id", v.get(0).get("region_id").toString());
                 result.put(k.toString(), map);
             });
         } else if (group.equals(QualityAnalyseGroupEnum.REASON_SUPPLIER)) {
@@ -89,7 +89,7 @@ public class QualityAnalyseServiceImpl extends ServiceImpl<QualityAnalyseMapper,
                 v.stream().filter(map1 -> map1.get("supplier") != null).collect(Collectors.groupingBy(map1 -> map1.get("supplier"))).forEach((k1, v1) -> {
                     JSONObject map1 = new JSONObject();
                     map1.put("value", v1.size());
-                    map1.put("id", v.get(0).get("supplier_id"));
+                    map1.put("id", v.get(0).get("supplier_id").toString());
                     map.put(k1.toString(), map1);
                 });
                 result.put(k.toString(), map);

+ 1 - 1
sop-business/src/main/resources/mapper/QualityAnalyseMapper.xml

@@ -143,7 +143,7 @@
                 and us.supplier_id = #{supplierId}
             </if>
             <if test="region_id != null and region_id != ''">
-                and r.id = #{region_id}
+                and c.region_id = #{region_id}
             </if>
             <if test="influenceDegree != null and influenceDegree != ''">
                 and a.Influence_degree = #{influenceDegree}