Explorar o código

机构分析统计

huangzhiguo %!s(int64=2) %!d(string=hai) anos
pai
achega
de1bfd40ad

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

@@ -14,7 +14,6 @@ import com.thinkgem.jeesite.common.persistence.DataEntity;
 public class ClubStatistics extends DataEntity<ClubStatistics> {
 
     private Integer userID;
-    @ExcelProperty(value = "机构ID")
     private Integer clubID;
 
     private String registerStartTime;       //注册开始时间

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

@@ -238,12 +238,46 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
         statistics.setYearStartTime(dateFormat.format(calendar.getTime()));
         List<ClubStatistics> selStatisticsList = new ArrayList<>();
         if (StringUtils.isNotBlank(statistics.getClubDataIntegrity())) {
+            // 初始化查询条件,排除sql分页
             ClubStatistics clubData = new ClubStatistics();
             clubData.setMonthStartTime(statistics.getMonthStartTime());
             clubData.setMonthEndTime(statistics.getMonthEndTime());
             clubData.setYearStartTime(statistics.getYearStartTime());
             clubData.setYearEndTime(statistics.getYearEndTime());
             clubData.setClubDataIntegrity(statistics.getClubDataIntegrity());
+            if (StringUtils.isNotBlank(statistics.getRegisterStartTime())) {
+                clubData.setRegisterStartTime(statistics.getRegisterStartTime());
+            }
+            if (StringUtils.isNotBlank(statistics.getRegisterEndTime())) {
+                clubData.setRegisterEndTime(statistics.getRegisterEndTime());
+            }
+            if (StringUtils.isNotBlank(statistics.getSearchStartTime())) {
+                clubData.setSearchStartTime(statistics.getSearchStartTime());
+            }
+            if (StringUtils.isNotBlank(statistics.getSearchEndTime())) {
+                clubData.setSearchEndTime(statistics.getSearchEndTime());
+            }
+            if (StringUtils.isNotBlank(statistics.getCustomerValue())) {
+                clubData.setCustomerValue(statistics.getCustomerValue());
+            }
+            if (StringUtils.isNotBlank(statistics.getSearchUserIdentity())) {
+                clubData.setSearchUserIdentity(statistics.getSearchUserIdentity());
+            }
+            if (StringUtils.isNotBlank(statistics.getSearchStatus())) {
+                clubData.setSearchStatus(statistics.getSearchStatus());
+            }
+            clubData.setLinkManIdentity(statistics.getLinkManIdentity());
+            clubData.setCustomStartTime(statistics.getCustomStartTime());
+            clubData.setCustomEndTime(statistics.getCustomEndTime());
+            clubData.setPayTotalMonth(statistics.getPayTotalMonth());
+            clubData.setPayTotalYear(statistics.getPayTotalYear());
+            clubData.setPayTotal(statistics.getPayTotal());
+            clubData.setPayTotalMonthType(statistics.getPayTotalMonthType());
+            clubData.setOrderCountMonthType(statistics.getOrderCountMonthType());
+            clubData.setPayTotalYearType(statistics.getPayTotalYearType());
+            clubData.setOrderCountYearType(statistics.getOrderCountYearType());
+            clubData.setPayTotalType(statistics.getPayTotalType());
+
             selStatisticsList = newCmClubDao.selStatisticsList(clubData);
         } else {
             selStatisticsList = newCmClubDao.selStatisticsList(statistics);

+ 6 - 2
src/main/java/com/caimei/modules/user/web/CmUserBehaviorRecordController.java

@@ -151,9 +151,13 @@ public class CmUserBehaviorRecordController extends BaseController {
 
         String wwwServer = Global.getConfig("wwwServer");
         //营业执照
-        newCmClub.setBusinessLicenseImage(AppUtils.getImageURL("clubBusinessLicenseImage", newCmClub.getBusinessLicenseImage(), 0, wwwServer));
+        if (StringUtils.isNotBlank(newCmClub.getBusinessLicenseImage())) {
+            newCmClub.setBusinessLicenseImage(AppUtils.getImageURL("clubBusinessLicenseImage", newCmClub.getBusinessLicenseImage(), 0, wwwServer));
+        }
         //门头照
-        newCmClub.setHeadpic(AppUtils.getImageURL("club", newCmClub.getHeadpic(), AppKeys.CLUB_LOGO_SIZE, wwwServer));
+        if (StringUtils.isNotBlank(newCmClub.getHeadpic())) {
+            newCmClub.setHeadpic(AppUtils.getImageURL("club", newCmClub.getHeadpic(), AppKeys.CLUB_LOGO_SIZE, wwwServer));
+        }
 
         model.addAttribute("cmClubinfo", cmClubinfo);
         model.addAttribute("newCmClub", newCmClub);

+ 6 - 2
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -1563,9 +1563,13 @@ public class AgencyController extends BaseController {
 
         String wwwServer = Global.getConfig("wwwServer");
         //营业执照
-        newCmClub.setBusinessLicenseImage(AppUtils.getImageURL("clubBusinessLicenseImage", newCmClub.getBusinessLicenseImage(), 0, wwwServer));
+        if (StringUtils.isNotBlank(newCmClub.getBusinessLicenseImage())) {
+            newCmClub.setBusinessLicenseImage(AppUtils.getImageURL("clubBusinessLicenseImage", newCmClub.getBusinessLicenseImage(), 0, wwwServer));
+        }
         //门头照
-        newCmClub.setHeadpic(AppUtils.getImageURL("club", newCmClub.getHeadpic(), AppKeys.CLUB_LOGO_SIZE, wwwServer));
+        if (StringUtils.isNotBlank(newCmClub.getHeadpic())) {
+            newCmClub.setHeadpic(AppUtils.getImageURL("club", newCmClub.getHeadpic(), AppKeys.CLUB_LOGO_SIZE, wwwServer));
+        }
 
         model.addAttribute("cmClubinfo", cmClubinfo);
         model.addAttribute("newCmClub", newCmClub);

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

@@ -78,7 +78,7 @@
                 AND cbr.accessDate = #{accessDate}
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                AND cbr.accessDate between #{startTime} and #{endTime}
+                AND cbr.accessDate <![CDATA[ >= ]]> #{startTime} AND cbr.accessDate <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY cbr.pageLabel
@@ -99,7 +99,7 @@
                 AND addTime like concat('%', #{accessDate},'%')
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                AND addTime between #{startTime} and #{endTime}
+                AND addTime <![CDATA[ >= ]]> #{startTime} AND addTime <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY remarks ORDER BY COUNT(remarks) LIMIT 10
@@ -119,7 +119,7 @@
                 AND cbr.accessDate like concat('%', #{accessDate},'%')
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                AND cbr.accessDate between #{startTime} and #{endTime}
+                AND cbr.accessDate <![CDATA[ >= ]]> #{startTime} AND cbr.accessDate <![CDATA[ <= ]]> #{endTime}
             </if>
         </where>
         GROUP BY cbr.pageType  ORDER BY COUNT(cbr.pageType) LIMIT 10

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

@@ -1071,8 +1071,8 @@
             <if test="linkManIdentity != null and linkManIdentity != ''">
                 AND c.linkManIdentity = #{linkManIdentity}
             </if>
-            <if test="clubDataIntegrity != null and clubDataIntegrity != ''">
-                AND c.status = #{clubDataIntegrity}
+            <if test="searchStatus != null and searchStatus != ''">
+                AND c.status = #{searchStatus}
             </if>
             <if test="payTotalMonth != null and payTotalMonth != ''">
                 <if test="payTotalMonth==1">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -425,7 +425,7 @@
                 </form:select>
             </div>
             <div class="item">
-                <input id="searchValidFlag" value="${searchValidFlag}" style="display: none"/>
+                <input id="searchValidFlag" value="${product.searchValidFlag}" style="display: none"/>
                 <label>商品状态:</label>
                 <label><input type="checkbox" name="searchValidFlag" onchange="checkNot()" id="validCheck2" class="validCheck"
                               value="2">已上架</label>

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

@@ -128,7 +128,7 @@
             </form:select>
         </div><br/><br/>
         <div class="viewDiv">
-            <input id="btnSubmit" class="btn autoView btn-primary" type="submit" value="查询" onclick="subClick()"/>
+            <input id="btnSubmit" class="btn autoView btn-primary" type="button" value="查询"/>
             <input id="export" class="btn autoView btn-primary" type="button" value="导出"/>
 <%--            <a href="${ctx}/new/user/agency/club/export?" class="btn autoView btn-primary" value="导出"></a>--%>
 <%--            <a id="export" href="${ctx}/new/user/agency/club/export?" class="btn autoView btn-primary" onclick="reExport()">导出</a>--%>
@@ -313,30 +313,6 @@ function page(n,s) {
     $('#searchForm').submit();
     return false;
 }
-function subClick() {
-    const payTotalMonth = $('#payTotalMonth').val();
-    const payTotalYear = $('#payTotalYear').val();
-    const customStartTime = $('#customStartTime').val();
-    const customEndTime = $('#customEndTime').val();
-    const payTotal = $('#payTotal').val();
-    console.log(customStartTime+'----'+customEndTime);
-    if ((customStartTime.length !== 0 || customStartTime !== '') && (customEndTime.length !== 0 || customEndTime !== '')) {
-        if (payTotalMonth.length !== 0 || payTotalMonth !== '') {
-            $.jBox.confirm("自定义统计时间不能与近一个月/近一年购买额联动查询", "提示");
-            return;
-        }
-        if (payTotalYear.length !== 0 || payTotalYear !== '') {
-            $.jBox.confirm("自定义统计时间不能与近一个月/近一年购买额联动查询", "提示");
-            return;
-        }
-        if (payTotal.length === 0 || payTotal === '') {
-            $.jBox.confirm("自定义统计时间需要与总购买额一起联动查询", "提示");
-            return;
-        }
-    }
-    $('#searchForm').submit();
-    return;
-}
 $(function () {
     const typeMap = {
         1: {
@@ -391,10 +367,29 @@ $(function () {
         var formData = $('#searchForm').serialize()
         window.location.href= "${ctx}/new/user/agency/club/export?"+formData
     })
-    // $('.sort-button .icon').click(function () {
-    //     $(this).addClass('active')
-    //     $(this).siblings('.icon').removeClass("active");
-    // })
+   $('#btnSubmit').click(function () {
+       const payTotalMonth = $('#payTotalMonth').val();
+       const payTotalYear = $('#payTotalYear').val();
+       const customStartTime = $('#customStartTime').val();
+       const customEndTime = $('#customEndTime').val();
+       const payTotal = $('#payTotal').val();
+       console.log(customStartTime+'----'+customEndTime);
+       if ((customStartTime.length !== 0 || customStartTime !== '') && (customEndTime.length !== 0 || customEndTime !== '')) {
+           if (payTotalMonth.length !== 0 || payTotalMonth !== '') {
+               $.jBox.confirm("自定义统计时间不能与近一个月/近一年购买额联动查询", "提示");
+               return;
+           }
+           if (payTotalYear.length !== 0 || payTotalYear !== '') {
+               $.jBox.confirm("自定义统计时间不能与近一个月/近一年购买额联动查询", "提示");
+               return;
+           }
+           if (payTotal.length === 0 || payTotal === '') {
+               $.jBox.confirm("自定义统计时间需要与总购买额一起联动查询", "提示");
+               return;
+           }
+       }
+       $('#searchForm').submit();
+   })
 })
 /*function reExport() {
     var formData = $('#searchForm').serialize()

+ 32 - 29
src/main/webapp/WEB-INF/views/modules/userNew/cmClubData.jsp

@@ -28,9 +28,9 @@
         <div class="flex-header">
             <div class="flex-header-main">
                 <div class="header-main-box">
-                    <c:if test="${newCmClub.name ne null}"><p>机构名称:<span>${newCmClub.name}</span></p></c:if>
-                    <c:if test="${newCmClub.userName ne null}"> <p>联系人:<span>${newCmClub.userName}</span></p></c:if>
-                    <c:if test="${newCmClub.linkManIdentity ne null}">
+                    <c:if test="${newCmClub.name ne null and newCmClub.name ne ''}"><p>机构名称:<span>${newCmClub.name}</span></p></c:if>
+                    <c:if test="${newCmClub.userName ne null and newCmClub.userName ne ''}"> <p>联系人:<span>${newCmClub.userName}</span></p></c:if>
+                    <c:if test="${newCmClub.linkManIdentity ne null and newCmClub.linkManIdentity ne ''}">
                         <p>联系人身份:
                             <span>
                                 <c:if test="${newCmClub.linkManIdentity eq '1'}">老板</c:if>
@@ -40,8 +40,8 @@
                             </span>
                         </p>
                     </c:if>
-                    <c:if test="${newCmClub.bindMobile ne null}"><p>手机号:<span>${newCmClub.bindMobile}</span></p></c:if>
-                    <c:if test="${cmClubinfo.firstClubType ne null and cmClubinfo.secondClubType ne null}">
+                    <c:if test="${newCmClub.bindMobile ne null and newCmClub.bindMobile ne ''}"><p>手机号:<span>${newCmClub.bindMobile}</span></p></c:if>
+                    <c:if test="${cmClubinfo.firstClubType ne null and cmClubinfo.firstClubType ne ''}">
                         <p>机构类型:
                             <span>
                                 <c:if test="${cmClubinfo.firstClubType == '1'}">医美</c:if>
@@ -49,24 +49,27 @@
                                 <c:if test="${cmClubinfo.firstClubType == '3'}">项目公司</c:if>
                                 <c:if test="${cmClubinfo.firstClubType == '4'}">个人</c:if>
                                 <c:if test="${cmClubinfo.firstClubType == '5'}">其他</c:if>
-
-                                <c:if test="${cmClubinfo.secondClubType eq '1'}"> - 诊所</c:if>
-                                <c:if test="${cmClubinfo.secondClubType eq '2'}"> - 门诊</c:if>
-                                <c:if test="${cmClubinfo.secondClubType eq '3'}"> - 医院</c:if>
-                                <c:if test="${cmClubinfo.secondClubType eq '4'}"> - 其他</c:if>
-                                <c:if test="${cmClubinfo.secondClubType eq '5'}"> - 美容院</c:if>
-                                <c:if test="${cmClubinfo.secondClubType eq '6'}"> - 养生馆</c:if>
-                                <c:if test="${cmClubinfo.secondClubType eq '7'}"> - 其他</c:if>
                             </span>
+                            <c:if test="${cmClubinfo.secondClubType ne null and cmClubinfo.secondClubType ne ''}">
+                                <span>
+                                    <c:if test="${cmClubinfo.secondClubType eq '1'}"> - 诊所</c:if>
+                                    <c:if test="${cmClubinfo.secondClubType eq '2'}"> - 门诊</c:if>
+                                    <c:if test="${cmClubinfo.secondClubType eq '3'}"> - 医院</c:if>
+                                    <c:if test="${cmClubinfo.secondClubType eq '4'}"> - 其他</c:if>
+                                    <c:if test="${cmClubinfo.secondClubType eq '5'}"> - 美容院</c:if>
+                                    <c:if test="${cmClubinfo.secondClubType eq '6'}"> - 养生馆</c:if>
+                                    <c:if test="${cmClubinfo.secondClubType eq '7'}"> - 其他</c:if>
+                                </span>
+                            </c:if>
                         </p>
                     </c:if>
-                    <c:if test="${newCmClub.province ne null and newCmClub.city ne null and newCmClub.town ne null and newCmClub.address ne null}"><p>地址:<span>${newCmClub.province } ${newCmClub.city } ${newCmClub.town } ${newCmClub.address}</span></p></c:if>
-                    <c:if test="${newCmClub.status ne null}"><p>状态:<span>${fns:getDictLabel(newCmClub.status, 'club_status', newCmClub.status)}</span></p></c:if>
-                    <c:if test="${newCmClub.registerTime ne null}"><p>注册时间:<span><fmt:formatDate value="${newCmClub.registerTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span></p></c:if>
+                    <c:if test="${newCmClub.province ne null and newCmClub.province ne '' and newCmClub.city ne null and newCmClub.city ne '' and newCmClub.town ne null and newCmClub.town ne '' and newCmClub.address ne null and newCmClub.address ne ''}"><p>地址:<span>${newCmClub.province } ${newCmClub.city } ${newCmClub.town } ${newCmClub.address}</span></p></c:if>
+                    <c:if test="${newCmClub.status ne null and newCmClub.status ne ''}"><p>状态:<span>${fns:getDictLabel(newCmClub.status, 'club_status', newCmClub.status)}</span></p></c:if>
+                    <c:if test="${newCmClub.registerTime ne null and newCmClub.registerTime ne ''}"><p>注册时间:<span><fmt:formatDate value="${newCmClub.registerTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span></p></c:if>
                 </div>
                 <div class="header-main-box">
                     <div class="main-box">
-                        <c:if test="${cmClubinfo.userIdentity ne null and cmClubinfo.svipUserFlag ne null}">
+                        <c:if test="${cmClubinfo.userIdentity ne null and cmClubinfo.userIdentity ne '' and cmClubinfo.svipUserFlag ne null and cmClubinfo.svipUserFlag ne ''}">
                             <div class="main-box-tp">
                                 <p>机构类别:
                                     <span>
@@ -78,7 +81,7 @@
                                 </p>
                             </div>
                         </c:if>
-                        <c:if test="${cmClubinfo.medicalPracticeLicenseImg ne null}">
+                        <c:if test="${cmClubinfo.medicalPracticeLicenseImg ne null and cmClubinfo.medicalPracticeLicenseImg ne ''}">
                             <div class="main-box-bt">
                                 <p>医疗许可证:</p>
                                 <a class="main-box-img" target="_blank" href="${cmClubinfo.medicalPracticeLicenseImg}"><img src="${cmClubinfo.medicalPracticeLicenseImg}"/></a>
@@ -86,12 +89,12 @@
                         </c:if>
                     </div>
                     <div class="main-box">
-                        <c:if test="${newCmClub.socialCreditCode ne null}">
+                        <c:if test="${newCmClub.socialCreditCode ne null and newCmClub.socialCreditCode ne ''}">
                             <div class="main-box-tp">
                                 <p>营业执照编号:<span>${newCmClub.socialCreditCode}</span></p>
                             </div>
                         </c:if>
-                        <c:if test="${newCmClub.businessLicenseImage ne null}">
+                        <c:if test="${newCmClub.businessLicenseImage ne null and newCmClub.businessLicenseImage ne ''}">
                             <div class="main-box-bt">
                                 <p>营业执照:</p>
                                 <a class="main-box-img" target="_blank" href="${newCmClub.businessLicenseImage}"><img src="${newCmClub.businessLicenseImage}"/></a>
@@ -102,48 +105,48 @@
             </div>
         </div>
         <div class="flex-content">
-            <c:if test="${newCmClub.sname ne null}">
+            <c:if test="${newCmClub.sname ne null and newCmClub.sname ne ''}">
                 <div class="flex-p">
                     <p>机构简称:<span>${newCmClub.sname}</span></p>
                 </div>
             </c:if>
-            <c:if test="${newCmClub.contractEmail ne null}">
+            <c:if test="${newCmClub.contractEmail ne null and newCmClub.contractEmail ne ''}">
                 <div class="flex-p">
                     <p>注册邮箱:<span>${newCmClub.contractEmail}</span></p>
                 </div>
             </c:if>
-            <c:if test="${newCmClub.headpic ne null}">
+            <c:if test="${newCmClub.headpic ne null and newCmClub.headpic ne ''}">
                 <div class="flex-p">
                     <p>门头照:<span></span></p>
                     <a class="flex-p-img" target="_blank" href="${newCmClub.headpic}"><img src="${newCmClub.headpic}" alt=""></a>
                 </div>
             </c:if>
-            <c:if test="${cmClubinfo.department ne null}">
+            <c:if test="${cmClubinfo.department ne null and cmClubinfo.department ne ''}">
                 <div class="flex-p">
                     <p>科室:<span>${cmClubinfo.department}</span></p>
                 </div>
             </c:if>
-            <c:if test="${cmClubinfo.mainpro ne null}">
+            <c:if test="${cmClubinfo.mainpro ne null and cmClubinfo.mainpro ne ''}">
                 <div class="flex-p">
                     <p>主营内容:<span>${cmClubinfo.mainpro}</span></p>
                 </div>
             </c:if>
-            <c:if test="${cmClubinfo.contractPhone ne null}">
+            <c:if test="${cmClubinfo.contractPhone ne null and cmClubinfo.contractPhone ne ''}">
                 <div class="flex-p">
                     <p>固定电话:<span>${cmClubinfo.contractPhone}</span></p>
                 </div>
             </c:if>
-            <c:if test="${cmClubinfo.fax ne null}">
+            <c:if test="${cmClubinfo.fax ne null and cmClubinfo.fax ne ''}">
                 <div class="flex-p">
                     <p>传真:<span>${cmClubinfo.fax}</span></p>
                 </div>
             </c:if>
-            <c:if test="${cmClubinfo.empnum ne null}">
+            <c:if test="${cmClubinfo.empnum ne null and cmClubinfo.empnum ne ''}">
                 <div class="flex-p">
                     <p>员工人数:<span>${cmClubinfo.empnum}</span></p>
                 </div>
             </c:if>
-            <c:if test="${cmClubinfo.info ne null}">
+            <c:if test="${cmClubinfo.info ne null and cmClubinfo.info ne ''}">
                 <div class="flex-p">
                     <p>公司简介:<span>${cmClubinfo.info}</span></p>
                 </div>

+ 7 - 7
src/main/webapp/WEB-INF/views/modules/userNew/cmClubPortrait.jsp

@@ -22,25 +22,25 @@
     <div class="main-content">
         <div class="flex-header">
             <div class="flex-header-main">
-                <c:if test="${statistics.name ne null}">
+                <c:if test="${statistics.name ne null and statistics.name ne ''}">
                     <p><i class="icon i1"></i><span>${statistics.name}</span></p>
                 </c:if>
-                <c:if test="${statistics.linkMan ne null}">
+                <c:if test="${statistics.linkMan ne null and statistics.linkMan ne ''}">
                     <p><i class="icon i2"></i><span>${statistics.linkMan}</span></p>
                 </c:if>
-                <c:if test="${statistics.linkManStatus ne null}">
+                <c:if test="${statistics.linkManStatus ne null and statistics.linkManStatus ne ''}">
                     <p><i class="icon i3"></i><span>${statistics.linkManStatus}</span></p>
                 </c:if>
-                <c:if test="${statistics.contractMobile ne null}">
+                <c:if test="${statistics.contractMobile ne null and statistics.contractMobile ne ''}">
                     <p><i class="icon i4"></i><span>${statistics.contractMobile}</span></p>
                 </c:if>
-                <c:if test="${statistics.clubType ne null}">
+                <c:if test="${statistics.clubType ne null and statistics.clubType ne ''}">
                     <p><i class="icon i5"></i><span>${statistics.clubType}</span></p>
                 </c:if>
-                <c:if test="${statistics.province ne null}">
+                <c:if test="${statistics.province ne null and statistics.province ne ''}">
                     <p><i class="icon i6"></i><span>${statistics.province}</span><span>${statistics.city}</span><span>${statistics.town}</span></p>
                 </c:if>
-                <c:if test="${statistics.addTime ne null}">
+                <c:if test="${statistics.addTime ne null and statistics.addTime ne ''}">
                     <p><i class="icon i7"></i><span>${statistics.addTime}</span></p>
                 </c:if>
             </div>