|
|
@@ -91,7 +91,7 @@ public class salearea extends Controller {
|
|
|
saleAreaids.addAll(userInfo.getHrSaleAreaIds(hrid));
|
|
|
saleAreaids.add(-1L);
|
|
|
if (sa_saleareaidsList.size() > 0) {
|
|
|
- String sqlStr = " and t1.sys_enterpriseid in (SELECT DISTINCT sys_enterpriseid from sys_enterprise_tradefield WHERE sa_saleareaid in " + saleAreaids + " )";
|
|
|
+ String sqlStr = " and t1.sys_enterpriseid in (SELECT DISTINCT sys_enterpriseid from sys_enterprise_tradefield WHERE sa_saleareaid in " + saleAreaids + " and hrid ='"+hrid+"' )";
|
|
|
sqlStr = sqlStr.replace("[", "(").replace("]", ")");
|
|
|
where.append(sqlStr);
|
|
|
}
|
|
|
@@ -128,13 +128,10 @@ public class salearea extends Controller {
|
|
|
Rows rows = querySQL.query();
|
|
|
|
|
|
RowsMap areaRowsMap = CommonHepler.getAreaRowsMap(this, rows.toArrayList("sa_agentsid", new ArrayList<>()));
|
|
|
-// RowsMap salerRowsMap = CommonHepler.getSalerNameRowsMap(this, rows.toArrayList("sa_agentsid", new ArrayList<>()));
|
|
|
for (Row row : rows) {
|
|
|
row.put("p_c_c", row.getString("province") + "-" + row.getString("city") + "-" + row.getString("county"));
|
|
|
Rows areaRows = areaRowsMap.getOrDefault(row.getString("sa_agentsid"), new Rows());
|
|
|
row.put("areanames", StringUtils.join(areaRows.toArrayList("areaname"), ","));
|
|
|
-// Rows salerRows = salerRowsMap.getOrDefault(row.getString("sa_agentsid"), new Rows());
|
|
|
-// row.put("salernames", StringUtils.join(salerRows.toArrayList("name"), ","));
|
|
|
}
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|