Commit ae8afa2a authored by 徐州's avatar 徐州

修改平台客户查询

parent 31b54800
package com.house365.web.controller; package com.house365.web.controller;
import com.google.common.base.Joiner;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.house365.beans.entity.*; import com.house365.beans.entity.*;
import com.house365.beans.system.Page; import com.house365.beans.system.Page;
...@@ -65,6 +66,22 @@ public class PlatformManagementController extends BaseController { ...@@ -65,6 +66,22 @@ public class PlatformManagementController extends BaseController {
// 获取查询条件 // 获取查询条件
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_"); Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
//多选来源放回去
if(searchParams.containsKey("EQ_actSources")) {
Object act = searchParams.get("EQ_actSources");
List<String> list = new ArrayList<>();
if(act instanceof String[]) {
String[] EQ_actSource = (String[]) act;
model.addAttribute("selected", Arrays.toString(EQ_actSource));
Arrays.stream(EQ_actSource).forEach(i-> list.add(i));
} else {
model.addAttribute("selected", act.toString());
list.add(act.toString());
}
searchParams.put("EQ_actSources", list);
}
Page page = new Page(pageSize == null ? 100 : pageSize); Page page = new Page(pageSize == null ? 100 : pageSize);
if (null != number) { if (null != number) {
page.setCurrentPage(number); page.setCurrentPage(number);
......
<%@include file="/WEB-INF/common/layouts/common.jsp" %> <%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %> <%@ page language="java" pageEncoding="UTF-8" %>
<html> <html>
<head> <head>
<c:if test="${not empty managerName}"> <c:if test="${not empty managerName}">
...@@ -440,10 +441,11 @@ ...@@ -440,10 +441,11 @@
活动来源: 活动来源:
<select width: 6rem name="search_EQ_actSource" id="search_EQ_actSource"> <select width: 6rem name="search_EQ_actSources" id="search_EQ_actSources" multiple="true">
<c:forEach items="${sources}" var="source"> <c:forEach items="${sources}" var="source">
<option value="${source.sourceName}" <option value="${source.sourceName}"
<c:if test="${source.sourceName eq param['search_EQ_actSource']}">selected="selected"</c:if>>${source.sourceName}</option> <c:if test="${fn:contains(selected,source.sourceName)}">selected="selected"</c:if>>${source.sourceName}</option>
<%-- <c:if test="${source.sourceName eq param['search_EQ_actSource']}"></c:if>>${source.sourceName}</option>--%>
</c:forEach> </c:forEach>
</select> </select>
......
...@@ -1547,6 +1547,14 @@ ...@@ -1547,6 +1547,14 @@
c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value# c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value#
]]> ]]>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.actSources">
<![CDATA[ c.act_source in ]]>
<iterate prepend="" property="searchFilters.actSources.value" close=")" open="(" conjunction=",">
<![CDATA[ #searchFilters.actSources.value[]# ]]>
</iterate>
</isNotEmpty>
<isNotEmpty prepend="AND" property="searchFilters.starCustomer"> <isNotEmpty prepend="AND" property="searchFilters.starCustomer">
<![CDATA[ <![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value# starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...@@ -2129,6 +2137,7 @@ ...@@ -2129,6 +2137,7 @@
isRecycled $searchFilters.isRecycled.operation$ #searchFilters.isRecycled.value# isRecycled $searchFilters.isRecycled.operation$ #searchFilters.isRecycled.value#
]]> ]]>
</isNotNull> </isNotNull>
</isNotNull> </isNotNull>
</dynamic> </dynamic>
</sql> </sql>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment