wzy
2021-11-11 8f7460c6ddff45ec39bf2026d75a3f4e2b26f13d
fix conflect
59 files modified
4 files added
1153 ■■■■■ changed files
zq-erp/pom.xml 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java 141 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java 15 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/LoginDto.java 10 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/RankingDto.java 3 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/SettingDto.java 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoVo.java 10 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/bean/SysCompany.java 14 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java 10 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java 9 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/dao/SysUsersDao.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/service/SysUsersService.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java 8 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java 3 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java 3 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java 68 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java 15 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java 15 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java 17 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/vo/DailyBeautyListVo.java 50 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java 17 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/application.properties 10 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/mdprd/system.properties 3 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/prd/system.properties 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/system.properties 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/common/SysCompanyDao.xml 12 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml 179 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml 8 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml 6 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml 60 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/index.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/map.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/map.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/show.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/index.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/map.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive-erp/shop/shopInfo-form.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/orgment/shopInfo-form.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html 12 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-beauty-list.html 223 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/statistics/vip-arrears-list.html 79 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/index.html 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html 9 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/common/login.html 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/super/sysCompany-form.html 18 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/super/sysCompany-list.html 1 ●●●● patch | view | raw | blame | history
zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/pom.xml
@@ -414,7 +414,6 @@
                    <exclude>config/xcshop/*</exclude>
                    <!--  -->
                    <exclude>config/config.json</exclude>
                    <exclude>config/application.properties</exclude>
                    <exclude>config/system.properties</exclude>
zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java
@@ -72,6 +72,8 @@
        //小程序公司与域名对应关系拦截
        registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**")
                .addPathPatterns("/api/common/wxLogin/**")
                .addPathPatterns("/api/common/bindUser")
                .excludePathPatterns("/wxCommon/wxapi/wxpayCallback")
                .excludePathPatterns("/wxCommon/wxapi/rechargeCallBack");
    }
zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java
@@ -1,5 +1,8 @@
package com.matrix.system.app.action;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.matrix.component.tools.HttpCurlUtil;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.*;
import com.matrix.system.app.authority.AppAuthorityManager;
@@ -8,9 +11,14 @@
import com.matrix.system.app.vo.UserInfoVo;
import com.matrix.system.common.authority.strategy.AccountPasswordLogin;
import com.matrix.system.common.authority.strategy.LoginStrategy;
import com.matrix.system.common.bean.SysCompany;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.common.dao.BusParameterSettingsDao;
import com.matrix.system.common.init.LocalCache;
import com.matrix.system.common.init.UserCacheManager;
import com.matrix.system.common.interceptor.HostInterceptor;
import com.matrix.system.common.service.SysCompanyService;
import com.matrix.system.common.service.SysUsersService;
import com.matrix.system.common.tools.PasswordUtil;
import com.matrix.system.common.tools.UploadUtil;
@@ -19,10 +27,12 @@
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.system.hive.plugin.util.ImageUtil;
import com.matrix.system.hive.service.SysShopInfoService;
import com.matrix.system.shopXcx.api.WeChatApiTools;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import net.sf.json.JSONObject;
import org.apache.commons.fileupload.FileUploadException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -62,18 +72,29 @@
    @Autowired
    private BusParameterSettingsDao busParameterSettingsDao;
    @Autowired
    private SysCompanyService sysCompanyService;;
    @Autowired
    WeChatApiTools weChatApiTools;
    @Autowired
    private UserCacheManager userCacheManager;
    @Value("${file_storage_path}")
    private String fileStoragePath;
    @Value("${static_resource_url}")
    private String nginxUrl;
    @Value("${login_public_key}")
    private String publicKey;
    @ApiOperation(value = "登陆接口", notes = "手机端登陆接口")
    @ApiResponses({
            @ApiResponse(code = 200, message = "OK",  response = UserInfoVo.class)
    })
    @PostMapping(value = "/login")
    public AjaxResult login(@RequestBody @Validated LoginDto loginDto) {
    public AjaxResult login(@RequestBody @Validated LoginDto loginDto) throws Exception {
        SysUsers user = new SysUsers();
        user.setSuAccount(loginDto.getUsername());
@@ -97,10 +118,12 @@
        userInfoVo.setRoleName(user.getRoleName());
        userInfoVo.setPhoto(user.getSuPhoto());
        String sb = token + "_1" + "_/api/vip/findVipInfoById/972";
        AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功");
        authorityManager.initUserPower(result,user);
        result.putInMap("user", userInfoVo);
        result.putInMap("token", token);
        result.putInMap("rasToken", RSAUtils.encryptByPublicKey(sb, publicKey));
        return result;
    }
@@ -247,6 +270,122 @@
    }
    @ApiOperation(value = "根据企业编码获取对应的请求地址")
    @PostMapping(value = "/getUrlByCompanyCode")
    public AjaxResult getUrlByCompanyCode(@RequestBody SettingDto codeDto) {
        SysCompany query = new SysCompany();
        query.setComCode(codeDto.getCode());
        List<SysCompany> list = sysCompanyService.findByModel(query);
        if (CollUtil.isEmpty(list)) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, "企业编码有误");
        }
        AjaxResult ajaxResult = new AjaxResult();
        ajaxResult.setStatus(AjaxResult.STATUS_SUCCESS);
        ajaxResult.putInMap("url", list.get(0).getComWebUrl());
        return ajaxResult;
    }
    @ApiOperation(value = "管理端小程序登录")
    @PostMapping(value = "/wxLogin/{code}")
    public AjaxResult wxLogin(@PathVariable("code") String code) throws IOException {
        if (StrUtil.isBlank(code)) {
            return AjaxResult.buildFailInstance("code不存在");
        }
        AjaxResult res = new AjaxResult();
        String requrl = weChatApiTools.getManagerXcxLoginUrl(code);
        String resultData = HttpCurlUtil.sendGetHttp(requrl, null);
        JSONObject json = JSONObject.fromObject(resultData);
        LogUtil.debug("管理端小程序登录获取到登录信息={}", json);
        if (json.containsKey("errcode")) {
            res.setStatus(AjaxResult.STATUS_FAIL);
            res.setInfo("自动登录失败");
            LogUtil.info("微信登录获取到异常信息errcode");
            return res;
        }
        String openId = json.getString("openid");
        res.setStatus(AjaxResult.STATUS_SUCCESS);
        res.putInMap("openId", openId);
        SysUsers hasBind = sysUsersService.findByOpenId(openId, HostInterceptor.getCompanyId());
        if (hasBind == null) {
            res.setInfo("未绑定用户");
            return res;
        }
        String token = userCacheManager.saveUserInfo(hasBind);
        LogUtil.info("用户token={}", token);
        authorityManager.initUserPower(res, hasBind);
        UserInfoVo userInfoVo = new UserInfoVo();
        if(hasBind.getShopId()!=null){
            SysShopInfo shopInfo = sysShopInfoService.findById(hasBind.getShopId());
            hasBind.setShopName(shopInfo.getShopName());
            userInfoVo.setShopName(shopInfo.getShopShortName());
        }
        userInfoVo.setId(hasBind.getSuId());
        userInfoVo.setName(hasBind.getSuName());
        userInfoVo.setRoleName(hasBind.getRoleName());
        userInfoVo.setPhoto(hasBind.getSuPhoto());
        res.putInMap("token", token);
        res.putInMap("userInfo", userInfoVo);
        return res;
    }
    @ApiOperation(value = "绑定用户")
    @PostMapping(value = "/bindUser")
    public AjaxResult bindUser(@RequestBody @Validated LoginDto loginDto) {
        SysUsers user = new SysUsers();
        user.setSuAccount(loginDto.getUsername());
        user.setSuPassword(loginDto.getPassword());
        LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService);
        user = authorityManager.login(apLogin);
        user.setSuPassword(null);
        user.setOpenIds(null);
        String token = userCacheManager.saveUserInfo(user);
        AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功");
        authorityManager.initUserPower(result, user);
        UserInfoVo userInfoVo = new UserInfoVo();
        if(user.getShopId()!=null){
            SysShopInfo shopInfo = sysShopInfoService.findById(user.getShopId());
            user.setShopName(shopInfo.getShopName());
            userInfoVo.setShopName(shopInfo.getShopShortName());
        }
        userInfoVo.setId(user.getSuId());
        userInfoVo.setName(user.getSuName());
        userInfoVo.setRoleName(user.getRoleName());
        userInfoVo.setPhoto(user.getSuPhoto());
        result.putInMap("token", token);
        result.putInMap("userInfo", userInfoVo);
        synchronized (this) {
            SysUsers hasBind = sysUsersService.findByOpenId(loginDto.getOpenId(), HostInterceptor.getCompanyId());
            if (hasBind != null) {
                if(StrUtil.isNotBlank(hasBind.getOpenIds())) {
                    List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ',');
                    openIds.remove(loginDto.getOpenId());
                    hasBind.setOpenIds(CollUtil.join(openIds, ","));
                    sysUsersService.modifyByModel(hasBind);
                }
            }
            List<String> openIds = StrUtil.split(user.getOpenIds(), ',');
            openIds.add(loginDto.getOpenId());
            user.setOpenIds(CollUtil.join(openIds, ","));
            sysUsersService.modifyByModel(user);
        }
        return result;
    }
}
zq-erp/src/main/java/com/matrix/system/app/action/ApiRankingAction.java
@@ -86,4 +86,17 @@
        achieveNew.setT1(rankingDto.getType());
        return AjaxResult.buildSuccessInstance(achieveNewDao.selectBeauticianConsumeAchieveRanking(achieveNew));
    }
    @ApiOperation(value = "人头数排名", notes = "人头数排名")
    @ApiResponses({
            @ApiResponse(code = 200, message = "ok", response = RankingVo.class)
    })
    @PostMapping(value = "/findNumOfPeopleRanking")
    public AjaxResult findNumOfPeopleRanking(@RequestBody RankingDto rankingDto) {
        AchieveNew achieveNew = new AchieveNew();
        QueryUtil.setQueryLimitCom(achieveNew);
        achieveNew.setDatatime(new Date());
        achieveNew.setT1(rankingDto.getType());
        return AjaxResult.buildSuccessInstance(achieveNewDao.selectNumOfPeopleAchieveRanking(achieveNew));
    }
}
zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java
@@ -3,6 +3,7 @@
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.app.dto.SettingDto;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.common.dao.BusParameterSettingsDao;
@@ -12,10 +13,7 @@
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
 * @author jyy
@@ -44,4 +42,13 @@
        return result;
    }
    @ApiOperation(value = "根据code获取配置", notes = "根据code获取配置")
    @PostMapping(value = "/findAppSettingsByCode")
    public AjaxResult findAppSettingsByCode(@RequestBody SettingDto settingDto) {
        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        AjaxResult result = AjaxResult.buildSuccessInstance("查询成功");
        result.putInMap(settingDto.getCode(), busParameterSettingsDao.selectCompanyParamByCode(settingDto.getCode(),user.getCompanyId()));
        return result;
    }
}
zq-erp/src/main/java/com/matrix/system/app/dto/LoginDto.java
@@ -20,6 +20,16 @@
    @NotBlank(message = "用户名或密码错误")
    private String password;
    private String openId;
    public String getOpenId() {
        return openId;
    }
    public void setOpenId(String openId) {
        this.openId = openId;
    }
    public String getUsername() {
        return username;
    }
zq-erp/src/main/java/com/matrix/system/app/dto/RankingDto.java
@@ -18,11 +18,12 @@
    public static final String DAY = "1";
    public static final String MONTH = "2";
    public static final String YEAR = "3";
    public static final String WEEK = "4";
    @ApiModelProperty(value = "数据类型 1-销售 2-消耗", example = "1")
    private String dataType;
    @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜", example = "1")
    @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜 4-周榜", example = "1")
    private String type;
    public String getDataType() {
zq-erp/src/main/java/com/matrix/system/app/dto/SettingDto.java
New file
@@ -0,0 +1,13 @@
package com.matrix.system.app.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "SettingDto", description = "根据code获取配置参数接收类")
public class SettingDto {
    @ApiModelProperty(value = "code", example = "1")
    private String code;
}
zq-erp/src/main/java/com/matrix/system/app/vo/VipInfoVo.java
@@ -42,6 +42,16 @@
    @ApiModelProperty(value = "累计消费")
    private BigDecimal totalShopping;
    @ApiModelProperty(value = "欠款")
    private BigDecimal arrears;
    public BigDecimal getArrears() {
        return arrears;
    }
    public void setArrears(BigDecimal arrears) {
        this.arrears = arrears;
    }
    public String getPhoto() {
        return photo;
zq-erp/src/main/java/com/matrix/system/common/bean/SysCompany.java
@@ -134,8 +134,16 @@
            
    
    private String  comPlats;
    private String comCode;
    public String getComCode() {
        return comCode;
    }
    public void setComCode(String comCode) {
        this.comCode = comCode;
    }
    public Long getComId() {
        return comId;
@@ -333,7 +341,7 @@
       public void setComPlats(String comPlats) {
        this.comPlats=comPlats;
    }
    @Override
    public String toString() {
zq-erp/src/main/java/com/matrix/system/common/bean/SysUsers.java
@@ -288,6 +288,16 @@
    @Extend
    private SysCompany company;
    private String openIds;
    public String getOpenIds() {
        return openIds;
    }
    public void setOpenIds(String openIds) {
        this.openIds = openIds;
    }
    public String getAllCustomer() {
        return allCustomer;
    }
zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java
@@ -606,7 +606,14 @@
     */
    public static final String WX_ORDER_NOTICE_DINGDING_TOKEN = "wxOrderNoticeDingdingToken";
    /**
     * 管理端小程序appid
     */
    public static final String MINI_PROGRAM_MANAGER_APP_ID = "xcx_manager_appid";
    /**
     * 管理端小程序secret
     */
    public static final String MINI_PROGRAM_MANAGER_SECRET = "xcx_manager_secret";
zq-erp/src/main/java/com/matrix/system/common/dao/SysUsersDao.java
@@ -125,4 +125,5 @@
    public List<AppVersion> selectAppVersion();
    SysUsers selectUserByOpenId(@Param("openId") String openId, @Param("companyId") Long companyId);
}
zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java
@@ -122,7 +122,7 @@
        List<SysCompany> company=sysCompanyService.findByModel(null);
        Map<String, SysCompany> companyMap=new HashMap<>();
        for (SysCompany sysCompany : company) {
            companyMap.put(sysCompany.getComWebUrl(), sysCompany);
            companyMap.put(sysCompany.getComCode(), sysCompany);
        }
        LocalCache.save("companyMap", companyMap);
    }
zq-erp/src/main/java/com/matrix/system/common/service/SysUsersService.java
@@ -173,4 +173,5 @@
    public List<AppVersion> findAppVersion();
    SysUsers findByOpenId(String openId, Long companyId);
}
zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
@@ -270,4 +270,9 @@
    public List<AppVersion> findAppVersion() {
        return sysUsersDao.selectAppVersion();
    }
    @Override
    public SysUsers findByOpenId(String openId, Long companyId) {
        return sysUsersDao.selectUserByOpenId(openId, companyId);
    }
}
zq-erp/src/main/java/com/matrix/system/common/tools/DataAuthUtil.java
@@ -31,7 +31,7 @@
     */
    public static boolean hasAllCustomerAuth() {
        SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
        return user.getShopRole().equals(Dictionary.FLAG_YES_Y) || user.getSuUserType().equals(AppConstance.USER_TYPE_ADMIN);
        return Dictionary.FLAG_YES_Y.equals(user.getShopRole()) || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType());
    }
}
zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
@@ -261,6 +261,7 @@
            vips.get(0).setLabels(sysVipLabelDao.selectByVipId(vips.get(0).getId()));
            vips.get(0).setAge(DateUtil.getAgeForBirthDay(vips.get(0).getBirthday1()));
            vips.get(0).setBalance(moneyCardUseDao.selectVipCardTotalMoney(vips.get(0).getId()));
            vips.get(0).setArrears(sysOrderService.findVipArrearsByVipId(vips.get(0).getId()));
            AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0);
            return result;
        } else {
zq-erp/src/main/java/com/matrix/system/hive/bean/ShoppingGoods.java
@@ -449,6 +449,19 @@
     */
    private String payMethods;
    /**
     * 是否合作项目
     */
    private Integer isCooperate;
    public Integer getIsCooperate() {
        return isCooperate;
    }
    public void setIsCooperate(Integer isCooperate) {
        this.isCooperate = isCooperate;
    }
    public String getAchieveRuleName() {
        return achieveRuleName;
    }
zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
@@ -9,6 +9,7 @@
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@@ -437,8 +438,7 @@
    private String name;
    private BigDecimal arrears;
}
zq-erp/src/main/java/com/matrix/system/hive/dao/AchieveNewDao.java
@@ -10,6 +10,7 @@
import com.matrix.system.hive.bean.AchieveNew;
import com.matrix.system.hive.dto.AchieveNewStatisticsDto;
import com.matrix.system.hive.vo.AchieveNewStatisticsVo;
import com.matrix.system.hive.vo.DailyBeautyListVo;
import org.apache.ibatis.annotations.Param;
import java.util.ArrayList;
@@ -91,4 +92,11 @@
    IPage<AchieveNewStatisticsVo> achieveNewStatistics(Page<AchieveNewStatisticsVo> page,  @Param("record")AchieveNewStatisticsDto queryDto);
     void setPayMethod(@Param("paymethod") String paymethod, @Param("list")  ArrayList<Long> ids);
     List<RankingVo> selectNumOfPeopleAchieveRanking(@Param("record") AchieveNew achieveNew);
    List<DailyBeautyListVo> selectDailyBeautyList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo);
    int selectDailyBeautyListTotal(@Param("record") AchieveNew achieveNew);
    String selectPlInfoByVipIdAndDate(@Param("datatime") Date datatime, @Param("vipId") Long vipId);
}
zq-erp/src/main/java/com/matrix/system/hive/dao/SysOrderDao.java
@@ -9,6 +9,7 @@
import com.matrix.system.shopXcx.api.vo.ErpOrderDetailVo;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@@ -54,4 +55,6 @@
    List<ErpOrderDetailVo> selectErpOrderList(ErpOrderListDto erpOrderListDto);
    ErpOrderDetailVo findUserOrderById(Long orderId);
    BigDecimal selectArrearsByVipId(Long vipId);
}
zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipInfoDao.java
@@ -8,6 +8,7 @@
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
@@ -214,4 +215,8 @@
    int unbundlingSaleMan(Long userId);
    int bindingRecommend(@Param("recommendId") Long recommendId,@Param("userId") Long userId);
    List<Map<String, Object>> selectVipArrearsStatistics(@Param("record") SysVipInfo sysVipInfo, @Param("pageVo") PaginationVO pageVo);
    Integer selectVipArrearsStatisticsTotal(@Param("record") SysVipInfo sysVipInfo);
}
zq-erp/src/main/java/com/matrix/system/hive/service/AchieveNewService.java
@@ -6,6 +6,7 @@
import com.matrix.system.hive.bean.SysOrder;
import com.matrix.system.hive.bean.SysProjServices;
import com.matrix.system.hive.plugin.util.BaseServices;
import com.matrix.system.hive.vo.DailyBeautyListVo;
import java.util.List;
import java.util.Map;
@@ -117,4 +118,7 @@
    public List<AchieveNew> findOrderItemAchieve(Long orderid);
    List<DailyBeautyListVo> findDailyBeautyList(AchieveNew achieveNew, PaginationVO pageVo);
    int findDailyBeautyListTotal(AchieveNew achieveNew);
}
zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
@@ -12,6 +12,7 @@
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpSession;
import java.math.BigDecimal;
import java.util.List;
/**
@@ -142,4 +143,6 @@
    List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder);
    BigDecimal findVipArrearsByVipId(Long vipId);
}
zq-erp/src/main/java/com/matrix/system/hive/service/SysVipInfoService.java
@@ -14,6 +14,7 @@
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
 *
@@ -205,4 +206,8 @@
    public int setToBeAnSalesman(Long userId,Long invitationId,long gradeId);
    SysVipInfo findByOpenId(String openId);
    List<Map<String, Object>> findVipArrearsStatistics(SysVipInfo sysVipInfo, PaginationVO pageVo);
    Integer findVipArrearsStatisticsTotal(SysVipInfo sysVipInfo);
}
zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java
@@ -21,6 +21,7 @@
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.system.hive.service.AchieveNewService;
import com.matrix.system.hive.service.SysProjServicesService;
import com.matrix.system.hive.vo.DailyBeautyListVo;
import com.matrix.system.hiveErp.pojo.AchieveRuleItem;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -174,8 +175,7 @@
        boolean flag = projServicesService.skipServiceOrderStep(Dictionary.SALE_MAN_IS_CONSUME_ACHIEVE);
        Set<Long> beautyIds = new HashSet<>();
        for (SysBeauticianState beauticianState : beauticianStateList) {
            // 是否第一次计算改美疗师
            boolean isFirst = true;
@@ -222,13 +222,13 @@
//                }
            }
            List<AchieveNew> beautyList = achieveNewDao.selectBeautyManAchieveList(beauticianState.getStaffId(), projServices.getVipId(), new Date());
            if (CollUtil.isEmpty(beautyList)) {
                achieveNew.setNumberOfPeople(1D / size);
            } else {
                achieveNew.setNumberOfPeople(1D / (size + beautyList.size()));
                achieveNewDao.updateAchieveNumOfPeople(beautyList, achieveNew.getNumberOfPeople());
            }
//            List<AchieveNew> beautyList = achieveNewDao.selectBeautyManAchieveList(beauticianState.getStaffId(), projServices.getVipId(), new Date());
//            if (CollUtil.isEmpty(beautyList)) {
//                achieveNew.setNumberOfPeople(1D / size);
//            } else {
//                achieveNew.setNumberOfPeople(1D / (size + beautyList.size()));
//                achieveNewDao.updateAchieveNumOfPeople(beautyList, achieveNew.getNumberOfPeople());
//            }
            achieveNew.setProjNum(1);
            if (StringUtils.isNotBlank(beauticianState.getExtract())) {
@@ -244,11 +244,14 @@
                achieveNew.setProjTime(beauticianState.getExcTime());
                isFirst = false;
            }
            beautyIds.add(achieveNew.getBeaultId());
            achieveNewList.add(achieveNew);
        }
        if (CollectionUtils.isNotEmpty(achieveNewList)) {
            achieveNewDao.batchInsert(achieveNewList);
            achieveNumOfPeople(beautyIds, projServices.getVipId());
        }
    }
@@ -297,9 +300,31 @@
        }
    }
    /**
     *
     * 合并订单与服务单人头逻辑,即每一个客户对美疗师/顾问来说,每一天同一个客户只算一个人头。
     * 如若A给客户X下订单,并给客户X服务,对A来说只算一个人头
     */
    private void achieveNumOfPeople(Set<Long> beautyIds, Long vipId) {
        for (Long userId : beautyIds) {
            double num;
            List<AchieveNew> achieveNewList = achieveNewDao.selectBeautyManAchieveList(userId, vipId, new Date());
            if (CollUtil.isEmpty(achieveNewList)) {
                num = 1D;
            } else {
                num = 1D / achieveNewList.size();
            }
            achieveNewDao.updateAchieveNumOfPeople(achieveNewList, num);
        }
    }
    @Override
    public void addAchaeveByOrder(SysOrder pageOrder) {
        List<AchieveNew> achieveNewList = new ArrayList<>();
        Set<Long> beautyIds = new HashSet<>();
        if (CollectionUtils.isNotEmpty(pageOrder.getItems())) {
            for (SysOrderItem orderItem : pageOrder.getItems()) {
@@ -309,13 +334,19 @@
                        if (achieveNew !=null   && achieveNew.getGoodsCash()!=null) {
                            buildAchieve(pageOrder,  orderItem, achieveNew);
                            achieveNewList.add(achieveNew);
                            beautyIds.add(achieveNew.getBeaultId());
                        }
                    }
                }
            }
        }
        if (CollectionUtils.isNotEmpty(achieveNewList)) {
            achieveNewDao.batchInsert(achieveNewList);
            if (!beautyIds.isEmpty()) {
                achieveNumOfPeople(beautyIds, pageOrder.getVipId());
            }
        }
    }
@@ -354,7 +385,7 @@
        }
        // 设置顾问人头业绩
        saleAchieveNumOfPeople(achieveNew);
//        saleAchieveNumOfPeople(achieveNew);
        achieveNew.setOrderType(Dictionary.ORDER_TYPE_SEAL);
        achieveNew.setOrderId(pageOrder.getId());
@@ -439,4 +470,21 @@
    public List<AchieveNew> findOrderItemAchieve(Long orderId) {
        return achieveNewDao.selectOrderItemAchieveByOrderId(orderId);
    }
    @Override
    public List<DailyBeautyListVo> findDailyBeautyList(AchieveNew achieveNew, PaginationVO pageVo) {
        List<DailyBeautyListVo> list = achieveNewDao.selectDailyBeautyList(achieveNew, pageVo);
        if (CollUtil.isNotEmpty(list)) {
            for (DailyBeautyListVo item : list) {
                String pl = achieveNewDao.selectPlInfoByVipIdAndDate(item.getDatatime(), item.getVipId());
                item.setProjInfo(pl);
            }
        }
        return list;
    }
    @Override
    public int findDailyBeautyListTotal(AchieveNew achieveNew) {
        return achieveNewDao.selectDailyBeautyListTotal(achieveNew);
    }
}
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -1853,4 +1853,9 @@
        sysInstoreInfoService.check(instoreInfo);
    }
    @Override
    public BigDecimal findVipArrearsByVipId(Long vipId) {
        return sysOrderDao.selectArrearsByVipId(vipId);
    }
}
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -79,6 +79,9 @@
    @Autowired
    ScoreVipDetailService scoreVipDetailService;
    @Autowired
    private SysOrderDao sysOrderDao;
    /**
     * 新增会员储值卡
@@ -440,7 +443,9 @@
    @Override
    public com.matrix.system.app.vo.VipInfoVo findApiVipInfoById(Long id) {
        return sysVipInfoDao.selectVipInfoById(id);
        com.matrix.system.app.vo.VipInfoVo result = sysVipInfoDao.selectVipInfoById(id);
        result.setArrears(sysOrderDao.selectArrearsByVipId(id));
        return result;
    }
    @Override
@@ -669,5 +674,13 @@
    }
    @Override
    public List<Map<String, Object>> findVipArrearsStatistics(SysVipInfo sysVipInfo, PaginationVO pageVo) {
        return sysVipInfoDao.selectVipArrearsStatistics(sysVipInfo, pageVo);
    }
    @Override
    public Integer findVipArrearsStatisticsTotal(SysVipInfo sysVipInfo) {
        return sysVipInfoDao.selectVipArrearsStatisticsTotal(sysVipInfo);
    }
}
zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -272,5 +272,20 @@
        }
    }
    @RequestMapping(value = "/findDailyBeautyList")
    @ResponseBody
    public AjaxResult findDailyBeautyList(@RequestBody  AchieveNew achieveNew) {
        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
        achieveNew.setCompanyId(sysUsers.getCompanyId());
        if (!DataAuthUtil.hasAllShopAuth()) {
            achieveNew.setShopId(sysUsers.getShopId());
        }
        PaginationVO pageVo = new PaginationVO();
        pageVo.setOffset(achieveNew.getOffset());
        pageVo.setLimit(achieveNew.getLimit());
        return AjaxResult.buildSuccessInstance(achieveNewService.findDailyBeautyList(achieveNew, pageVo), achieveNewService.findDailyBeautyListTotal(achieveNew));
    }
}
zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java
@@ -7,7 +7,9 @@
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.hive.bean.AchieveNew;
import com.matrix.system.hive.bean.SysVipInfo;
import com.matrix.system.hive.service.AchieveNewService;
import com.matrix.system.hive.service.SysVipInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -29,6 +31,9 @@
    @Autowired
    private AchieveNewService achieveNewService;
    @Autowired
    private SysVipInfoService sysVipInfoService;
    @RequestMapping(value = "/vipConsumeStatistics")
    @ResponseBody
    public AjaxResult vipConsumeStatistics(AchieveNew achieveNew, PaginationVO pageVo) {
@@ -40,4 +45,16 @@
        int total = achieveNewService.findVipConsumeStatisticsTotal(achieveNew);
        return AjaxResult.buildSuccessInstance(list, total);
    }
    @RequestMapping(value = "/vipArrearsStatistics")
    @ResponseBody
    public AjaxResult vipArrearsStatistics(SysVipInfo sysVipInfo, PaginationVO pageVo) {
        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
        if (!DataAuthUtil.hasAllShopAuth()) {
            sysVipInfo.setShopId(sysUsers.getShopId());
        }
        int total = sysVipInfoService.findVipArrearsStatisticsTotal(sysVipInfo);
        return AjaxResult.buildSuccessInstance(sysVipInfoService.findVipArrearsStatistics(sysVipInfo, pageVo), total);
    }
}
zq-erp/src/main/java/com/matrix/system/hive/vo/DailyBeautyListVo.java
New file
@@ -0,0 +1,50 @@
package com.matrix.system.hive.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class DailyBeautyListVo {
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date datatime;
    private String beautyName;
    private String vipName;
    private Long vipId;
    private int isAppoint;
    private String arrivalWay;
    private int orderCnt;
    private int arriveCnt;
    private String payMethods;
    private BigDecimal teamPay;
    private BigDecimal tcAndProjCash;
    private BigDecimal productCash;
    private BigDecimal cardCash;
    private BigDecimal cardPay;
    private BigDecimal cashPay;
    private BigDecimal consume;
    private Integer projCnt;
    private BigDecimal ticheng;
    private String projInfo;
}
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java
@@ -47,7 +47,22 @@
     */
    public  String getXcxLoginUrl(String code,Long companyId) {
        String wechatLoginUrl = PropertiesUtil.getString(WECHAT_LOGIN_URL);
        return String.format(wechatLoginUrl, getAppid(companyId), getSecret(companyId), code);
    }
    /**
     * 获取管理端小程序登录地址
     *
     * @param code
     * @return
     */
    public String getManagerXcxLoginUrl(String code) {
        String wechatLoginUrl = PropertiesUtil.getString(WECHAT_LOGIN_URL);
        String appId = PropertiesUtil.getString(AppConstance.MINI_PROGRAM_MANAGER_APP_ID);
        String secret = PropertiesUtil.getString(AppConstance.MINI_PROGRAM_MANAGER_SECRET);
        return String.format(wechatLoginUrl, appId, secret, code);
    }
    /**
@@ -67,8 +82,6 @@
        BusParameterSettings secret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_SECRET, companyId);
        return  secret.getParamValue();
    }
    /**
     * 清空token
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
@@ -2,6 +2,7 @@
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.common.init.UserCacheManager;
import com.matrix.component.tools.HttpCurlUtil;
import com.matrix.core.pojo.AjaxResult;
zq-erp/src/main/resources/config/application.properties
@@ -8,6 +8,10 @@
#spring.datasource.password=123456
#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
spring.datasource.username=hive
spring.datasource.password=hive123!@#
spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
#spring.datasource.username=xc_shop
#spring.datasource.password=xc_shop123!@#
#spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
@@ -17,9 +21,9 @@
#spring.datasource.password=hive123!@#
#spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
spring.datasource.username=meidu_data
spring.datasource.password=meidu_4321#&@
spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
#spring.datasource.username=meidu_data
#spring.datasource.password=meidu_4321#&@
#spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
#spring.datasource.username=root
zq-erp/src/main/resources/config/mdprd/system.properties
@@ -59,7 +59,8 @@
wechar_login_url =https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
xcx_appid =wx3836ab3c1490ff29
xcx_secret =39a3687ec5b2666ed68e7c8b83b26b47
xcx_manager_appid=wx2948b3b914a9722e
xcx_manager_secret=1685dfd99a43e213ed8be07870b898ba
#微信支付调试开关
wx_pay_debug_onoff = false
zq-erp/src/main/resources/config/prd/system.properties
@@ -12,7 +12,7 @@
default_password=123
#nginx静态资源访问地址
static_resource_url=https://filehive2.jyymatrix.cc/uploadeFile/
static_resource_url=https://hive.file.csxuncong.com/uploadeFile/
#文件保存地址
file_storage_path=/mnt/hive/static/uploadeFile/
#文件上传大小字节为单位  10MB
@@ -59,7 +59,8 @@
wechar_login_url =https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
xcx_appid =wx3836ab3c1490ff29
xcx_secret =39a3687ec5b2666ed68e7c8b83b26b47
xcx_manager_appid=wx2948b3b914a9722e
xcx_manager_secret=1685dfd99a43e213ed8be07870b898ba
#微信支付调试开关
wx_pay_debug_onoff = false
zq-erp/src/main/resources/config/system.properties
@@ -51,6 +51,8 @@
wechar_login_url =https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
xcx_appid =wx5cc58f796224af61
xcx_secret =facea088aae414e5c2ee86b459887721
xcx_manager_appid=wx2948b3b914a9722e
xcx_manager_secret=1685dfd99a43e213ed8be07870b898ba
#公众号
gzh_appid=wx57e6335559bdbda6
zq-erp/src/main/resources/mybatis/mapper/common/SysCompanyDao.xml
@@ -231,6 +231,9 @@
            <if test="_parameter.containsKey('comPlats')">
                com_plats = #{comPlats},
            </if>
            <if test="_parameter.containsKey('comCode')">
                com_code = #{comCode},
            </if>
        </set>
        WHERE com_id=#{comId}
    </update>
@@ -694,7 +697,8 @@
        com_logo,
        com_valid,
        com_functions,
        com_plats
        com_plats,
        com_code
        from sys_company
        where com_id=#{comId}
    </select>
@@ -846,9 +850,13 @@
                    and com_functions = #{record.comFunctions}
                </if>
                <if
                    test="(record.comPlats!=null and record.comPlats!='') or (record.comPlats!='' and record.comPlats==0)">
                        test="(record.comPlats!=null and record.comPlats!='') or (record.comPlats!='' and record.comPlats==0)">
                    and com_plats = #{record.comPlats}
                </if>
                <if
                        test="(record.comCode!=null and record.comCode!='') or (record.comCode!='' and record.comCode==0)">
                    and com_code = #{record.comCode}
                </if>
            </if>
        </where>
    </select>
zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
@@ -486,6 +486,9 @@
            <if test="signDate != null and signDate !='' ">
                sign_date = #{signDate}
            </if>
            <if test="openIds != null and openIds !='' ">
                open_ids = #{openIds}
            </if>
        </set>
        WHERE su_id=#{suId}
@@ -1328,4 +1331,14 @@
    <select id="selectAppVersion" resultType="com.matrix.system.hive.bean.AppVersion">
        select * from app_version
    </select>
    <select id="selectUserByOpenId" resultMap="SysUsersMap">
        select *,
        (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName
        from sys_users where find_in_set(#{openId}, open_ids)
        <if test="companyId != null">
            and company_id=#{companyId}
        </if>
    </select>
</mapper>
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -989,6 +989,9 @@
            <if test='record.t1 == "3" and record.datatime != null'>
                and date_format(datatime, '%Y') = date_format(#{record.datatime}, '%Y')
            </if>
            <if test='record.t1 == "4" and record.datatime != null'>
                and date_format(datatime, '%Y-%m-%d %u') = date_format(#{record.datatime}, '%Y-%m-%d %u')
            </if>
        </where>
        group by a.shop_id
        order by amount desc, a.shop_id
@@ -1020,6 +1023,9 @@
            </if>
            <if test='record.t1 == "3" and record.datatime != null'>
                and date_format(datatime, '%Y') = date_format(#{record.datatime}, '%Y')
            </if>
            <if test='record.t1 == "4" and record.datatime != null'>
                and date_format(datatime, '%Y-%m-%d %u') = date_format(#{record.datatime}, '%Y-%m-%d %u')
            </if>
        </where>
        group by a.beault_id
@@ -1066,6 +1072,9 @@
            <if test='record.type == "3" and record.datatime != null'>
                and date_format(datatime, '%Y') = date_format(#{record.datatime}, '%Y')
            </if>
            <if test='record.t1 == "4" and record.datatime != null'>
                and date_format(datatime, '%Y-%m-%d %u') = date_format(#{record.datatime}, '%Y-%m-%d %u')
            </if>
        </where>
        group by b.su_id
        order by amount desc, b.su_id
@@ -1092,6 +1101,9 @@
            </if>
            <if test='record.t1 == "3" and record.datatime != null'>
                and date_format(a.create_time, '%Y') = date_format(#{record.datatime}, '%Y')
            </if>
            <if test='record.t1 == "4" and record.datatime != null'>
                and date_format(a.create_time, '%Y-%m-%d %u') = date_format(#{record.datatime}, '%Y-%m-%d %u')
            </if>
        </where>
        group by a.shop_id
@@ -1193,4 +1205,171 @@
    </update>
    <select id="selectNumOfPeopleAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo">
        select
        b.su_name name,
        b.su_id id,
        b.su_photo photo,
        sum(number_of_people) 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>
            <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>
            <if test='record.t1 == "4" and record.datatime != null'>
                and date_format(datatime, '%Y-%m-%d %u') = date_format(#{record.datatime}, '%Y-%m-%d %u')
            </if>
        </where>
        group by a.beault_id
        order by amount desc
    </select>
    <select id="selectDailyBeautyList" resultType="com.matrix.system.hive.vo.DailyBeautyListVo">
        select
            date_format(b.datatime, '%Y-%m-%d') datatime,
            a.su_id,
            a.su_name beautyName,
            c.id vipId,
            c.VIP_NAME,
            c.arrival_way,
            case when c.BEATUY_ID=a.su_id then 1 else 0 end isAppoint,
            (select count(distinct date_format(n.datatime, '%Y-%m-%d')) from achieve_new n
             where date_format(b.datatime, '%Y-%m') = date_format(n.datatime, '%Y-%m') and n.vip_id=c.ID
             group by date_format(n.datatime, '%Y-%m'))arriveCnt,
            (select count(1) from sys_order o where o.statu in ('欠款', '已付款') and o.VIP_ID=c.id)  orderCnt,
            (select group_concat(distinct q.pay_method) payMethod from sys_order p
               inner join sys_order_flow q on p.ID=q.ORDER_ID
               inner join achieve_new o on o.order_id=p.id
             where date_format(pay_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d') and o.beault_id=a.su_id and c.ID=q.vip_id and p.STATU in ('欠款', '已付款')
             group by p.VIP_ID) payMethods,
            (select sum(amount) from sys_order_flow x
                 inner join achieve_new y on x.order_id=y.order_id
             where x.pay_method='团购' and date_format(x.create_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
               and y.beault_id=a.su_id and x.vip_id=c.id ) teamPay,
            (select sum(m.ZK_PRICE) from sys_order_item m
                 inner join achieve_new n on n.ORDER_ID=m.order_id
             where date_format(m.create_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
               and m.type in ('套餐', '项目') and n.beault_id=a.su_id) tcAndProjCash,
            (select sum(m.ZK_PRICE) from sys_order_item m
                 inner join achieve_new n on n.ORDER_ID=m.order_id
             where date_format(m.create_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
               and m.type in ('家居产品') and n.beault_id=a.su_id) productCash,
            (select sum(m.ZK_PRICE) from sys_order_item m
                 inner join achieve_new n on n.ORDER_ID=m.order_id
             where date_format(m.create_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
               and m.type in ('充值卡') and n.beault_id=a.su_id) cardCash,
            (select sum(amount) from sys_order_flow x
                 inner join achieve_new y on x.order_id=y.order_id
             where x.pay_method='储值卡' and date_format(x.create_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
               and y.beault_id=a.su_id and x.vip_id=c.id) cardPay,
            (select sum(amount) from sys_order_flow x
                inner join achieve_new y on x.order_id=y.order_id
             where x.pay_method not in ('储值卡','欠款') and date_format(x.create_time, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
                and y.beault_id=a.su_id and x.vip_id=c.id) cashPay,
            (select sum(e.goods_cash) from achieve_new e
                inner join shopping_goods f on e.shopping_goods_id=f.id and f.is_cooperate=1
             where e.order_type='订单' and date_format(e.datatime, '%Y-%m-%d') = date_format(b.datatime, '%Y-%m-%d')
                and e.beault_id=a.su_id and e.vip_id=c.id) cooperateProj,
            sum(proj_percentage) ticheng,
            sum(IFNULL(free_consume,0) + IFNULL(his_consume,0)) consume,
            (select count(1) from achieve_new z where z.beault_id=a.su_id and c.id=z.vip_id and z.order_type='服务单' group by z.beault_id,z.vip_id) projCnt
        from sys_users a
             left join achieve_new b on a.su_id=b.beault_id
             left join sys_vip_info c on b.vip_id=c.ID
        where 1=1
        <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.beginTime != null">
            and date_format(b.datatime, '%Y-%m-%d') > date_format(#{record.beginTime}, '%Y-%m-%d')
        </if>
        <if test="record.endTime != null">
            and date_format(#{record.endTime}, '%Y-%m-%d') > date_format(b.datatime, '%Y-%m-%d')
        </if>
        <if test="record.beaultId != null">
            and a.su_id=#{record.beaultId}
        </if>
        <if test="record.vipQueryKey != null and record.vipQueryKey != ''">
            and c.vip_name like concat('%', #{record.vipQueryKey}, '%')
        </if>
        <if test="record.beginTime == null and record.endTime == null">
            and date_format(b.datatime, '%Y-%m') = date_format(now(), '%Y-%m')
        </if>
        group by date_format(b.datatime, '%Y-%m-%d'), a.su_id, c.ID
        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
            order by date_format(b.datatime, '%Y-%m-%d') desc, a.su_id
            <if test="pageVo.offset >=0  and pageVo.limit >0">
                limit
                #{pageVo.offset},#{pageVo.limit}
            </if>
        </if>
    </select>
    <select id="selectDailyBeautyListTotal" resultType="java.lang.Integer">
        select count(1) from (
             select
                 date_format(b.datatime, '%Y-%m-%d') datatime,
                 a.su_id,
                 a.su_name,
                 c.id vipId,
                 c.VIP_NAME,
                 c.arrival_way,
                 sum(proj_percentage) ticheng,
                 sum(IFNULL(free_consume,0) + IFNULL(his_consume,0)) consume
             from sys_users a
                      left join achieve_new b on a.su_id=b.beault_id
                      left join sys_vip_info c on b.vip_id=c.ID
            where 1=1
            <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.beginTime != null">
                and date_format(b.datatime, '%Y-%m-%d') > date_format(#{record.beginTime}, '%Y-%m-%d')
            </if>
            <if test="record.endTime != null">
                and date_format(#{record.endTime}, '%Y-%m-%d') > date_format(b.datatime, '%Y-%m-%d')
            </if>
            <if test="record.beaultId != null">
                and a.su_id=#{record.beaultId}
            </if>
            <if test="record.vipQueryKey != null and record.vipQueryKey != ''">
                and c.vip_name like concat('%', #{record.vipQueryKey}, '%')
            </if>
            <if test="record.beginTime == null and record.endTime == null">
                and date_format(b.datatime, '%Y-%m') = date_format(now(), '%Y-%m')
            </if>
             group by date_format(b.datatime, '%Y-%m-%d'), a.su_id, c.ID
        ) a
    </select>
    <select id="selectPlInfoByVipIdAndDate" resultType="java.lang.String">
        select group_concat(concat(name,'*', bb))
        from (select l.name name, 0+CAST(sum(n.amount) as char) bb from sys_out_store m
         inner join sys_out_store_item n on m.id=n.OUT_STORE_ID
         inner join shopping_goods l on n.SKU_ID=l.id
       where m.SERVICE_ID in (select distinct service_order_id from achieve_new where date_format(datatime, '%Y-%m-%d') = date_format(#{datatime}, '%Y-%m-%d') and vip_id=#{vipId})
       group by l.id) a
    </select>
</mapper>
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
@@ -308,8 +308,8 @@
        invalid_time,
        pay_methods,
        is_infinite,
        achieve_rule_id
        achieve_rule_id,
        is_cooperate
        )
        VALUES (
        #{id},
@@ -371,8 +371,8 @@
            #{invalidTime},
            #{payMethods},
            #{isInfinite},
            #{achieveRuleId}
            #{achieveRuleId},
            #{isCooperate}
        )
    </insert>
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -494,7 +494,7 @@
            MAX(pay_time) payTime,
            GROUP_CONCAT(DISTINCT t2.shop_short_name) shopName
        from sys_order t1
        left join sys_order_flow b on t1.id=b.ORDER_ID and pay_method!='储值卡'
        left join sys_order_flow b on t1.id=b.ORDER_ID and pay_method!='储值卡' and pay_method!='欠款'
        left join sys_shop_info t2 on t1.SHOP_ID=t2.ID
        where t1.VIP_ID=#{vipId} and STATU='已付款';
    </select>
@@ -690,4 +690,8 @@
    </select>
    <select id="selectArrearsByVipId" resultType="java.math.BigDecimal">
        select sum(arrears) from sys_order
        where vip_id=#{vipId} and statu='欠款'
    </select>
</mapper>
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -1473,8 +1473,68 @@
    <select id="selectVipArrearsStatistics" resultType="java.util.Map">
        select
            a.VIP_NAME vipName,
            a.PHONE phone,
            c.shop_short_name shopName,
            sum(b.arrears) arrears,
            count(1) cnt,
            d.su_name staffName
        from sys_vip_info a
         inner join sys_order b on a.ID=b.VIP_ID
         inner join sys_shop_info c on a.SHOP_ID=c.ID
         left join sys_users d on a.STAFF_ID=d.su_id
        where b.STATU='欠款' and b.arrears!=0
            <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.vipName!=null and record.vipName!="" '>
                and (a.vip_name like concat('%', #{record.vipName}, '%') or a.vip_no like concat('%', #{record.vipName}, '%') or a.phone like concat('%', #{record.vipName}, '%'))
            </if>
        group by a.id
        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
            <if test="pageVo.sort !=null  and pageVo.order !=null">
                order by
                ${pageVo.sort} ${pageVo.order}
            </if>
            <if test="pageVo.offset >=0  and pageVo.limit >0">
                limit
                #{pageVo.offset},#{pageVo.limit}
            </if>
        </if>
    </select>
    <select id="selectVipArrearsStatisticsTotal" resultType="java.lang.Integer">
        select count(1) from (
            select
                a.VIP_NAME vipName,
                a.PHONE phone,
                c.shop_short_name shopName,
                sum(b.arrears) arrears,
                count(1) cnt,
                d.su_name staffName
            from sys_vip_info a
                inner join sys_order b on a.ID=b.VIP_ID
                inner join sys_shop_info c on a.SHOP_ID=c.ID
                left join sys_users d on a.STAFF_ID=d.su_id
            where b.STATU='欠款' and b.arrears!=0
                <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.vipName!=null and record.vipName!="" '>
                    and (a.vip_name like concat('%', #{record.vipName}, '%') or a.vip_no like concat('%', #{record.vipName}, '%') or a.phone like concat('%', #{record.vipName}, '%'))
                </if>
            group by a.id
        ) a
    </select>
</mapper>
    
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/index.html
@@ -11,7 +11,7 @@
    .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
    .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
</head>
<body onload="initMap();">
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/map.html
@@ -7,7 +7,7 @@
            html { height: 100% }
            body { height: 100%; margin: 0; padding: 0; background-color: #FFF }
        </style>
        <script charset="utf-8" src="http://api.map.baidu.com/api?v=1.3"></script>
        <script charset="utf-8" src="https://api.map.baidu.com/api?v=1.3"></script>
        <script>
            var map, geocoder;
            function initialize() {
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/map.html
@@ -4,7 +4,7 @@
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script type="text/javascript" src="../internal.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.1&services=true"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.1&services=true"></script>
    <style type="text/css">
        .content{width:530px; height: 350px;margin: 10px auto;}
        .content table{width: 100%}
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/show.html
@@ -14,7 +14,7 @@
            overflow: hidden;
        }
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
</head>
<body onload="initMap();">
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/index.html
@@ -12,7 +12,7 @@
    .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
    .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
</head>
<body onload="initMap();">
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/map.html
@@ -7,7 +7,7 @@
            html { height: 100% }
            body { height: 100%; margin: 0; padding: 0; background-color: #FFF }
        </style>
        <script charset="utf-8" src="http://api.map.baidu.com/api?v=1.3"></script>
        <script charset="utf-8" src="https://api.map.baidu.com/api?v=1.3"></script>
        <script>
            var map, geocoder;
            function initialize() {
zq-erp/src/main/resources/templates/views/admin/hive-erp/shop/shopInfo-form.html
@@ -13,7 +13,7 @@
    th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=Oego4OzlvPRPNyjCPTctXtuVNsSissOX"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=Oego4OzlvPRPNyjCPTctXtuVNsSissOX"></script>
</head>
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -911,7 +911,7 @@
                        this.achieveList.push({
                            orderItem: item,
                            staff: this.loginUser,
                            saleId: this.loginUser.suId,
                            saleId: _this.loginUser.suUserType === 'admin' ? '' : this.loginUser.suId,
                            goodsCash: item.payMoney,
                            achieveType : _this.achieveTypeList[0].value,
                            commission: 0,
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -150,6 +150,7 @@
                    <el-row style="padding: 10px 20px;">
                        <p>余额:<span v-if="vipInfo.balance != null">{{vipInfo.balance}}元</span></p>
                        <p>积分:<span v-if="vipInfo.pointAll != null">{{vipInfo.pointAll}}</span></p>
                        <p>欠款金额:<span v-if="vipInfo.arrears != null">{{vipInfo.arrears}} 元</span></p>
                        <p>累计消费金额:<span v-if="vipInfo.totalMoney != null">{{vipInfo.totalMoney.toFixed(2)}} 元</span></p>
                        <p>累计消费次数:<span v-if="vipInfo.totalTimes != null">{{vipInfo.totalTimes}} 次</span></p>
                        <p>上次消费时间:<span v-if="vipInfo.payTime">{{vipInfo.payTime}}</span></p>
zq-erp/src/main/resources/templates/views/admin/hive/orgment/shopInfo-form.html
@@ -13,7 +13,7 @@
    th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=Oego4OzlvPRPNyjCPTctXtuVNsSissOX"></script>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=Oego4OzlvPRPNyjCPTctXtuVNsSissOX"></script>
</head>
zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html
@@ -234,6 +234,17 @@
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="是否合作项目">
                            <el-radio-group v-model="form.isCooperate">
                                <el-radio label="2">否</el-radio>
                                <el-radio label="1">是</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <p class="el-big-title">销售设置</p>
@@ -1145,6 +1156,7 @@
            //表单数据
            form: {
                isPresent: '否',
                isCooperate: '2',
                staus: '上架',
                //产品组合
                assembleGoods: [],
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-beauty-list.html
New file
@@ -0,0 +1,223 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
    content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
    <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
    <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" th:src="@{/js/function/public.js}"></script>
</head>
<style>
    .table-style {
        margin: 20px 0;
        padding: 20px 10px;
        border: 1px solid #DCDFE6;
        background-color: white;
    }
    .search-form {
        background-color: white;
        padding-top: 10px;
        padding-left: 20px;
        padding-bottom: 10px;
    }
</style>
<body>
<div id="app" style="">
    <el-row class="search-form">
        <el-form ref="form" :model="form" inline>
            <el-form-item label="日期范围">
                <el-date-picker v-model="form.timeRange"
                                type="datetimerange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期">
                </el-date-picker>
            </el-form-item>
            <el-form-item label="业绩归属人">
                <el-select v-model="form.beaultId" placeholder="请选择">
                    <el-option v-for="item in achieveUsers"
                               :key="item.suId"
                               :label="item.suName"
                               :value="item.suId"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="会员">
                <el-input v-model="form.vipQueryKey"></el-input>
            </el-form-item>
            <el-form-item label="门店">
                <el-select v-model="form.shopId" placeholder="请选择所属门店">
                    <el-option v-for="item in shopList"
                               :key="item.id"
                               :label="item.shopName"
                               :value="item.id">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-button type="primary" @click="search" >搜索</el-button>
            <el-button @click="resetForm('form')">重置</el-button>
<!--            <el-button type="warning" @click="exportExcel">导出</el-button>-->
        </el-form>
    </el-row>
    <el-row class="table-style">
        <el-table :data="tableData" style="width: 100%">
            <el-table-column type="index" width="30" fixed="left"></el-table-column>
            <el-table-column prop="datatime" width="150" label="时间" fixed="left"></el-table-column>
            <el-table-column prop="beautyName" label="美疗师" fixed="left"></el-table-column>
            <el-table-column prop="vipName" label="客户" fixed="left"></el-table-column>
            <el-table-column prop="isAppoint" label="是否指定客" width="100">
                <template slot-scope="scope">
                    <span v-if="scope.row.isAppoint ==1 ">是</span>
                    <span v-else>否</span>
                </template>
            </el-table-column>
            <el-table-column label="客流" align="center">
                <el-table-column prop="orderCnt" label="是否会员">
                    <template slot-scope="scope">
                        <span v-if="scope.row.orderCnt > 0">是</span>
                        <span v-else>否</span>
                    </template>
                </el-table-column>
                <el-table-column prop="arrivalWay" label="到店途径"></el-table-column>
                <el-table-column prop="arriveCnt" label="当月到店次数" width="120"></el-table-column>
            </el-table-column>
            <el-table-column label="实操业绩" align="center">
                <el-table-column prop="projInfo" label="项目->消耗产品" width="230"></el-table-column>
                <el-table-column prop="projCnt" label="项目数量"></el-table-column>
                <el-table-column prop="ticheng" label="手工费"></el-table-column>
                <el-table-column prop="consume" label="耗卡"></el-table-column>
            </el-table-column>
            <el-table-column label="现金业绩" align="center">
                <el-table-column prop="payMethods" label="消费类型"  width="200"></el-table-column>
                <el-table-column prop="orderType" label="特色项目"></el-table-column>
                <el-table-column prop="teamPay" label="团购销售"></el-table-column>
                <el-table-column prop="tcAndProjCash" label="卡项销售"></el-table-column>
                <el-table-column prop="productCash" label="产品销售"></el-table-column>
                <el-table-column prop="cardCash" label="会员充值"></el-table-column>
                <el-table-column prop="cashPay" label="总业绩"></el-table-column>
                <el-table-column prop="cardPay" label="划卡"></el-table-column>
            </el-table-column>
        </el-table>
        <el-row style="margin-top: 10px;">
            <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="page.currentPage"
                    :page-sizes="[10, 20, 30, 50]"
                    :page-size="page.size"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="page.total">
            </el-pagination>
        </el-row>
    </el-row>
</div>
<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
<script type="text/javascript">
    var vue = new Vue({
        el : "#app",
        data : {
            tableData : [],
            shopList : [],
            form : {
                timeRange : '',
                vipQueryKey : '',
                beaultId : '',
                shopId : ''
            },
            page : {
                currentPage : 1,
                size : 10,
                total : 0
            }
        },
        created : function() {
            this.queryTableData();
        },
        methods : {
            queryTableData() {
                let _this = this;
                let params = {};
                let page = _this.page;
                let form = _this.form;
                if (form.timeRange) {
                    params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
                    params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
                }
                params.vipQueryKey=form.vipQueryKey;
                params.beaultId=form.beaultId;
                params.limit = page.size;
                params.offset = (page.currentPage - 1) * page.size;
                AjaxProxy.requst({
                    app: _this,
                    data: params,
                    url: basePath + "/admin/achieve/findDailyBeautyList",
                    callback: function (loj) {
                        _this.tableData = loj.rows;
                        _this.page.total = loj.total;
                        _this.queryAchieveUsers();
                        _this.queryShops();
                    }
                });
            },
            queryAchieveUsers() {
                let _this = this;
                AjaxProxy.requst({
                    app: _this,
                    url: basePath + '/admin/getShopStaffByRoleName',
                    callback: function (data) {
                        _this.achieveUsers = data.rows;
                    }
                });
            },
            resetForm(formName) {
                // this.$refs[formName].resetFields();
                this.form = {
                    timeRange : '',
                    vipQueryKey : '',
                    beaultId : ''
                }
            },
            search() {
                this.queryTableData();
            },
            queryShops() {
                let _this = this;
                AjaxProxy.requst({
                    app: _this,
                    url: basePath + '/admin/shopInfo/findAllWithPermi',
                    callback: function (data) {
                        _this.shopList = data.rows;
                    }
                });
            },
            handleSizeChange(val) {
                this.page.size = val;
                this.queryTableData();
            },
            handleCurrentChange(val) {
                this.page.currentPage = val;
                this.queryTableData();
            },
        }
    })
</script>
</body>
</html>
zq-erp/src/main/resources/templates/views/admin/hive/statistics/vip-arrears-list.html
New file
@@ -0,0 +1,79 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
    content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
        th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
</head>
<body class="gray-bg">
    <div class="ibox-content">
    <!-- 搜索框部分start -->
        <form class="form-inline" id="serchform">
        <div class="row mb-10">
                <div class="col-sm-8">
                    <button  onclick="myGrid.serchData()" type="button" class="btn btn-info btn-sm"><i class="fa fa-search" ></i> 搜索</button>
                    <button  onclick="myGrid.resetForm()" type="button"   class="btn btn-default btn-sm"><i class="fa fa-refresh " ></i> 重置</button>
                </div>
            </div>
            <div class="form-group mr-20">
                <input autocomplete="off" placeholder="会员姓名/手机/编号"   name="vipName" type="text" class="form-control" />
            </div>
            <div class="form-group mr-20">
                <label for="staffId">健康顾问</label>
                <select class="form-control autoFull select2"
                        th:data-url="@{/admin/shopAll}"
                        data-value="suId"
                        id="staffId"
                        data-filed="suName"
                        name="staffId">
                    <option value="">--请选择顾问--</option>
                </select>
            </div>
        </form>
        <div id="option-bar" >
            <button matrix:btn="bedList-exportExcel" onclick="exportExcel()" type="button" class="btn btn-default btn-sm"><i class="fa fa-download" ></i> 导出</button>
        </div>
        <table id="mgrid" data-url="" >
            <thead>
                <tr>
                    <th data-formatter="MGrid.indexfn" data-align="center"  data-width="30px" >序号</th>
                    <th data-field="vipName">会员名称</th>
                    <th data-field="phone">手机号码</th>
                    <th data-field="shopName">所属门店</th>
                    <th data-field="arrears" data-sortable="true">欠款金额</th>
                    <th data-field="cnt" data-sortable="true">欠款订单</th>
                    <th data-field="staffName">所属顾问</th>
                </tr>
            </thead>
        </table>
    </div>
    <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script><script type="text/javascript">
        var myGrid;
        $(function(){
            //初始化项目属性搜索列表
            MTools.autoFullSelect();
            $(".select2").select2();
            myGrid=MGrid.initGrid({
                 url:basePath+"/admin/vipStatistics/vipArrearsStatistics"
             });
        });
        // function exportExcel(){
        //     var param=MForm.toUrlParam("#serchform");
        //     window.location.href=basePath+"/admin/moneyCardUseStatistics/exportSummaryItemDetail?"+param;
        // }
    </script>
</body>
</html>
zq-erp/src/main/resources/templates/views/admin/index.html
@@ -89,7 +89,7 @@
                        <i class="fa fa-user" ></i>
                        <span style="line-height: 35px; color: #333; " th:utext="${session.userInfo.suName}+' | '">
                        </span>
                        <a style="line-height: 35px; color: #333; " target="_blank" href="https://www.yuque.com/books/share/70c39d28-6aac-4763-ae92-899ea5822a0d" >
                        <a style="line-height: 35px; color: #333; " target="_blank" href="https://www.yuque.com/books/share/7b10c3aa-f289-4f36-b402-5031fbd7f038" >
                            <i class="fa fa-book" aria-hidden="true"></i>
                            帮助手册</a>
                    </div>
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
@@ -807,13 +807,22 @@
                sku.sort = sort;
                //推广提成
                var selfPrice = tds.eq(length - 5).find("input").val();
                if(selfPrice == ""){
                    selfPrice = 0;
                }
                sku.selfPrice = selfPrice;
                //推广提成
                var sealesPrice = tds.eq(length - 4).find("input").val();
                if(sealesPrice == ""){
                    sealesPrice = 0;
                }
                sku.sealesPrice = sealesPrice;
                //邀请提成
                var invitationPrice = tds.eq(length - 3).find("input").val();
                if(invitationPrice == ""){
                    invitationPrice = 0;
                }
                sku.invitationPrice = invitationPrice;
                //兑换所需金额
zq-erp/src/main/resources/templates/views/common/login.html
@@ -271,9 +271,9 @@
                    href="https://pubstorage-bucket.oss-cn-shenzhen.aliyuncs.com/tools/xp/49.0.2623.112_chrome_installer.exe "
                    target="_blank">谷歌浏览器(推荐)</a><span>|</span><strong>打印控件:</strong><a
                    href="https://pubstorage-bucket.oss-cn-shenzhen.aliyuncs.com/tools/CLodop_Setup_for_Win32NT_https_3.056Extend.exe"
                    target="_blank">下载控件</a><span>|</span><strong>APP:</strong><a
                    target="_blank">下载控件</a><span>|</span><!--<strong>APP:</strong><a
                    href="http://testfile.hive.jyymatrix.cc/mobile/download.html"
                    target="_blank">下载APP客户端</a>
                    target="_blank">下载APP客户端</a>-->
            </p>
        </div>
    </div>
zq-erp/src/main/resources/templates/views/super/sysCompany-form.html
@@ -70,10 +70,11 @@
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">网站地址</label>
                <label class="col-sm-2 control-label">网站地址<span
                        class="text-danger">*</span></label>
                <div class="col-sm-4">
                    <input   type="text" class="form-control"
                        th:value="${obj.comWebUrl }" name="comWebUrl"
                    <input   type="text"  class="form-control"
                        ignore="ignore" dataType="*1-100" th:value="${obj.comWebUrl }" name="comWebUrl"
                        nullmsg="网站不能为空">
                    <div class="Validform_checktip"></div>
                </div>
@@ -85,6 +86,17 @@
                    <div class="Validform_checktip"></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">公司编码<span
                        class="text-danger">*</span></label>
                <div class="col-sm-4">
                    <input   type="text" dataType="*1-100" class="form-control"
                             name="comCode" th:value="${obj.comCode }"
                             nullmsg="公司编码不能为空">
                    <div class="Validform_checktip"></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">企业功能</label>
                <div class=" ztree col-sm-9" id="treeDemo"></div>
zq-erp/src/main/resources/templates/views/super/sysCompany-list.html
@@ -82,6 +82,7 @@
                <th data-field="comBossTel">联系电话</th>
                <th data-field="comAddress">地址</th>
                <th data-field="comWebUrl" data-formatter="MGrid.getUrl">网站</th>
                <th data-field="comCode">公司编码</th>
                <th data-align="center" data-width="150px" data-field="comId"
                    data-formatter="buidOperate">操作
                </th>
zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java
@@ -126,8 +126,6 @@
        newSetting11.setCategory("店务配置");
        newSettings.add(newSetting11);
        for (ParameterSettings newSetting : newSettings) {
            List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting);
            if(CollectionUtil.isEmpty(parameterSettings)){