瀏覽代碼

机构分析统计

huangzhiguo 2 年之前
父節點
當前提交
fbadbfa492

+ 2 - 0
src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java

@@ -85,4 +85,6 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
     String recordDescribe(Integer clubId);
 
     List<CmBehaviorRecord> selRegisterIP(Integer clubId);
+
+    List<ClubStatistics> selStatisticsList(ClubStatistics statistics);
 }

+ 421 - 0
src/main/java/com/caimei/modules/user/entity/ClubStatistics.java

@@ -0,0 +1,421 @@
+package com.caimei.modules.user.entity;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/2/23
+ */
+public class ClubStatistics extends DataEntity<ClubStatistics> {
+
+    private Integer userID;
+    private Integer clubID;
+
+    private String registerStartTime;       //注册开始时间
+    private String registerEndTime;         //注册结束时间
+    private String searchStartTime;         //最近下单开始时间
+    private String searchEndTime;           //最近下单结束时间
+    private String customerValue;           //机构类型
+    private String searchUserIdentity;      //机构级别
+    private String searchStatus;            //状态
+    private String customStartTime;         //自定义统计开始时间
+    private String customEndTime;           //自定义统计结束时间
+    private String monthStartTime;         //近一个月开始时间
+    private String monthEndTime;           //近一个月结束时间
+    private String yearStartTime;         //近一个年开始时间
+    private String yearEndTime;           //近一个年结束时间
+
+    private String name;    // 机构名称
+    private String linkMan; //联系人
+    private String contractMobile;  //联系手机
+    private String linkManIdentity; //联系人身份:1老板,2采购,3运营,4其他
+    private String spName;      //协销人员
+    private String address;         //详细地址
+    private String businessLicenseImage;    //营业执照
+    private String userIdentity;    //用户身份
+    private String sname;   //机构简称
+    private String contractEmail;   //联系邮箱
+    private String contractPhone;   //联系电话
+    private String fax;     //传真
+    private String headpic;     //门头照
+    private String socialCreditCode;    //统一社会信用代码 --- 营业执照编号
+    private String info;    //公司简介
+    private String linkManStatus;   //联系人身份
+    private String clubStatus;  // 机构状态
+    private String clubRank;  // 机构级别
+    private String firstClubType;  // 机构一级分类
+    private String classify;  // 机构二级分类
+    private String clubDataIntegrity;  // 资料完整度
+    private String addTime;  // 注册时间
+    private String svipUserFlag;  // vip类别
+    private String payTotalMonth;  // 近一个月购买额
+    private String orderCountMonth;  // 近一个月订单数
+    private String payTotalYear;  // 近一个年购买额
+    private String orderCountYear;  // 近一个年订单数
+    private String payTotal;  // 总购买额
+    private String pageLabel;   //最常搜索词
+    private String lastOrderTime;  // 最近下单时间
+
+
+    public Integer getUserID() {
+        return userID;
+    }
+
+    public void setUserID(Integer userID) {
+        this.userID = userID;
+    }
+
+    public Integer getClubID() {
+        return clubID;
+    }
+
+    public void setClubID(Integer clubID) {
+        this.clubID = clubID;
+    }
+
+    public String getRegisterStartTime() {
+        return registerStartTime;
+    }
+
+    public void setRegisterStartTime(String registerStartTime) {
+        this.registerStartTime = registerStartTime;
+    }
+
+    public String getRegisterEndTime() {
+        return registerEndTime;
+    }
+
+    public void setRegisterEndTime(String registerEndTime) {
+        this.registerEndTime = registerEndTime;
+    }
+
+    public String getSearchStartTime() {
+        return searchStartTime;
+    }
+
+    public void setSearchStartTime(String searchStartTime) {
+        this.searchStartTime = searchStartTime;
+    }
+
+    public String getSearchEndTime() {
+        return searchEndTime;
+    }
+
+    public void setSearchEndTime(String searchEndTime) {
+        this.searchEndTime = searchEndTime;
+    }
+
+    public String getCustomerValue() {
+        return customerValue;
+    }
+
+    public void setCustomerValue(String customerValue) {
+        this.customerValue = customerValue;
+    }
+
+    public String getSearchUserIdentity() {
+        return searchUserIdentity;
+    }
+
+    public void setSearchUserIdentity(String searchUserIdentity) {
+        this.searchUserIdentity = searchUserIdentity;
+    }
+
+    public String getSearchStatus() {
+        return searchStatus;
+    }
+
+    public void setSearchStatus(String searchStatus) {
+        this.searchStatus = searchStatus;
+    }
+
+    public String getCustomStartTime() {
+        return customStartTime;
+    }
+
+    public void setCustomStartTime(String customStartTime) {
+        this.customStartTime = customStartTime;
+    }
+
+    public String getCustomEndTime() {
+        return customEndTime;
+    }
+
+    public void setCustomEndTime(String customEndTime) {
+        this.customEndTime = customEndTime;
+    }
+
+    public String getMonthStartTime() {
+        return monthStartTime;
+    }
+
+    public void setMonthStartTime(String monthStartTime) {
+        this.monthStartTime = monthStartTime;
+    }
+
+    public String getMonthEndTime() {
+        return monthEndTime;
+    }
+
+    public void setMonthEndTime(String monthEndTime) {
+        this.monthEndTime = monthEndTime;
+    }
+
+    public String getYearStartTime() {
+        return yearStartTime;
+    }
+
+    public void setYearStartTime(String yearStartTime) {
+        this.yearStartTime = yearStartTime;
+    }
+
+    public String getYearEndTime() {
+        return yearEndTime;
+    }
+
+    public void setYearEndTime(String yearEndTime) {
+        this.yearEndTime = yearEndTime;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getLinkMan() {
+        return linkMan;
+    }
+
+    public void setLinkMan(String linkMan) {
+        this.linkMan = linkMan;
+    }
+
+    public String getContractMobile() {
+        return contractMobile;
+    }
+
+    public void setContractMobile(String contractMobile) {
+        this.contractMobile = contractMobile;
+    }
+
+    public String getLinkManIdentity() {
+        return linkManIdentity;
+    }
+
+    public void setLinkManIdentity(String linkManIdentity) {
+        this.linkManIdentity = linkManIdentity;
+    }
+
+    public String getSpName() {
+        return spName;
+    }
+
+    public void setSpName(String spName) {
+        this.spName = spName;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getBusinessLicenseImage() {
+        return businessLicenseImage;
+    }
+
+    public void setBusinessLicenseImage(String businessLicenseImage) {
+        this.businessLicenseImage = businessLicenseImage;
+    }
+
+    public String getUserIdentity() {
+        return userIdentity;
+    }
+
+    public void setUserIdentity(String userIdentity) {
+        this.userIdentity = userIdentity;
+    }
+
+    public String getSname() {
+        return sname;
+    }
+
+    public void setSname(String sname) {
+        this.sname = sname;
+    }
+
+    public String getContractEmail() {
+        return contractEmail;
+    }
+
+    public void setContractEmail(String contractEmail) {
+        this.contractEmail = contractEmail;
+    }
+
+    public String getContractPhone() {
+        return contractPhone;
+    }
+
+    public void setContractPhone(String contractPhone) {
+        this.contractPhone = contractPhone;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getHeadpic() {
+        return headpic;
+    }
+
+    public void setHeadpic(String headpic) {
+        this.headpic = headpic;
+    }
+
+    public String getSocialCreditCode() {
+        return socialCreditCode;
+    }
+
+    public void setSocialCreditCode(String socialCreditCode) {
+        this.socialCreditCode = socialCreditCode;
+    }
+
+    public String getInfo() {
+        return info;
+    }
+
+    public void setInfo(String info) {
+        this.info = info;
+    }
+
+    public String getLinkManStatus() {
+        return linkManStatus;
+    }
+
+    public void setLinkManStatus(String linkManStatus) {
+        this.linkManStatus = linkManStatus;
+    }
+
+    public String getClubStatus() {
+        return clubStatus;
+    }
+
+    public void setClubStatus(String clubStatus) {
+        this.clubStatus = clubStatus;
+    }
+
+    public String getClubRank() {
+        return clubRank;
+    }
+
+    public void setClubRank(String clubRank) {
+        this.clubRank = clubRank;
+    }
+
+    public String getFirstClubType() {
+        return firstClubType;
+    }
+
+    public void setFirstClubType(String firstClubType) {
+        this.firstClubType = firstClubType;
+    }
+
+    public String getClassify() {
+        return classify;
+    }
+
+    public void setClassify(String classify) {
+        this.classify = classify;
+    }
+
+    public String getClubDataIntegrity() {
+        return clubDataIntegrity;
+    }
+
+    public void setClubDataIntegrity(String clubDataIntegrity) {
+        this.clubDataIntegrity = clubDataIntegrity;
+    }
+
+    public String getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(String addTime) {
+        this.addTime = addTime;
+    }
+
+    public String getSvipUserFlag() {
+        return svipUserFlag;
+    }
+
+    public void setSvipUserFlag(String svipUserFlag) {
+        this.svipUserFlag = svipUserFlag;
+    }
+
+    public String getPayTotalMonth() {
+        return payTotalMonth;
+    }
+
+    public void setPayTotalMonth(String payTotalMonth) {
+        this.payTotalMonth = payTotalMonth;
+    }
+
+    public String getOrderCountMonth() {
+        return orderCountMonth;
+    }
+
+    public void setOrderCountMonth(String orderCountMonth) {
+        this.orderCountMonth = orderCountMonth;
+    }
+
+    public String getPayTotalYear() {
+        return payTotalYear;
+    }
+
+    public void setPayTotalYear(String payTotalYear) {
+        this.payTotalYear = payTotalYear;
+    }
+
+    public String getOrderCountYear() {
+        return orderCountYear;
+    }
+
+    public void setOrderCountYear(String orderCountYear) {
+        this.orderCountYear = orderCountYear;
+    }
+
+    public String getPayTotal() {
+        return payTotal;
+    }
+
+    public void setPayTotal(String payTotal) {
+        this.payTotal = payTotal;
+    }
+
+    public String getPageLabel() {
+        return pageLabel;
+    }
+
+    public void setPageLabel(String pageLabel) {
+        this.pageLabel = pageLabel;
+    }
+
+    public String getLastOrderTime() {
+        return lastOrderTime;
+    }
+
+    public void setLastOrderTime(String lastOrderTime) {
+        this.lastOrderTime = lastOrderTime;
+    }
+}

+ 76 - 0
src/main/java/com/caimei/modules/user/service/NewCmClubService.java

@@ -1,7 +1,9 @@
 package com.caimei.modules.user.service;
 
 import java.io.IOException;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -213,4 +215,78 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
        return cmReports;
     }
 
+    public Page<ClubStatistics> statisticsList(Page<ClubStatistics> page, ClubStatistics statistics){
+        statistics.setPage(page);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        String monthStartTime = "";
+        String yearStartTime = "";
+        String endTime = "";
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        // 获取近一个月、近一年结束时间
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        Date time = calendar.getTime();
+        endTime = dateFormat.format(time);
+        statistics.setMonthEndTime(endTime);
+        statistics.setYearEndTime(endTime);
+        // 近一个月开始时间
+        calendar.setTime(time);
+        calendar.add(Calendar.MONTH,-1);
+        statistics.setMonthStartTime(dateFormat.format(calendar.getTime()));
+        // 近一年开始时间
+        calendar.setTime(time);
+        calendar.add(Calendar.YEAR,-1);
+        statistics.setYearStartTime(dateFormat.format(calendar.getTime()));
+        List<ClubStatistics> selStatisticsList = newCmClubDao.selStatisticsList(statistics);
+        int number = 0;
+        for (ClubStatistics clubStatistics : selStatisticsList) {
+            if (StringUtils.isNotBlank(clubStatistics.getName())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getLinkMan())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getContractMobile())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getLinkManIdentity())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getAddress())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getBusinessLicenseImage())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getUserIdentity())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getSname())) {
+                number += 3;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getContractEmail())) {
+                number += 5;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getContractPhone())) {
+                number += 4;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getFax())) {
+                number += 3;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getHeadpic())) {
+                number += 6;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getSocialCreditCode())) {
+                number += 5;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getInfo())) {
+                number += 5;
+            }
+            clubStatistics.setClubDataIntegrity(number+"%");
+            number=0;
+        }
+        page.setList(selStatisticsList);
+        return page;
+    }
 }

+ 4 - 3
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -1405,9 +1405,10 @@ public class AgencyController extends BaseController {
     }
 
     @RequestMapping(value = "/statisticsList")
-    public String statisticsList(NewCmClub newCmClub, HttpServletRequest request, HttpServletResponse response, Model model) {
-
-        model.addAttribute("newCmClub",newCmClub);
+    public String statisticsList(ClubStatistics statistics, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<ClubStatistics> page = newCmClubService.statisticsList(new Page<>(request, response), statistics);
+        model.addAttribute("statistics",statistics);
+        model.addAttribute("page",page);
         return "modules/userNew/cmAgencyStatisticsList";
     }
 

+ 132 - 0
src/main/resources/mappings/modules/user/NewCmClubMapper.xml

@@ -718,4 +718,136 @@
     <select id="selRegisterIP" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
         SELECT u.registerIP,u.ipAddress AS region, u.registerTime FROM USER u LEFT JOIN club c ON u.userID = c.userID WHERE c.clubID = #{clubId}
     </select>
+
+    <select id="selStatisticsList" resultType="com.caimei.modules.user.entity.ClubStatistics">
+        SELECT
+        u.userId,
+        c.clubID,
+        c.name,
+        c.linkMan,
+        c.contractMobile,
+        c.linkManIdentity,
+        c.address,
+        c.businessLicenseImage,
+        u.userIdentity,
+        c.sname,
+        c.contractEmail,
+        c.contractPhone,
+        c.fax,
+        c.headpic,
+        c.socialCreditCode,
+        c.info,
+        (CASE WHEN c.linkManIdentity=1 THEN '老板'
+        WHEN c.linkManIdentity=2 THEN '采购'
+        WHEN c.linkManIdentity=3 THEN '运营'
+        WHEN c.linkManIdentity=4 THEN '其他'
+        END) AS linkManStatus,
+        (CASE WHEN c.status=91 THEN '已下线'
+        WHEN c.status=90 THEN '已上线'
+        WHEN c.status=92 THEN '审核未通过'
+        WHEN c.status=93 THEN '已确认'
+        ELSE '已冻结' END) AS clubStatus,
+        (CASE WHEN u.userIdentity=2 THEN '资质机构'
+        ELSE '个人机构' END) AS clubRank,
+        (CASE WHEN c.firstClubType=1 THEN '医美'
+        WHEN c.firstClubType=2 THEN '生美'
+        WHEN c.firstClubType=3 THEN '项目公司'
+        WHEN c.firstClubType=4 THEN '个人'
+        ELSE '其他' END) AS firstClubType,
+        (CASE WHEN c.secondClubType=1 THEN '诊所'
+        WHEN c.secondClubType=2 THEN '门诊'
+        WHEN c.secondClubType=3 THEN '医院'
+        END) AS classify,
+        c.addTime AS addTime,
+        IF(csu.delFlag = '0' AND NOW() <![CDATA[ < ]]> csu.endTime,1,0) AS svipUserFlag,
+        case sp.status when 91 then '采美默认协销经理(官方账号)' else sp.linkMan end AS spName,
+        IFNULL(orderMonth.payTotalMonth,0) AS payTotalMonth,
+        IFNULL(orderMonth.orderCountMonth,0) AS orderCountMonth,
+        IFNULL(orderYesr.payTotalYesr,0) AS payTotalYear,
+        IFNULL(orderYesr.orderCountYesr,0) AS orderCountYear,
+        IFNULL(orderTotal.payTotal,0) AS payTotal,
+        pb.pageLabel,
+        MAX(cor.orderTime) AS lastOrderTime
+        FROM club c
+        LEFT JOIN cm_order cor ON c.userID = cor.userID
+        LEFT JOIN USER u ON u.userId=c.userId
+        LEFT JOIN cm_svip_user csu ON csu.userId = u.userID
+        LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
+        LEFT JOIN
+        (SELECT userId,SUM(co.payTotalFee) AS payTotalMonth,
+        COUNT(co.orderid) AS orderCountMonth
+        FROM cm_order co
+        <where>
+            co.status NOT IN (0,6,7)
+            <!--<if test="monthStartTime != null and monthStartTime != '' and monthEndTime != null and monthEndTime != ''">-->
+                AND co.orderTime BETWEEN #{monthStartTime} AND #{monthEndTime}
+            <!--</if>-->
+        </where>
+        GROUP BY co.userid) AS orderMonth ON c.userId=orderMonth.userId
+
+        LEFT JOIN
+        (SELECT userId,SUM(co.payTotalFee) AS payTotalYesr,
+        COUNT(co.orderid) AS orderCountYesr
+        FROM cm_order co
+        <where>
+             co.status NOT IN (0,6,7)
+            <!--<if test="yearStartTime != null and yearStartTime != '' and yearEndTime != null and yearEndTime != ''">-->
+                AND co.orderTime BETWEEN #{yearStartTime} AND #{yearEndTime}
+            <!--</if>-->
+        </where>
+        GROUP BY co.userid) AS orderYesr ON c.userId=orderYesr.userId
+
+        LEFT JOIN
+        (SELECT userId,SUM(co.payTotalFee) AS payTotal,
+        COUNT(co.orderid) AS 21OrderCount
+        FROM cm_order co
+        <where>
+            co.status NOT IN (0,6,7)
+            <if test="customStartTime != null and customStartTime != ''">
+                AND (co.orderTime > #{customStartTime} or co.orderTime = #{customStartTime})
+            </if>
+            <if test="customEndTime != null and customEndTime != ''">
+                AND co.orderTime <![CDATA[ <= ]]> #{customEndTime}
+            </if>
+        </where>
+        GROUP BY co.userid) AS orderTotal ON c.userId=orderTotal.userId
+
+        LEFT JOIN
+        (
+        SELECT c.userID, COUNT(cbr.pageLabel), cbr.pageLabel
+        FROM cm_behavior_record cbr
+        LEFT JOIN club c ON cbr.userID = c.userID
+        <where> cbr.userID = c.userID</where>
+        GROUP BY cbr.pageLabel) AS pb ON c.userID = pb.userID
+        <where>
+            <if test="registerStartTime != null and registerStartTime != ''">
+                AND (c.addTime > #{registerStartTime} or c.addTime = #{registerStartTime} )
+            </if>
+           <if test="registerEndTime != null and registerEndTime != ''">
+               AND c.addTime <![CDATA[ <= ]]> #{registerEndTime}
+           </if>
+            <if test="searchStartTime != null and searchStartTime != ''">
+                AND (cor.orderTime > #{searchStartTime} or cor.orderTime = #{searchStartTime} )
+            </if>
+               <if test=" searchEndTime != null and searchEndTime != ''">
+                   AND cor.orderTime <![CDATA[ <= ]]> #{searchEndTime}
+               </if>
+            <if test="customerValue != null and customerValue != ''">
+                AND c.firstClubType = #{customerValue}
+            </if>
+            <if test="searchUserIdentity != null and searchUserIdentity != ''">
+                AND u.userIdentity = #{searchUserIdentity}
+            </if>
+            <if test="searchStatus != null and searchStatus != ''">
+                AND c.status = #{searchStatus}
+            </if>
+            <if test="linkManIdentity != null and linkManIdentity != ''">
+                AND c.linkManIdentity = #{linkManIdentity}
+            </if>
+            <if test="clubDataIntegrity != null and clubDataIntegrity != ''">
+                AND c.status = #{clubDataIntegrity}
+            </if>
+        </where>
+        GROUP BY c.userID
+    </select>
 </mapper>

+ 2 - 1
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

@@ -50,7 +50,8 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/">机构机构基本资料列表</a></li>
+    <li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>

+ 156 - 85
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyStatisticsList.jsp

@@ -46,70 +46,119 @@
         #alertModal .alertModal-btn{width:260px;height:49px;padding:0 20px;border-top:1px solid #EBEBEB}
         #alertModal .alertModal-btn button{float:right;margin:5px}
         .acticer_span{display: inline-block;width: 14px;height: 14px;border-radius: 50%;box-sizing: border-box;border: 1px solid #999999;text-align: center;color: #333333;font-size: 12px;line-height: 14px;float: none;margin-left: 3px;}
+        /*#items{border-bottom: #0d0d0d 1px dashed}*/
     </style>
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li><a href="${ctx}/new/user/agency/">机构机构基本资料列表</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>
-<form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/new/user/agency/" method="post"
+<form:form id="searchForm" modelAttribute="statistics" action="${ctx}/new/user/agency/statisticsList" method="post"
            class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="flex-wrap">
-        <div class="item">
-            <label>注册时间:</label>
-            <form:input path="registerStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
-                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-            -
-            <form:input path="registerEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
-                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-        </div>
-        <div class="item">
-            <label>最近下单时间:</label>
-            <form:input path="searchStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
-                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-            -
-            <form:input path="searchEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
-                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        <div id="items" class="flex-wrap">
+            <div class="item">
+                <label>注册时间:</label>
+                <form:input path="registerStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${registerStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="registerEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${registerEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <div class="item">
+                <label>最近下单时间:</label>
+                <form:input path="searchStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${searchStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="searchEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${searchEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <label class="control-label">机构类型:</label>
+            <form:select path="customerValue" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="医美"/>
+                <form:option value="2" label="生美"/>
+                <form:option value="3" label="项目公司"/>
+                <form:option value="4" label="个人"/>
+                <form:option value="0" label="其他"/>
+            </form:select>
+            <div class="item">
+                <label>机构级别:</label>
+                <form:select path="searchUserIdentity" class="input-medium">
+                    <form:option value="" label="请选择"/>
+                    <form:option value="4" label="个人机构"/>
+                    <form:option value="2" label="资质机构"/>
+                    <form:option value="8" label="超级会员"/>
+                </form:select>
+            </div>
+            <div class="item">
+                <label> 状态:</label>
+                <form:select path="searchStatus" class="input-medium">
+                    <form:option value="" label="请选择"/>
+                    <form:options items="${fns:getDictList('club_status')}" itemLabel="label" itemValue="value"
+                                  htmlEscape="false"/>
+                </form:select>
+            </div>
+            <label class="control-label">联系人身份:</label>
+            <form:select path="linkManIdentity" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="老板"/>
+                <form:option value="2" label="采购"/>
+                <form:option value="3" label="运营"/>
+                <form:option value="4" label="其他"/>
+            </form:select>
+            <label class="control-label">资料完整度:</label>
+            <form:select path="clubDataIntegrity" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="20%至70%"/>
+                <form:option value="2" label="70%以上"/>
+            </form:select>
         </div>
-        <label class="control-label">机构类型:</label>
-        <form:select path="customerValue" class="input-medium">
-            <form:option value="" label="请选择"/>
-            <form:option value="1" label="医美"/>
-            <form:option value="2" label="生美"/>
-            <form:option value="3" label="项目公司"/>
-            <form:option value="4" label="个人"/>
-            <form:option value="0" label="其他"/>
-        </form:select>
-        <div class="item">
-            <label>机构级别:</label>
-            <form:select path="searchUserIdentity" class="input-medium">
+<%--        <span style="width: 100%; height: 0; border: #0d0d0d 1px dashed;"/><br/>--%>
+        <div class="flex-wrap">
+            <label class="control-label">近一个月购买额:</label>
+            <form:select path="payTotalMonth" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="小于1万"/>
+                <form:option value="2" label="1万至10万"/>
+                <form:option value="3" label="10万至100万"/>
+                <form:option value="4" label="大于100万"/>
+            </form:select>
+            <label class="control-label">近一个年购买额:</label>
+            <form:select path="payTotalYear" class="input-medium">
                 <form:option value="" label="请选择"/>
-                <form:option value="4" label="个人机构"/>
-                <form:option value="2" label="资质机构"/>
-                <form:option value="8" label="超级会员"/>
+                <form:option value="1" label="小于1万"/>
+                <form:option value="2" label="1万至10万"/>
+                <form:option value="3" label="10万至100万"/>
+                <form:option value="4" label="大于100万"/>
+            </form:select>
+            <div class="item">
+                <label>自定义统计时间:</label>
+                <form:input path="customStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${customStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="customEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${customEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <label class="control-label">总购买额:</label>
+            <form:select path="payTotal" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="小于1万"/>
+                <form:option value="2" label="1万至10万"/>
+                <form:option value="3" label="10万至100万"/>
+                <form:option value="4" label="大于100万"/>
             </form:select>
         </div>
-
-        <label class="control-label">客户价值:</label>
-        <form:select path="customerValue" class="input-medium">
-            <form:option value="" label="请选择"/>
-            <form:option value="一般保持客户" label="一般保持客户"/>
-            <form:option value="一般发展客户" label="一般发展客户"/>
-            <form:option value="一般价值客户" label="一般价值客户"/>
-            <form:option value="一般挽留客户" label="一般挽留客户"/>
-            <form:option value="重要保持客户" label="重要保持客户"/>
-            <form:option value="重要发展客户" label="重要发展客户"/>
-            <form:option value="重要价值客户" label="重要价值客户"/>
-            <form:option value="重要挽留客户" label="重要挽留客户"/>
-        </form:select>
-
         <div class="item">
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+            <input id="export" class="btn btn-primary" type="button" value="导出"/>
         </div>
+
     </div>
 </form:form>
 <sys:message content="${message}"/>
@@ -119,78 +168,100 @@
         <th>机构ID</th>
         <th>机构名称</th>
         <th>联系人</th>
+        <th>联系人身份</th>
         <th>手机号</th>
         <th>协销人员</th>
         <th>状态</th>
         <th>机构类别</th>
+        <th>机构级别</th>
+        <th>资料完整度</th>
         <th>注册时间</th>
+        <th>近一个月订单数</th>
+        <th>近一个年订单数</th>
+        <th>近一个月购买额</th>
+        <th>近一个年购买额</th>
+        <th>总购买额</th>
+        <th>最常搜索词</th>
+        <th>最近下单时间</th>
         <th>操作</th>
     </tr>
     </thead>
     <tbody>
-    <c:forEach items="${page.list}" var="newCmClubList">
+    <c:forEach items="${page.list}" var="clubList">
         <tr>
-            <td>${newCmClubList.clubID}</td>
+            <td>${clubList.clubID}</td>
             <td>
-                ${newCmClubList.name}
+                ${clubList.name}
             </td>
             <td>
-                    ${newCmClubList.userName}
+                    ${clubList.linkMan}
             </td>
-
             <td>
-                    ${newCmClubList.bindMobile}
+                <c:if test="${clubList.linkManStatus ne null}">
+                    ${clubList.linkManStatus}
+                </c:if>
+                <c:if test="${clubList.linkManStatus eq null}">
+                    ---
+                </c:if>
             </td>
             <td>
-                    ${newCmClubList.spName}
+                    ${clubList.contractMobile}
             </td>
             <td>
-                <c:choose>
-                    <c:when test="${newCmClubList.status eq 90}">
-                        <font color="green">已上线</font>
-                        &nbsp;&nbsp;<a href="${ctx}/new/user/agency/offline?id=${newCmClubList.clubID}&searchName=${newCmClub.searchName}&searchUserName=${newCmClub.searchUserName}&searchBindMobile=${newCmClub.searchBindMobile}&searchEmail=${newCmClub.searchEmail}&searchUserOrganizeID=${newCmClub.searchUserOrganizeID}&searchStatus=${newCmClub.searchStatus}&searchUserIdentity=${newCmClub.searchUserIdentity}&searchStartTime=${newCmClub.searchStartTime}&searchEndTime=${newCmClub.searchEndTime}" onclick="return confirmx('确定下线该会所吗?', this.href)" style="text-decoration:underline;">下线</a>
-                        <%--                        </c:if>--%>
-                    </c:when>
-                    <c:when test="${newCmClubList.status eq 91}">
-                        <font color="red">已下线</font>
-                        <%--                        <c:if test="${newCmClubList.userOrganizeID eq null or newCmClubList.userOrganizeID eq 0}">--%>
-                        &nbsp;&nbsp;<a href="${ctx}/new/user/agency/online?id=${newCmClubList.clubID}&searchName=${newCmClub.searchName}&searchUserName=${newCmClub.searchUserName}&searchBindMobile=${newCmClub.searchBindMobile}&searchEmail=${newCmClub.searchEmail}&searchUserOrganizeID=${newCmClub.searchUserOrganizeID}&searchStatus=${newCmClub.searchStatus}&searchUserIdentity=${newCmClub.searchUserIdentity}&searchStartTime=${newCmClub.searchStartTime}&searchEndTime=${newCmClub.searchEndTime}" onclick="return confirmx('确定上线该会所吗?', this.href)" style="text-decoration:underline;">上线</a>
-                        <%--                        </c:if>--%>
-                    </c:when>
-                    <c:when test="${newCmClubList.status eq 92}">
-                        <a href="JavaScript:;" onclick="return alertx('不通过原因:${newCmClubList.auditNote}')"
-                           style="text-decoration:underline;"><font color="red">审核未通过</font></a>
-                    </c:when>
-                    <c:when test="${newCmClubList.status eq 93}">
-                        <font color="#BF826C">已确认</font>
-                    </c:when>
-                    <c:when test="${newCmClubList.status eq 94}">
-                        <font color="red">已冻结</font>
-                    </c:when>
-                    <c:otherwise>
-                        ${fns:getDictLabel(newCmClubList.status, 'club_status', newCmClubList.status)}
-                    </c:otherwise>
-                </c:choose>
+                    ${clubList.spName}
             </td>
+            <td>${clubList.clubStatus}</td>
             <td>
-                <c:if test="${newCmClubList.userIdentity eq 4}">
+                <c:if test="${clubList.firstClubType != null || clubList.firstClubType != ''}">
+                    ${clubList.firstClubType}
+                </c:if>
+                <c:if test="${clubList.classify != null || clubList.classify != '' || clubList.classify ne null}">
+                   - ${clubList.classify}
+                </c:if>
+                <c:if test="${clubList.firstClubType == null and clubList.firstClubType == '' and clubList.classify == null and clubList.classify == ''}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${clubList.userIdentity eq 4}">
                     个人机构
                 </c:if>
-                <c:if test="${newCmClubList.userIdentity eq 2}">
+                <c:if test="${clubList.userIdentity eq 2}">
                     资质机构
                 </c:if>
-                <c:if test="${newCmClubList.svipUserFlag eq 1}">
+                <c:if test="${clubList.svipUserFlag eq 1}">
                     <font color="red">(超级会员)</font>
                 </c:if>
-                <c:if test="${newCmClubList.userIdentity eq 2 and newCmClubList.svipUserFlag eq 0}">
+                <c:if test="${clubList.userIdentity eq 2 and clubList.svipUserFlag eq 0}">
                     <font color="red">(普通会员)</font>
                 </c:if>
             </td>
+            <td>${clubList.clubDataIntegrity}</td>
             <td>
-                <fmt:formatDate value="${newCmClubList.registerTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
+                <c:if test="${clubList.addTime != null || clubList.addTime != '' || clubList.addTime ne null}">
+                    ${clubList.addTime}
+                    <%--<fmt:formatDate value="${clubList.addTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>--%>
+                </c:if>
+                <c:if test="${clubList.addTime == null || clubList.addTime == '' || clubList.addTime eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>${clubList.orderCountMonth}</td>
+            <td>${clubList.orderCountYear}</td>
+            <td>${clubList.payTotalMonth}</td>
+            <td>${clubList.payTotalYear}</td>
+            <td>${clubList.payTotal}</td>
+            <td>
+                <c:if test="${clubList.pageLabel ne null}">
+                    ${clubList.pageLabel}
+                </c:if>
+                <c:if test="${clubList.pageLabel eq null}">
+                    ---
+                </c:if>
             </td>
+            <td>${clubList.lastOrderTime}</td>
             <td>
-                <a href="${ctx}/new/user/agency/clubPortrait?clubID=${newCmClubList.clubID}&clubName=${newCmClubList.name}&dateType=0&type=4">查看详情</a>
+                <a href="${ctx}/new/user/agency/clubPortrait?clubID=${clubList.clubID}&clubName=${clubList.name}&dateType=0&type=4">查看详情</a>
             </td>
         </tr>
     </c:forEach>