Просмотр исходного кода

区域经理业绩统计多个区域合计(而不是去取第一个)

hu 2 лет назад
Родитель
Сommit
0f8708f3af

+ 10 - 7
src/custom/restcontroller/webmanage/sale/salestarget/personnelstatistics.java

@@ -131,12 +131,12 @@ public class personnelstatistics extends Controller {
         hrsqlFactory.addParameter("siteid", siteid);
         hrsqlFactory.addParameter("hrid", hrid);
         Rows hrrows = dbConnect.runSqlQuery(hrsqlFactory.getSQL());
-
-        if(sa_saleareaid==0){
-            if(hrrows.isNotEmpty()){
-                sa_saleareaid=hrrows.get(0).getLong("sa_saleareaid");
-            }
-        }
+        RowsMap hrrowsMap = hrrows.toRowsMap("sa_saleareaid");
+//        if(sa_saleareaid==0){
+//            if(hrrows.isNotEmpty()){
+//                sa_saleareaid=hrrows.get(0).getLong("sa_saleareaid");
+//            }
+//        }
 
         //考核指标类型
         long sa_salestargetbillid = 0;
@@ -342,7 +342,10 @@ public class personnelstatistics extends Controller {
         }
         Rows rowsResult =new Rows();
         for (Row row : rows) {
-            rowsResult.add(row);
+            if(hrrowsMap.containsKey(row.getString("sa_saleareaid"))){
+                rowsResult.add(row);
+            }
+
         }
 
         for (Row row : rowsResult) {