|
@@ -12,6 +12,7 @@ import common.annotation.CACHEING_CLEAN;
|
|
|
import common.annotation.cm;
|
|
|
import common.data.*;
|
|
|
import restcontroller.R;
|
|
|
+import restcontroller.sale.promotion.promotion;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
@@ -46,6 +47,31 @@ public class salearea extends Controller {
|
|
|
return getSucReturnObject().setData(toprows).toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "营销区域列表查询(区域经理)")
|
|
|
+ @CACHEING
|
|
|
+ public String query_area_qyjl() throws YosException {
|
|
|
+ HashMap<Long, JSONArray> map = new HashMap<>();
|
|
|
+
|
|
|
+ /*
|
|
|
+ 查询所有分类
|
|
|
+ */
|
|
|
+ SQLFactory areasqlFactory = new SQLFactory(new promotion(content), "区域经理查询下属营销区域");
|
|
|
+ areasqlFactory.addParameter("siteid", siteid);
|
|
|
+ areasqlFactory.addParameter("hrid", hrid);
|
|
|
+ Rows arearows = dbConnect.runSqlQuery(areasqlFactory);
|
|
|
+ String sql ="select sa_saleareaid,areaname,isused,remarks,sequence,ifnull(parentid,0) as parentid from sa_salearea where siteid='" + siteid + "' and sa_saleareaid in "+arearows.toArrayList("sa_saleareaid")+" order by sequence,sa_saleareaid";
|
|
|
+ sql = sql.replace("[", "(").replace("]", ")");
|
|
|
+ Rows allrows = dbConnect.runSqlQuery(sql);
|
|
|
+ /*
|
|
|
+ 递归查询
|
|
|
+ */
|
|
|
+ for (Row row : allrows) {
|
|
|
+ row.put("subarea", getSubArea(row, allrows));
|
|
|
+ }
|
|
|
+ return getSucReturnObject().setData(allrows).toString();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@API(title = "营销区域列表查询(范围)")
|
|
|
public String query_area_auth() throws YosException {
|
|
|
|