|
@@ -334,11 +334,15 @@ public class Hospital extends Controller {
|
|
|
}
|
|
}
|
|
|
//标签
|
|
//标签
|
|
|
if (whereObject.containsKey("tag") && !whereObject.getJSONArray("tag").isEmpty()) {
|
|
if (whereObject.containsKey("tag") && !whereObject.getJSONArray("tag").isEmpty()) {
|
|
|
- for (Object o : whereObject.getJSONArray("tag")) {
|
|
|
|
|
|
|
+ JSONArray tags = whereObject.getJSONArray("tag");
|
|
|
|
|
+ String tag=tags.toString().replace("[","(").replace("]",")");
|
|
|
|
|
+ if (tags.size() > 0) {
|
|
|
where.append(" and exists(select 1 from sys_datatag WHERE ownertable = 'sa_customers' and siteid='").append(siteid).append("' ");
|
|
where.append(" and exists(select 1 from sys_datatag WHERE ownertable = 'sa_customers' and siteid='").append(siteid).append("' ");
|
|
|
- where.append(" and tag='").append(o).append("' and t1.sa_customersid=ownerid ");
|
|
|
|
|
|
|
+ where.append(" and tag in ").append(tag).append(" and t1.sa_customersid=ownerid ");
|
|
|
where.append(")");
|
|
where.append(")");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
//开发阶段
|
|
//开发阶段
|
|
|
if (whereObject.containsKey("stagename") && !"".equals(whereObject.getString("stagename"))) {
|
|
if (whereObject.containsKey("stagename") && !"".equals(whereObject.getString("stagename"))) {
|
|
@@ -441,10 +445,10 @@ public class Hospital extends Controller {
|
|
|
row.putIfAbsent("totalop", 0);
|
|
row.putIfAbsent("totalop", 0);
|
|
|
//关键人
|
|
//关键人
|
|
|
Rows KeyDoctors = KeyDoctorsRowsMap.getOrDefault(String.valueOf(id), new Rows());
|
|
Rows KeyDoctors = KeyDoctorsRowsMap.getOrDefault(String.valueOf(id), new Rows());
|
|
|
- row.putIfAbsent("keyperson", StringUtils.join(KeyDoctors.toArray("doctorname"),","));
|
|
|
|
|
|
|
+ row.putIfAbsent("keyperson", StringUtils.join(KeyDoctors.toArray("doctorname"), ","));
|
|
|
//签约经销商
|
|
//签约经销商
|
|
|
Rows signagent = AgentRowsMap.getOrDefault(String.valueOf(id), new Rows());
|
|
Rows signagent = AgentRowsMap.getOrDefault(String.valueOf(id), new Rows());
|
|
|
- row.putIfAbsent("signagent", StringUtils.join(signagent.toArray("enterprisename"),","));
|
|
|
|
|
|
|
+ row.putIfAbsent("signagent", StringUtils.join(signagent.toArray("enterprisename"), ","));
|
|
|
String stagename = row.getString("stagename");
|
|
String stagename = row.getString("stagename");
|
|
|
for (Row stageRow : stageRows) {
|
|
for (Row stageRow : stageRows) {
|
|
|
if (stagename.equals(stageRow.getString("stagename"))) {
|
|
if (stagename.equals(stageRow.getString("stagename"))) {
|