فهرست منبع

Merge remote-tracking branch 'origin/developerD' into developer

huangzhiguo 1 سال پیش
والد
کامیت
92f0e8c6e2
38فایلهای تغییر یافته به همراه1529 افزوده شده و 88 حذف شده
  1. 5 1
      src/main/java/com/caimei/modules/newhome/dao/NewPageFirstNavigationDao.java
  2. 2 2
      src/main/java/com/caimei/modules/newhome/entity/NewPageFirstNavigation.java
  3. 7 1
      src/main/java/com/caimei/modules/newhome/service/NewPageFirstNavigationService.java
  4. 34 10
      src/main/java/com/caimei/modules/newhome/web/NewPageFirstNavigationController.java
  5. 10 4
      src/main/java/com/caimei/modules/user/dao/CmPortraitDao.java
  6. 2 0
      src/main/java/com/caimei/modules/user/dao/CmSpDao.java
  7. 4 0
      src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java
  8. 366 0
      src/main/java/com/caimei/modules/user/entity/ActiveClub.java
  9. 2 2
      src/main/java/com/caimei/modules/user/entity/ClubData.java
  10. 103 0
      src/main/java/com/caimei/modules/user/entity/CmClubLabel.java
  11. 21 1
      src/main/java/com/caimei/modules/user/entity/CmClubSales.java
  12. 36 0
      src/main/java/com/caimei/modules/user/entity/NewCmClub.java
  13. 39 13
      src/main/java/com/caimei/modules/user/service/ClubPortraitService.java
  14. 20 0
      src/main/java/com/caimei/modules/user/service/NewCmClubService.java
  15. 35 0
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  16. 20 0
      src/main/java/com/caimei/modules/user/web/newUser/SpController.java
  17. 12 0
      src/main/resources/mappings/modules/newhome/NewPageFirstNavigationMapper.xml
  18. 15 4
      src/main/resources/mappings/modules/user/CmPortraitMapper.xml
  19. 10 0
      src/main/resources/mappings/modules/user/CmSpMapper.xml
  20. 142 0
      src/main/resources/mappings/modules/user/NewCmClubMapper.xml
  21. 21 11
      src/main/webapp/WEB-INF/views/modules/newhome/newPageFirstNavigationForm.jsp
  22. 32 24
      src/main/webapp/WEB-INF/views/modules/newhome/newPageFirstNavigationList.jsp
  23. 1 1
      src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageForm.jsp
  24. 1 1
      src/main/webapp/WEB-INF/views/modules/serviceteam/cmServiceteamRoleForm.jsp
  25. 1 1
      src/main/webapp/WEB-INF/views/modules/user/clubTemporaryList.jsp
  26. 1 1
      src/main/webapp/WEB-INF/views/modules/user/cmDistributionClubList.jsp
  27. 1 1
      src/main/webapp/WEB-INF/views/modules/user/cmOperationalLogs.jsp
  28. 448 0
      src/main/webapp/WEB-INF/views/modules/userNew/activeClubInfoList.jsp
  29. 24 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp
  30. 1 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyStatisticsList.jsp
  31. 15 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmClubSales.jsp
  32. 1 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmSpClubTrackList.jsp
  33. 12 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmSpList.jsp
  34. 3 2
      src/main/webapp/WEB-INF/views/modules/userNew/cmSpLivelyClubFrom.jsp
  35. 1 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmSpLivelyClubList.jsp
  36. 7 1
      src/main/webapp/static/modules/cmClubSales/cmClubSales.css
  37. 1 0
      src/main/webapp/static/modules/cmClubSales/cmClubSales.js
  38. 73 1
      src/main/webapp/static/modules/cmClubSales/cmClubSalesEachs.js

+ 5 - 1
src/main/java/com/caimei/modules/newhome/dao/NewPageFirstNavigationDao.java

@@ -5,6 +5,8 @@ import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.newhome.entity.NewPageFirstNavigation;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * 新首页一级导航栏DAO接口
  *
@@ -15,4 +17,6 @@ import org.apache.ibatis.annotations.Param;
 public interface NewPageFirstNavigationDao extends CrudDao<NewPageFirstNavigation> {
 
     void saveSort(@Param("sort") String sort, @Param("id") String id);
-}
+
+    List<Integer> getEnableNumber(@Param("www") String www, @Param("crm") String crm);
+}

+ 2 - 2
src/main/java/com/caimei/modules/newhome/entity/NewPageFirstNavigation.java

@@ -22,7 +22,7 @@ public class NewPageFirstNavigation extends DataEntity<NewPageFirstNavigation> {
     private String navigationName;
 
     /**
-     * 一级导航栏类型 0启用二级导航跳转 1启用链接跳转(已废弃)
+     * 一级导航栏类型 0启用二级导航跳转 1启用链接跳转(已废弃) 2 快捷运营
      */
     private String type;
 
@@ -72,7 +72,7 @@ public class NewPageFirstNavigation extends DataEntity<NewPageFirstNavigation> {
     }
 
     public Date getEndPvCreateTime() {
-        
+
         return endPvCreateTime;
     }
 

+ 7 - 1
src/main/java/com/caimei/modules/newhome/service/NewPageFirstNavigationService.java

@@ -58,4 +58,10 @@ public class NewPageFirstNavigationService extends CrudService<NewPageFirstNavig
     public void saveSort(String sort, String id) {
         newPageFirstNavigationDao.saveSort(sort, id);
     }
-}
+
+    @Transactional(readOnly = false)
+    public Integer getNumber(String www, String crm) {
+        List<Integer> enableNumber = newPageFirstNavigationDao.getEnableNumber(www, crm);
+        return null == enableNumber ? 0 : enableNumber.size();
+    }
+}

+ 34 - 10
src/main/java/com/caimei/modules/newhome/web/NewPageFirstNavigationController.java

@@ -70,15 +70,19 @@ public class NewPageFirstNavigationController extends BaseController {
         }
         newPageFirstNavigation.setStatisticsType("4");
         Page<NewPageFirstNavigation> page = newPageFirstNavigationService.findPage(new Page<NewPageFirstNavigation>(request, response), newPageFirstNavigation);
+        Integer number = newPageFirstNavigationService.getNumber("www", null);
         model.addAttribute("page", page);
         model.addAttribute("newPageFirstNavigation", newPageFirstNavigation);
+        model.addAttribute("number", number);
         return "modules/newhome/newPageFirstNavigationList";
     }
 
     @RequiresPermissions("newhome:newPageFirstNavigation:view")
     @RequestMapping(value = "form")
     public String form(NewPageFirstNavigation newPageFirstNavigation, Model model) {
+        Integer number = newPageFirstNavigationService.getNumber("www", null);
         model.addAttribute("newPageFirstNavigation", newPageFirstNavigation);
+        model.addAttribute("number", number);
         return "modules/newhome/newPageFirstNavigationForm";
     }
 
@@ -88,8 +92,8 @@ public class NewPageFirstNavigationController extends BaseController {
         if (!beanValidator(model, newPageFirstNavigation)) {
             return form(newPageFirstNavigation, model);
         }
-        //判断如果已经存在10条数据则不允许添加(产品控制数量显示)
-        NewPageFirstNavigation navigation = new NewPageFirstNavigation();
+        // 判断如果已经存在10条数据则不允许添加(产品控制数量显示)
+        /*NewPageFirstNavigation navigation = new NewPageFirstNavigation();
         navigation.setType(newPageFirstNavigation.getType());
         List<NewPageFirstNavigation> list = newPageFirstNavigationService.findList(navigation);
         if (StringUtils.isEmpty(newPageFirstNavigation.getId())) {
@@ -97,11 +101,19 @@ public class NewPageFirstNavigationController extends BaseController {
                 addMessage(model, "最多添加10个主菜单!删除旧菜单后才能继续添加");
                 return form(newPageFirstNavigation, model);
             }
+        }*/
+        Integer number = newPageFirstNavigationService.getNumber("www", null);
+        if (!"2".equals(newPageFirstNavigation.getType()) && null != number && number >= 8 && "1".equals(newPageFirstNavigation.getWwwEnabledStatus())) {
+            addMessage(redirectAttributes, "网站端最多只能启用8个菜单,请停用其他菜单后再重新添加");
+            model.addAttribute("message", "网站端最多只能启用8个菜单,请停用其他菜单后再重新添加");
+            return form(newPageFirstNavigation, model);
+        }
+        // 上传图片
+        if ("2".equals(newPageFirstNavigation.getType())) {
+            String image = newPageFirstNavigation.getIcon();
+            image = UploadPicUtils.saveImageToServer(image);
+            newPageFirstNavigation.setIcon(image);
         }
-        //上传图片
-        String image = newPageFirstNavigation.getIcon();
-        image = UploadPicUtils.saveImageToServer(image);
-        newPageFirstNavigation.setIcon(image);
         if (StringUtils.isEmpty(newPageFirstNavigation.getId())) {
             newPageFirstNavigation.setCreateDate(new Date());
             newPageFirstNavigationService.insert(newPageFirstNavigation);
@@ -130,12 +142,24 @@ public class NewPageFirstNavigationController extends BaseController {
     @RequiresPermissions("newhome:newPageFirstNavigation:edit")
     @ResponseBody
     @RequestMapping(value = "updateEnabledStatus")
-    public Map<String, Object> updateEnabledStatus(String enabledStatus, String[] ids, String www, String[] supplierIDs, HttpServletRequest request, HttpServletResponse response) {
+    public Map<String, Object> updateEnabledStatus(String enabledStatus, String[] ids, String www, String type, String[] supplierIDs, HttpServletRequest request, HttpServletResponse response) {
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
-            newPageFirstNavigationService.updateEnabledStatusByIds(enabledStatus, ids);
-            map.put("success", true);
-            map.put("msg", "修改成功");
+            Integer number = newPageFirstNavigationService.getNumber(www, null);
+            if ("0".equals(enabledStatus)) {
+                newPageFirstNavigationService.updateEnabledStatusByIds(enabledStatus, ids);
+                map.put("success", true);
+                map.put("msg", "修改成功");
+            } else {
+                if (("0".equals(type) && null != number && number < 8) || "2".equals(type)) {
+                    newPageFirstNavigationService.updateEnabledStatusByIds(enabledStatus, ids);
+                    map.put("success", true);
+                    map.put("msg", "修改成功");
+                } else {
+                    map.put("success", false);
+                    map.put("msg", "网站端最多只能启用8个菜单,请停用其他菜单后再重新启用本菜单。");
+                }
+            }
             cleanRedisCache();// 清理缓存
         } catch (Exception e) {
             logger.debug(e.toString(), e);

+ 10 - 4
src/main/java/com/caimei/modules/user/dao/CmPortraitDao.java

@@ -44,7 +44,7 @@ public interface CmPortraitDao extends CrudDao<CmPortrait> {
      * @param clubSales
      * @return
      */
-    List<clubData> getNewClubInfo(CmClubSales clubSales);
+    List<ClubData> getNewClubInfo(CmClubSales clubSales);
 
     /**
      * 新注册机构Id
@@ -57,14 +57,14 @@ public interface CmPortraitDao extends CrudDao<CmPortrait> {
      * @param clubSales
      * @return
      */
-    List<clubData> getClubRemark(CmClubSales clubSales);
+    List<ClubData> getClubRemark(CmClubSales clubSales);
 
     /**
      * 游客咨询记录
      * @param clubSales
      * @return
      */
-    List<clubData> getClubVisitorRemark(CmClubSales clubSales);
+    List<ClubData> getClubVisitorRemark(CmClubSales clubSales);
 
     /**
      * 用户活跃信息日期
@@ -76,5 +76,11 @@ public interface CmPortraitDao extends CrudDao<CmPortrait> {
      * 日期下用户活跃费分类数据
      * @return
      */
-    List<clubData> getActiveInfo(@Param("time") String time, @Param("serviceProviderId") Integer serviceProviderId);
+    List<ClubData> getActiveInfo(@Param("time") String time, @Param("serviceProviderId") Integer serviceProviderId);
+
+    /**
+     * 机构活跃信息
+     * @return
+     */
+    List<ClubData> getClubActive();
 }

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

@@ -34,4 +34,6 @@ public interface CmSpDao extends CrudDao<NewCmSp> {
     void deleteManager();
 
     NewCmSp findManagerInfo();
+
+    List<Map<String, Object>> getSpClubActive(@Param("serviceProviderID") Integer serviceProviderID);
 }

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

@@ -32,6 +32,8 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
 
     List<ServiceProviderModel> spNameList();
 
+    List<CmClubLabel> getClubLabel();
+
     void insertBeansHistory(UserBeansHistory beansHistory);
     List<CmClubRemarks> findRemarksList(CmClubRemarks cmClubRemarks);
 
@@ -97,4 +99,6 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
     List<easyExcel> findExcelList(ClubStatistics statistics);
 
     List<String> getClubIds();
+
+    List<ActiveClub> getActiveClubInfo(ActiveClub activeClub);
 }

+ 366 - 0
src/main/java/com/caimei/modules/user/entity/ActiveClub.java

@@ -0,0 +1,366 @@
+package com.caimei.modules.user.entity;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * Description
+ *
+ * @author : hzg
+ * @date : 2023/12/29
+ */
+public class ActiveClub  extends DataEntity<ActiveClub> {
+    private Integer userID; // 用户Id
+    private Integer clubID; // 机构Id
+    private String registerStartTime; // 注册开始时间
+    private String registerEndTime; // 注册结束时间
+    private String behaviorStartTime; // 最近访问时间开始时间
+    private String behaviorEndTime; // 最近访问时间结束时间
+    private String recentlyStartTime; // 最近咨询时间开始时间
+    private String recentlyEndTime; // 最近咨询时间结束时间
+    private String orderStartTime; // 最近下单时间开始时间
+    private String orderEndTime; // 最近下单时间结束时间
+    private Integer orderByType; // 排序方式 最近访问时间 0  降序 1 升序
+    // 省
+    private String provinceID;
+    // 市
+    private String cityID;
+
+    private String province;
+    private String city;
+    private String town;
+    private String name;    // 机构名称
+    private String linkMan; //联系人
+    private String contractMobile;  //联系手机
+    private String linkManIdentity; //联系人身份:1老板,2采购,3运营,4其他
+    private Integer spID;   // 协销Id
+    private String spName;      //协销人员
+    private String address;         //详细地址
+    private String userIdentity;    //用户身份
+    private String sname;   //机构简称
+    private String linkManStatus;   //联系人身份
+    private String clubStatus;  // 机构状态
+    private String clubRank;  // 机构级别
+    private String firstClubType;  // 机构一级分类
+    private String classify;  // 机构二级分类
+    private String addTime;  // 注册时间
+    private String svipUserFlag;  // vip类别
+    private String activeStatus;     // 活跃状态 0:活跃、1:不活跃
+    private String activeState;     // 活跃状态
+    private String customerValues;   // 客户价值
+    private String registerTime;    // 注册时间
+    private String behaviorTime;    // 最近访问时间
+    private String lastOrderTime;  // 最近下单时间
+    private String recentlyTime;    //最近咨询时间
+
+    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 getBehaviorStartTime() {
+        return behaviorStartTime;
+    }
+
+    public void setBehaviorStartTime(String behaviorStartTime) {
+        this.behaviorStartTime = behaviorStartTime;
+    }
+
+    public String getBehaviorEndTime() {
+        return behaviorEndTime;
+    }
+
+    public void setBehaviorEndTime(String behaviorEndTime) {
+        this.behaviorEndTime = behaviorEndTime;
+    }
+
+    public String getRecentlyStartTime() {
+        return recentlyStartTime;
+    }
+
+    public void setRecentlyStartTime(String recentlyStartTime) {
+        this.recentlyStartTime = recentlyStartTime;
+    }
+
+    public String getRecentlyEndTime() {
+        return recentlyEndTime;
+    }
+
+    public void setRecentlyEndTime(String recentlyEndTime) {
+        this.recentlyEndTime = recentlyEndTime;
+    }
+
+    public String getOrderStartTime() {
+        return orderStartTime;
+    }
+
+    public void setOrderStartTime(String orderStartTime) {
+        this.orderStartTime = orderStartTime;
+    }
+
+    public String getOrderEndTime() {
+        return orderEndTime;
+    }
+
+    public void setOrderEndTime(String orderEndTime) {
+        this.orderEndTime = orderEndTime;
+    }
+
+    public Integer getOrderByType() {
+        return orderByType;
+    }
+
+    public void setOrderByType(Integer orderByType) {
+        this.orderByType = orderByType;
+    }
+
+    public String getProvinceID() {
+        return provinceID;
+    }
+
+    public void setProvinceID(String provinceID) {
+        this.provinceID = provinceID;
+    }
+
+    public String getCityID() {
+        return cityID;
+    }
+
+    public void setCityID(String cityID) {
+        this.cityID = cityID;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getTown() {
+        return town;
+    }
+
+    public void setTown(String town) {
+        this.town = town;
+    }
+
+    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 Integer getSpID() {
+        return spID;
+    }
+
+    public void setSpID(Integer spID) {
+        this.spID = spID;
+    }
+
+    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 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 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 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 getActiveStatus() {
+        return activeStatus;
+    }
+
+    public void setActiveStatus(String activeStatus) {
+        this.activeStatus = activeStatus;
+    }
+
+    public String getActiveState() {
+        return activeState;
+    }
+
+    public void setActiveState(String activeState) {
+        this.activeState = activeState;
+    }
+
+    public String getCustomerValues() {
+        return customerValues;
+    }
+
+    public void setCustomerValues(String customerValues) {
+        this.customerValues = customerValues;
+    }
+
+    public String getRegisterTime() {
+        return registerTime;
+    }
+
+    public void setRegisterTime(String registerTime) {
+        this.registerTime = registerTime;
+    }
+
+    public String getBehaviorTime() {
+        return behaviorTime;
+    }
+
+    public void setBehaviorTime(String behaviorTime) {
+        this.behaviorTime = behaviorTime;
+    }
+
+    public String getLastOrderTime() {
+        return lastOrderTime;
+    }
+
+    public void setLastOrderTime(String lastOrderTime) {
+        this.lastOrderTime = lastOrderTime;
+    }
+
+    public String getRecentlyTime() {
+        return recentlyTime;
+    }
+
+    public void setRecentlyTime(String recentlyTime) {
+        this.recentlyTime = recentlyTime;
+    }
+}

+ 2 - 2
src/main/java/com/caimei/modules/user/entity/clubData.java → src/main/java/com/caimei/modules/user/entity/ClubData.java

@@ -6,7 +6,7 @@ package com.caimei.modules.user.entity;
  * @author : hzg
  * @date : 2023/11/27
  */
-public class clubData {
+public class ClubData {
     /**
      * 机构id
      */
@@ -20,7 +20,7 @@ public class clubData {
      */
     private Integer number;
     /**
-     * activeStatus
+     * 活跃状态 0:活跃、1:不活跃
      */
     private Integer activeStatus;
 

+ 103 - 0
src/main/java/com/caimei/modules/user/entity/CmClubLabel.java

@@ -0,0 +1,103 @@
+package com.caimei.modules.user.entity;
+
+/**
+ * Description
+ *
+ * @author : hzg
+ * @date : 2024/1/3
+ */
+public class CmClubLabel {
+    private Integer id;
+    /**
+     * 机构Id
+     */
+    private Integer clubId;
+    /**
+     * 关键词
+     */
+    private String label;
+    /**
+     * 页面类型
+     */
+    private Integer pageType;
+    /**
+     * 0:动态标签;1:静态标签
+     */
+    private Integer dynamicStatus;
+    /**
+     * 出现次数
+     */
+    private Integer appearNumber;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+    /**
+     * 删除标记
+     */
+    private Integer delFlag;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getClubId() {
+        return clubId;
+    }
+
+    public void setClubId(Integer clubId) {
+        this.clubId = clubId;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public Integer getPageType() {
+        return pageType;
+    }
+
+    public void setPageType(Integer pageType) {
+        this.pageType = pageType;
+    }
+
+    public Integer getDynamicStatus() {
+        return dynamicStatus;
+    }
+
+    public void setDynamicStatus(Integer dynamicStatus) {
+        this.dynamicStatus = dynamicStatus;
+    }
+
+    public Integer getAppearNumber() {
+        return appearNumber;
+    }
+
+    public void setAppearNumber(Integer appearNumber) {
+        this.appearNumber = appearNumber;
+    }
+
+    public String getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(String addTime) {
+        this.addTime = addTime;
+    }
+
+    public Integer getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Integer delFlag) {
+        this.delFlag = delFlag;
+    }
+}

+ 21 - 1
src/main/java/com/caimei/modules/user/entity/CmClubSales.java

@@ -14,7 +14,7 @@ public class CmClubSales {
     private Integer spID;
     // 日期类别 1日 2月 3半年 4全年
     private Integer dateType;
-    // 数据类型 0新注册机构统计 1机构咨询记录统计 2机构活跃趋势 3初始状态
+    // 数据类型 0新注册机构统计、1机构咨询记录统计、2机构活跃趋势、3机构活跃占比、4初始状态
     private Integer type;
     // 开始时间
     private String startTime;
@@ -22,6 +22,10 @@ public class CmClubSales {
     private String endTime;
     // 值 name - value
     private ArrayList<OrderPortrait> portrait;
+    // 机构活跃总数
+    private Integer clubProportionTotal;
+    // 机构活跃
+    private ArrayList<OrderPortrait> clubProportion;
     // 机构咨询记录内圈数据
     private ArrayList<OrderPortrait> internalPortrait;
     // 新注册机构总数量
@@ -84,6 +88,22 @@ public class CmClubSales {
         this.portrait = portrait;
     }
 
+    public Integer getClubProportionTotal() {
+        return clubProportionTotal;
+    }
+
+    public void setClubProportionTotal(Integer clubProportionTotal) {
+        this.clubProportionTotal = clubProportionTotal;
+    }
+
+    public ArrayList<OrderPortrait> getClubProportion() {
+        return clubProportion;
+    }
+
+    public void setClubProportion(ArrayList<OrderPortrait> clubProportion) {
+        this.clubProportion = clubProportion;
+    }
+
     public ArrayList<OrderPortrait> getInternalPortrait() {
         return internalPortrait;
     }

+ 36 - 0
src/main/java/com/caimei/modules/user/entity/NewCmClub.java

@@ -100,6 +100,10 @@ public class NewCmClub extends DataEntity<NewCmClub> {
     private Integer newDeal;//新分配机构状态 0.否,1.是
     private String allocationStartTime; // 开始分配时间
     private String allocationEndTime; // 开始分配时间
+    private String trendsLabel;   // 动态标签
+    private String stateLabel;   // 静态标签
+    private String labelStartTime;  // 需求跨度开始时间
+    private String labelEndTime;    // 需求跨度结束时间
 
     public Date getProviderTime() {
         return providerTime;
@@ -712,4 +716,36 @@ public class NewCmClub extends DataEntity<NewCmClub> {
     public void setAllocationEndTime(String allocationEndTime) {
         this.allocationEndTime = allocationEndTime;
     }
+
+    public String getTrendsLabel() {
+        return trendsLabel;
+    }
+
+    public void setTrendsLabel(String trendsLabel) {
+        this.trendsLabel = trendsLabel;
+    }
+
+    public String getStateLabel() {
+        return stateLabel;
+    }
+
+    public void setStateLabel(String stateLabel) {
+        this.stateLabel = stateLabel;
+    }
+
+    public String getLabelStartTime() {
+        return labelStartTime;
+    }
+
+    public void setLabelStartTime(String labelStartTime) {
+        this.labelStartTime = labelStartTime;
+    }
+
+    public String getLabelEndTime() {
+        return labelEndTime;
+    }
+
+    public void setLabelEndTime(String labelEndTime) {
+        this.labelEndTime = labelEndTime;
+    }
 }

+ 39 - 13
src/main/java/com/caimei/modules/user/service/ClubPortraitService.java

@@ -6,10 +6,10 @@ import com.caimei.modules.user.entity.*;
 import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.utils.ObjectUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.text.DecimalFormat;
 import java.text.NumberFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -560,17 +560,17 @@ public class ClubPortraitService {
             e.printStackTrace();
         }
         // 新注册机构
-        if (0 == clubSales.getType() || 3 == clubSales.getType()) {
+        if (0 == clubSales.getType() || 4 == clubSales.getType()) {
 
             int spClub = 0, unSpClub = 0;
             ArrayList<OrderPortrait> orderPortraits = new ArrayList<>();
             OrderPortrait orderPortrait = new OrderPortrait();
-            List<clubData> clubList = cmPortraitDao.getNewClubInfo(clubSales);
+            List<ClubData> clubList = cmPortraitDao.getNewClubInfo(clubSales);
             int length = clubList.size();
             NumberFormat instance = NumberFormat.getInstance();
             instance.setMaximumFractionDigits(2);
             if (length != 0) {
-                for (clubData club : clubList) {
+                for (ClubData club : clubList) {
                     if ( null == club.getSpID() || 1342 == club.getSpID()) {
                         // 未分配协销结构与
                         unSpClub++;
@@ -605,11 +605,11 @@ public class ClubPortraitService {
             clubSales.setEndTime(endTime);
         }
         // 机构咨询记录
-        if (1 == clubSales.getType() || 3 == clubSales.getType()) {
+        if (1 == clubSales.getType() || 4 == clubSales.getType()) {
             // 机构咨询记录
-            List<clubData> clubRemark = cmPortraitDao.getClubRemark(clubSales);
+            List<ClubData> clubRemark = cmPortraitDao.getClubRemark(clubSales);
             // 游客咨询记录
-            List<clubData> clubVisitorRemark = cmPortraitDao.getClubVisitorRemark(clubSales);
+            List<ClubData> clubVisitorRemark = cmPortraitDao.getClubVisitorRemark(clubSales);
             // 新注册机构
             List<Integer> clubIdList = cmPortraitDao.getNewClubId(clubSales);
             int total = 0;
@@ -625,7 +625,7 @@ public class ClubPortraitService {
                 int fillClub = 0, fillRemark = 0 ;
                 // 未填写过机构数、咨询记录数
                 int unFillClub = 0;
-                for (clubData remark : clubRemark) {
+                for (ClubData remark : clubRemark) {
                     total += remark.getNumber();
                     clubRemarkNumber += remark.getNumber();
                     for (Integer clubId : clubIdList) {
@@ -657,7 +657,7 @@ public class ClubPortraitService {
                 orderPortrait = new OrderPortrait();
             }
             if (clubVisitorRemark.size() != 0) {
-                for (clubData tourist : clubVisitorRemark) {
+                for (ClubData tourist : clubVisitorRemark) {
                     total += tourist.getNumber();
                     touristRemarkNumber += tourist.getNumber();
                 }
@@ -682,7 +682,7 @@ public class ClubPortraitService {
             clubSales.setPortrait(orderPortraits);
         }
         // 机构活跃
-        if (2 == clubSales.getType() || 3 == clubSales.getType()) {
+        if (2 == clubSales.getType() || 4 == clubSales.getType()) {
             if (expty) {
                 // 默认前一周
                 calendar.setTime(date);
@@ -704,17 +704,17 @@ public class ClubPortraitService {
             for (String activeDate : activeDateList) {
                 names.add(activeDate);
                 // 该天用户活跃数据
-                List<clubData> activeInfo = cmPortraitDao.getActiveInfo(activeDate, clubSales.getSpID());
+                List<ClubData> activeInfo = cmPortraitDao.getActiveInfo(activeDate, clubSales.getSpID());
                 Integer activeNumber = 0;
                 Integer unActiveNumber = 0;
                 if (null != activeInfo && activeInfo.size() > 0) {
                     // 活跃数据
-                    List<clubData> activeClubList = activeInfo.stream().filter(ac -> ac.getActiveStatus().equals(0)).collect(Collectors.toList());
+                    List<ClubData> activeClubList = activeInfo.stream().filter(ac -> ac.getActiveStatus().equals(0)).collect(Collectors.toList());
                     if (null != activeClubList && activeClubList.size() > 0) {
                         activeNumber = activeClubList.get(0).getNumber();
                     }
                     // 不活跃数据
-                    List<clubData> unActiveClubList = activeInfo.stream().filter(ac -> ac.getActiveStatus().equals(1)).collect(Collectors.toList());
+                    List<ClubData> unActiveClubList = activeInfo.stream().filter(ac -> ac.getActiveStatus().equals(1)).collect(Collectors.toList());
                     if (null != unActiveClubList && unActiveClubList.size() > 0) {
                         unActiveNumber = unActiveClubList.get(0).getNumber();
                     }
@@ -726,6 +726,32 @@ public class ClubPortraitService {
             clubSales.setValues(active);
             clubSales.setValues1(unActive);
         }
+        // 机构活跃占比
+        if (3 == clubSales.getType() || 4 == clubSales.getType()) {
+            ArrayList<OrderPortrait> orderPortraits = new ArrayList<>();
+            OrderPortrait orderPortrait = new OrderPortrait();
+            List<ClubData> clubActive = cmPortraitDao.getClubActive();
+            int active = 0, unActive = 0, max = 0;
+            for (ClubData clubData : clubActive) {
+                max += clubData.getNumber();
+                if (0 == clubData.getActiveStatus()) {
+                    active += clubData.getNumber();
+                } else {
+                    unActive += clubData.getNumber();
+                }
+            }
+            // 格式化,去除小数点后位数
+            DecimalFormat df = new DecimalFormat("#");
+            orderPortrait.setName("活跃机构 " + df.format(MathUtil.mul(MathUtil.div(active, max), 100, 2).doubleValue()) + "% " + active + "  个");
+            orderPortrait.setValue(active);
+            orderPortraits.add(orderPortrait);
+            orderPortrait = new OrderPortrait();
+            orderPortrait.setName("不活跃机构 " + df.format(MathUtil.mul(MathUtil.div(unActive, max), 100, 2).doubleValue()) + "% " + unActive + "  个");
+            orderPortrait.setValue(unActive);
+            orderPortraits.add(orderPortrait);
+            clubSales.setClubProportionTotal(max);
+            clubSales.setClubProportion(orderPortraits);
+        }
         try {
             clubSales.setStartTime(dateFormat.format(dateFormat.parse(clubSales.getStartTime())));;
             clubSales.setEndTime(dateFormat.format(dateFormat.parse(clubSales.getEndTime())));;

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

@@ -327,6 +327,26 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
         return page;
     }
 
+    public List<CmClubLabel> findClubLabel() {
+        List<CmClubLabel> clubLabelList = newCmClubDao.getClubLabel();
+        if (null != clubLabelList && clubLabelList.size() > 0) {
+            clubLabelList.removeIf(cl -> "null".equals(cl.getLabel()) || " ".equals(cl.getLabel()));
+            for (CmClubLabel cmClubLabel : clubLabelList) {
+                if (cmClubLabel.getLabel().endsWith(".") || cmClubLabel.getLabel().endsWith("-") || cmClubLabel.getLabel().endsWith("、")) {
+                    cmClubLabel.setLabel(cmClubLabel.getLabel().substring(0, cmClubLabel.getLabel().length() - 1).trim());
+                }
+            }
+        }
+        return clubLabelList;
+    }
+
+    public Page<ActiveClub> findActiveClubInfo(Page<ActiveClub> page, ActiveClub activeClub) {
+        activeClub.setPage(page);
+        List<ActiveClub> activeClubInfo = newCmClubDao.getActiveClubInfo(activeClub);
+        page.setList(activeClubInfo);
+        return page;
+    }
+
     public List<easyExcel> exportExcel(ClubStatistics statistics) {
         List<easyExcel> statisticsList = newCmClubDao.findExcelList(statistics);
         List<easyExcel> easyExcels = setExData(statisticsList, statistics);

+ 35 - 0
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -49,6 +49,7 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 用户模块重构--机构管理Controller
@@ -157,11 +158,21 @@ public class AgencyController extends BaseController {
         }
 
         Page<NewCmClub> page = newCmClubService.findPage(new Page<NewCmClub>(request, response, 20), newCmClub);
+        // 机构标签
+        List<CmClubLabel> clubLabelList = newCmClubService.findClubLabel();
+        List<CmClubLabel> trendsLabel = new ArrayList<>();
+        List<CmClubLabel> stateLabel = new ArrayList<>();
+        if (null != clubLabelList && clubLabelList.size() > 0) {
+            trendsLabel = clubLabelList.stream().filter( cl -> cl.getDynamicStatus().equals(0)).collect(Collectors.toList());
+            stateLabel = clubLabelList.stream().filter( cl -> cl.getDynamicStatus().equals(1)).collect(Collectors.toList());
+        }
         // 协销下拉
         List<ServiceProviderModel> spNameList = newCmClubDao.spNameList();
         model.addAttribute("newCmClub", newCmClub);
         model.addAttribute("page", page);
         model.addAttribute("spNameList", spNameList);
+        model.addAttribute("trendsLabel", trendsLabel);
+        model.addAttribute("stateLabel", stateLabel);
         return "modules/userNew/cmAgencyList";
     }
 
@@ -1848,6 +1859,7 @@ public class AgencyController extends BaseController {
             ArrDate newClub = new ArrDate();
             ArrDate remarks = new ArrDate();
             ArrDate active = new ArrDate();
+            ArrDate clubProportion = new ArrDate();
             // 新注册机构
             newClub.setClubInfo(clubSales.getPortrait());
             if (clubSales.getTotal() == null) {
@@ -1872,6 +1884,14 @@ public class AgencyController extends BaseController {
             } else {
                 map.put("remarks", remarks);
             }
+            // 机构活跃饼图
+            clubProportion.setClubInfo(clubSales.getClubProportion());
+            if (null == clubSales.getClubProportionTotal() || clubSales.getClubProportionTotal() ==  0) {
+                map.put("clubProportion", null);
+            } else {
+                map.put("clubProportion", clubProportion);
+            }
+            // 机构活跃线型图
             active.setName(clubSales.getNames());
             active.setValue(clubSales.getValues());
             active.setValue1(clubSales.getValues1());
@@ -2004,4 +2024,19 @@ public class AgencyController extends BaseController {
         }
         return map;
     }
+
+    /**
+     * 机构活跃详情
+     * @return
+     */
+    @RequestMapping("/findActiveClubInfo")
+    public String findActiveClubInfo(ActiveClub activeClub, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<ActiveClub> page = newCmClubService.findActiveClubInfo(new Page<>(request, response), activeClub);
+        // 协销下拉
+        List<ServiceProviderModel> spNameList = newCmClubDao.spNameList();
+        model.addAttribute("activeClub", activeClub);
+        model.addAttribute("page", page);
+        model.addAttribute("spNameList", spNameList);
+        return "modules/userNew/activeClubInfoList";
+    }
 }

+ 20 - 0
src/main/java/com/caimei/modules/user/web/newUser/SpController.java

@@ -13,6 +13,7 @@ import com.caimei.modules.project.model.ClubModel;
 import com.caimei.modules.project.model.ServiceProviderModel;
 import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.modules.sys.utils.ValidateUtils;
+import com.caimei.modules.user.dao.CmSpDao;
 import com.caimei.modules.user.service.WebChatUserService;
 import com.caimei.modules.user.aop.OperationLogAnnotation;
 import com.caimei.modules.user.dao.NewCmClubDao;
@@ -82,6 +83,8 @@ public class SpController extends BaseController {
     private NewShopOrderDao newShopOrderDao;
     @Resource
     private WebChatUserService webChatUserService;
+    @Resource
+    private CmSpDao cmSpDao;
 
     @ModelAttribute
     public NewCmSp get(@RequestParam(required = false) String id) {
@@ -289,6 +292,23 @@ public class SpController extends BaseController {
     @RequestMapping(value = {"cmSpList", ""})
     public String list(NewCmSp newCmSp, HttpServletRequest request, HttpServletResponse response, Model model) {
         Page<NewCmSp> page = cmSpService.findPage(new Page<NewCmSp>(request, response), newCmSp);
+        page.getList().forEach(s -> {
+            List<Map<String, Object>> spClubActive = cmSpDao.getSpClubActive(s.getServiceProviderID());
+            int loginSum = 0, notLoginSum = 0;
+            for (Map<String, Object> map : spClubActive) {
+                if (map.get("activeStatus").equals(0)) {
+                    loginSum = Integer.parseInt(map.get("number").toString());
+                }
+                if (map.get("activeStatus").equals(1)) {
+                    notLoginSum = Integer.parseInt(map.get("number").toString());
+                }
+            }
+            int sum = MathUtil.add(loginSum, notLoginSum).intValue();
+            s.setLivelyClub(loginSum);
+            s.setNolivelyClub(notLoginSum);
+            s.setLivelyClubProportion(0 == sum ? new BigDecimal(0) : MathUtil.mul(MathUtil.div(loginSum, sum, 2), 100));
+            s.setNolivelyClubProportion(0 == sum ? new BigDecimal(0) : MathUtil.mul(MathUtil.div(notLoginSum, sum, 2), 100));
+        });
         if (CollectionUtils.isEmpty(cmSpService.findSpManager())) {
             model.addAttribute("hasManager", "0");
         } else {

+ 12 - 0
src/main/resources/mappings/modules/newhome/NewPageFirstNavigationMapper.xml

@@ -127,6 +127,18 @@
 		WHERE id = #{id}
 	</delete>
 
+	<select id="getEnableNumber" resultType="java.lang.Integer">
+		select id from new_page_first_navigation
+		<where>
+			delFlag = 0 and (type = 0 OR type IS NULL)
+			<if test="www != null and www != ''">
+				and wwwEnabledStatus = 1
+			</if>
+			<if test="crm != null and crm != ''">
+				and crmEnabledStatus = 1
+			</if>
+		</where>
+	</select>
 	<update id="updateEnabledStatusByIds">
 		UPDATE new_page_first_navigation a SET a.wwwEnabledStatus = #{param1}
 		WHERE  a.id IN

+ 15 - 4
src/main/resources/mappings/modules/user/CmPortraitMapper.xml

@@ -178,7 +178,7 @@
         FROM serviceprovider WHERE organizeID = 0  AND openId IS NOT NULL AND openId != '' AND status = 90 AND serviceProviderID != 1342
     </select>
 
-    <select id="getNewClubInfo" resultType="com.caimei.modules.user.entity.clubData">
+    <select id="getNewClubInfo" resultType="com.caimei.modules.user.entity.ClubData">
         SELECT
         c.clubID,
         c.spID
@@ -209,7 +209,7 @@
         </where>
     </select>
 
-    <select id="getClubRemark" resultType="com.caimei.modules.user.entity.clubData">
+    <select id="getClubRemark" resultType="com.caimei.modules.user.entity.ClubData">
         SELECT clubId as clubID, SUM(num) as number FROM
         (
         SELECT
@@ -249,7 +249,7 @@
         ) b group by b.clubId
     </select>
 
-    <select id="getClubVisitorRemark" resultType="com.caimei.modules.user.entity.clubData">
+    <select id="getClubVisitorRemark" resultType="com.caimei.modules.user.entity.ClubData">
         SELECT
         clubId,
         COUNT(id) as number
@@ -284,7 +284,7 @@
         order by addTime asc
     </select>
 
-    <select id="getActiveInfo" resultType="com.caimei.modules.user.entity.clubData">
+    <select id="getActiveInfo" resultType="com.caimei.modules.user.entity.ClubData">
         SELECT
             coas.activeStatus as activeStatus,
             COUNT(coas.id) as number
@@ -301,4 +301,15 @@
         </where>
         GROUP BY coas.activeStatus
     </select>
+
+    <select id="getClubActive" resultType="com.caimei.modules.user.entity.ClubData">
+        SELECT
+            coas.activeStatus AS activeStatus,
+            COUNT(c.clubId) AS number
+        FROM cm_organ_active_system coas
+                 LEFT JOIN club c ON coas.userId = c.userId
+                 LEFT JOIN serviceprovider s ON s.serviceProviderId = c.spId
+        WHERE coas.stage = 0
+        GROUP BY coas.activeStatus
+    </select>
 </mapper>

+ 10 - 0
src/main/resources/mappings/modules/user/CmSpMapper.xml

@@ -271,5 +271,15 @@
 		left join serviceprovider s on csm.serviceProviderId=s.serviceProviderID
 	</select>
 
+	<select id="getSpClubActive" resultType="java.util.Map">
+		SELECT
+			COUNT(c.clubId) as number,
+			coas.activeStatus as activeStatus
+		FROM serviceprovider s
+				 LEFT JOIN club c ON c.spID = s.serviceProviderID
+				 LEFT JOIN cm_organ_active_system coas ON coas.userId = c.userId
+		WHERE coas.stage = 0  and s.status = 90  and s.serviceProviderID = #{serviceProviderID}
+		GROUP BY coas.activeStatus
+	</select>
 
 </mapper>

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

@@ -161,6 +161,18 @@
                 AND (ccs.checkTime <![CDATA[ <= ]]> #{allocationEndTime}
                 OR cpr.createTime <![CDATA[ <= ]]> #{allocationEndTime})
             </if>
+            <if test="trendsLabel != null and trendsLabel != ''">
+                AND a.clubId in (select clubId from cm_club_label where label like concat('%', #{trendsLabel}, '%') AND dynamicStatus = 0)
+            </if>
+            <if test="stateLabel != null and stateLabel != ''">
+                AND a.clubId in (select clubId from cm_club_label where label like concat('%', #{stateLabel}, '%') AND dynamicStatus = 1)
+            </if>
+            <if test="labelStartTime != null and labelStartTime != ''">
+                AND a.clubId in (select clubId from cm_club_label where addTime <![CDATA[ >= ]]> #{labelStartTime})
+            </if>
+            <if test="labelEndTime != null and labelEndTime != ''">
+                AND a.clubId in (select clubId from cm_club_label where addTime <![CDATA[ <= ]]> #{labelEndTime})
+            </if>
             <if test="startLoginTime != null and startLoginTime != ''">
                 AND (u.loginTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) OR a.clubId in (select a.clubId
                 FROM ((
@@ -249,6 +261,10 @@
           AND STATUS = 90
     </select>
 
+    <select id="getClubLabel" resultType="com.caimei.modules.user.entity.CmClubLabel">
+        SELECT label, dynamicStatus FROM  cm_club_label
+    </select>
+
     <select id="findAllList" resultType="NewCmClub">
         SELECT
         <include refid="newCmClubColumns"/>
@@ -1411,4 +1427,130 @@
             AND a.status =90 and u.userOrganizeID IN(0,1)  AND u.userIdentity != 8
         </where>
     </select>
+
+    <select id="getActiveClubInfo" resultType="com.caimei.modules.user.entity.ActiveClub">
+        SELECT
+        DISTINCT u.userId,
+        coas.activeStatus,
+        c.clubID,
+        c.name,
+        c.linkMan,
+        c.contractMobile,
+        c.linkManIdentity,
+        c.address,
+        u.userIdentity,
+        u.registerTime,
+        c.sname,
+        c.info,
+        d.name AS province,
+        c.name AS city,
+        b.name AS  town,
+        (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 = 1 THEN '待审核'
+        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 '医院'
+        WHEN c.secondClubType=5 THEN '美容院'
+        WHEN c.secondClubType=6 THEN '养生馆'
+        WHEN c.secondClubType=7 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,
+        cb.accessTime AS behaviorTime,
+        ccr.addTime AS recentlyTime,
+        cso.orderTime as lastOrderTime
+        FROM club c
+        LEFT JOIN cm_organ_active_system coas ON coas.userId = c.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 town b ON b.townID = c.townID
+        LEFT JOIN city ct ON ct.cityID = c.cityID
+        LEFT JOIN province d ON d.provinceID = c.provinceID
+        LEFT JOIN (SELECT userId, MAX(accessTime) AS accessTime FROM cm_behavior_record WHERE delFlag = 0 AND userId != 0 GROUP BY userId) cb ON cb.userId = c.userId
+        LEFT JOIN (SELECT clubId, ADDTIME FROM (SELECT clubId, ADDTIME FROM cm_club_remarks
+                UNION SELECT clubId, ADDTIME FROM cm_visitor_remarks WHERE clubId IS NOT NULL AND clubId != '') remark
+                GROUP BY remark.clubId ORDER BY remark.addTime DESC) ccr ON ccr.clubId = c.clubId
+        LEFT JOIN (SELECT userId, MAX(orderTime) AS orderTime FROM cm_shop_order  GROUP BY userId) cso ON cso.userId = c.userId
+        <where>
+            coas.stage = 0
+            <if test="activeStatus == 0">
+                and coas.activeStatus = 0
+            </if>
+            <if test="activeStatus == 1">
+                and coas.activeStatus = 1
+            </if>
+            <if test="clubID != null and clubID != ''">
+                AND c.clubID = #{clubID}
+            </if>
+            <if test="name != null and name != ''">
+                AND c.name LIKE concat('%',#{name},'%')
+            </if>
+            <if test="linkMan != null and linkMan != ''">
+                AND c.linkMan LIKE concat('%',#{linkMan},'%')
+            </if>
+            <if test="contractMobile != null and contractMobile != ''">
+                AND c.contractMobile LIKE concat('%',#{contractMobile},'%')
+            </if>
+            <if test="spID != null and spID != ''">
+                AND c.spID = #{spID}
+            </if>
+            <if test="firstClubType != null and firstClubType != ''">
+                AND c.firstClubType = #{firstClubType}
+            </if>
+            <if test="linkManIdentity != null and linkManIdentity != ''">
+                AND c.linkManIdentity = #{linkManIdentity}
+            </if>
+            <if test="userIdentity != null and userIdentity != ''">
+                AND u.userIdentity = #{userIdentity}
+            </if>
+            <if test="registerStartTime != null and registerStartTime != ''">
+                AND u.registerTime <![CDATA[ >= ]]> #{registerStartTime}
+            </if>
+            <if test="registerEndTime != null and registerEndTime != ''">
+                AND u.registerTime <![CDATA[ <= ]]> #{registerEndTime}
+            </if>
+            <if test="behaviorStartTime != null and behaviorStartTime != ''">
+                AND cb.accessTime <![CDATA[ >= ]]> #{behaviorStartTime}
+            </if>
+            <if test="behaviorEndTime != null and behaviorEndTime != ''">
+                AND cb.accessTime <![CDATA[ <= ]]> #{behaviorEndTime}
+            </if>
+            <if test="recentlyStartTime != null and recentlyStartTime != ''">
+                AND ccr.addTime <![CDATA[ >= ]]> #{recentlyStartTime}
+            </if>
+            <if test="recentlyEndTime != null and recentlyEndTime != ''">
+                AND ccr.addTime <![CDATA[ <= ]]> #{recentlyEndTime}
+            </if>
+            <if test="orderStartTime != null and orderStartTime != ''">
+                AND cso.orderTime <![CDATA[ >= ]]> #{orderStartTime}
+            </if>
+            <if test="orderEndTime != null and orderEndTime != ''">
+                AND cso.orderTime <![CDATA[ <= ]]> #{orderEndTime}
+            </if>
+        </where>
+        <if test="orderByType == null or orderByType == 1">
+            ORDER BY cb.accessTime DESC
+        </if>
+        <if test="orderByType == 2">
+            ORDER BY cb.accessTime asc
+        </if>
+    </select>
 </mapper>

+ 21 - 11
src/main/webapp/WEB-INF/views/modules/newhome/newPageFirstNavigationForm.jsp

@@ -82,6 +82,13 @@
 						alertx("请上传图标");
 						return;
 					}
+					const type = $('#type').val()
+					const number = $('#number').val()
+					const status = $('.wwwEnabledStatus').val()
+					if (type != 2 && '1' == status && number >= 8) {
+						top.$.jBox.confirm("网站端最多只能启用8个菜单,请停用其他菜单后再重新启用本菜单。", "提示");
+						return;
+					}
 					loading('正在提交,请稍等...');
 					form.submit();
 				},
@@ -163,12 +170,13 @@
 </head>
 <body>
 	<ul class="nav nav-tabs">
-		<li class=${newPageFirstNavigation.type==0?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=${newPageFirstNavigation.type}">主菜单列表</a></li>
-		<li class=${newPageFirstNavigation.type==2?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=${newPageFirstNavigation.type}">快捷运营菜单</a></li>
+		<li class=${newPageFirstNavigation.type==0?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=0">主菜单列表</a></li>
+		<li class=${newPageFirstNavigation.type==2?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=2">快捷运营菜单</a></li>
 		<li class="active"><a href="${ctx}/newhome/newPageFirstNavigation/form?id=${newPageFirstNavigation.id}">${not empty newPageFirstNavigation.id?'编辑':'添加'}</a></li>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="newPageFirstNavigation" action="${ctx}/newhome/newPageFirstNavigation/save" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
+		<input id="number" name="number" type="hidden" value="${number}"/>
 		<form:hidden path="type"/>
 		<sys:message content="${message}"/>
 		<div class="control-group">
@@ -185,16 +193,18 @@
 			</div>
 		</div>
 		</c:if>
-		<div class="control-group iconBox">
-			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>图标:</label>
-			<div class="controls upload-content" id="iconBox">
-				<div class="conList">
-					<form:hidden id="icon" path="icon" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
-					<sys:ckfinder input="icon" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
-					<br><label>建议图片分辨率110px*110px</label>
+		<c:if test="${newPageFirstNavigation.type != 0}">
+			<div class="control-group iconBox">
+				<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>图标:</label>
+				<div class="controls upload-content" id="iconBox">
+					<div class="conList">
+						<form:hidden id="icon" path="icon" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+						<sys:ckfinder input="icon" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+						<br><label>建议图片分辨率110px*110px</label>
+					</div>
 				</div>
 			</div>
-		</div>
+		</c:if>
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>跳转链接:</label>
 			<div class="controls">
@@ -210,7 +220,7 @@
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>网站状态:</label>
 			<div class="controls">
-				<form:select path="wwwEnabledStatus" class="input-xlarge ">
+				<form:select path="wwwEnabledStatus" class="input-xlarge wwwEnabledStatus">
 					<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 				</form:select>
 			</div>

+ 32 - 24
src/main/webapp/WEB-INF/views/modules/newhome/newPageFirstNavigationList.jsp

@@ -21,13 +21,19 @@
 
 		//PC端状态修改
 		function updateEnabledStatus(status,ids,www){
+			const number = $('#number').val()
+			const type = $('#type').val()
 			var msg='确定启用该菜单吗?';
 			if('0'==status){
 				msg='确定停用该菜单吗?';
 			}
+			if (type != 2 && '1'==status && number >= 8) {
+				top.$.jBox.confirm("网站端最多只能启用8个菜单,请停用其他菜单后再重新启用本菜单。", "提示");
+				return;
+			}
 			top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
 				if(v=='ok'){
-					$.post("${ctx}/newhome/newPageFirstNavigation/updateEnabledStatus",{'enabledStatus':status,'ids':ids,'www':www}, function(data) {
+					$.post("${ctx}/newhome/newPageFirstNavigation/updateEnabledStatus",{'enabledStatus':status,'ids':ids,'www':www, 'type': type}, function(data) {
 						if(true==data.success){
 							$.jBox.tip(data.msg, 'info');
 						} else {
@@ -118,6 +124,7 @@
 <form:form id="searchForm" modelAttribute="newPageFirstNavigation" action="${ctx}/newhome/newPageFirstNavigation" method="get" class="breadcrumb form-search">
 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+	<input id="number" name="number" type="hidden" value="${number}"/>
 	<input id="type" name="type" type="hidden" value="${newPageFirstNavigation.type}"/>
 	<c:if test="${newPageFirstNavigation.type==2}">
 		<label>点击时间:</label>
@@ -141,7 +148,7 @@
 	<tr>
 		<th>ID</th>
 		<th><c:if test="${newPageFirstNavigation.type==0}">主</c:if>菜单名称</th>
-		<th>图标</th>
+		<c:if test="${newPageFirstNavigation.type != 0}"><th>图标</th></c:if>
 		<th>跳转链接</th>
 		<c:if test="${newPageFirstNavigation.type==2}">
 			<th>点击量</th>
@@ -154,36 +161,37 @@
 	</tr>
 	</thead>
 	<tbody>
-	<c:forEach items="${page.list}" var="newPageFirstNavigation">
+	<c:forEach items="${page.list}" var="list">
 		<tr>
-			<input class="check-item" type="hidden" id="preferredProductSort${newPageFirstNavigation.id}" value='${newPageFirstNavigation.id}-${newPageFirstNavigation.sort}'/>
-			<td>
-					${newPageFirstNavigation.id}
-			</td>
+			<input class="check-item" type="hidden" id="preferredProductSort${list.id}" value='${list.id}-${list.sort}'/>
 			<td>
-					${newPageFirstNavigation.navigationName}
+					${list.id}
 			</td>
 			<td>
-					<img src="${newPageFirstNavigation.icon}" style="width: 50px;height: 50px;">
+					${list.navigationName}
 			</td>
-
+			<c:if test="${newPageFirstNavigation.type != 0}">
+				<td>
+						<img src="${list.icon}" style="width: 50px;height: 50px;">
+				</td>
+			</c:if>
 			<td>
-					<a href="${newPageFirstNavigation.link}" target="_blank">${newPageFirstNavigation.link}</a>
+					<a href="${list.link}" target="_blank">${list.link}</a>
 			</td>
 			<c:if test="${newPageFirstNavigation.type==2}">
-				<td>${newPageFirstNavigation.pv}</td>
+				<td>${list.pv}</td>
 			</c:if>
 			<td>
 				<shiro:hasPermission name="newhome:newPageFirstNavigation:edit">
-					<c:if test="${newPageFirstNavigation.wwwEnabledStatus eq 1 }">
+					<c:if test="${list.wwwEnabledStatus eq 1 }">
 						<font color="green">已启用</font>
-						<a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageFirstNavigation.id}','WWW');" >
+						<a href="javascript:void(0);" onclick="updateEnabledStatus('0','${list.id}','WWW');" >
 							停用
 						</a>
 					</c:if>
-					<c:if test="${newPageFirstNavigation.wwwEnabledStatus ne 1 }">
+					<c:if test="${list.wwwEnabledStatus ne 1 }">
 						<font color="red">已停用</font>
-						<a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageFirstNavigation.id}','WWW');">
+						<a href="javascript:void(0)" onclick="updateEnabledStatus('1','${list.id}','WWW');">
 							启用
 						</a>
 					</c:if>
@@ -191,33 +199,33 @@
 			</td>
 			<td>
 				<shiro:hasPermission name="newhome:newPageFirstNavigation:edit">
-					<c:if test="${newPageFirstNavigation.crmEnabledStatus eq 1 }">
+					<c:if test="${list.crmEnabledStatus eq 1 }">
 						<font color="green">已启用</font>
-						<a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageFirstNavigation.id}','CRM');" >
+						<a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${list.id}','CRM');" >
 							停用
 						</a>
 					</c:if>
-					<c:if test="${newPageFirstNavigation.crmEnabledStatus ne 1 }">
+					<c:if test="${list.crmEnabledStatus ne 1 }">
 						<font color="red">已停用</font>
-						<a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageFirstNavigation.id}','CRM');">
+						<a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${list.id}','CRM');">
 							启用
 						</a>
 					</c:if>
 				</shiro:hasPermission>
 			</td>
 			<td>
-				<input  id="sort" name="sort" style="width:50px;" value="${newPageFirstNavigation.sort}"  onkeyup="onlynum(this)"  onchange="changeSort(${newPageFirstNavigation.id},this)"></td>
+				<input  id="sort" name="sort" style="width:50px;" value="${list.sort}"  onkeyup="onlynum(this)"  onchange="changeSort(${list.id},this)"></td>
 			</td>
 			<td>
-				<fmt:formatDate value="${newPageFirstNavigation.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				<fmt:formatDate value="${list.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
 			</td>
 			<shiro:hasPermission name="newhome:newPageFirstNavigation:edit"><td>
-				<a href="${ctx}/newhome/newPageFirstNavigation/form?id=${newPageFirstNavigation.id}&type=${newPageFirstNavigation.type}">编辑</a>
+				<a href="${ctx}/newhome/newPageFirstNavigation/form?id=${list.id}&type=${list.type}">编辑</a>
 				<%--<c:if test="${newPageFirstNavigation.type eq 0}">
 					<a href="${ctx}/newhome/newPageSecondaryNavigation/?firstNavigationId=${newPageFirstNavigation.id}">二级分类设置</a>
 				</c:if>--%>
 				<shiro:hasPermission name="newhome:newPageFirstNavigation:delete">
-					<a href="${ctx}/newhome/newPageFirstNavigation/delete?id=${newPageFirstNavigation.id}&type=${newPageFirstNavigation.type}" onclick="return confirmx('确定删除该菜单吗?', this.href)">删除</a>
+					<a href="${ctx}/newhome/newPageFirstNavigation/delete?id=${list.id}&type=${list.type}" onclick="return confirmx('确定删除该菜单吗?', this.href)">删除</a>
 				</shiro:hasPermission>
 			</td></shiro:hasPermission>
 		</tr>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageForm.jsp

@@ -75,7 +75,7 @@
 				<sys:ckfinder input="crmImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
 			</div>
 			<div class="controls" style="padding-top: 20px;">
-				<p style="color:#D0D0D0 ;">建议尺寸:750 * 366 / PX</p>
+				<p style="color:#D0D0D0 ;">建议尺寸:702 * 280 / PX</p>
 			</div>
 		</div>
 		<div class="control-group">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/serviceteam/cmServiceteamRoleForm.jsp

@@ -86,7 +86,7 @@
     </shiro:hasPermission>
     <li><a href="${ctx}/serviceteam/cmServiceteamRole/">协销小组</a></li>
     <li><a href="${ctx}/new/user/cmSp/leader/">协销总管理员</a></li>
-    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
 
     <li class="active"><a
             href="${ctx}/serviceteam/cmServiceteamRole/form?teamId=${cmServiceteamRole.teamId}">协销小组${not empty cmServiceteamRole.teamId?'编辑':'添加'}</a>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/clubTemporaryList.jsp

@@ -24,7 +24,7 @@
 <ul class="nav nav-tabs">
 	<li><a href="${ctx}/new/user/agency/clubSales">机构-协销列表</a></li>
 	<li><a href="${ctx}/new/user/agency/">机构基本资料列表</a></li>
-	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
 	<li class="active"><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
 	<li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/cmDistributionClubList.jsp

@@ -104,7 +104,7 @@
 	<li ><a href="${ctx}/new/user/agency/">机构基本资料列表</a></li>
 	<li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
 	<li><a href="${ctx}/new/user/agency/cmSpClubTrackList">新分配机构跟踪管理</a></li>
-	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
 	<li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
 	<li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 	<li class="active"><a href="${ctx}/new/user/agency/distributionCLubList">分销系统机构列表</a></li>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/cmOperationalLogs.jsp

@@ -30,7 +30,7 @@
 <ul class="nav nav-tabs">
     <li><a href="${ctx}/new/user/agency/clubSales">机构-协销列表</a></li>
     <li><a href="${ctx}/new/user/agency/">机构基本资料列表</a></li>
-    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li class="active"><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>

+ 448 - 0
src/main/webapp/WEB-INF/views/modules/userNew/activeClubInfoList.jsp

@@ -0,0 +1,448 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>机构基本资料列表</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .reg-row .new-tag.active{border:1px solid #de5801}
+        .reg-row{margin-bottom:20px}
+        .reg-row .reg-label{display:inline-block;width:120px;text-align:right;font-size:13px}
+        .the-oradio{display:inline-block;vertical-align:top}
+        .the-oradio div{width:85px;display:inline-block;font-size:12px;color:#666}
+        .the-oradio div input[type="radio"]{width:17px;height:17px;margin-right:5px;vertical-align:text-top}
+        .med-option{display:block;margin:10px 0 0 125px}
+        .reg-row .business-license{position:relative;display:inline-block;width:166px;height:123px;border-radius:6px;margin:18px 0 0 125px}
+        #medicalPracticeLicenseImgPreview{display:inline-block}
+        .qualification{margin-top:20px}
+        .reg-row .tags-area{display:inline-block;width:420px}
+        .reg-row .new-tag{display:inline-block;width:70px;border:1px solid #e5e5e5;border-radius:6px;padding:5px;margin-right:14px;margin-bottom:14px;text-align:center;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
+        .reg-row .tags-operate{margin-left:125px}
+        .reg-row .reg-input{width:336px;height:32px;padding:0 8px;margin-right:20px;border:1px solid #dcdcdc;border-radius:6px}
+        .reg-row .tags-operate .tag-input{width:159px;margin-right:13px;display:none;vertical-align:top}
+        .reg-row .tags-operate .tag-add{line-height:20px;vertical-align:middle;margin-bottom:0;vertical-align:top}
+        .reg-row .tags-area{vertical-align:top}
+        .tag-add{display:none}
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .modal{width:700px;margin-left:-350px}
+        #myModal{display:none}
+        .modal-body{max-height:300px !important}
+        .modal.fade.in{top:0 !important}
+        #btnSubmit{margin-left:20px}
+        .flex-wrap .item{margin-right:20px}
+        #auditBox{padding:20px;line-height:30px}
+        #auditBox .bd-row{display:flex;margin-bottom:15px}
+        #auditBox .bd-row > span{display:inline-block;width:60px}
+        #auditBox .auditCheckBox{width:250px}
+        #auditBox .auditCheckBox label{margin:0 5px 5px 0}
+        #auditBox .auditCheckBox input{display:none}
+        #auditBox .auditCheckBox input + span{display:inline-block;line-height:24px;padding:0 12px;border:1px solid #666;border-radius:5px}
+        #auditBox .auditCheckBox input:checked + span{background-color:#E6633A}
+        #alertModal{width:300px;height:200px;border:1px solid #ebebeb;border-radius:10px;position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;background:#FFFFFF;display:none}
+        #alertModal .title{height:50px;line-height:50px;font-size:14px;font-weight:bold;text-align:center;position:relative;border-bottom:1px solid #EBEBEB}
+        #alertModal .close{width:50px;height:50px;display:block;position:absolute;right:0;top:0;line-height:50px;color:#000;font-weight:bold;text-align:center;font-style:normal;font-size:18px}
+        #alertModal .alert-content{width:260px;height:60px;padding:20px}
+        #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}*/
+        .viewDiv{position: relative; margin: 0 auto;margin-top: 10px; width: 100%; height: 1px; background-color: #d4d4d4; text-align: center; font-size: 16px; color: rgba(101, 101, 101, 1);}
+        .autoView{position: absolute; left: 90%; background-color: #ffffff;margin-left: 100px; padding: 0 15px; transform: translateX(-30%) translateY(-30%);}
+        #activeClub { width: 100%; height: 50px; display: flex;  align-items: center; }
+        #activeClub > li {float: left; text-align: center; margin-left: 15px; font-size: 15px; list-style-type: none;}
+        .redAddClass {color: red; border-bottom: red 5px solid;}
+    </style>
+    <link href="${ctxStatic}/modules/cmAgencyStatisticsList/cmAgencyStatisticsList.css" rel="stylesheet">
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/clubSales">机构-协销列表</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/findActiveClubInfo?orderByType=1&activeStatus=0">机构分析统计列表</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="activeClub" action="${ctx}/new/user/agency/findActiveClubInfo" 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}"/>
+    <input id="userID" name="payTotalMonthType" type="hidden" value="${activeClub.userID}"/>
+    <input id="orderByType" name="orderByType" type="hidden" value="${activeClub.orderByType}"/>
+    <input id="activeStatus" name="activeStatus" type="hidden" value="${activeClub.activeStatus}"/>
+    <div class="flex-wrap">
+        <div id="items" class="flex-wrap">
+            <div class="item">
+                <label>机构ID:</label>
+                <form:input path="clubID" type="text" onkeyup="this.value=value.replace(/[^\d]/g,'')" htmlEscape="false"
+                            maxlength="50" class="input-medium"/>
+            </div>
+            <div class="item">
+                <label>机构名称:</label>
+                <form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
+            </div>
+            <div class="item">
+                <label>联系人:</label>
+                <form:input path="linkMan" htmlEscape="false" maxlength="50" class="input-medium"/>
+            </div>
+            <div class="item">
+                <label>手机号:</label>
+                <form:input path="contractMobile" htmlEscape="false" maxlength="50" class="input-medium"/>
+            </div>
+            <div class="item">
+                <label>协销:</label>
+                <form:select path="spID" class="input-medium">
+                    <form:option value="" label="全部"/>
+                    <form:options items="${spNameList}" itemLabel="name" itemValue="serviceProviderID" htmlEscape="false"/>
+                </form:select>
+            </div>
+            <div class="item">
+                <label class="control-label">机构类型:</label>
+                <form:select path="firstClubType" 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>
+            <div class="item">
+                <label>机构级别:</label>
+                <form:select path="userIdentity" 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="clubStatus" class="input-medium">
+                    <form:option value="" label="请选择"/>
+                    <form:options items="${fns:getDictList('club_status')}" itemLabel="label" itemValue="value"
+                                  htmlEscape="false"/>
+                </form:select>
+            </div>
+            <div class="item">
+                <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>
+            </div>
+            <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="behaviorStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${behaviorStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="behaviorEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${behaviorEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <div class="item">
+                <label>最近咨询时间:</label>
+                <form:input path="recentlyStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${recentlyStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="recentlyEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${recentlyEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <div class="item">
+                <label>最近下单时间:</label>
+                <form:input path="orderStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${orderStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="orderEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${orderEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <div class="item">
+                <input id="btnSubmit" class="btn btn-primary" type="button" value="查询"/>
+                <input id="export" class="btn btn-primary" type="button" value="导出"/>
+            </div>
+        </div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<div>
+    <ul id="activeClub">
+        <li class="icon-activeClub" value="0">活跃机构</li>
+        <li class="icon-ubActiveClub" value="1">不活跃机构</li>
+    </ul>
+</div>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>机构ID</th>
+        <th>机构名称</th>
+        <th>联系人</th>
+        <th>联系人身份</th>
+        <th>手机号</th>
+        <th>协销人员</th>
+        <th>地址</th>
+        <th>状态</th>
+        <th>机构类型</th>
+        <th>机构级别</th>
+        <th>注册时间</th>
+        <th class="th-sort">
+            最近访问时间
+            <div class="sort sort-button" id="sort-button1">
+                <a href="${ctx}/new/user/agency/findActiveClubInfo?orderByType=1" class="icon icon-up"></a>
+                <a href="${ctx}/new/user/agency/findActiveClubInfo?orderByType=2" class="icon icon-down"></a>
+            </div>
+        </th>
+        <th>最近咨询时间</th>
+        <th>最近下单时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="clubList">
+        <tr>
+            <td>${clubList.clubID}</td>
+            <td>
+                    ${clubList.name}
+            </td>
+            <td>
+                    ${clubList.linkMan}
+            </td>
+            <td>
+                <c:if test="${clubList.linkManStatus ne null}">
+                    ${clubList.linkManStatus}
+                </c:if>
+                <c:if test="${clubList.linkManStatus eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                    ${clubList.contractMobile}
+            </td>
+            <td>
+                    ${clubList.spName}
+            </td>
+            <td>
+                <c:if test="${not empty clubList.province}">
+                    ${clubList.province}
+                </c:if>
+                <c:if test="${not empty clubList.city}">
+                    ${clubList.city}
+                </c:if>
+                <c:if test="${empty clubList.province and empty clubList.city}">
+                    ---
+                </c:if>
+            </td>
+            <td>${clubList.clubStatus}</td>
+            <td>
+                <c:if test="${clubList.firstClubType != null || clubList.firstClubType != ''}">
+                    ${clubList.firstClubType}
+                </c:if>
+                <c:if test="${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="${clubList.userIdentity eq 2}">
+                    资质机构
+                </c:if>
+                <c:if test="${clubList.svipUserFlag eq 1}">
+                    <font color="red">(超级会员)</font>
+                </c:if>
+                <c:if test="${clubList.userIdentity eq 2 and clubList.svipUserFlag eq 0}">
+                    <font color="red">(普通会员)</font>
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${clubList.registerTime ne null}">
+                    ${clubList.registerTime}
+                    <%--<fmt:formatDate value="${clubList.addTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>--%>
+                </c:if>
+                <c:if test="${clubList.registerTime eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${clubList.behaviorTime ne null}">
+                    ${clubList.behaviorTime}
+                </c:if>
+                <c:if test="${clubList.behaviorTime eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${clubList.recentlyTime ne null}">
+                    ${clubList.recentlyTime}
+                </c:if>
+                <c:if test="${clubList.recentlyTime eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${clubList.lastOrderTime ne null}">
+                    ${clubList.lastOrderTime}
+                </c:if>
+                <c:if test="${clubList.lastOrderTime eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                <a href="${ctx}/new/user/agency/clubPortrait?clubID=${clubList.clubID}&clubName=${clubList.name}&dateType=0&type=4">机构画像</a>
+                <a href="javascript: void(0);"
+                   onclick="goNewBack(1, '${clubList.addTime}', ${clubList.userIdentity}, '${clubList.name}', '${clubList.linkMan}','${clubList.clubID}')">访问记录</a>
+                <a href="javascript: void(0);"
+                   onclick="goNewBack(2, '${clubList.addTime}', ${clubList.userIdentity}, '${clubList.name}', '${clubList.linkMan}','${clubList.clubID}')">咨询记录</a>
+            </td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+<script type="text/javascript">
+    function page(n,s) {
+        $('#pageNo').val(n);
+        $('#pageSize').val(s);
+        $('#searchForm').submit();
+        return false;
+    }
+    // 活跃、不活跃查询
+    $('#activeClub > li').click(function () {
+        console.log($(this).val());
+        const activeStatus = $(this).val() * 1;
+        $('#activeStatus').val(activeStatus);
+        console.log('---------', $('#activeStatus').val());
+        if (activeStatus === 0) {
+            // 活跃机构
+            $('.icon-activeClub').attr("class", "redAddClass")
+        } else {
+            // 不活跃机构
+            $('.icon-ubActiveClub').attr("class", "redAddClass")
+        }
+        $('#searchForm').submit();
+    })
+
+    function goNewBack(type, addTime, userIdentity, name, linkMan, clubId) {
+        // 跳转到新后台查询数据 type: 1 访问记录 2:咨询记录
+        const date = getZeroTimeToday();
+        console.log(date)
+        const addDateTime = stringToDate(addTime.toString());
+        console.log('addDateTime----', addDateTime);
+        if (type === 1) {
+            // 若是今天以前注册的机构,点击访问记录,跳转到新后台【用户行为记录】-【过往数据】页面,
+            // 页面展示以公司名称(个人机构以联系人当公司名称)筛选后的结果;
+            // 若是今天注册的机构,点击访问记录,跳转到新后台【用户行为记录】-【今日数据】页面,
+            // 页面展示以公司名称(个人机构以联系人当公司名称)筛选后的结果。
+            if (addDateTime < date) {
+                // 过往数据
+                if (userIdentity === 4) {
+                    $.get("${ctx}/jump/link", function (data) {
+                        link = "https://manager.caimei365.com/#/user/record-list?type=second&corporateName=" + linkMan + "&clubId=" + clubId + "&token=" + data;
+                        window.open(link, "_blank");
+                    });
+                } else {
+                    $.get("${ctx}/jump/link", function (data) {
+                        link = "https://manager.caimei365.com/#/user/record-list?type=second&corporateName=" + name + "&clubId=" + clubId + "&token=" + data;
+                        window.open(link, "_blank");
+                    });
+                }
+            } else {
+                // 今日数据
+                if (userIdentity === 4) {
+                    $.get("${ctx}/jump/link", function (data) {
+                        link = "https://manager.caimei365.com/#/user/record-list?type=first&corporateName=" + linkMan + "&clubId=" + clubId + "&token=" + data;
+                        window.open(link, "_blank");
+                    });
+                } else {
+                    $.get("${ctx}/jump/link", function (data) {
+                        link = "https://manager.caimei365.com/#/user/record-list?type=first&corporateName=" + name + "&clubId=" + clubId + "&token=" + data;
+                        window.open(link, "_blank");
+                    });
+                }
+
+            }
+        } else {
+            // 点击咨询记录,跳转到新后台【用户咨询记录汇总】页面,页面展示以机构名称筛选后的结果
+            if (userIdentity === 4) {
+                $.get("${ctx}/jump/link", function (data) {
+                    link = "https://manager.caimei365.com/#/user/consult/list?clubName=" + linkMan + "&clubId=" + clubId + "&token=" + data;
+                    window.open(link, "_blank");
+                });
+            } else {
+                $.get("${ctx}/jump/link", function (data) {
+                    link = "https://manager.caimei365.com/#/user/consult/list?clubName=" + name + "&clubId=" + clubId + "&token=" + data;
+                    window.open(link, "_blank");
+                });
+            }
+
+        }
+    }
+
+    $(function () {
+        const activeStatus = $('#activeStatus').val() * 1;
+        if (activeStatus === 0) {
+            // 活跃机构
+            $('.icon-activeClub').attr("class", "redAddClass")
+        } else {
+            // 不活跃机构
+            $('.icon-ubActiveClub').attr("class", "redAddClass")
+        }
+        const typeMap = {
+            1: {
+                val: $("#orderByType").val() ? $("#orderByType").val() * 1 : null,
+                dom: $('#sort-button1')
+            },
+            2: {
+                val: $("#activeStatus").val() ? $("#activeStatus").val() * 1 : null,
+                dom: $('#activeClub')
+            }
+        }
+        const setActiveFn = function (type,num){
+            if( type === 0){
+                typeMap[num].dom.find('.icon-up').addClass('active');
+            }else{
+                typeMap[num].dom.find('.icon-down').addClass('active');
+            }
+        }
+        const setActiveClub = function (type,num){
+            if( type === 0){
+                console.log('***************');
+                typeMap[num].dom.find('.icon-activeClub').addClass('active').addClass('redAddClss');
+            }else{
+                typeMap[num].dom.find('.icon-unActiveClub').addClass('active').addClass('redAddClss');
+            }
+        }
+        // 最近访问时间 1 降序  2 升序
+        if(typeMap[1].val || typeMap[1].val === 0) {
+            setActiveFn(typeMap[1].val,1)
+        }
+        // 活跃、不活跃机构
+        if(typeMap[2].val || typeMap[2].val === 0) {
+            setActiveClub(typeMap[2].val,2)
+        }
+        $('#btnSubmit').click(function () {
+            $('#searchForm').submit();
+        })
+    })
+    function stringToDate(dateString) {
+        const parts = dateString.split(/[- :]/);
+        return new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);
+    }
+    // 当天0点0分时间
+    function getZeroTimeToday() {
+        const today = new Date();
+        return new Date(today.getFullYear(), today.getMonth(), today.getDate());
+    }
+</script>
+</body>
+</html>

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

@@ -269,7 +269,7 @@
     <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}/new/user/agency/cmSpClubTrackList">新分配机构跟踪管理</a></li>
-    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
     <li><a href="${ctx}/new/user/agency/distributionCLubList">分销系统机构列表</a></li>
@@ -371,6 +371,29 @@
             <form:input path="allocationEndTime" 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:select path="trendsLabel" class="input-medium">
+                <form:option value="" label="全部"/>
+                <form:options items="${trendsLabel}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+            </form:select>
+        </div>
+        <div class="item">
+            <label>静态标签:</label>
+            <form:select path="stateLabel" class="input-medium">
+                <form:option value="" label="全部"/>
+                <form:options items="${stateLabel}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+            </form:select>
+        </div>
+        <div class="item">
+            <label>需求跨度:</label>
+            <form:input path="labelStartTime" type="text" maxlength="20" class="input-mini Wdate"
+                        value="${labelStartTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            -
+            <form:input path="labelEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${labelEndTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        </div>
         <div class="item">
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         </div>

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

@@ -58,7 +58,7 @@
     <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}/new/user/agency/cmSpClubTrackList">新分配机构跟踪管理</a></li>
-    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>

+ 15 - 1
src/main/webapp/WEB-INF/views/modules/userNew/cmClubSales.jsp

@@ -20,7 +20,7 @@
     <li><a href="${ctx}/new/user/agency/">机构基本资料列表</a></li>
     <li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
     <li><a href="${ctx}/new/user/agency/cmSpClubTrackList">新分配机构跟踪管理</a></li>
-    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--    <li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
     <li><a href="${ctx}/new/user/agency/distributionCLubList">分销系统机构列表</a></li>
@@ -103,6 +103,20 @@
         </div>
     </div>
     <div class="flex-content">
+        <div class="flex-box clubProportion">
+            <div class="box-title">
+                <H4 class="H_tag">机构活跃占比</H4>
+                <a id="clubActiceDetails" href="${ctx}/new/user/agency/findActiveClubInfo?orderByType=1&activeStatus=0">详情></a>
+            </div>
+            <div class="box-eachts"  style="height: 350px">
+                <div class="eachts-data" id="clubProportion" style="">
+                    <!-- keyWordsEacths表 -->
+                </div>
+                <div class="eachts-none" id="clubProportionNone">
+                    <p>暂无数据</p>
+                </div>
+            </div>
+        </div>
         <div class="flex-box max">
             <div class="box-title">
                 <H4 class="H_tag">机构活跃趋势</H4>

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

@@ -106,7 +106,7 @@
 	<li><a href="${ctx}/new/user/agency/list">机构基本资料列表</a></li>
 	<li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
 	<li class="active"><a href="${ctx}/new/user/agency/cmSpClubTrackList">新分配机构跟踪管理</a></li>
-	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
 	<li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
 	<li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>

+ 12 - 1
src/main/webapp/WEB-INF/views/modules/userNew/cmSpList.jsp

@@ -72,6 +72,10 @@
 				<th>类型</th>
 				<%--<th>身份</th>--%>
 				<th>创建时间</th>
+				<th>活跃机构</th>
+				<th>不活跃机构</th>
+				<th>活跃机构占比</th>
+				<th>不活跃机构占比</th>
 				<shiro:hasPermission name="user:newCmClub:edit"><th>操作</th></shiro:hasPermission>
 			</tr>
 		</thead>
@@ -100,6 +104,10 @@
 				</td>
 				<%--<td>${newCmSp.spIdentity}</td>--%>
 				<td>${newCmSp.addTime}</td>
+				<td>${newCmSp.livelyClub}</td>
+				<td>${newCmSp.nolivelyClub}</td>
+				<td>${newCmSp.livelyClubProportion}%</td>
+				<td>${newCmSp.nolivelyClubProportion}%</td>
 				<shiro:hasPermission name="user:newCmClub:edit">
 					<td>
 					<c:if test="${newCmSp.status eq 90 || newCmSp.status eq 91}">
@@ -110,11 +118,14 @@
                             <a href="${ctx}/new/user/cmSp/cmSpOnLine?id=${newCmSp.serviceProviderID}" onclick="return confirmx('确定上线该协销人员吗?', this.href)">上线</a>
                         </c:if>
 						<a href="javascript:void(0);" onclick="updatePwd(${newCmSp.serviceProviderID})">重置密码</a>
-						<a href="javascript:void(0);" onclick="sendMsg(${newCmSp.serviceProviderID})">发送消息</a>
+						<%--<a href="javascript:void(0);" onclick="sendMsg(${newCmSp.serviceProviderID})">发送消息</a>--%>
 						<a href="${ctx}/new/user/cmSp/cmSpEdit?id=${newCmSp.serviceProviderID}">编辑</a>
 						<%--<shiro:hasPermission name="user:newCmClub:delete">
 						<a href="${ctx}/new/user/cmSp/cmSpDelete?id=${newCmSp.serviceProviderID}" onclick="return confirmx('确认要删除该协销人员吗?', this.href)">删除</a>
 						</shiro:hasPermission>--%>
+						<c:if test="${newCmSp.status eq 90}">
+						<a href="${ctx}/new/user/cmSp/cmSpLivelyClubFrom?spID=${newCmSp.serviceProviderID}">机构详情</a>
+						</c:if>
 					</c:if>
 					<c:if test="${newCmSp.status eq 1 || newCmSp.status eq 92}">
 						<a href="javascript:void(0);" onclick="audit('${newCmSp.serviceProviderID}','${newCmSp.name}', '${newCmSp.contractMobile}', '${hasManager}')">审核</a>

+ 3 - 2
src/main/webapp/WEB-INF/views/modules/userNew/cmSpLivelyClubFrom.jsp

@@ -87,13 +87,14 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-	<li><a href="${ctx}/new/user/cmSp/cmSpList/">协销人员列表</a></li>
+	<%--<li><a href="${ctx}/new/user/cmSp/cmSpList/">协销人员列表</a></li>
 	<shiro:hasPermission name="user:newCmClub:edit">
 		<li><a href="${ctx}/new/user/cmSp/cmSpForm">添加协销人员</a></li>
 	</shiro:hasPermission>
 	<li><a href="${ctx}/serviceteam/cmServiceteamRole/">协销小组</a></li>
 	<li><a href="${ctx}/new/user/cmSp/leader/">协销总管理员</a></li>
-	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+	<li><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
+	<li><a href="${ctx}/new/user/cmSp/cmSpList/">协销人员列表</a></li>
 	<li class="active"><a href="${ctx}/new/user/cmSp/cmSpLivelyClubFrom?spID=${spId}">查看详情</a></li>
 </ul>
 

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

@@ -53,7 +53,7 @@
 	<li><a href="${ctx}/new/user/agency/">机构基本资料列表</a></li>
 	<li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
 	<li><a href="${ctx}/new/user/agency/cmSpClubTrackList">新分配机构跟踪管理</a></li>
-	<li class="active"><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>
+<%--	<li class="active"><a href="${ctx}/new/user/cmSp/cmSpLivelyClubList/">机构活跃分析</a></li>--%>
 	<li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
 	<li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 	<li><a href="${ctx}/new/user/agency/distributionCLubList">分销系统机构列表</a></li>

+ 7 - 1
src/main/webapp/static/modules/cmClubSales/cmClubSales.css

@@ -24,7 +24,10 @@
     border-radius: 10px;
 }
 .flex-content .flex-box.max{
-    width:1415px;
+    width: 1000px;
+}
+.flex-content .flex-box.clubProportion{
+    width: 400px;
 }
 .flex-content .flex-box.box1{
     width: 1415px;
@@ -49,6 +52,9 @@
     font-weight: normal;
     color: #40E0D0;
 }
+#clubActiceDetails {
+    float: right;
+}
 .flex-box .box-title span em{
     font-style: normal;
     font-weight: normal;

+ 1 - 0
src/main/webapp/static/modules/cmClubSales/cmClubSales.js

@@ -11,6 +11,7 @@ $(function(){
     getClubSalesEacthsData(0,1);
     getClubSalesEacthsData(1,1);
     getClubSalesEacthsData(2,1);
+    getClubSalesEacthsData(3,1);
     // 点击筛选新注册机构统计数据
     $('#clubTabs').children("a").each(function (index) {
         $(this).click(function () {

+ 73 - 1
src/main/webapp/static/modules/cmClubSales/cmClubSalesEachs.js

@@ -166,11 +166,19 @@ const  getClubSalesEacthsData = function (type,dateType) {
                             setClubActiveData(type,data)
                         }
                         break;
+                    case 3:
+                        if(!data.clubProportion){
+                            $('#clubProportionNone').show();
+                            $('#clubProportion').hide();
+                        }else{
+                            clubProportion(type,data)
+                        }
+                        break;
                 }
                 defaultParams.startTime = '';
                 defaultParams.endTime = '';
             } else {
-                console.log('机构订单图表数据异常')
+                console.log('机构-协销图表数据异常')
             }
         }
     });
@@ -256,6 +264,25 @@ const setClubActiveData = function (type,data) {
     }
     getClubActiveEacths(clubMap[type].fn, clubMap[type].id, clubMap[type].name, clubMap[type].active, clubMap[type].unActive);
 }
+// 设置新注册机构统计数据
+const clubProportion = function (type,data) {
+    const clubMap = {
+        3:{ // 新注册机构统计
+            fn:function () {
+                $('.eachts-total').show();
+                $('#clubProportionNone').hide();
+                $('#clubProportion').show();
+            },
+            id:'clubProportion',
+            series:{
+                name:'机构活跃占比',
+                color:['#3aa0ff','#36cbcb','#fad337','#4dcb73','#f2637b','#975fe4'],
+                seriesData: data.clubProportion.clubInfo
+            },
+        }
+    }
+    getclubProportionEacths(clubMap[type].fn,clubMap[type].id,clubMap[type].series);
+}
 // 基于准备好的dom,初始化echarts实例
 const getClubEacths = function (handleFn,id,data) {
     // 基于准备好的dom,初始化echarts实例
@@ -419,3 +446,48 @@ const getClubActiveEacths = function (handleFn, id, data, active, unActive) {
     myChart.setOption(option);
     window.onresize = myChart.resize;//移动适配
 };
+
+// 基于准备好的dom,初始化echarts实例
+const getclubProportionEacths = function (handleFn,id,data) {
+    // 基于准备好的dom,初始化echarts实例
+    handleFn();
+    const myChart = echarts.init(document.getElementById(id));
+    const option = {
+        tooltip: {
+            trigger: 'item'
+        },
+        legend: {
+            orient: 'vertical',
+            bottom: '0%',
+            textStyle: {
+                fontSize: 14,
+                color:'#333333'
+            },
+        },
+        color:data.color,
+        series: [
+            {
+                name: data.name,
+                type: 'pie',
+                radius: ['30%', '50%'],
+                center: ['50%', '50%'],
+                avoidLabelOverlap: false,
+                emphasis: {
+                    itemStyle: {
+                        shadowBlur: 10,
+                        shadowOffsetX: 0,
+                        shadowColor: 'rgba(0, 0, 0, 0.5)'
+                    }
+                },
+                label: {
+                    show: false,
+                    position: 'center'
+                },
+                data:data.seriesData
+            }
+        ]
+    };
+    // 使用刚指定的配置项和数据显示图表。
+    myChart.setOption(option);
+    window.onresize = myChart.resize;//移动适配
+};