|
@@ -16,6 +16,7 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.sale.promotion.promotion;
|
|
|
import restcontroller.webmanage.sale.salestarget.personnel;
|
|
|
+import restcontroller.webmanage.users.users;
|
|
|
|
|
|
import javax.annotation.processing.SupportedSourceVersion;
|
|
|
import java.math.BigDecimal;
|
|
@@ -1274,20 +1275,36 @@ public class databoard extends Controller {
|
|
|
areasqlFactory.addParameter("hrid", hrid);
|
|
|
Rows arearows = dbConnect.runSqlQuery(areasqlFactory);
|
|
|
|
|
|
-
|
|
|
- if(arearows.isNotEmpty() && arearows.size()>1){
|
|
|
+ SQLFactory roleSQL = new SQLFactory(this, "账号详情查询_角色列表");
|
|
|
+ roleSQL.addParameter_in("userid", userid);
|
|
|
+ roleSQL.addParameter("siteid", siteid);
|
|
|
+ Rows rolerows = dbConnect.runSqlQuery(roleSQL);
|
|
|
+ if(rolerows.isNotEmpty()){
|
|
|
ArrayList<Long> arrayList =arearows.toArrayList("sa_saleareaid", new ArrayList<Long>());
|
|
|
arrayList.addAll(SaleArea.getSubSaleAreaIds(this, arrayList));
|
|
|
String sql ="";
|
|
|
if(alias.equals("")){
|
|
|
- sql = " and sys_enterpriseid in (select sys_enterpriseid from sys_enterprise_tradefield where sa_saleareaid in "+arrayList+") ";
|
|
|
+ sql = " and sys_enterpriseid in (select sys_enterpriseid from sys_enterprise_tradefield where sa_saleareaid in "+arrayList+") ";
|
|
|
}else{
|
|
|
- sql = " and "+alias+".sys_enterpriseid in (select sys_enterpriseid from sys_enterprise_tradefield where sa_saleareaid in "+arrayList+") ";
|
|
|
+ sql = " and "+alias+".sys_enterpriseid in (select sys_enterpriseid from sys_enterprise_tradefield where sa_saleareaid in "+arrayList+") ";
|
|
|
}
|
|
|
|
|
|
sql = sql.replace("[", "(").replace("]", ")");
|
|
|
where=where+sql;
|
|
|
}
|
|
|
+// if(arearows.isNotEmpty() && arearows.size()>1){
|
|
|
+// ArrayList<Long> arrayList =arearows.toArrayList("sa_saleareaid", new ArrayList<Long>());
|
|
|
+// arrayList.addAll(SaleArea.getSubSaleAreaIds(this, arrayList));
|
|
|
+// String sql ="";
|
|
|
+// if(alias.equals("")){
|
|
|
+// sql = " and sys_enterpriseid in (select sys_enterpriseid from sys_enterprise_tradefield where sa_saleareaid in "+arrayList+") ";
|
|
|
+// }else{
|
|
|
+// sql = " and "+alias+".sys_enterpriseid in (select sys_enterpriseid from sys_enterprise_tradefield where sa_saleareaid in "+arrayList+") ";
|
|
|
+// }
|
|
|
+//
|
|
|
+// sql = sql.replace("[", "(").replace("]", ")");
|
|
|
+// where=where+sql;
|
|
|
+// }
|
|
|
return where;
|
|
|
}
|
|
|
|
|
@@ -1298,8 +1315,11 @@ public class databoard extends Controller {
|
|
|
areasqlFactory.addParameter("hrid", hrid);
|
|
|
Rows arearows = dbConnect.runSqlQuery(areasqlFactory);
|
|
|
|
|
|
-
|
|
|
- if(arearows.isNotEmpty() && arearows.size()>1){
|
|
|
+ SQLFactory roleSQL = new SQLFactory(this, "账号详情查询_角色列表");
|
|
|
+ roleSQL.addParameter_in("userid", userid);
|
|
|
+ roleSQL.addParameter("siteid", siteid);
|
|
|
+ Rows rolerows = dbConnect.runSqlQuery(roleSQL);
|
|
|
+ if(rolerows.isNotEmpty()){
|
|
|
ArrayList<Long> arrayList =arearows.toArrayList("sa_saleareaid", new ArrayList<Long>());
|
|
|
arrayList.addAll(SaleArea.getSubSaleAreaIds(this, arrayList));
|
|
|
String sql ="";
|
|
@@ -1312,6 +1332,20 @@ public class databoard extends Controller {
|
|
|
sql = sql.replace("[", "(").replace("]", ")");
|
|
|
where=where+sql;
|
|
|
}
|
|
|
+
|
|
|
+// if(arearows.isNotEmpty() && arearows.size()>1){
|
|
|
+// ArrayList<Long> arrayList =arearows.toArrayList("sa_saleareaid", new ArrayList<Long>());
|
|
|
+// arrayList.addAll(SaleArea.getSubSaleAreaIds(this, arrayList));
|
|
|
+// String sql ="";
|
|
|
+// if(alias.equals("")){
|
|
|
+// sql = " and sa_saleareaid in "+arrayList;
|
|
|
+// }else{
|
|
|
+// sql = " and "+alias+".sa_saleareaid in "+arrayList;
|
|
|
+// }
|
|
|
+//
|
|
|
+// sql = sql.replace("[", "(").replace("]", ")");
|
|
|
+// where=where+sql;
|
|
|
+// }
|
|
|
return where;
|
|
|
}
|
|
|
|