|
|
@@ -90,6 +90,14 @@ public class performancetargetboard extends Controller {
|
|
|
public String queryperformancetarget() throws YosException {
|
|
|
//long hrid= content.getLong("hrid");
|
|
|
//long sa_saleareaid= content.getLong("sa_saleareaid");
|
|
|
+ StringBuffer where = new StringBuffer(" 1=1 ");
|
|
|
+
|
|
|
+ if (content.containsKey("where")) {
|
|
|
+ JSONObject whereObject = content.getJSONObject("where");
|
|
|
+ if (whereObject.containsKey("areaname") && !"".equals(whereObject.getString("areaname"))) {
|
|
|
+ where.append(" and t3.areaname ='").append(whereObject.getString("areaname")).append("' ");
|
|
|
+ }
|
|
|
+ }
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_hr","name","hrid");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
querySQL.addJoinTable(JOINTYPE.inner, "sa_salearea_hr", "t2", "t1.siteid = t2.siteid and t1.hrid = t2.hrid");
|
|
|
@@ -97,6 +105,8 @@ public class performancetargetboard extends Controller {
|
|
|
|
|
|
querySQL.setWhere("t1.siteid", siteid);
|
|
|
querySQL.setWhere("t1.hrid", hrid);
|
|
|
+ querySQL.setWhere(where.toString());
|
|
|
+
|
|
|
|
|
|
Rows arearows = querySQL.query();
|
|
|
Rows arearows1=new Rows();
|