|
|
@@ -65,21 +65,22 @@ public class performancetargetboard extends Controller {
|
|
|
for (Row row : rows) {
|
|
|
list.add(row.getLong("sa_saleareaid"));
|
|
|
}
|
|
|
-
|
|
|
- if(rows.isNotEmpty()){
|
|
|
- arearows =getSubSaleAreas(this,list);
|
|
|
- Rows saleareahrrows =dbConnect.runSqlQuery("select t1.name,t2.sa_saleareaid,t1.hrid from sys_hr t1 inner join sa_salearea_hr t2 on t1.siteid = t2.siteid and t1.hrid = t2.hrid where t1.siteid='"+siteid+"'");
|
|
|
- RowsMap saleareahrRowsMap =saleareahrrows.toRowsMap("sa_saleareaid");
|
|
|
- for (Row row :arearows){
|
|
|
- if(saleareahrRowsMap.containsKey(row.getString("sa_saleareaid"))){
|
|
|
- for(Row row1 :saleareahrRowsMap.get(row.getString("sa_saleareaid"))){
|
|
|
- row.put("name",row1.getString("name"));
|
|
|
- row.put("hrid",row1.getString("hrid"));
|
|
|
- rows.add(row);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ arearows =getSubSaleAreas(this,list);
|
|
|
+ rows.addAll(arearows);
|
|
|
+// if(rows.isNotEmpty()){
|
|
|
+// arearows =getSubSaleAreas(this,list);
|
|
|
+// Rows saleareahrrows =dbConnect.runSqlQuery("select t1.name,t2.sa_saleareaid,t1.hrid from sys_hr t1 inner join sa_salearea_hr t2 on t1.siteid = t2.siteid and t1.hrid = t2.hrid where t1.siteid='"+siteid+"'");
|
|
|
+// RowsMap saleareahrRowsMap =saleareahrrows.toRowsMap("sa_saleareaid");
|
|
|
+// for (Row row :arearows){
|
|
|
+// if(saleareahrRowsMap.containsKey(row.getString("sa_saleareaid"))){
|
|
|
+// for(Row row1 :saleareahrRowsMap.get(row.getString("sa_saleareaid"))){
|
|
|
+// row.put("name",row1.getString("name"));
|
|
|
+// row.put("hrid",row1.getString("hrid"));
|
|
|
+// rows.add(row);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
|
|
|
@@ -87,7 +88,7 @@ public class performancetargetboard extends Controller {
|
|
|
|
|
|
@API(title = "查询业务员月度指标", apiversion = R.ID2025103010192003.v1.class)
|
|
|
public String queryperformancetarget_month() throws YosException {
|
|
|
- long hrid= content.getLong("hrid");
|
|
|
+ //long hrid= content.getLong("hrid");
|
|
|
long sa_saleareaid= content.getLong("sa_saleareaid");
|
|
|
long year= content.getLong("year");
|
|
|
long month= content.getLong("month");
|
|
|
@@ -111,7 +112,7 @@ public class performancetargetboard extends Controller {
|
|
|
}
|
|
|
SQLFactory personnelsqlFactory = new SQLFactory(this, "人员-目标详情列表");
|
|
|
personnelsqlFactory.addParameter("sa_salestargetbillid", sa_salestargetbillid);
|
|
|
- personnelsqlFactory.addParameter_SQL("where", " t.hrid="+hrid);
|
|
|
+ personnelsqlFactory.addParameter_SQL("where", " t.sa_saleareaid="+sa_saleareaid);
|
|
|
personnelsqlFactory.addParameter("siteid", siteid);
|
|
|
Rows salestargetrows = dbConnect.runSqlQuery(personnelsqlFactory.getSQL());
|
|
|
BigDecimal rw_month=BigDecimal.ZERO;
|
|
|
@@ -180,7 +181,7 @@ public class performancetargetboard extends Controller {
|
|
|
|
|
|
@API(title = "查询业务员季度指标", apiversion = R.ID2025103010193903.v1.class)
|
|
|
public String queryperformancetarget_quarter() throws YosException {
|
|
|
- long hrid= content.getLong("hrid");
|
|
|
+// long hrid= content.getLong("hrid");
|
|
|
long sa_saleareaid= content.getLong("sa_saleareaid");
|
|
|
long year= content.getLong("year");
|
|
|
int selectmonth= content.getIntValue("month");
|
|
|
@@ -203,7 +204,7 @@ public class performancetargetboard extends Controller {
|
|
|
}
|
|
|
SQLFactory personnelsqlFactory = new SQLFactory(this, "人员-目标详情列表");
|
|
|
personnelsqlFactory.addParameter("sa_salestargetbillid", sa_salestargetbillid);
|
|
|
- personnelsqlFactory.addParameter_SQL("where", " t.hrid="+hrid);
|
|
|
+ personnelsqlFactory.addParameter_SQL("where", " t.sa_saleareaid="+sa_saleareaid);
|
|
|
personnelsqlFactory.addParameter("siteid", siteid);
|
|
|
Rows salestargetrows = dbConnect.runSqlQuery(personnelsqlFactory.getSQL());
|
|
|
BigDecimal rw_quarter=BigDecimal.ZERO;
|
|
|
@@ -279,7 +280,7 @@ public class performancetargetboard extends Controller {
|
|
|
|
|
|
@API(title = "查询业务员总指标", apiversion = R.ID2025103010195403.v1.class)
|
|
|
public String queryperformancetarget_total() throws YosException {
|
|
|
- long hrid= content.getLong("hrid");
|
|
|
+ //long hrid= content.getLong("hrid");
|
|
|
long sa_saleareaid= content.getLong("sa_saleareaid");
|
|
|
long year= content.getLong("year");
|
|
|
JSONArray months = content.getJSONArray("months");
|
|
|
@@ -303,7 +304,7 @@ public class performancetargetboard extends Controller {
|
|
|
}
|
|
|
SQLFactory personnelsqlFactory = new SQLFactory(this, "人员-目标详情列表");
|
|
|
personnelsqlFactory.addParameter("sa_salestargetbillid", sa_salestargetbillid);
|
|
|
- personnelsqlFactory.addParameter_SQL("where", " t.hrid="+hrid);
|
|
|
+ personnelsqlFactory.addParameter_SQL("where", " t.sa_saleareaid="+sa_saleareaid);
|
|
|
personnelsqlFactory.addParameter("siteid", siteid);
|
|
|
Rows salestargetrows = dbConnect.runSqlQuery(personnelsqlFactory.getSQL());
|
|
|
BigDecimal rw_all=BigDecimal.ZERO;
|