|
@@ -120,36 +120,31 @@ public class workorder extends Controller {
|
|
|
JSONObject whereObject = content.getJSONObject("where");
|
|
|
if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
|
|
|
where.append(" and(");
|
|
|
- where.append("t1.name like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.phonenumber like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.officetelephone like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.position like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t2.depname like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append("t1.phonenumber like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append("or t1.name like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append("or t1.accountno like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
where.append(")");
|
|
|
}
|
|
|
- if (whereObject.containsKey("isleader") && !"".equals(whereObject.getString("isleader"))) {
|
|
|
- where.append(" and t1.isleader ='").append(whereObject.getString("isleader")).append("' ");
|
|
|
+ if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
|
|
|
+ where.append(" and(");
|
|
|
+ where.append("t1.status ='").append(whereObject.getString("status")).append("' ");
|
|
|
+ where.append(")");
|
|
|
}
|
|
|
+ if (whereObject.containsKey("usertype") && !"".equals(whereObject.getString("usertype"))) {
|
|
|
+ where.append(" and(");
|
|
|
+ where.append("t2.usertype ='").append(whereObject.getString("usertype")).append("' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(sys_enterpriseid>0){
|
|
|
+ where.append(" and(");
|
|
|
+ where.append("t4.sys_enterpriseid ='").append(sys_enterpriseid).append("' ");
|
|
|
+ where.append(")");
|
|
|
}
|
|
|
-// boolean containssub = content.getBoolean("containssub");
|
|
|
-// JSONArray departmentidsArray = content.getJSONArray("departmentids");
|
|
|
-// ArrayList<String> departmentidsList = new ArrayList<>();
|
|
|
-// for (Object o : departmentidsArray) {
|
|
|
-// String departmentid = o.toString();
|
|
|
-// departmentidsList.add(departmentid);
|
|
|
-// if (containssub) {
|
|
|
-// departmentidsList.addAll(getSubDepartmentids(Long.parseLong(departmentid)));
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
-// if (content.containsKey("isAll")) {
|
|
|
-// if (content.getBooleanValue("isAll")) {
|
|
|
-// departmentidsList = dbConnect.runSqlQuery("SELECT departmentid from sys_department WHERE siteid = '" + siteid + "' AND isused").toArrayList("departmentid");
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
+
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "服务人员列表查询");
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
-// sqlFactory.addParameter_in("departmentid", departmentidsList);
|
|
|
sqlFactory.addParameter_SQL("where", where);
|
|
|
// Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_site_parameter", "sys_site_parameterid");
|