From 33d82cdff305ce4cb784638edc258b7bb8397353 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Wed, 06 Jan 2021 15:44:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/api' into api

---
 zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopProductDao.java                       |    2 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml                                |   58 +
 zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml                              |   13 
 zq-erp/src/main/java/com/matrix/system/app/dto/ArticleListDto.java                           |   26 
 zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/StatisticsParamVo.java             |   35 
 zq-erp/src/main/java/com/matrix/system/app/dto/SkinCheckListDto.java                         |   22 
 zq-erp/src/main/java/com/matrix/system/app/dto/BusinessesDto.java                            |   45 
 zq-erp/src/main/java/com/matrix/system/app/vo/BeauticianVo.java                              |   30 
 zq-erp/src/main/java/com/matrix/system/app/vo/UserInfoVo.java                                |   11 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java                    |   51 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java                        |   38 
 zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckListVo.java                           |   69 +
 zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java                              |    4 
 zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDetailVo.java                         |   80 +
 zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java                |   15 
 zq-erp/src/main/java/com/matrix/system/hive/dao/SysBusinessDataDao.java                      |    5 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/DataAnalysisCustomerServiceImpl.java |  192 +++
 zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/Caculate.java                      |    4 
 zq-erp/src/main/java/com/matrix/system/app/dto/UsersQueryDto.java                            |   23 
 zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java                             |    5 
 zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java                     |    5 
 zq-erp/src/main/resources/config/system.properties                                           |    2 
 zq-erp/src/main/java/com/matrix/system/app/mapper/SysSkinCheckRecordMapper.java              |   38 
 zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoListVo.java                             |   12 
 zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java                      |  111 ++
 zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml                              |   56 +
 zq-erp/src/main/java/com/matrix/system/app/mapper/SysUsersMapper.java                        |    2 
 zq-erp/src/main/java/com/matrix/system/app/vo/VipAchieveDataShowVo.java                      |  147 ++
 zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java                           |    5 
 zq-erp/src/main/java/com/matrix/system/app/dto/VipStatisticsParamDto.java                    |  100 ++
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java                               |   10 
 zq-erp/src/main/java/com/matrix/system/app/mapper/QuestionMapper.java                        |   31 
 zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java                             |   78 +
 zq-erp/src/main/java/com/matrix/system/app/action/ApiSkinCheckAction.java                    |   80 +
 zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml                              |    2 
 zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java                          |   32 
 zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java                                |    4 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/ArticleServiceImpl.java              |    7 
 zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml                                 |   13 
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml                          |   10 
 zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDiagnoseItemVo.java                   |   31 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java                      |  100 ++
 zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java                    |   21 
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java              |   73 -
 zq-erp/src/main/java/com/matrix/system/hive/service/ArticleService.java                      |    1 
 zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml                             |   14 
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java                     |   11 
 zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml                         |   85 +
 zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml                      |    9 
 zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml                                |  393 +++++++
 zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerItemDto.java                    |   56 +
 zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerDto.java                        |   38 
 zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckAnalysisItems.java                    |   77 +
 zq-erp/src/main/java/com/matrix/system/app/dto/RankingDto.java                               |   43 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java                       |   16 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java             |   11 
 zq-erp/src/main/java/com/matrix/system/app/vo/RankingVo.java                                 |   69 +
 zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java                 |   42 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java                   |  222 ++++
 zq-erp/src/main/java/com/matrix/system/app/action/ApiShopInfoAction.java                     |   42 
 zq-erp/src/main/java/com/matrix/system/app/vo/QuestionVo.java                                |   88 +
 zq-erp/src/main/java/com/matrix/system/hive/bean/ArticleType.java                            |   10 
 zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java                      |   65 +
 63 files changed, 2,870 insertions(+), 120 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
index 266baef..a9c7719 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
@@ -4,7 +4,6 @@
 import com.matrix.component.redis.RedisClient;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.UUIDUtil;
-import com.matrix.system.app.authority.AppAuthorityManager;
 import com.matrix.system.app.dto.LoginDto;
 import com.matrix.system.app.vo.UserInfoVo;
 import com.matrix.system.common.authority.DefaultAuthorityManager;
@@ -12,6 +11,7 @@
 import com.matrix.system.common.authority.strategy.LoginStrategy;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.service.SysUsersService;
+import com.matrix.system.hive.bean.SysShopInfo;
 import com.matrix.system.hive.service.SysShopInfoService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -19,10 +19,7 @@
 import io.swagger.annotations.ApiResponses;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @author wzy
@@ -40,7 +37,7 @@
     private SysShopInfoService sysShopInfoService;
 
     @Autowired
-    private AppAuthorityManager authorityManager;
+    private DefaultAuthorityManager authorityManager;
 
     @Autowired
     private RedisClient redisClient;
@@ -58,8 +55,11 @@
         LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService);
         user = authorityManager.login(apLogin);
 
+        UserInfoVo userInfoVo = new UserInfoVo();
         if(user.getShopId()!=null){
-            user.setShopName(sysShopInfoService.findById(user.getShopId()).getShopName());
+            SysShopInfo shopInfo = sysShopInfoService.findById(user.getShopId());
+            user.setShopName(shopInfo.getShopName());
+            userInfoVo.setShopName(shopInfo.getShopShortName());
         }
         user.setSuPassword(null);
 
@@ -67,7 +67,6 @@
         redisClient.saveValueForever(token, JSONObject.toJSONString(user));
         redisClient.saveValueForever(user.getSuId().toString(), token);
 
-        UserInfoVo userInfoVo = new UserInfoVo();
         userInfoVo.setId(user.getSuId());
         userInfoVo.setName(user.getSuName());
         userInfoVo.setRoleName(user.getRoleName());
@@ -79,4 +78,5 @@
         result.putInMap("token", token);
         return result;
     }
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
index 2e23de7..5089f28 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
@@ -1,8 +1,17 @@
 package com.matrix.system.app.action;
 
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.system.app.dto.ArticleListDto;
+import com.matrix.system.hive.action.BaseController;
+import com.matrix.system.hive.bean.Article;
+import com.matrix.system.hive.bean.ArticleType;
+import com.matrix.system.hive.service.ArticleService;
+import com.matrix.system.hive.service.ArticleTypeService;
 import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @author wzy
@@ -11,6 +20,42 @@
 @Api(value = "ApiKnowledgeAction", tags = "知识库接口类")
 @RestController
 @RequestMapping(value = "/api/know")
-public class ApiKnowledgeAction {
+public class ApiKnowledgeAction extends BaseController {
+
+    @Autowired
+    private ArticleTypeService articleTypeService;
+
+    @Autowired
+    private ArticleService articleService;
+
+    @ApiOperation(value = "获取知识库分类", notes = "获取知识库分类")
+    @GetMapping(value = "/findKnowledgeType")
+    public AjaxResult findKnowledgeType() {
+        ArticleType type = new ArticleType();
+        type.setShopId(getMe().getShopId());
+        type.setParentId(0L);
+        return AjaxResult.buildSuccessInstance(articleTypeService.findByModel(type));
+    }
+
+    @ApiOperation(value = "根据分类获取文章列表", notes = "根据分类获取文章列表")
+    @PostMapping(value = "/findArticleList")
+    public AjaxResult findArticleList(@RequestBody ArticleListDto articleListDto) {
+        PaginationVO pageVo = new PaginationVO();
+        pageVo.setOffset((articleListDto.getPageNum() - 1) * articleListDto.getPageSize());
+        pageVo.setLimit(articleListDto.getPageSize());
+
+        Article article = new Article();
+        article.setTypeId(articleListDto.getTypeId());
+        return AjaxResult.buildSuccessInstance(articleService.findApiArticleListInPage(article, pageVo));
+    }
+
+    @ApiOperation(value = "获取文章详情页", notes = "获取文章详情页")
+    @GetMapping(value = "/findArticleDetail/{id}")
+    public AjaxResult findArticleDetail(@PathVariable("id") Long id) {
+        Article article = articleService.findById(id);
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功");
+        ajaxResult.putInMap("article", article);
+        return ajaxResult;
+    }
 
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
new file mode 100644
index 0000000..9389cc0
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
@@ -0,0 +1,100 @@
+package com.matrix.system.app.action;
+
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.DateUtil;
+import com.matrix.system.app.dto.RankingDto;
+import com.matrix.system.app.vo.RankingVo;
+import com.matrix.system.common.tools.DataAuthUtil;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.bean.AchieveNew;
+import com.matrix.system.hive.bean.SysOrder;
+import com.matrix.system.hive.dao.AchieveNewDao;
+import com.matrix.system.hive.service.AchieveNewService;
+import com.matrix.system.hive.service.SysOrderService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@Api(value = "ApiRankingAction", tags = "排行榜接口类")
+@RestController
+@RequestMapping(value ="/api/ranking")
+public class ApiRankingAction {
+
+    @Autowired
+    private SysOrderService sysOrderService;
+
+    @Autowired
+    private AchieveNewDao achieveNewDao;
+
+    @ApiOperation(value = "顾问业绩排行榜", notes = "顾问业绩排行榜")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
+    })
+    @PostMapping(value = "/findStaffAchieveRanking")
+    public AjaxResult findStaffAchieveRanking(@RequestBody RankingDto rankingDto) {
+        SysOrder sysOrder = new SysOrder();
+        if (DataAuthUtil.hasAllShopAuth()) {
+            QueryUtil.setQueryLimitCom(sysOrder);
+        } else {
+            QueryUtil.setQueryLimit(sysOrder);
+        }
+        sysOrder.setOrderTime(new Date());
+        sysOrder.setType(rankingDto.getType());
+        return AjaxResult.buildSuccessInstance(sysOrderService.findStaffSaleAchieveRanking(sysOrder));
+    }
+
+    @ApiOperation(value = "门店业绩排行榜", notes = "门店业绩排行榜")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
+    })
+    @PostMapping(value = "/findShopAchieveRanking")
+    public AjaxResult findShopAchieveRanking(@RequestBody RankingDto rankingDto) {
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("");
+        if (RankingDto.SALE.equals(rankingDto.getDataType())) {
+            SysOrder sysOrder = new SysOrder();
+            QueryUtil.setQueryLimitCom(sysOrder);
+            sysOrder.setType(rankingDto.getType());
+            sysOrder.setOrderTime(new Date());
+            List<RankingVo> list = sysOrderService.findApiShopAchieveRanking(sysOrder);
+            ajaxResult.setRows(list);
+        } else {
+            AchieveNew achieveNew = new AchieveNew();
+            QueryUtil.setQueryLimitCom(achieveNew);
+            achieveNew.setDatatime(new Date());
+            achieveNew.setT1(rankingDto.getType());
+            List<RankingVo> rankingVos = achieveNewDao.selectShopConsumeAchieveRanking(achieveNew);
+            ajaxResult.setRows(rankingVos);
+        }
+        return ajaxResult;
+    }
+
+    @ApiOperation(value = "美疗师业绩排行榜", notes = "美疗师业绩排行榜")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
+    })
+    @PostMapping(value = "/findBeauticianAchieveRanking")
+    public AjaxResult findBeauticianAchieveRanking(@RequestBody RankingDto rankingDto) {
+        AchieveNew achieveNew = new AchieveNew();
+        if (DataAuthUtil.hasAllShopAuth()) {
+            QueryUtil.setQueryLimitCom(achieveNew);
+        } else {
+            QueryUtil.setQueryLimit(achieveNew);
+        }
+        achieveNew.setDatatime(new Date());
+        achieveNew.setT1(rankingDto.getType());
+        return AjaxResult.buildSuccessInstance(achieveNewDao.selectBeauticianConsumeAchieveRanking(achieveNew));
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
index a2c7233..83a7b43 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -80,25 +80,31 @@
         queryUse.setVipId(serviceVipProjDto.getVipId());
         queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM);
         queryUse.setTaocanId(-1L);
-        switch (serviceVipProjDto.getType()) {
-            case "0" :
-                break;
-            case "1":
-                queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
-                queryUse.setIsOver(Dictionary.FLAG_NO_N);
-                break;
-            case "2":
-                queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX);
-                queryUse.setIsOver(Dictionary.FLAG_YES_Y);
-                break;
-            case "3":
-                queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1));
-                break;
-            default:
-                queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
-                queryUse.setIsOver(Dictionary.FLAG_NO_N);
-                break;
+        if (serviceVipProjDto.getType() != null) {
+            switch (serviceVipProjDto.getType()) {
+                case "0":
+                    break;
+                case "1":
+                    queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
+                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
+                    break;
+                case "2":
+                    queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX);
+                    queryUse.setIsOver(Dictionary.FLAG_YES_Y);
+                    break;
+                case "3":
+                    queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1));
+                    break;
+                default:
+                    queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
+                    queryUse.setIsOver(Dictionary.FLAG_NO_N);
+                    break;
+            }
+        } else {
+            queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
+            queryUse.setIsOver(Dictionary.FLAG_NO_N);
         }
+
         queryUse.setQueryKey(serviceVipProjDto.getQueryKey());
         List<SysProjUse> projList = projUseService.findInPage(queryUse, null);
         List<ServiceProjVo> serviceProjVos = SysProjUseMapper.INSTANCE.entityListToProjVoList(projList);
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiShopInfoAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiShopInfoAction.java
new file mode 100644
index 0000000..ca1c8b5
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiShopInfoAction.java
@@ -0,0 +1,42 @@
+package com.matrix.system.app.action;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.bean.SysShopInfo;
+import com.matrix.system.hive.service.SysShopInfoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author wzy
+ * @date 2020-12-30
+ **/
+@Api(value = "ApiShopInfoAction", tags = "店铺信息接口类")
+@RestController
+@RequestMapping(value = "/api/shop")
+public class ApiShopInfoAction {
+
+    @Autowired
+    private SysShopInfoService shopInfoService;
+
+    @ApiOperation(value = "获取门店列表", notes = "获取门店列表")
+    @GetMapping(value = "/findAllShopList")
+    public AjaxResult findAllShopList() {
+        SysShopInfo shopInfo = new SysShopInfo();
+        QueryUtil.setQueryLimitCom(shopInfo);
+        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+        if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
+            shopInfo.setId(sysUsers.getShopId());
+        }
+
+        return AjaxResult.buildSuccessInstance(shopInfoService.findByModel(shopInfo));
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiSkinCheckAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiSkinCheckAction.java
index 78dbbc9..1763057 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiSkinCheckAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiSkinCheckAction.java
@@ -1,8 +1,28 @@
 package com.matrix.system.app.action;
 
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.app.dto.SkinCheckListDto;
+import com.matrix.system.app.mapper.SysSkinCheckRecordMapper;
+import com.matrix.system.app.vo.SkinCheckAnalysisItems;
+import com.matrix.system.app.vo.SkinCheckDetailVo;
+import com.matrix.system.app.vo.SkinCheckDiagnoseItemVo;
+import com.matrix.system.app.vo.SkinCheckListVo;
+import com.matrix.system.hive.bean.SysSkinCheckRecord;
+import com.matrix.system.hive.dao.SysSkinCheckRecordDao;
+import com.matrix.system.hive.plugin.util.CollectionUtils;
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import com.matrix.system.shopXcx.dao.ShopProductDao;
 import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * @author wzy
@@ -13,4 +33,60 @@
 @RequestMapping(value = "/api/skinCheck")
 public class ApiSkinCheckAction {
 
+    @Autowired
+    private SysSkinCheckRecordDao sysSkinCheckRecordDao;
+
+    @Autowired
+    private ShopProductDao shopProductDao;
+
+    @ApiOperation(value = "获取皮肤检测列表", notes = "获取皮肤检测列表")
+    @PostMapping(value = "/findSkinCheckList")
+    public AjaxResult findSkinCheckList(@RequestBody @Validated SkinCheckListDto skinCheckListDto) {
+        SysSkinCheckRecord sysSkinCheckRecord = new SysSkinCheckRecord();
+        sysSkinCheckRecord.setUserId(skinCheckListDto.getVipId());
+
+        PaginationVO pageVo = new PaginationVO();
+        pageVo.setOffset((skinCheckListDto.getPageNum() - 1) * skinCheckListDto.getPageSize());
+        pageVo.setLimit(skinCheckListDto.getPageSize());
+        pageVo.setSort("t1.create_time");
+        pageVo.setOrder("desc");
+
+        List<SysSkinCheckRecord> dataList = sysSkinCheckRecordDao.selectInPage(sysSkinCheckRecord, pageVo);
+        List<SkinCheckListVo> list = SysSkinCheckRecordMapper.INSTANCE.entitiesToListVos(dataList);
+        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, list,
+                sysSkinCheckRecordDao.selectTotalRecord(sysSkinCheckRecord));
+        return result;
+    }
+
+
+    @ApiOperation(value = "获取皮肤检测详情", notes = "获取皮肤检测详情")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = SkinCheckDetailVo.class)
+    })
+    @GetMapping(value = "/findSkinCheckDetail/{id}")
+    public AjaxResult findSkinCheckDetail(@PathVariable("id") Long id) {
+
+        SysSkinCheckRecord sysSkinCheckRecord = sysSkinCheckRecordDao.selectById(id);
+
+        SysSkinCheckRecordMapper instance = SysSkinCheckRecordMapper.INSTANCE;
+        SkinCheckDetailVo detail = instance.entityToDetailVo(sysSkinCheckRecord);
+        detail.setSex(sysSkinCheckRecord.getSex());
+        List<SkinCheckDiagnoseItemVo> diagnoseItems = instance.entitiesToDiagnoseItems(sysSkinCheckRecord.getAnalysisDetail());
+        List<SkinCheckAnalysisItems> analysisItems = instance.entitiesToAnalysisItems(sysSkinCheckRecord.getSkinDetails());
+
+        analysisItems.forEach(item -> {
+            List<Integer> ids = StringUtils.strToCollToInteger(item.getProductIds(), ",");
+            if(CollectionUtils.isNotEmpty(ids)){
+                List<String> shopProducts = shopProductDao.selectProductNameByIds(ids);
+                item.setProducts(shopProducts);
+            }
+        });
+
+        detail.setDiagnoseItems(diagnoseItems);
+        detail.setAnalysisItems(analysisItems);
+
+        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功");
+        ajaxResult.putInMap("detail", detail);
+        return ajaxResult;
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java
new file mode 100644
index 0000000..3363c1e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiStatisticsAction.java
@@ -0,0 +1,222 @@
+package com.matrix.system.app.action;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.app.dto.BusinessesDto;
+import com.matrix.system.app.dto.VipStatisticsParamDto;
+import com.matrix.system.app.vo.BeauticianVo;
+import com.matrix.system.app.vo.BusinessesDataShowVo;
+import com.matrix.system.app.vo.VipAchieveDataShowVo;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.hive.action.util.QueryUtil;
+import com.matrix.system.hive.bean.AchieveNew;
+import com.matrix.system.hive.bean.SysBusinessData;
+import com.matrix.system.hive.dao.SysBusinessDataDao;
+import com.matrix.system.hive.service.imp.DataAnalysisCustomerServiceImpl;
+import com.matrix.system.hiveErp.analysUtil.Caculate;
+import com.matrix.system.hiveErp.analysUtil.SeriesVo;
+import com.matrix.system.hiveErp.analysUtil.StatisticsParamVo;
+import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam;
+import com.matrix.system.hiveErp.dao.TjVipSumDao;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@Api(value = "ApiStatisticsAction", tags = "报表接口类")
+@RestController
+@RequestMapping(value = "/api/statistics")
+public class ApiStatisticsAction {
+
+    @Autowired
+    TjVipSumDao tjVipSumDao;
+
+    @Autowired
+    private SysBusinessDataDao sysBusinessDataDao;
+
+    @Autowired
+    private DataAnalysisCustomerServiceImpl dataAnalysisCustomerService;
+
+    @ApiOperation(value = "公司经营报表/门店经营报表")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = BusinessesDataShowVo.class)
+    })
+    @PostMapping(value = "/findShopBusinessesData")
+    public AjaxResult findShopBusinessesData(@RequestBody BusinessesDto businessesDto) {
+        SysBusinessData sysBusinessData = new SysBusinessData();
+        // 若shopId为空,则查询门店经营报表
+        if (businessesDto.getShopId() == null) {
+            sysBusinessData.setShopId(businessesDto.getShopId());
+        }
+        QueryUtil.setQueryLimitCom(sysBusinessData);
+
+        if (BusinessesDto.DAY.equals(businessesDto.getType())) {
+            sysBusinessData.setT1("%Y-%m-%d");
+        } else {
+            sysBusinessData.setT1("%Y-%m");
+        }
+        PaginationVO pageVo = new PaginationVO();
+        pageVo.setOffset((businessesDto.getPageNum() - 1) * businessesDto.getPageSize());
+        pageVo.setLimit(businessesDto.getPageSize());
+
+        return AjaxResult.buildSuccessInstance(sysBusinessDataDao.selectApiBusinessDataInPage(sysBusinessData, pageVo), sysBusinessDataDao.selectApiBusinessDataTotal(sysBusinessData));
+    }
+
+    @ApiOperation(value = "专项", notes = "专项")
+    @PostMapping(value = "/findBusinessInCome")
+    public AjaxResult findBusinessInCome(@RequestBody @Validated StatisticsParamVo statisticsParam) {
+        if (statisticsParam.getShopId() != null) {
+            AjaxResult ajaxResult = dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<BigDecimal>() {
+                @Override
+                public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) {
+                    switch (statisticsParam.getType()) {
+                        case "1" :
+                            return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null);
+                        case "2" :
+                            return tjVipSumDao.selectCashIncome(timeSpaceParam, shopId, null);
+                        case "3" :
+                            return tjVipSumDao.selectCardUse(timeSpaceParam, shopId, null);
+                        case "4" :
+                            return tjVipSumDao.selectHisConsume(timeSpaceParam, shopId, null);
+                        case "5" :
+                            return tjVipSumDao.selectFreeConsume(timeSpaceParam, shopId, null);
+                        case "6" :
+                            return tjVipSumDao.selectCashRefund(timeSpaceParam, shopId, null);
+                        case "7" :
+                            return tjVipSumDao.selectCardRefund(timeSpaceParam, shopId, null);
+                        case "8" :
+                            return tjVipSumDao.selectArrears(timeSpaceParam, shopId, null);
+                        default :
+                            return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null);
+                    }
+                }
+            });
+            return setDataList(ajaxResult);
+        } else {
+            AjaxResult ajaxResult = dataAnalysisCustomerService.getCompanyAnalysisResult(statisticsParam, new Caculate<BigDecimal>() {
+                @Override
+                public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) {
+                    switch (statisticsParam.getType()) {
+                        case "1" :
+                            return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId);
+                        case "2" :
+                            return tjVipSumDao.selectCashIncome(timeSpaceParam, null, companyId);
+                        case "3" :
+                            return tjVipSumDao.selectCardUse(timeSpaceParam, null, companyId);
+                        case "4" :
+                            return tjVipSumDao.selectHisConsume(timeSpaceParam, null, companyId);
+                        case "5" :
+                            return tjVipSumDao.selectFreeConsume(timeSpaceParam, null, companyId);
+                        case "6" :
+                            return tjVipSumDao.selectCashRefund(timeSpaceParam, null, companyId);
+                        case "7" :
+                            return tjVipSumDao.selectCardRefund(timeSpaceParam, null, companyId);
+                        case "8" :
+                            return tjVipSumDao.selectArrears(timeSpaceParam, null, companyId);
+                        default :
+                            return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId);
+                    }
+                }
+            });
+            return setDataList(ajaxResult);
+        }
+    }
+
+    private AjaxResult setDataList(AjaxResult ajaxResult) {
+        List<SeriesVo> list = (List<SeriesVo>) ajaxResult.getMapInfo().get("series");
+        String[] xAxis = (String[]) ajaxResult.getMapInfo().get("xAxis");
+        String [] data = list.get(0).getData();
+        if (data != null && data.length != 0) {
+            List<Map<String, String>> dataList = new ArrayList<>();
+            for(int i = data.length - 1; i >= 0; i--) {
+                Map<String, String> map = new HashMap<>();
+                map.put(xAxis[i], data[i]);
+                dataList.add(map);
+            }
+            ajaxResult.setRows(dataList);
+        }
+
+        return ajaxResult;
+    }
+
+
+    @ApiOperation(value = "查询员工业绩报表", notes = "查询员工业绩报表")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = VipAchieveDataShowVo.class)
+    })
+    @PostMapping(value = "/findVipAchieve")
+    public AjaxResult findVipAchieve(@RequestBody BusinessesDto businessesDto) {
+        AchieveNew achieveNew = new AchieveNew();
+        if (BusinessesDto.DAY.equals(businessesDto.getType())) {
+            achieveNew.setT1("%Y-%m-%d");
+        } else {
+            achieveNew.setT1("%Y-%m");
+        }
+
+        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        if (businessesDto.getStaffId() == null) {
+
+            businessesDto.setStaffId(sysUsers.getSuId());
+        }
+        achieveNew.setVipId(businessesDto.getStaffId());
+
+        PaginationVO pageVo = new PaginationVO();
+        pageVo.setLimit(businessesDto.getPageSize());
+        pageVo.setOffset((businessesDto.getPageNum() - 1) * businessesDto.getPageSize());
+        return AjaxResult.buildSuccessInstance(tjVipSumDao.selectVipAchieveInPage(achieveNew, pageVo));
+    }
+
+    @ApiOperation(value = "员工专项", notes = "员工专项")
+    @PostMapping(value = "/findVipBusinessData")
+    public AjaxResult findVipBusinessData(@RequestBody @Validated VipStatisticsParamDto vipStatisticsParamDto) {
+        AjaxResult ajaxResult = dataAnalysisCustomerService.getStaffAnalysisResult(vipStatisticsParamDto, new Caculate<BigDecimal>() {
+            @Override
+            public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long staffId) {
+                switch (vipStatisticsParamDto.getType()) {
+                    case "1" :
+                        return tjVipSumDao.selectStaffOrderAchieve(timeSpaceParam, staffId);
+                    case "2" :
+                        return tjVipSumDao.selectStaffCashAchieve(timeSpaceParam, staffId);
+                    case "3" :
+                        return tjVipSumDao.selectStaffCardAchieve(timeSpaceParam, staffId);
+                    case "4" :
+                        return tjVipSumDao.selectStaffGoodsAchieve(timeSpaceParam, staffId);
+                    case "5" :
+                        return tjVipSumDao.selectStaffCardUseAchieve(timeSpaceParam, staffId);
+                    case "6" :
+                        return tjVipSumDao.selectStaffHisConsumeAchieve(timeSpaceParam, staffId);
+                    case "7" :
+                        return tjVipSumDao.selectStaffFreeConsumeAchieve(timeSpaceParam, staffId);
+                    case "8" :
+                        return tjVipSumDao.selectStaffCommissionAchieve(timeSpaceParam, staffId);
+                    case "9" :
+                        return tjVipSumDao.selectStaffPeopleNum(timeSpaceParam, staffId);
+                    case "10" :
+                        return tjVipSumDao.selectStaffProjNum(timeSpaceParam, staffId);
+                    case "11" :
+                        return tjVipSumDao.selectStaffProjTime(timeSpaceParam, staffId);
+                    default:
+                        return tjVipSumDao.selectStaffOrderAchieve(timeSpaceParam, staffId);
+                }
+            }
+        });
+
+        return setDataList(ajaxResult);
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
index 95a5374..5858e80 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiUsersAction.java
@@ -1,10 +1,12 @@
 package com.matrix.system.app.action;
 
+import com.matrix.component.redis.RedisClient;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.tools.DateUtil;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.dto.BeauticianDto;
+import com.matrix.system.app.dto.UsersQueryDto;
 import com.matrix.system.app.mapper.SysBeauticianStateMapper;
 import com.matrix.system.app.mapper.SysUsersMapper;
 import com.matrix.system.app.mapper.SysWorkBeatuistaffMapper;
@@ -12,6 +14,7 @@
 import com.matrix.system.app.vo.UserAchieveVo;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.service.SysUsersService;
+import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.hive.bean.SysBeauticianState;
 import com.matrix.system.hive.bean.SysWorkBeatuistaff;
 import com.matrix.system.hive.service.AchieveNewService;
@@ -50,6 +53,9 @@
     @Autowired
     private SysWorkBeatuistaffService sysWorkBeatuistaffService;
 
+    @Autowired
+    private RedisClient redisClient;
+
 
     @ApiOperation(value = "个人中心--获取用户业绩接口 type 1-今日 2-昨天 3-本月 4-上月")
     @ApiResponses({
@@ -89,4 +95,36 @@
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, SysWorkBeatuistaffMapper.INSTANCE.workBeautysToBeautyVos(workBeauty), 0);
     }
 
+    @ApiOperation(value = "退出登陆", notes = "退出登陆")
+    @GetMapping(value = "/loginOut")
+    public AjaxResult loginOut() {
+        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        String token = redisClient.getCachedValue(sysUsers.getSuId().toString());
+
+        redisClient.removeObject(token);
+        redisClient.removeObject(sysUsers.getSuId().toString());
+        return AjaxResult.buildSuccessInstance("退出成功");
+    }
+
+    @ApiOperation(value = "员工列表", notes = "员工列表")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = BeauticianVo.class)
+    })
+    @PostMapping(value = "/findAllUsers")
+    public AjaxResult findAllUsers(@RequestBody UsersQueryDto usersQueryDto) {
+        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+        SysUsers query = new SysUsers();
+        if (DataAuthUtil.hasAllShopAuth()) {
+            query.setCompanyId(sysUsers.getCompanyId());
+        } else {
+            query.setCompanyId(sysUsers.getCompanyId());
+            query.setShopId(sysUsers.getShopId());
+        }
+        query.setSuName(usersQueryDto.getQueryKey());
+        List<SysUsers> list = sysUsersService.findByModel(query);
+        List<BeauticianVo> dataList = SysUsersMapper.INSTANCE.usersListToBeautyList(list);
+        return AjaxResult.buildSuccessInstance(dataList);
+    }
+
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java
index c25ac3f..0a52155 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiVipInfoAction.java
@@ -6,17 +6,22 @@
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.app.dto.AddVipDto;
 import com.matrix.system.app.dto.ModifyVipDto;
+import com.matrix.system.app.dto.QuestionAnswerDto;
 import com.matrix.system.app.dto.VipInfoListDto;
-import com.matrix.system.app.vo.VipInfoDetailVo;
-import com.matrix.system.app.vo.VipInfoListVo;
-import com.matrix.system.app.vo.VipInfoVo;
+import com.matrix.system.app.mapper.MoneyCardUseMapper;
+import com.matrix.system.app.mapper.QuestionMapper;
+import com.matrix.system.app.vo.*;
 import com.matrix.system.common.bean.CustomerDataDictionary;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.hive.action.BaseController;
-import com.matrix.system.hive.bean.SysVipInfo;
-import com.matrix.system.hive.bean.SysVipLevel;
+import com.matrix.system.hive.bean.*;
+import com.matrix.system.hive.dao.MoneyCardUseDao;
+import com.matrix.system.hive.dao.VipAnswerDao;
+import com.matrix.system.hive.plugin.util.CollectionUtils;
+import com.matrix.system.hive.service.MoneyCardUseService;
+import com.matrix.system.hive.service.QuestionSerivce;
 import com.matrix.system.hive.service.SysVipInfoService;
 import com.matrix.system.hive.service.SysVipLevelService;
 import io.swagger.annotations.Api;
@@ -46,6 +51,15 @@
 
     @Autowired
     private CustomerDataDictionaryDao customerDataDictionaryDao;
+
+    @Autowired
+    private MoneyCardUseService moneyCardUseService;
+
+    @Autowired
+    private QuestionSerivce questionSerivce;
+
+    @Autowired
+    private VipAnswerDao vipAnswerDao;
 
     @ApiOperation(value = "获取会员通讯录列表", notes = "获取会员通讯录列表")
     @ApiResponses({
@@ -144,4 +158,45 @@
 
         return AjaxResult.buildSuccessInstance(sysVipInfoService.findAll(sysVipInfo));
     }
+
+    @ApiOperation(value = "卡项 - 获取会员卡项列表", notes = "卡项 - 获取会员卡项列表")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = VipCardListVo.class)
+    })
+    @GetMapping(value = "/findVipCardInfo/{vipId}")
+    public AjaxResult findVipCardInfo(@PathVariable("vipId") Long vipId) {
+        MoneyCardUse moneyCardUse = new MoneyCardUse();
+        moneyCardUse.setVipId(vipId);
+        List<MoneyCardUse> list = moneyCardUseService.findVipCardUseInPage(moneyCardUse, null);
+
+        List<VipCardListVo> dataList = MoneyCardUseMapper.INSTANCE.entitiesToCardListVos(list);
+        return AjaxResult.buildSuccessInstance(dataList);
+    }
+
+    @ApiOperation(value = "会员档案 - 获取客户档案问题", notes = "会员档案 - 获取客户档案问题")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "ok", response = QuestionVo.class)
+    })
+    @GetMapping(value = "/findVipQuestions/{vipId}")
+    public AjaxResult findVipQuestions(@PathVariable("vipId") Long vipId) {
+        // 获取会员所有的答案,分类型
+        List<Question> questions = questionSerivce.findByVipId(vipId);
+        AjaxResult result = AjaxResult.buildSuccessInstance("获取成功");
+        List<QuestionVo> list = QuestionMapper.INSTANCE.entitiesToVos(questions);
+        result.putInMap("questions", list);
+        return result;
+    }
+
+    @ApiOperation(value = "会员档案 - 提交会员档案", notes = "会员档案 - 提交会员档案")
+    @PostMapping(value = "/saveVipQuestionsAnswer")
+    public AjaxResult saveVipQuestionsAnswer(@RequestBody QuestionAnswerDto questionAnswerDto) {
+        VipAnswer delAnswer = new VipAnswer();
+        delAnswer.setVipId(questionAnswerDto.getVipId());
+        vipAnswerDao.deleteByModel(delAnswer);
+        if (CollectionUtils.isNotEmpty(questionAnswerDto.getItems())) {
+            List<VipAnswer> vipAnswers = QuestionMapper.INSTANCE.dtosToVipAnswers(questionAnswerDto.getItems());
+            vipAnswerDao.batchInsert(vipAnswers);
+        }
+        return AjaxResult.buildSuccessInstance("档案更新成功");
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/ArticleListDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/ArticleListDto.java
new file mode 100644
index 0000000..fa97fee
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/ArticleListDto.java
@@ -0,0 +1,26 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wzy
+ * @date 2021-01-05
+ **/
+@ApiModel(value = "ArticleListDto", description = "文章列表接收参数类")
+public class ArticleListDto extends BasePageDto {
+
+    @NotNull
+    @ApiModelProperty(value = "分类ID")
+    private Long typeId;
+
+    public Long getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(Long typeId) {
+        this.typeId = typeId;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/BusinessesDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/BusinessesDto.java
new file mode 100644
index 0000000..0e5cf41
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/BusinessesDto.java
@@ -0,0 +1,45 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value = "BusinessesDto", description = "门店/公司报表参数接受类")
+public class BusinessesDto extends BasePageDto{
+
+    public static final String DAY = "1";
+
+    public static final String MONTH = "2";
+
+    @ApiModelProperty(value = "type 1-每日 2-每月", example = "1")
+    private String type;
+
+    @ApiModelProperty(value = "门店ID", example = "34")
+    private Long shopId;
+
+    @ApiModelProperty(value = "会员ID")
+    private Long staffId;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Long getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(Long shopId) {
+        this.shopId = shopId;
+    }
+
+    public Long getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(Long staffId) {
+        this.staffId = staffId;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerDto.java
new file mode 100644
index 0000000..37df68b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerDto.java
@@ -0,0 +1,38 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@ApiModel(value = "QuestionAnswerDto", description = "提交客户档案接口参数接收类")
+public class QuestionAnswerDto {
+
+    @NotNull(message = "参数错误")
+    @ApiModelProperty(value = "会员ID")
+    private Long vipId;
+
+    @ApiModelProperty(value = "题目答案列表")
+    private List<QuestionAnswerItemDto> items;
+
+    public Long getVipId() {
+        return vipId;
+    }
+
+    public void setVipId(Long vipId) {
+        this.vipId = vipId;
+    }
+
+    public List<QuestionAnswerItemDto> getItems() {
+        return items;
+    }
+
+    public void setItems(List<QuestionAnswerItemDto> items) {
+        this.items = items;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerItemDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerItemDto.java
new file mode 100644
index 0000000..9d3c49a
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/QuestionAnswerItemDto.java
@@ -0,0 +1,56 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@ApiModel(value = "QuestionAnswerItemDto", description = "问题答案接收类")
+public class QuestionAnswerItemDto {
+
+    @ApiModelProperty(value = "问题ID")
+    private Long questionId;
+
+    @ApiModelProperty(value = "会员ID")
+    private Long vipId;
+
+    @ApiModelProperty(value = "答案Ids,逗号隔开")
+    private String answerId;
+
+    @ApiModelProperty(value = "文本答案")
+    private String answerText;
+
+    public Long getVipId() {
+        return vipId;
+    }
+
+    public void setVipId(Long vipId) {
+        this.vipId = vipId;
+    }
+
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+
+    public String getAnswerId() {
+        return answerId;
+    }
+
+    public void setAnswerId(String answerId) {
+        this.answerId = answerId;
+    }
+
+    public String getAnswerText() {
+        return answerText;
+    }
+
+    public void setAnswerText(String answerText) {
+        this.answerText = answerText;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/RankingDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/RankingDto.java
new file mode 100644
index 0000000..3c3d788
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/RankingDto.java
@@ -0,0 +1,43 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@ApiModel(value = "RankingDto", description = "排行榜参数接收类")
+public class RankingDto {
+
+    public static final String SALE = "1";
+    public static final String CONSUME = "2";
+
+    public static final String DAY = "1";
+    public static final String MONTH = "2";
+    public static final String YEAR = "3";
+
+    @ApiModelProperty(value = "数据类型 1-销售 2-消耗", example = "1")
+    private String dataType;
+
+    @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜", example = "1")
+    private String type;
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/SkinCheckListDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/SkinCheckListDto.java
new file mode 100644
index 0000000..5540113
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/SkinCheckListDto.java
@@ -0,0 +1,22 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotNull;
+
+@ApiModel(value = "SkinCheckListDto", description = "皮肤检测列表接收参数类")
+public class SkinCheckListDto  extends BasePageDto{
+
+    @NotNull(message = "参数错误")
+    @ApiModelProperty(value = "会员ID", example = "361")
+    private Long vipId;
+
+    public Long getVipId() {
+        return vipId;
+    }
+
+    public void setVipId(Long vipId) {
+        this.vipId = vipId;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/UsersQueryDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/UsersQueryDto.java
new file mode 100644
index 0000000..8374880
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/UsersQueryDto.java
@@ -0,0 +1,23 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @author wzy
+ * @date 2021-01-05
+ **/
+@ApiModel(value = "UsersQueryDto", description = "员工列表接口参数类")
+public class UsersQueryDto {
+
+    @ApiModelProperty(value = "查询参数")
+    private String queryKey;
+
+    public String getQueryKey() {
+        return queryKey;
+    }
+
+    public void setQueryKey(String queryKey) {
+        this.queryKey = queryKey;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/dto/VipStatisticsParamDto.java b/zq-erp/src/main/java/com/matrix/system/app/dto/VipStatisticsParamDto.java
new file mode 100644
index 0000000..2f58a71
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/dto/VipStatisticsParamDto.java
@@ -0,0 +1,100 @@
+package com.matrix.system.app.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 统计查询条件
+ * @author jyy
+ */
+@ApiModel(value = "VipStatisticsParamDto", description = "员工专项统计接收参数类")
+public class VipStatisticsParamDto {
+
+    public static final String COMPANY = "1";
+
+    public static final String SHOP = "2";
+
+    /**
+     * 开始时间
+     */
+    @NotBlank(message = "参数错误")
+    @ApiModelProperty(value = "开始时间", example = "2020-12-01")
+    private String beginTime;
+
+    /**
+     *结束时间
+     */
+    @NotBlank(message = "参数错误")
+    @ApiModelProperty(value = "结束时间", example = "2020-12-31")
+    private String endTime;
+    /**
+     *统计单位
+     */
+    @NotBlank(message = "参数错误")
+    @ApiModelProperty(value = "统计单位", example = "日")
+    private String statisticsUnit;
+
+    /**
+     *对比单位
+     */
+    @ApiModelProperty(hidden = true)
+    private String  contrastUnit;
+    /**
+     * 门店id
+     */
+    @ApiModelProperty(value = "员工, 不传默认当前登陆用户")
+    private Long staffId;
+
+    @ApiModelProperty(value = "类型 1-订单业绩 2-现金业绩 3-售卡业绩 4-产品业绩 5-划扣业绩 6-本金消耗 7-赠送消耗 8-服务提成 9-人头数 10-项目数 11-服务时长", example = "1")
+    private String type;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getBeginTime() {
+        return beginTime;
+    }
+
+    public void setBeginTime(String beginTime) {
+        this.beginTime = beginTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getStatisticsUnit() {
+        return statisticsUnit;
+    }
+
+    public void setStatisticsUnit(String statisticsUnit) {
+        this.statisticsUnit = statisticsUnit;
+    }
+
+    public String getContrastUnit() {
+        return contrastUnit;
+    }
+
+    public void setContrastUnit(String contrastUnit) {
+        this.contrastUnit = contrastUnit;
+    }
+
+    public Long getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(Long staffId) {
+        this.staffId = staffId;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java b/zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java
new file mode 100644
index 0000000..8ad6f7d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/mapper/MoneyCardUseMapper.java
@@ -0,0 +1,21 @@
+package com.matrix.system.app.mapper;
+
+import com.matrix.system.app.vo.VipCardListVo;
+import com.matrix.system.hive.bean.MoneyCardUse;
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@Mapper
+public abstract class MoneyCardUseMapper {
+    public static final MoneyCardUseMapper INSTANCE = Mappers.getMapper(MoneyCardUseMapper.class);
+
+    public abstract VipCardListVo entityToCardListVo(MoneyCardUse moneyCardUse);
+
+    public abstract List<VipCardListVo> entitiesToCardListVos(List<MoneyCardUse> list);
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/mapper/QuestionMapper.java b/zq-erp/src/main/java/com/matrix/system/app/mapper/QuestionMapper.java
new file mode 100644
index 0000000..c16b5d8
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/mapper/QuestionMapper.java
@@ -0,0 +1,31 @@
+package com.matrix.system.app.mapper;
+
+import com.matrix.system.app.dto.QuestionAnswerDto;
+import com.matrix.system.app.dto.QuestionAnswerItemDto;
+import com.matrix.system.app.vo.QuestionVo;
+import com.matrix.system.hive.bean.Question;
+import com.matrix.system.hive.bean.VipAnswer;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@Mapper
+public abstract class QuestionMapper {
+    public static final QuestionMapper INSTANCE = Mappers.getMapper(QuestionMapper.class);
+
+    public abstract QuestionVo entityToVo(Question question);
+
+    public abstract List<QuestionVo> entitiesToVos(List<Question> list);
+
+    @Mapping(source = "questionId", target = "quesionId")
+    public abstract VipAnswer dtoToVipAnswer(QuestionAnswerItemDto questionAnswerDto);
+
+    public abstract List<VipAnswer> dtosToVipAnswers(List<QuestionAnswerItemDto> list);
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/mapper/SysSkinCheckRecordMapper.java b/zq-erp/src/main/java/com/matrix/system/app/mapper/SysSkinCheckRecordMapper.java
new file mode 100644
index 0000000..411a311
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/mapper/SysSkinCheckRecordMapper.java
@@ -0,0 +1,38 @@
+package com.matrix.system.app.mapper;
+
+import com.matrix.system.app.vo.SkinCheckAnalysisItems;
+import com.matrix.system.app.vo.SkinCheckDetailVo;
+import com.matrix.system.app.vo.SkinCheckDiagnoseItemVo;
+import com.matrix.system.app.vo.SkinCheckListVo;
+import com.matrix.system.hive.bean.SysSkinCheckRecord;
+import com.matrix.system.hive.bean.SysSkinDetail;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+@Mapper
+public abstract class SysSkinCheckRecordMapper {
+    public static final SysSkinCheckRecordMapper INSTANCE = Mappers.getMapper(SysSkinCheckRecordMapper.class);
+
+    public abstract SkinCheckListVo entityToSkinCheckListVo(SysSkinCheckRecord sysSkinCheckRecord);
+
+    public abstract List<SkinCheckListVo> entitiesToListVos(List<SysSkinCheckRecord> list);
+
+    @Mapping(target = "sex", source = "ext2")
+    @Mapping(target = "vipName", source = "userName")
+    public abstract SkinCheckDetailVo entityToDetailVo(SysSkinCheckRecord sysSkinCheckRecord);
+
+    @Mapping(target = "title", source = "symptom")
+    public abstract SkinCheckDiagnoseItemVo entityToDiagnoseItem(SysSkinDetail sysSkinDetail);
+
+    public abstract List<SkinCheckDiagnoseItemVo> entitiesToDiagnoseItems(List<SysSkinDetail> list);
+
+    @Mapping(target = "title", source = "symptom")
+    public abstract SkinCheckAnalysisItems entityToAnalysisItem(SysSkinDetail sysSkinDetail);
+
+    public abstract List<SkinCheckAnalysisItems> entitiesToAnalysisItems(List<SysSkinDetail> list);
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/mapper/SysUsersMapper.java b/zq-erp/src/main/java/com/matrix/system/app/mapper/SysUsersMapper.java
index 4bcfc7a..0a238e8 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/mapper/SysUsersMapper.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/mapper/SysUsersMapper.java
@@ -18,6 +18,8 @@
 
     @Mapping(source = "suId", target = "id")
     @Mapping(source = "suName", target = "name")
+    @Mapping(source = "suPhoto", target = "photo")
+    @Mapping(source = "suTel", target = "telphone")
     public abstract BeauticianVo sysUsersToBeauticianVo(SysUsers sysUsers);
 
     public abstract List<BeauticianVo> usersListToBeautyList(List<SysUsers> list);
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/BeauticianVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/BeauticianVo.java
index 2542a67..8e25766 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/vo/BeauticianVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/BeauticianVo.java
@@ -13,6 +13,12 @@
 
     private String name;
 
+    private String roleName;
+
+    private String photo;
+
+    private String telphone;
+
     public Long getId() {
         return id;
     }
@@ -28,4 +34,28 @@
     public void setName(String name) {
         this.name = name;
     }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    public String getPhoto() {
+        return photo;
+    }
+
+    public void setPhoto(String photo) {
+        this.photo = photo;
+    }
+
+    public String getTelphone() {
+        return telphone;
+    }
+
+    public void setTelphone(String telphone) {
+        this.telphone = telphone;
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java
new file mode 100644
index 0000000..f47b02e
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/BusinessesDataShowVo.java
@@ -0,0 +1,111 @@
+package com.matrix.system.app.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @author wzy
+ * @date 2020-12-29
+ **/
+@ApiModel(value = "BusinessDataShowVo", description = "经营报表返回参数类")
+public class BusinessesDataShowVo {
+
+    @ApiModelProperty(value = "时间")
+    private String dataTime;
+
+    @ApiModelProperty(value = "营业收入")
+    private String totalPay;
+
+    @ApiModelProperty(value = "现金收入")
+    private String cashPay;
+
+    @ApiModelProperty(value = "余额划扣")
+    private String cardPay;
+
+    @ApiModelProperty(value = "欠款")
+    private String arrearsPay;
+
+    @ApiModelProperty(value = "赠送消耗")
+    private String freeConsumePay;
+
+    @ApiModelProperty(value = "本金消耗")
+    private String consumePay;
+
+    @ApiModelProperty(value = "现金退款")
+    private String refundCashPay;
+
+    @ApiModelProperty(value = "卡项退款")
+    private String refundCardPay;
+
+    public String getDataTime() {
+        return dataTime;
+    }
+
+    public void setDataTime(String dataTime) {
+        this.dataTime = dataTime;
+    }
+
+    public String getTotalPay() {
+        return totalPay;
+    }
+
+    public void setTotalPay(String totalPay) {
+        this.totalPay = totalPay;
+    }
+
+    public String getCashPay() {
+        return cashPay;
+    }
+
+    public void setCashPay(String cashPay) {
+        this.cashPay = cashPay;
+    }
+
+    public String getCardPay() {
+        return cardPay;
+    }
+
+    public void setCardPay(String cardPay) {
+        this.cardPay = cardPay;
+    }
+
+    public String getArrearsPay() {
+        return arrearsPay;
+    }
+
+    public void setArrearsPay(String arrearsPay) {
+        this.arrearsPay = arrearsPay;
+    }
+
+    public String getFreeConsumePay() {
+        return freeConsumePay;
+    }
+
+    public void setFreeConsumePay(String freeConsumePay) {
+        this.freeConsumePay = freeConsumePay;
+    }
+
+    public String getConsumePay() {
+        return consumePay;
+    }
+
+    public void setConsumePay(String consumePay) {
+        this.consumePay = consumePay;
+    }
+
+    public String getRefundCashPay() {
+        return refundCashPay;
+    }
+
+    public void setRefundCashPay(String refundCashPay) {
+        this.refundCashPay = refundCashPay;
+    }
+
+    public String getRefundCardPay() {
+        return refundCardPay;
+    }
+
+    public void setRefundCardPay(String refundCardPay) {
+        this.refundCardPay = refundCardPay;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/QuestionVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/QuestionVo.java
new file mode 100644
index 0000000..35b08e6
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/QuestionVo.java
@@ -0,0 +1,88 @@
+package com.matrix.system.app.vo;
+
+import com.matrix.core.tools.StringUtils;
+import com.matrix.system.hive.bean.Answer;
+import com.matrix.system.hive.bean.VipAnswer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@ApiModel(value = "QuestionVo", description = "会员档案返回参数类")
+public class QuestionVo {
+
+    @ApiModelProperty(value = "问题ID")
+    private Long id;
+
+    @ApiModelProperty(value = "问题")
+    private String question;
+
+    @ApiModelProperty(value = "类型 1-文本 输入框 2-单选 下拉框 3-多选 多选框 4-长文本 文本域 5-标题 只显示即可")
+    private String type;
+
+    @ApiModelProperty(value = "单选、多选的选项")
+    private List<Answer> answers;
+
+    @ApiModelProperty(value = "回显答案")
+    private VipAnswer vipAnswer;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getQuestion() {
+        return question;
+    }
+
+    public void setQuestion(String question) {
+        this.question = question;
+    }
+
+    public String getType() {
+        if (StringUtils.isNotBlank(type)) {
+            switch (type) {
+                case "文本" :
+                    return "1";
+                case "单选" :
+                    return "2";
+                case "多选" :
+                    return "3";
+                case "长文本" :
+                    return "4";
+                case "标题" :
+                    return "5";
+                default:
+                    return "6";
+            }
+        }
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public List<Answer> getAnswers() {
+        return answers;
+    }
+
+    public void setAnswers(List<Answer> answers) {
+        this.answers = answers;
+    }
+
+    public VipAnswer getVipAnswer() {
+        return vipAnswer;
+    }
+
+    public void setVipAnswer(VipAnswer vipAnswer) {
+        this.vipAnswer = vipAnswer;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/RankingVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/RankingVo.java
new file mode 100644
index 0000000..38ebab8
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/RankingVo.java
@@ -0,0 +1,69 @@
+package com.matrix.system.app.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@ApiModel(value = "RankingVo", description = "排行榜返回参数类")
+public class RankingVo {
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "头像")
+    private String photo;
+
+    @ApiModelProperty(value = "金额")
+    private BigDecimal amount;
+
+    @ApiModelProperty(value = "店铺名称")
+    private String shopName;
+
+    @ApiModelProperty(value = "员工ID")
+    private Long id;
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPhoto() {
+        return photo;
+    }
+
+    public void setPhoto(String photo) {
+        this.photo = photo;
+    }
+
+    public BigDecimal getAmount() {
+        return amount == null ? amount : amount.setScale(BigDecimal.ROUND_DOWN, 2);
+    }
+
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckAnalysisItems.java b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckAnalysisItems.java
new file mode 100644
index 0000000..2f1806f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckAnalysisItems.java
@@ -0,0 +1,77 @@
+package com.matrix.system.app.vo;
+
+import com.matrix.system.shopXcx.bean.ShopProduct;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+@ApiModel(value = "SkinCheckAnalysisItems", description = "问题分析返回接口类")
+public class SkinCheckAnalysisItems {
+
+    @ApiModelProperty(value = "图片")
+    private String img;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "问题分析")
+    private String analysis;
+
+    @ApiModelProperty(value = "解决办法")
+    private String solution;
+
+    @ApiModelProperty(hidden = true)
+    private String productIds;
+
+    @ApiModelProperty(value = "产品列表")
+    private List<String> products;
+
+    public String getProductIds() {
+        return productIds;
+    }
+
+    public void setProductIds(String productIds) {
+        this.productIds = productIds;
+    }
+
+    public String getImg() {
+        return img;
+    }
+
+    public void setImg(String img) {
+        this.img = img;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getAnalysis() {
+        return analysis;
+    }
+
+    public void setAnalysis(String analysis) {
+        this.analysis = analysis;
+    }
+
+    public String getSolution() {
+        return solution;
+    }
+
+    public void setSolution(String solution) {
+        this.solution = solution;
+    }
+
+    public List<String> getProducts() {
+        return products;
+    }
+
+    public void setProducts(List<String> products) {
+        this.products = products;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDetailVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDetailVo.java
new file mode 100644
index 0000000..cec1053
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDetailVo.java
@@ -0,0 +1,80 @@
+package com.matrix.system.app.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.tools.DateUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+import java.util.List;
+
+@ApiModel(value = "SkinCheckDetailVo", description = "皮肤检测详情返回接口类")
+public class SkinCheckDetailVo {
+
+    @ApiModelProperty(value = "会员姓名")
+    private String vipName;
+
+    @ApiModelProperty(value = "头像")
+    private String photo;
+
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
+    @ApiModelProperty(value = "检测时间")
+    private Date checkTime;
+
+    @ApiModelProperty(value = "诊断结果")
+    List<SkinCheckDiagnoseItemVo> diagnoseItems;
+
+    @ApiModelProperty(value = "问题分析")
+    List<SkinCheckAnalysisItems> analysisItems;
+
+    public String getVipName() {
+        return vipName;
+    }
+
+    public void setVipName(String vipName) {
+        this.vipName = vipName;
+    }
+
+    public String getPhoto() {
+        return photo;
+    }
+
+    public void setPhoto(String photo) {
+        this.photo = photo;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public Date getCheckTime() {
+        return checkTime;
+    }
+
+    public void setCheckTime(Date checkTime) {
+        this.checkTime = checkTime;
+    }
+
+    public List<SkinCheckDiagnoseItemVo> getDiagnoseItems() {
+        return diagnoseItems;
+    }
+
+    public void setDiagnoseItems(List<SkinCheckDiagnoseItemVo> diagnoseItems) {
+        this.diagnoseItems = diagnoseItems;
+    }
+
+    public List<SkinCheckAnalysisItems> getAnalysisItems() {
+        return analysisItems;
+    }
+
+    public void setAnalysisItems(List<SkinCheckAnalysisItems> analysisItems) {
+        this.analysisItems = analysisItems;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDiagnoseItemVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDiagnoseItemVo.java
new file mode 100644
index 0000000..1f5cbcc
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckDiagnoseItemVo.java
@@ -0,0 +1,31 @@
+package com.matrix.system.app.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value = "SkinCheckDiagnoseItemVo", description = "诊断结果返回参数类")
+public class SkinCheckDiagnoseItemVo {
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "百分比")
+    private Double percentage;
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+
+    public Double getPercentage() {
+        return percentage;
+    }
+
+    public void setPercentage(Double percentage) {
+        this.percentage = percentage;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckListVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckListVo.java
new file mode 100644
index 0000000..7e3e292
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/SkinCheckListVo.java
@@ -0,0 +1,69 @@
+package com.matrix.system.app.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.tools.DateUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value = "SkinCheckListVo", description = "皮肤检测列表返回参数类")
+public class SkinCheckListVo {
+
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "检测人员")
+    private String checkUserName;
+
+    @ApiModelProperty(value = "检测门店")
+    private String shopName;
+
+    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
+    @ApiModelProperty(value = "检测时间")
+    private Date checkTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+
+    public String getCheckUserName() {
+        return checkUserName;
+    }
+
+    public void setCheckUserName(String checkUserName) {
+        this.checkUserName = checkUserName;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public Date getCheckTime() {
+        return checkTime;
+    }
+
+    public void setCheckTime(Date checkTime) {
+        this.checkTime = checkTime;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/UserInfoVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/UserInfoVo.java
index 4054540..105bd58 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/vo/UserInfoVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/UserInfoVo.java
@@ -22,6 +22,9 @@
     @ApiModelProperty(value = "头像", example = "--")
     private String photo;
 
+    @ApiModelProperty(value = "门店名称")
+    private String shopName;
+
     public Long getId() {
         return id;
     }
@@ -53,4 +56,12 @@
     public void setPhoto(String photo) {
         this.photo = photo;
     }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/VipAchieveDataShowVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/VipAchieveDataShowVo.java
new file mode 100644
index 0000000..d392636
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/VipAchieveDataShowVo.java
@@ -0,0 +1,147 @@
+package com.matrix.system.app.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * @author wzy
+ * @date 2020-12-31
+ **/
+@ApiModel(value = "VipAchieveDataShowVo", description = "员工业绩返回参数类")
+public class VipAchieveDataShowVo {
+
+    @ApiModelProperty(value = "时间")
+    private String time;
+
+    @ApiModelProperty(value = "订单业绩")
+    private BigDecimal orderAmount;
+
+    @ApiModelProperty(value = "现金业绩")
+    private BigDecimal cashAmount;
+
+    @ApiModelProperty(value = "售卡业绩")
+    private BigDecimal cardAmount;
+
+    @ApiModelProperty(value = "产品业绩")
+    private BigDecimal goodsAmount;
+
+    @ApiModelProperty(value = "划扣业绩")
+    private BigDecimal cardUseAmount;
+
+    @ApiModelProperty(value = "本金消耗")
+    private BigDecimal hisConsume;
+
+    @ApiModelProperty(value = "赠送消耗")
+    private BigDecimal freeConsume;
+
+    @ApiModelProperty(value = "提成")
+    private BigDecimal commission;
+
+    @ApiModelProperty(value = "人头数")
+    private BigDecimal peopleNum;
+
+    @ApiModelProperty(value = "项目数")
+    private Integer projNum;
+
+    @ApiModelProperty(value = "服务时长")
+    private Integer serviceTime;
+
+
+    public String getTime() {
+        return time;
+    }
+
+    public void setTime(String time) {
+        this.time = time;
+    }
+
+    public BigDecimal getOrderAmount() {
+        return orderAmount;
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = orderAmount;
+    }
+
+    public BigDecimal getCashAmount() {
+        return cashAmount;
+    }
+
+    public void setCashAmount(BigDecimal cashAmount) {
+        this.cashAmount = cashAmount;
+    }
+
+    public BigDecimal getCardAmount() {
+        return cardAmount;
+    }
+
+    public void setCardAmount(BigDecimal cardAmount) {
+        this.cardAmount = cardAmount;
+    }
+
+    public BigDecimal getGoodsAmount() {
+        return goodsAmount;
+    }
+
+    public void setGoodsAmount(BigDecimal goodsAmount) {
+        this.goodsAmount = goodsAmount;
+    }
+
+    public BigDecimal getCardUseAmount() {
+        return cardUseAmount;
+    }
+
+    public void setCardUseAmount(BigDecimal cardUseAmount) {
+        this.cardUseAmount = cardUseAmount;
+    }
+
+    public BigDecimal getHisConsume() {
+        return hisConsume;
+    }
+
+    public void setHisConsume(BigDecimal hisConsume) {
+        this.hisConsume = hisConsume;
+    }
+
+    public BigDecimal getFreeConsume() {
+        return freeConsume;
+    }
+
+    public void setFreeConsume(BigDecimal freeConsume) {
+        this.freeConsume = freeConsume;
+    }
+
+    public BigDecimal getCommission() {
+        return commission;
+    }
+
+    public void setCommission(BigDecimal commission) {
+        this.commission = commission;
+    }
+
+    public BigDecimal getPeopleNum() {
+        return peopleNum;
+    }
+
+    public void setPeopleNum(BigDecimal peopleNum) {
+        this.peopleNum = peopleNum;
+    }
+
+    public Integer getProjNum() {
+        return projNum;
+    }
+
+    public void setProjNum(Integer projNum) {
+        this.projNum = projNum;
+    }
+
+    public Integer getServiceTime() {
+        return serviceTime;
+    }
+
+    public void setServiceTime(Integer serviceTime) {
+        this.serviceTime = serviceTime;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java
new file mode 100644
index 0000000..1098de9
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/VipCardListVo.java
@@ -0,0 +1,78 @@
+package com.matrix.system.app.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.tools.DateUtil;
+import com.matrix.system.constance.Dictionary;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author wzy
+ * @date 2020-12-28
+ **/
+@ApiModel(value = "VipCardListVo", description = "会员卡项列表")
+public class VipCardListVo {
+
+    @ApiModelProperty(value = "卡项名称")
+    private String cardName;
+
+    @ApiModelProperty(value = "现有金额")
+    private BigDecimal realMoney;
+
+    @ApiModelProperty(value = "赠送金额")
+    private BigDecimal giftMoney;
+
+    @ApiModelProperty(value = "状态 1-有效 2-无效")
+    private String status;
+
+    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
+    @ApiModelProperty(value = "有效时间")
+    private Date failTime;
+
+    public String getCardName() {
+        return cardName;
+    }
+
+    public void setCardName(String cardName) {
+        this.cardName = cardName;
+    }
+
+    public BigDecimal getRealMoney() {
+        return realMoney;
+    }
+
+    public void setRealMoney(BigDecimal realMoney) {
+        this.realMoney = realMoney;
+    }
+
+    public BigDecimal getGiftMoney() {
+        return giftMoney;
+    }
+
+    public void setGiftMoney(BigDecimal giftMoney) {
+        this.giftMoney = giftMoney;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        if (Dictionary.MONEYCARD_STATUS_YX.equals(status)) {
+            this.status = "1";
+        } else {
+            this.status = "2";
+        }
+    }
+
+    public Date getFailTime() {
+        return failTime;
+    }
+
+    public void setFailTime(Date failTime) {
+        this.failTime = failTime;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoListVo.java b/zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoListVo.java
index bd3239d..04cfadd 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoListVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoListVo.java
@@ -1,5 +1,6 @@
 package com.matrix.system.app.vo;
 
+import com.matrix.system.hive.bean.SysVipLevel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -27,6 +28,9 @@
 
     @ApiModelProperty(value = "门店简称")
     private String shopName;
+
+    @ApiModelProperty(value = "会员等级对象")
+    private String vipLevel;
 
     public String getVipName() {
         return vipName;
@@ -75,4 +79,12 @@
     public void setShopName(String shopName) {
         this.shopName = shopName;
     }
+
+    public String getVipLevel() {
+        return vipLevel;
+    }
+
+    public void setVipLevel(String vipLevel) {
+        this.vipLevel = vipLevel;
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
index 30443b0..2857afc 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
@@ -1,16 +1,21 @@
 package com.matrix.system.hive.action;
 
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 
 import javax.annotation.Resource;
 
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
+import com.matrix.core.tools.StringUtils;
 import com.matrix.core.tools.WebUtil;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.ArticleType;
+import com.matrix.system.hive.plugin.message.StringUtil;
+import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.hive.service.ArticleTypeService;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -110,6 +115,16 @@
    		articleType.setType(Dictionary.ARTICEL_TYPE_NAME_MDXY);
 		SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
 		articleType.setShopId(users.getShopId());
+
+		Long parentId = articleType.getParentId();
+		List<Long> ids = new ArrayList<>();
+		while (parentId != 0) {
+			ArticleType type = currentService.findById(parentId);
+			ids.add(type.getId());
+			parentId = type.getParentId();
+		}
+
+		articleType.setParentIds(CollectionUtils.isNotEmpty(ids) ? StringUtils.collToStr(ids, ",") : null);
 		if (articleType.getId() != null) {
 
 			return modify(currentService, articleType, "文章类型");
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java
index 8619f5f..11d512f 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java
@@ -1,5 +1,8 @@
 package com.matrix.system.hive.bean;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.matrix.core.tools.DateUtil;
+
 import java.util.Date;
 import java.io.Serializable;
 /**
@@ -65,6 +68,7 @@
 	/**
 	 * 创建时间
 	 */
+	@JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8")
 	private Date  createtiem;
 			
 	
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/ArticleType.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/ArticleType.java
index 884b2c7..3c9420e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/ArticleType.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/ArticleType.java
@@ -56,6 +56,8 @@
 	private String  type;
 
 	private Long shopId;
+
+	private String parentIds;
 			
 	/**
 	 * 扩展属性
@@ -159,6 +161,14 @@
 		this.type=type;
 	}
 
+	public String getParentIds() {
+		return parentIds;
+	}
+
+	public void setParentIds(String parentIds) {
+		this.parentIds = parentIds;
+	}
+
 	@Override
 	public String toString() {
 		return "ArticleType [id=" + id + ", articleTypeName=" + articleTypeName
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
index 663fa32..9c16a42 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysOrder.java
@@ -161,6 +161,16 @@
 	 */
 	private Integer times;
 
+	private String type;
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
 	public Integer getTimes() {
 		return times;
 	}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java
index 6fac369..62d9262 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysSkinCheckRecord.java
@@ -98,11 +98,22 @@
 	private String userName;
 
 	@Extend
+	private String sex;
+
+	@Extend
 	private String shopName;
 
 	@Extend
 	private String checkUserName;
 
+	public String getSex() {
+		return sex;
+	}
+
+	public void setSex(String sex) {
+		this.sex = sex;
+	}
+
 	public Date getBeginTime() {
 		return beginTime;
 	}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
index ea162f3..33dfa98 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
@@ -6,6 +6,7 @@
 
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.system.app.vo.OrderDetailAchieveItemVo;
+import com.matrix.system.app.vo.RankingVo;
 import com.matrix.system.app.vo.UserAchieveVo;
 import com.matrix.system.hive.bean.AchieveNew;
 import org.apache.ibatis.annotations.Param;
@@ -62,4 +63,8 @@
 	UserAchieveVo selectUserAchieveByTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userId") Long userId);
 
 	List<OrderDetailAchieveItemVo> selectApiOrderItemAchieve(@Param("itemId") Long itemId);
+
+	List<RankingVo> selectShopConsumeAchieveRanking(@Param("record") AchieveNew achieveNew);
+
+	List<RankingVo> selectBeauticianConsumeAchieveRanking(@Param("record") AchieveNew achieveNew);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java
index 681ed4e..1cb6338 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java
@@ -31,5 +31,7 @@
 	public int  selectTotalRecord(@Param("record") Article article);
 	
 	public Article  selectById(Long id);
-	
+
+	public List<Article> selectApiArticleListInPage(@Param("record") Article article, @Param("pageVo") PaginationVO pageVo);
+
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBusinessDataDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBusinessDataDao.java
index d4ba3fe..0aefeb4 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBusinessDataDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysBusinessDataDao.java
@@ -1,6 +1,7 @@
 package com.matrix.system.hive.dao;
 
 import com.matrix.core.pojo.PaginationVO;
+import com.matrix.system.app.vo.BusinessesDataShowVo;
 import com.matrix.system.hive.bean.SysBusinessData;
 import com.matrix.system.hive.statistics.BusinessDataShowVo;
 import org.apache.ibatis.annotations.Param;
@@ -44,5 +45,9 @@
 	public SysBusinessData  selectById(Integer id);
 	
 	public SysBusinessData  selectForUpdate(Integer id);
+
+	List<BusinessesDataShowVo> selectApiBusinessDataInPage(@Param("record") SysBusinessData data,@Param("pageVo") PaginationVO pageVo);
+
+	int selectApiBusinessDataTotal(@Param("record") SysBusinessData data);
 	
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java
index 8320974..b0c55ff 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java
@@ -3,6 +3,7 @@
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.system.app.dto.OrderListDto;
 import com.matrix.system.app.vo.OrderDetailVo;
+import com.matrix.system.app.vo.RankingVo;
 import com.matrix.system.hive.bean.SysOrder;
 import org.apache.ibatis.annotations.Param;
 
@@ -43,4 +44,8 @@
 	int selectApiOrderListTotal(@Param("record") OrderListDto orderListDto);
 
 	OrderDetailVo selectApiOrderDetailById(@Param("orderId") Long orderId);
+
+	List<RankingVo> selectShopAchieveRanking(@Param("record") SysOrder sysOrder);
+
+	List<RankingVo> selectStaffSaleAchieveRanking(@Param("record") SysOrder sysOrder);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/ArticleService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/ArticleService.java
index dceb4ad..af74da5 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/ArticleService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/ArticleService.java
@@ -72,6 +72,7 @@
 	 */
 	public Article  findById(Long id);
 
+	public List<Article> findApiArticleListInPage(Article article, PaginationVO pageVo);
    	
 
   
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
index a3af416..40a7f9e 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
@@ -4,6 +4,7 @@
 import com.matrix.core.pojo.PaginationVO;
 import com.matrix.system.app.dto.OrderListDto;
 import com.matrix.system.app.vo.OrderDetailVo;
+import com.matrix.system.app.vo.RankingVo;
 import com.matrix.system.hive.bean.SysOrder;
 import com.matrix.system.hive.plugin.util.BaseServices;
 import com.matrix.system.hive.pojo.CzXkVo;
@@ -136,4 +137,8 @@
 	int findApiOrderListTotal(OrderListDto orderListDto);
 
 	OrderDetailVo findApiOrderDetailByOrderId(Long orderId);
+
+	List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder);
+
+	List<RankingVo> findStaffSaleAchieveRanking(SysOrder sysOrder);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ArticleServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ArticleServiceImpl.java
index 2749a58..f42702b 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ArticleServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ArticleServiceImpl.java
@@ -117,7 +117,8 @@
 	
 	}
 
-   	
-	
-	
+	@Override
+	public List<Article> findApiArticleListInPage(Article article, PaginationVO pageVo) {
+		return articleDao.selectApiArticleListInPage(article, pageVo);
+	}
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/DataAnalysisCustomerServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/DataAnalysisCustomerServiceImpl.java
new file mode 100644
index 0000000..1b11435
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/DataAnalysisCustomerServiceImpl.java
@@ -0,0 +1,192 @@
+package com.matrix.system.hive.service.imp;
+
+import com.matrix.core.constance.MatrixConstance;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.app.dto.VipStatisticsParamDto;
+import com.matrix.system.common.bean.SysCompany;
+import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.SysCompanyDao;
+import com.matrix.system.common.dao.SysUsersDao;
+import com.matrix.system.common.tools.DataAuthUtil;
+import com.matrix.system.hive.bean.SysShopInfo;
+import com.matrix.system.hive.dao.SysShopInfoDao;
+import com.matrix.system.hiveErp.analysUtil.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * @author wzy
+ * @date 2020-12-30
+ **/
+@Service
+public class DataAnalysisCustomerServiceImpl {
+
+    @Autowired
+    private SysShopInfoDao shopInfoDao;
+
+    @Autowired
+    private SysCompanyDao sysCompanyDao;
+
+    @Autowired
+    private SysUsersDao sysUsersDao;
+
+    /**
+     * 按店铺查询数据通用格式执行方法,支持时、日、月、年维度
+     * 如:              A店铺    B店铺
+     * 2020-01-01     12     13
+     * 2020-02-02     10     11
+     *
+     * @param statisticsParam 时间条件
+     * @param caculate        循环调用caculate计算该店的数据
+     *                        查询的数据需满足  只有一个门店只有一行 列名称为 t0,t1,t2
+     * @return
+     */
+    public AjaxResult getAnalysisResult(StatisticsParamVo statisticsParam, Caculate caculate) {
+        AjaxResult result = new AjaxResult();
+
+        //根据计算横坐标
+        List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit());
+
+        //获取所有门店
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        List<SysShopInfo> shops = null;
+        if (statisticsParam.getShopId() != null) {
+            shops = Arrays.asList(shopInfoDao.selectById(user.getShopId()));
+        } else {
+            if (DataAuthUtil.hasAllShopAuth()) {
+                shops = shopInfoDao.selectShopInfo(user.getCompanyId());
+            } else {
+                shops = Arrays.asList(shopInfoDao.selectById(user.getShopId()));
+            }
+        }
+        //定义数据项内容
+        List<SeriesVo> series = new ArrayList<>();
+
+        //定义数据主体
+        String[] legendData = new String[shops.size()];
+
+        int i = 0;
+
+        //按门店统计数据
+        List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis);
+        for (SysShopInfo shop : shops) {
+
+            legendData[i++] = shop.getShopName();
+            //数据项内容
+            SeriesVo storeInfoSeries = new SeriesVo();
+            storeInfoSeries.setName(shop.getShopName());
+            //调用计算器获取数据库统计的结果
+            Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam, shop.getId(), null);
+            //把统计结果转成数组格式
+            storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap));
+            series.add(storeInfoSeries);
+
+        }
+        //构造返回对象
+        Map<Object, Object> data = new HashMap<>();
+        data.put("legendData", legendData);
+        data.put("series", series);
+        String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam);
+        data.put("xAxis", Arrays.copyOf(xData, xData.length - 1));
+        result.setMapInfo(data);
+        result.setStatus(AjaxResult.STATUS_SUCCESS);
+        return result;
+    }
+
+    public AjaxResult getCompanyAnalysisResult(StatisticsParamVo statisticsParam, Caculate caculate) {
+        AjaxResult result = new AjaxResult();
+
+        //根据计算横坐标
+        List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit());
+
+        //获取所有门店
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+        SysCompany company = sysCompanyDao.selectById(user.getCompanyId());
+
+        //定义数据项内容
+        List<SeriesVo> series = new ArrayList<>();
+
+        //定义数据主体
+        String[] legendData = new String[1];
+
+        int i = 0;
+
+        //按门店统计数据
+        List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis);
+
+        legendData[0] = company.getComName();
+        //数据项内容
+        SeriesVo storeInfoSeries = new SeriesVo();
+        storeInfoSeries.setName(company.getComName());
+        //调用计算器获取数据库统计的结果
+        Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam, null, company.getComId());
+        //把统计结果转成数组格式
+        storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap));
+        series.add(storeInfoSeries);
+
+        //构造返回对象
+        Map<Object, Object> data = new HashMap<>();
+        data.put("legendData", legendData);
+        data.put("series", series);
+        String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam);
+        data.put("xAxis", Arrays.copyOf(xData, xData.length - 1));
+        result.setMapInfo(data);
+        result.setStatus(AjaxResult.STATUS_SUCCESS);
+        return result;
+    }
+
+    public AjaxResult getStaffAnalysisResult(VipStatisticsParamDto statisticsParam, Caculate caculate) {
+        AjaxResult result = new AjaxResult();
+
+        //根据计算横坐标
+        List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit());
+
+        //获取所有门店
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+        Long staffId = null;
+        if (statisticsParam.getStaffId() == null) {
+            staffId = user.getSuId();
+        } else {
+            staffId = statisticsParam.getStaffId();
+        }
+        SysUsers sysUsers = sysUsersDao.selectById(staffId);
+
+        //定义数据项内容
+        List<SeriesVo> series = new ArrayList<>();
+
+        //定义数据主体
+        String[] legendData = new String[1];
+
+        int i = 0;
+
+        //按门店统计数据
+        List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis);
+
+        legendData[0] = sysUsers.getSuName();
+        //数据项内容
+        SeriesVo storeInfoSeries = new SeriesVo();
+        storeInfoSeries.setName(sysUsers.getSuName());
+        //调用计算器获取数据库统计的结果
+        Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam, null, sysUsers.getSuId());
+        //把统计结果转成数组格式
+        storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap));
+        series.add(storeInfoSeries);
+
+        //构造返回对象
+        Map<Object, Object> data = new HashMap<>();
+        data.put("legendData", legendData);
+        data.put("series", series);
+        StatisticsParamVo statisticsParam1 = new StatisticsParamVo();
+        statisticsParam1.setStatisticsUnit(statisticsParam.getStatisticsUnit());
+        String[] xData = StatisticsTimeUtil.getFormartDateList(xAxis, statisticsParam1);
+        data.put("xAxis", Arrays.copyOf(xData, xData.length - 1));
+        result.setMapInfo(data);
+        result.setStatus(AjaxResult.STATUS_SUCCESS);
+        return result;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index 250b154..b64d15a 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -10,6 +10,7 @@
 import com.matrix.system.app.vo.OrderDetailAchieveItemVo;
 import com.matrix.system.app.vo.OrderDetailItemVo;
 import com.matrix.system.app.vo.OrderDetailVo;
+import com.matrix.system.app.vo.RankingVo;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
@@ -1250,4 +1251,14 @@
         orderDetail.setItems(items);
         return orderDetail;
     }
+
+    @Override
+    public List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder) {
+        return sysOrderDao.selectShopAchieveRanking(sysOrder);
+    }
+
+    @Override
+    public List<RankingVo> findStaffSaleAchieveRanking(SysOrder sysOrder) {
+        return sysOrderDao.selectStaffSaleAchieveRanking(sysOrder);
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
index 69a4dc0..8c1a271 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
@@ -7,6 +7,7 @@
 import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.hive.bean.SysShopInfo;
 import com.matrix.system.hive.dao.SysShopInfoDao;
+import com.matrix.system.hive.service.imp.DataAnalysisCustomerServiceImpl;
 import com.matrix.system.hiveErp.analysUtil.*;
 import com.matrix.system.hiveErp.dao.TjVipSumDao;
 import org.jetbrains.annotations.NotNull;
@@ -31,6 +32,8 @@
     @Autowired
     SysShopInfoDao shopInfoDao;
 
+    @Autowired
+    DataAnalysisCustomerServiceImpl dataAnalysisCustomerService;
 
 
     /**
@@ -43,9 +46,9 @@
      */
     @RequestMapping(value = "/customerHeadCompare")
     public @ResponseBody  AjaxResult customerHeadCompare(StatisticsParamVo statisticsParam) {
-        return getAnalysisResult(statisticsParam, new Caculate() {
+        return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<Integer>() {
             @Override
-            public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId) {
+            public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) {
                 //从员工业绩统计表中,按时间段,门店的维度统计人头数
                 return tjVipSumDao.customerHeadCompare(timeSpaceParam,shopId);
             }
@@ -61,9 +64,9 @@
      */
     @RequestMapping(value = "/customerEnterCountCompare")
     public @ResponseBody  AjaxResult customerEnterCountCompare(StatisticsParamVo statisticsParam) {
-        return getAnalysisResult(statisticsParam, new Caculate() {
+        return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<Integer>() {
             @Override
-            public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId) {
+            public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) {
                 //从员工业绩统计表中,按时间段,门店的维度统计人次
                 return tjVipSumDao.customerEnterCountCompare(timeSpaceParam,shopId);
             }
@@ -80,9 +83,9 @@
      */
     @RequestMapping(value = "/customerEnterRateCompare")
     public @ResponseBody  AjaxResult customerEnterRateCompare(StatisticsParamVo statisticsParam) {
-        return getAnalysisResult(statisticsParam, new Caculate() {
+        return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<Integer>() {
             @Override
-            public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId) {
+            public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) {
                 //从员工业绩统计表中,按时间段,门店的维度统计人次
                 return tjVipSumDao.customerEnterRateCompare(timeSpaceParam,shopId);
             }
@@ -93,64 +96,6 @@
 
 
 
-
-
-    /**
-     *  按店铺查询数据通用格式执行方法,支持时、日、月、年维度
-     *  如:              A店铺    B店铺
-     *     2020-01-01     12     13
-     *     2020-02-02     10     11
-     * @param statisticsParam 时间条件
-     * @param caculate  循环调用caculate计算该店的数据
-     *                  查询的数据需满足  只有一个门店只有一行 列名称为 t0,t1,t2
-     * @return
-     */
-    private AjaxResult getAnalysisResult(StatisticsParamVo statisticsParam, Caculate caculate) {
-        AjaxResult result = new AjaxResult();
-
-        //根据计算横坐标
-        List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(statisticsParam.getBeginTime(), statisticsParam.getEndTime(), statisticsParam.getStatisticsUnit());
-
-        //获取所有门店
-        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-        List<SysShopInfo> shops=null;
-        if(DataAuthUtil.hasAllShopAuth()){
-            shops= shopInfoDao.selectShopInfo(user.getCompanyId());
-        }else{
-            shops=Arrays.asList(shopInfoDao.selectById(user.getShopId()));
-        }
-        //定义数据项内容
-        List<SeriesVo> series=new ArrayList<>();
-
-        //定义数据主体
-        String[]  legendData=new String[shops.size()];
-
-        int i=0;
-
-        //按门店统计数据
-        List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis);
-        for(SysShopInfo shop: shops){
-
-            legendData[i++]=shop.getShopName();
-            //数据项内容
-            SeriesVo storeInfoSeries=new SeriesVo();
-            storeInfoSeries.setName(shop.getShopName());
-            //调用计算器获取数据库统计的结果
-            Map<String, Integer> yAxisMap = caculate.exec(timeSpaceParam,shop.getId());
-            //把统计结果转成数组格式
-            storeInfoSeries.setData(StatisticsTimeUtil.getSeries(yAxisMap));
-            series.add(storeInfoSeries);
-
-        }
-        //构造返回对象
-        Map<Object,Object> data=new HashMap<>();
-        data.put("legendData",legendData);
-        data.put("series",series);
-        data.put("xAxis", StatisticsTimeUtil.getFormartDateList(xAxis,statisticsParam));
-        result.setMapInfo(data);
-        result.setStatus(AjaxResult.STATUS_SUCCESS);
-        return result;
-    }
 
 
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/Caculate.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/Caculate.java
index 27e6cdf..193b9d0 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/Caculate.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/Caculate.java
@@ -5,6 +5,6 @@
 /**
  * 明细数值计算器
  */
-public interface Caculate {
-    public Map<String, Integer> exec(List<StatisticsTimeDaoParam> timeSpaceParam , Long shopId);
+public interface Caculate<T> {
+    public Map<String, T> exec(List<StatisticsTimeDaoParam> timeSpaceParam , Long shopId, Long companyId);
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/StatisticsParamVo.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/StatisticsParamVo.java
index dba0746..8bd9e7a 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/StatisticsParamVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/analysUtil/StatisticsParamVo.java
@@ -1,33 +1,62 @@
 package com.matrix.system.hiveErp.analysUtil;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotBlank;
+
 /**
  * 统计查询条件
  * @author jyy
  */
+@ApiModel(value = "StatisticsParamVo", description = "专项统计接收参数类")
 public class StatisticsParamVo {
+
+    public static final String COMPANY = "1";
+
+    public static final String SHOP = "2";
 
     /**
      * 开始时间
      */
+    @NotBlank(message = "参数错误")
+    @ApiModelProperty(value = "开始时间", example = "2020-12-01")
     private String beginTime;
 
     /**
      *结束时间
      */
+    @NotBlank(message = "参数错误")
+    @ApiModelProperty(value = "结束时间", example = "2020-12-31")
     private String endTime;
     /**
      *统计单位
      */
+    @NotBlank(message = "参数错误")
+    @ApiModelProperty(value = "统计单位", example = "日")
     private String statisticsUnit;
 
     /**
      *对比单位
      */
+    @ApiModelProperty(hidden = true)
     private String  contrastUnit;
     /**
      * 门店id
      */
-    private String shopId;
+    @ApiModelProperty(value = "门店ID, 不传默认统计整个公司")
+    private Long shopId;
+
+    @ApiModelProperty(value = "类型 1-营业收入 2-现金收入 3-余额划扣 4-本金消耗 5-赠送消耗 6-现金退款 7-卡项退款 8-欠款", example = "1")
+    private String type;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
 
     public String getBeginTime() {
         return beginTime;
@@ -61,11 +90,11 @@
         this.contrastUnit = contrastUnit;
     }
 
-    public String getShopId() {
+    public Long getShopId() {
         return shopId;
     }
 
-    public void setShopId(String shopId) {
+    public void setShopId(Long shopId) {
         this.shopId = shopId;
     }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
index 3e27576..21c325f 100644
--- a/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
@@ -1,9 +1,13 @@
 package com.matrix.system.hiveErp.dao;
 
 
+import com.matrix.core.pojo.PaginationVO;
+import com.matrix.system.app.vo.VipAchieveDataShowVo;
+import com.matrix.system.hive.bean.AchieveNew;
 import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 
@@ -16,4 +20,32 @@
 	 Map<String, Integer> customerEnterCountCompare(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId);
 
 	Map<String, Integer> customerEnterRateCompare(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId);
+
+	Map<String, BigDecimal> selectBusinessInCome(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	Map<String, BigDecimal> selectCashIncome(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	Map<String, BigDecimal> selectCardUse(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	Map<String, BigDecimal> selectArrears(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	Map<String, BigDecimal> selectHisConsume(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	Map<String, BigDecimal> selectFreeConsume(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+	Map<String, BigDecimal> selectCardRefund(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+	Map<String, BigDecimal> selectCashRefund(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("shopId") Long shopId, @Param("companyId") Long companyId);
+
+	List<VipAchieveDataShowVo> selectVipAchieveInPage(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo);
+
+	Map<String, BigDecimal> selectStaffOrderAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffCashAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffCardAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffGoodsAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffCardUseAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffHisConsumeAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffFreeConsumeAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffCommissionAchieve(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffPeopleNum(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffProjNum(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
+	Map<String, BigDecimal> selectStaffProjTime(@Param("list") List<StatisticsTimeDaoParam> timeSpaceParam, @Param("staffId") Long staffId);
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopProductDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopProductDao.java
index 176f9c0..653bfde 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopProductDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopProductDao.java
@@ -53,6 +53,8 @@
 	 */
 	List<ShopProduct> selectByIds(@Param("ids") List<Integer> ids);
 
+	List<String> selectProductNameByIds(@Param("ids") List<Integer> ids);
+
 	List<ShopProduct> selectProductByAttrid(@Param("attrId") String attrId,@Param("shopId") Long shopId);
 
 
diff --git a/zq-erp/src/main/resources/config/system.properties b/zq-erp/src/main/resources/config/system.properties
index e008d06..9bf9768 100644
--- a/zq-erp/src/main/resources/config/system.properties
+++ b/zq-erp/src/main/resources/config/system.properties
@@ -92,7 +92,7 @@
 
 
 #是否启用异常上报
-is_open_exception_report=true
+is_open_exception_report=false
 showExcptionUrl=http://erp.hive.jyymatrix.cc/showException
 
 
diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
index 321834c..9534312 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
@@ -960,7 +960,7 @@
                 </if>
                 <if
                         test="(record.suName!=null and record.suName!='') or (record.suName!='' and record.suName==0)">
-                    and su_name like concat('%',#{record.suName},'%')
+                    and (su_name like concat('%',concat(#{record.suName},'%')) or su_tel = #{record.suName})
                 </if>
                 <if
                         test="(record.suTel!=null and record.suTel!='') or (record.suTel!='' and record.suTel==0)">
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
index 1994fd2..5449871 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -958,4 +958,60 @@
 		inner join sys_users b on (a.beault_id=b.su_id or a.sale_id = b.su_id)
 		where a.order_item_id=#{itemId} and order_type = '订单'
 	</select>
+
+	<select id="selectShopConsumeAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo">
+		select
+			b.shop_short_name name,
+			b.SHOP_IMAG photo,
+			sum(IFNULL(a.free_consume,0) + IFNULL(a.consume,0) + IFNULL(a.his_consume,0)) amount
+		from achieve_new a
+		left join sys_shop_info b on a.shop_id=b.ID
+		<where>
+			<if test="record.companyId != null">
+				and a.company_id=#{record.companyId}
+			</if>
+			<if test='record.t1 == "1" and record.datatime != null'>
+				and date_format(datatime, '%Y-%m-%d') = date_format(#{record.datatime}, '%Y-%m-%d')
+			</if>
+			<if test='record.t1 == "2" and record.datatime != null'>
+				and date_format(datatime, '%Y-%m') = date_format(#{record.datatime}, '%Y-%m')
+			</if>
+			<if test='record.t1 == "3" and record.datatime != null'>
+				and date_format(datatime, '%Y') = date_format(#{record.datatime}, '%Y')
+			</if>
+		</where>
+		group by a.shop_id
+		order by amount desc, a.shop_id
+	</select>
+
+	<select id="selectBeauticianConsumeAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo">
+		select
+			b.su_name name,
+			b.su_id id,
+			sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume, 0) + IFNULL(a.consume, 0)) amount,
+			c.shop_short_name shopName
+		from achieve_new a
+		inner join sys_users b on a.beault_id=b.su_id
+		left join sys_shop_info c on a.shop_id=c.ID
+		<where>
+			a.order_type='服务单'
+			<if test="record.companyId != null">
+				and a.company_id=#{record.companyId}
+			</if>
+			<if test="record.shopId != null">
+				and a.shop_id=#{record.shopId}
+			</if>
+			<if test='record.t1 == "1" and record.datatime != null'>
+				and date_format(datatime, '%Y-%m-%d') = date_format(#{record.datatime}, '%Y-%m-%d')
+			</if>
+			<if test='record.t1 == "2" and record.datatime != null'>
+				and date_format(datatime, '%Y-%m') = date_format(#{record.datatime}, '%Y-%m')
+			</if>
+			<if test='record.t1 == "3" and record.datatime != null'>
+				and date_format(datatime, '%Y') = date_format(#{record.datatime}, '%Y')
+			</if>
+		</where>
+		group by a.beault_id
+		order by amount desc
+	</select>
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml
index 40be119..d7b9b0c 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml
@@ -437,4 +437,17 @@
 		</if>
 		order by type_id,sort,createtiem desc
 	</select>
+
+	<select id="selectApiArticleListInPage" resultMap="ArticleMap">
+		select * from article a
+		inner join article_type b on a.type_id=b.id and find_in_set(#{record.typeId}, b.parent_ids)
+		order by a.createtiem desc
+		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
+			<if test="pageVo.offset >=0  and pageVo.limit >0">
+				limit
+				#{pageVo.offset},#{pageVo.limit}
+			</if>
+		</if>
+	</select>
+
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
index c45c853..65db100 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
@@ -12,7 +12,8 @@
 			<result property="description" column="description" />
 			<result property="url" column="url" />
 			<result property="icon" column="icon" />
-			<result property="type" column="type" />
+		<result property="type" column="type" />
+		<result property="parentIds" column="parent_ids" />
 		<result property="shopId" column="shop_id"/>
 			<!--扩展属性  -->
 			<!-- <association property="article" javaType="Article"
@@ -30,7 +31,8 @@
 			url,
 			icon,
 			type,
-			shop_id
+			shop_id,
+			parent_ids
 		)
 	VALUES (
 			#{id},
@@ -41,7 +43,8 @@
 			#{url},
 			#{icon},
 			#{type},
-			#{shopId}
+			#{shopId},
+			#{parentIds}
 	)
 	</insert>
 	
@@ -70,7 +73,10 @@
 				</if>		
 				<if test="type != null and type !='' ">
 					type = #{type},
-				</if>		
+				</if>
+				<if test="parentIds != null and parentIds !='' ">
+					parent_ids = #{parentIds},
+				</if>
 		</set>
 		WHERE id=#{id} 
 	</update>
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
index d048579..74da875 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
@@ -533,6 +533,89 @@
         ) t
     </select>
 
+    <select id="selectApiBusinessDataInPage" resultType="com.matrix.system.app.vo.BusinessesDataShowVo">
+        select
+            date_format(a.time, #{record.t1}) dataTime,
+            sum(cashPay + cardPay + arrearsPay) totalPay,
+            sum(cashPay) cashPay,
+            sum(cardPay) cardPay,
+            sum(arrearsPay) arrearsPay,
+            sum(freeConsumePay) freeConsumePay,
+            sum(consumePay) consumePay,
+            sum(refundCardPay) refundCardPay,
+            sum(refundCashPay) refundCashPay
+        from (
+                 select
+                        company_id,
+                        shop_id,
+                        a.time,
+                        MAX(CASE code WHEN 'cashPay' THEN value ELSE 0 END)            cashPay,
+                        MAX(CASE code WHEN 'cardPay' THEN value ELSE 0 END)            cardPay,
+                        MAX(CASE code WHEN 'arrearsPay' THEN value ELSE 0 END)         arrearsPay,
+                        MAX(CASE code WHEN 'freeConsumePay' THEN value ELSE 0 END)     freeConsumePay,
+                        MAX(CASE code WHEN 'consumePay' THEN value ELSE 0 END)         consumePay,
+                        MAX(CASE code WHEN 'refundCashPay' THEN ABS(value) ELSE 0 END) refundCashPay,
+                        MAX(CASE code WHEN 'refundCardPay' THEN ABS(value) ELSE 0 END) refundCardPay
+                 from sys_business_data a
+                 group by a.time, company_id, shop_id
+             ) a
+        <where>
+            <if test="record.companyId != null">
+                and a.company_id=#{record.companyId}
+            </if>
+            <if test="record.shopId != null">
+                and a.shop_id=#{record.shopId}
+            </if>
+        </where>
+        group by date_format(a.time, #{record.t1})
+        order by a.time desc
+        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
+            <if test="pageVo.offset >=0  and pageVo.limit >0">
+                limit
+                #{pageVo.offset},#{pageVo.limit}
+            </if>
+        </if>
+    </select>
 
-
+    <select id="selectApiBusinessDataTotal" resultType="java.lang.Integer">
+        select
+            count(1)
+        from (
+            select
+                date_format(a.time, #{record.t1}) dataTime,
+                sum(cashPay + cardPay + arrearsPay) totalPay,
+                sum(cashPay) cashPay,
+                sum(cardPay) cardPay,
+                sum(arrearsPay) arrearsPay,
+                sum(freeConsumePay) freeConsumePay,
+                sum(consumePay) consumePay,
+                sum(refundCardPay) refundCardPay,
+                sum(refundCashPay) refundCashPay
+            from (
+                select
+                company_id,
+                shop_id,
+                a.time,
+                MAX(CASE code WHEN 'cashPay' THEN value ELSE 0 END)            cashPay,
+                MAX(CASE code WHEN 'cardPay' THEN value ELSE 0 END)            cardPay,
+                MAX(CASE code WHEN 'arrearsPay' THEN value ELSE 0 END)         arrearsPay,
+                MAX(CASE code WHEN 'freeConsumePay' THEN value ELSE 0 END)     freeConsumePay,
+                MAX(CASE code WHEN 'consumePay' THEN value ELSE 0 END)         consumePay,
+                MAX(CASE code WHEN 'refundCashPay' THEN ABS(value) ELSE 0 END) refundCashPay,
+                MAX(CASE code WHEN 'refundCardPay' THEN ABS(value) ELSE 0 END) refundCardPay
+                from sys_business_data a
+                group by a.time, company_id, shop_id
+            ) a
+            <where>
+                <if test="record.companyId != null">
+                    and a.company_id=#{record.companyId}
+                </if>
+                <if test="record.shopId != null">
+                    and a.shop_id=#{record.shopId}
+                </if>
+            </where>
+            group by date_format(a.time, #{record.t1})
+            order by a.time desc
+        ) a
+    </select>
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
index d86c4f7..3e09a48 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -550,4 +550,62 @@
         left join sys_users c on a.STAFF_ID=c.su_id
         where a.id=#{orderId}
     </select>
+
+    <select id="selectShopAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo">
+        select
+               b.shop_short_name name,
+               b.SHOP_IMAG photo,
+               sum(IFNULL(a.ZK_TOTAL,0)) amount
+        from sys_order a
+        left join sys_shop_info b on a.SHOP_ID=b.ID
+        <where>
+            a.statu in ('已付款', '欠款')
+            <if test="record.companyId != null">
+                and a.company_id=#{record.companyId}
+            </if>
+            <if test='record.type == "1" and record.orderTime != null'>
+                and date_format(order_time, '%Y-%m-%d') = date_format(#{record.orderTime}, '%Y-%m-%d')
+            </if>
+            <if test='record.type == "2" and record.orderTime != null'>
+                and date_format(order_time, '%Y-%m') = date_format(#{record.orderTime}, '%Y-%m')
+            </if>
+            <if test='record.type == "3" and record.orderTime != null'>
+                and date_format(order_time, '%Y') = date_format(#{record.orderTime}, '%Y')
+            </if>
+        </where>
+        group by a.SHOP_ID
+        order by amount desc, a.shop_id
+    </select>
+
+    <select id="selectStaffSaleAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo">
+        select
+               b.su_name name,
+               b.su_id id,
+               b.su_photo photo,
+               sum(ZK_TOTAL) amount,
+               c.shop_short_name shopName
+        from sys_order a
+        left join sys_users b on a.STAFF_ID=b.su_id
+        left join sys_shop_info c on a.SHOP_ID=c.ID
+        <where>
+            a.statu in ('已付款', '欠款') and b.su_id is not null
+            <if test="record.companyId != null">
+                and a.company_id=#{record.companyId}
+            </if>
+            <if test="record.shopId != null">
+                and a.shop_id=#{record.shopId}
+            </if>
+            <if test='record.type == "1" and record.orderTime != null'>
+                and date_format(order_time, '%Y-%m-%d') = date_format(#{record.orderTime}, '%Y-%m-%d')
+            </if>
+            <if test='record.type == "2" and record.orderTime != null'>
+                and date_format(order_time, '%Y-%m') = date_format(#{record.orderTime}, '%Y-%m')
+            </if>
+            <if test='record.type == "3" and record.orderTime != null'>
+                and date_format(order_time, '%Y') = date_format(#{record.orderTime}, '%Y')
+            </if>
+        </where>
+        group by b.su_id
+        order by amount desc, b.su_id
+    </select>
 </mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml
index 73519e7..cf75379 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysSkinCheckRecordDao.xml
@@ -18,11 +18,13 @@
 		<result property="shopName" column="shopName" />
 		<result property="telphone" column="telphone" />
 		<result property="checkUserName" column="checkUserName" />
+		<result property="userName" column="userName" />
 			<result property="ext1" column="ext1" />
 			<result property="ext2" column="ext2" />
 			<result property="ext3" column="ext3" />
 			<result property="ext4" column="ext4" />
-			<result property="ext5" column="ext5" />
+		<result property="ext5" column="ext5" />
+		<result property="sex" column="sex" />
 		<collection property="skinDetails" ofType="com.matrix.system.hive.bean.SysSkinDetail" column="id">
 			<id property="id" column="detailId" />
 			<result property="checkId" column="check_id" />
@@ -356,10 +358,13 @@
 			t3.symptom analysisSymptom,
 			t3.percentage analysisPercentage,
 			t3.analysis analysisAnalysis,
-			t3.img analysisImg
+			t3.img analysisImg,
+		    t4.vip_name userName,
+		    t4.sex sex
 		from sys_skin_check_record t1
 		left join sys_skin_detail t2 on t1.id=t2.check_id and t2.t1=1
 		left join sys_skin_detail t3 on t1.id=t3.check_id and t3.t1=2
+		left join sys_vip_info t4 on t1.user_id=t4.id
 		where  t1.id=#{id}
 	</select>	
 	
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
index 4e58387..417b21f 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -108,6 +108,10 @@
         <!-- 扩展属性 -->
         <result property="staffName" column="STAFF_NAME"/>
         <result property="shopName" column="SHOP_NAME"/>
+        <association property="vipLevel" javaType="com.matrix.system.hive.bean.SysVipLevel" >
+            <result property="levelName" column="levelName"/>
+            <result property="vipLevel" column="vipLevel"/>
+        </association>
     </resultMap>
 
     <!-- 查询几天内过生日的会员 -->
@@ -965,12 +969,15 @@
 		a.province,
 		a.city,
 		a.area,
-		a.recommend_id
+		a.recommend_id,
+		e.level_name levelName,
+		e.vip_level vipLevel
 	</sql>
     <sql id="from">
 		from sys_vip_info a
 		left join sys_users c on c.su_id =a.STAFF_ID
 		left join sys_shop_info d ON d.ID=a.SHOP_ID
+		left join sys_vip_level e on a.level_id=e.id
 	   
 	</sql>
 
@@ -1255,7 +1262,8 @@
                a.PHONE phone,
                a.photo photo,
                b.arriveCnt arriveCnt,
-               g.shop_short_name shopName
+               g.shop_short_name shopName,
+               z.level_name vipLevel
         from sys_vip_info a
         left join (
             select x.vip_id, count(1) arriveCnt from (
@@ -1273,6 +1281,7 @@
                                                  group by date_format(datatime, '%Y-%m-%d'), vip_id
                                              ) x group by x.vip_id
             ) b on a.ID=b.vip_id
+        left join sys_vip_level z on a.level_id=z.id
         <!-- 本月消费 -->
         <if test="record.sort == 'used'">
             left join (
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
index 55ed022..43e968b 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
@@ -68,5 +68,398 @@
 
 	</select>
 
+	<select id="selectBusinessInCome" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(ZK_TOTAL), 0)
+			from sys_order
+			where STATU in ('已付款', '欠款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectCashIncome" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(cash_Pay), 0)
+			from sys_order
+			where STATU in ('已付款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectCardUse" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(card_Pay), 0)
+			from sys_order
+			where STATU in ('已付款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectArrears" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(arrears), 0)
+			from sys_order
+			where STATU in ('欠款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectHisConsume" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(his_consume), 0)
+			from achieve_new
+			where order_type in ('服务单')
+			and <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectFreeConsume" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(free_consume), 0)
+			from achieve_new
+			where order_type in ('服务单')
+			and <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectCashRefund" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(cash_Pay), 0)
+			from sys_order
+			where STATU in ('退款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+
+	<select id="selectCardRefund" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(card_Pay), 0)
+			from sys_order
+			where STATU in ('退款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectVipAchieveInPage" resultType="com.matrix.system.app.vo.VipAchieveDataShowVo">
+		select
+			date_format(a.datatime, #{record.t1}) time,
+			ROUND(sum(IFNULL(zk_total, 0)), 2) orderAmount,
+			ROUND(sum(IFNULL(proj_cash, 0)), 2) cashAmount,
+			ROUND(sum(IFNULL(card_cash, 0)), 2) cardAmount,
+			ROUND(sum(IFNULL(goods_cash, 0)), 2) goodsAmount,
+			ROUND(sum(IFNULL(consume, 0)), 2) cardUseAmount,
+			ROUND(sum(IFNULL(his_consume, 0)), 2) hisConsume,
+			ROUND(sum(IFNULL(free_consume, 0)), 2) freeConsume,
+			ROUND(sum(IFNULL(proj_percentage, 0)), 2) commission,
+			ROUND(sum(IFNULL(number_of_people, 0)), 2) peopleNum,
+			ROUND(sum(IFNULL(proj_num, 0)), 2) projNum,
+			ROUND(sum(IFNULL(proj_time, 0)), 2) serviceTime
+		from (
+			select * from (
+				select * from (
+					select date_format(date_add(now(), INTERVAL -(@rowd := @rowd + 1) DAY), '%Y-%m-%d') datatime
+					from achieve_new a, (select @rowd := 0) t
+				) a
+			) a
+			left join (
+			select
+				date_format(a.datatime, '%Y-%m-%d') datatime1,
+				SUM((IFNULL(a.card_cash,0) +IFNULL(a.proj_cash,0) + IFNULL(a.goods_cash,0))) as zk_total,
+				SUM(IFNULL(a.proj_cash,0)) proj_cash,
+				SUM(IFNULL(a.goods_cash, 0)) goods_cash,
+				SUM(IFNULL(a.card_cash,0)) card_cash,
+				SUM(IFNULL(a.consume, 0)) consume
+				from achieve_new a where a.sale_id=#{record.vipId}
+			group by date_format(a.datatime, '%Y-%m-%d')
+			) b on a.datatime=b.datatime1
+			left join (
+			select
+				date_format(b.datatime, '%Y-%m-%d') datatime2,
+				SUM(IFNULL(b.his_consume, 0)) his_consume,
+				SUM(IFNULL(b.free_consume, 0)) free_consume,
+				SUM(IFNULL(b.proj_percentage, 0)) proj_percentage,
+				SUM(IFNULL(b.number_of_people, 0)) number_of_people,
+				SUM(IFNULL(b.proj_num, 0)) proj_num,
+				SUM(IFNULL(b.proj_time, 0)) proj_time
+			from achieve_new b where b.beault_id=#{record.vipId}
+			group by date_format(b.datatime, '%Y-%m-%d')
+			) c on a.datatime=c.datatime2
+		) a
+		group by date_format(a.datatime, #{record.t1})
+		order by a.datatime desc
+		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
+			<if test="pageVo.offset >=0  and pageVo.limit >0">
+				limit
+				#{pageVo.offset},#{pageVo.limit}
+			</if>
+		</if>
+	</select>
+
+	<select id="selectStaffOrderAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+				IFNULL(SUM((IFNULL(a.card_cash,0) +IFNULL(a.proj_cash,0) + IFNULL(a.goods_cash,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and sale_id=#{staffId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffCashAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.proj_cash,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and sale_id=#{staffId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffCardAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.card_cash,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and sale_id=#{staffId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffGoodsAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.goods_cash,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and sale_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffCardUseAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.consume,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and sale_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffHisConsumeAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.his_consume,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and beault_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffFreeConsumeAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.free_consume,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and beault_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffCommissionAchieve" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.proj_percentage,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and beault_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffPeopleNum" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.number_of_people,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and beault_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffProjNum" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.proj_num,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and beault_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
+
+	<select id="selectStaffProjTime" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select
+			IFNULL(SUM((IFNULL(a.proj_time,0))),0)
+			from  achieve_new a
+			where   <![CDATA[datatime > #{item.beginTime}   and  datatime < #{item.endTime} ]]>
+			<if test="staffId != null and staffId != 0">
+				and beault_id=#{staffId}
+			</if>
+			) as t${index}
+		</foreach>
+		from area where id=1
+	</select>
 </mapper>
 	
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
index f12db2c..2c2cf8c 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
@@ -846,6 +846,16 @@
         </foreach>
     </select>
 
+    <select id="selectProductNameByIds" resultType="java.lang.String">
+        select
+         title
+        from shop_product
+        where id in
+        <foreach collection="ids" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </select>
+
 
     <!-- 根据id 锁表查询-->
     <select id="selectForUpdate" resultMap="ShopProductMap">

--
Gitblit v1.9.1