Merge branch 'score_shop' into api_score_meger
# Conflicts:
# zq-erp/pom.xml
# zq-erp/src/main/resources/config/prd/application.properties
# zq-erp/src/main/resources/templates/views/super/sysCompany-form.html
78 files modified
7 files added
| | |
| | | |
| | | //小程序公司与域名对应关系拦截 |
| | | registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**") |
| | | .addPathPatterns("/api/common/wxLogin/**") |
| | | .addPathPatterns("/api/common/bindUser") |
| | | .addPathPatterns("/api/user/xcxloginOut/**") |
| | | .excludePathPatterns("/wxCommon/wxapi/wxpayCallback") |
| | | .excludePathPatterns("/wxCommon/wxapi/rechargeCallBack"); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | @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()); |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @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()); |
| | | |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | |
| | | List<String> openIds = StrUtil.split(user.getOpenIds(), ','); |
| | | openIds.add(loginDto.getOpenId()); |
| | | user.setOpenIds(CollUtil.join(openIds, ",")); |
| | | sysUsersService.modifyByModel(user); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | 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)); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.interceptor.ApiUserLoginInterceptor; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "小程序退出登陆", notes = "小程序退出登陆") |
| | | @GetMapping(value = "/xcxloginOut/{code}") |
| | | public AjaxResult xcxloginOut(HttpServletRequest request, @PathVariable("code") String code) { |
| | | SysUsers hasBind = sysUsersService.findByOpenId(code, HostInterceptor.getCompanyId()); |
| | | if (hasBind != null) { |
| | | if(StrUtil.isNotBlank(hasBind.getOpenIds())) { |
| | | List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ','); |
| | | openIds.remove(code); |
| | | |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | String token=ApiUserLoginInterceptor.resolveToken(request,privateKey); |
| | | LocalCache.remove(token); |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "员工列表", notes = "员工列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = BeauticianVo.class) |
| | |
| | | @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; |
| | | } |
| | |
| | | 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() { |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiModelProperty(value = "套餐来源,转让,购买") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "划扣金额") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "时长") |
| | | private Integer timeLength; |
| | |
| | | public void setBalance(Double balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "若套餐为任选套餐 则判断是否无限次 Y是 N否") |
| | | private String isInfinite; |
| | | |
| | | @ApiModelProperty(value = "来源") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "套餐内产品") |
| | | List<ServiceProjVo> proj; |
| | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | } |
| | |
| | | @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; |
| | |
| | | |
| | | |
| | | private String comPlats; |
| | | |
| | | |
| | | |
| | | private String comCode; |
| | | |
| | | public String getComCode() { |
| | | return comCode; |
| | | } |
| | | |
| | | public void setComCode(String comCode) { |
| | | this.comCode = comCode; |
| | | } |
| | | |
| | | public Long getComId() { |
| | | return comId; |
| | |
| | | public void setComPlats(String comPlats) { |
| | | this.comPlats=comPlats; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | @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; |
| | | } |
| | |
| | | */ |
| | | 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"; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | public SysRolePwoerFn selectForUpdate(Long rpfId); |
| | | |
| | | int deleteByFns(@Param("companyId") Long comId, @Param("list") List<String> deletedFn); |
| | | } |
| | |
| | | |
| | | public List<AppVersion> selectAppVersion(); |
| | | |
| | | SysUsers selectUserByOpenId(@Param("openId") String openId, @Param("companyId") Long companyId); |
| | | |
| | | int updateUserOpenId(@Param("openId") String openId, @Param("suId") Long suId); |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | |
| | | public List<AppVersion> findAppVersion(); |
| | | |
| | | SysUsers findByOpenId(String openId, Long companyId); |
| | | |
| | | int modifyUserOpenId(String openId, Long suId); |
| | | } |
| | |
| | | package com.matrix.system.common.service.impl;
|
| | |
|
| | | import com.matrix.core.constance.MatrixConstance;
|
| | | import com.matrix.core.constance.SystemErrorCode;
|
| | | import com.matrix.core.exception.GlobleException;
|
| | | import com.matrix.core.pojo.PaginationVO;
|
| | | import com.matrix.core.tools.ModelUtils;
|
| | | import com.matrix.core.tools.StringUtils;
|
| | | import com.matrix.core.tools.WebUtil;
|
| | | import com.matrix.system.common.bean.*;
|
| | | import com.matrix.system.common.dao.SysCompanyDao;
|
| | | import com.matrix.system.common.dao.SysRoleDao;
|
| | | import com.matrix.system.common.dao.SysRolePwoerFnDao;
|
| | | import com.matrix.system.common.service.SysCompanyService;
|
| | | import com.matrix.system.hive.bean.SysShopInfo;
|
| | | import com.matrix.system.hive.bean.Warehouse;
|
| | | import com.matrix.system.hive.dao.SysShopInfoDao;
|
| | | import com.matrix.system.hive.dao.WarehouseDao;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * 公司管理
|
| | | * |
| | | * @author JIANGYOUYAO
|
| | | * @email 935090232@qq.com
|
| | | * @date Dec 11, 2017
|
| | | */
|
| | | @Service
|
| | | public class SysCompanyServiceImpl implements SysCompanyService {
|
| | |
|
| | | @Autowired
|
| | | private SysCompanyDao sysCompanyDao;
|
| | | @Autowired
|
| | | private SysRoleDao sysRoleDao;
|
| | | @Autowired
|
| | | private SysRolePwoerFnDao rolePwoerFnDao;
|
| | |
|
| | | @Autowired
|
| | | private SysShopInfoDao shopInfoDao;
|
| | |
|
| | |
|
| | | @Autowired
|
| | | private InitCustomerDataDictionaryService initCustomerDataDictionaryService;
|
| | |
|
| | |
|
| | | @Autowired
|
| | | private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService;
|
| | |
|
| | |
|
| | | @Autowired
|
| | | private InitRolePowerService initRolePowerService;
|
| | |
|
| | | @Autowired
|
| | | private InitGoodsTypeService initGoodsTypeService;
|
| | |
|
| | | @Autowired
|
| | | private InitShopProductCateService initShopProductCateService;
|
| | |
|
| | | @Autowired
|
| | | private InitBusParameterSettingService initBusParameterSettingService;
|
| | |
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public int add(SysCompany sysCompany) {
|
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
|
| | | sysCompany.setCreateBy(user.getSuName());
|
| | | sysCompany.setUpdateBy(user.getSuName());
|
| | | int i= sysCompanyDao.insert(sysCompany);
|
| | | SysShopInfo zbShop= addZbShop(sysCompany);
|
| | | initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany);
|
| | | initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany,zbShop);
|
| | | initRolePowerService.initRolePower(sysCompany);
|
| | | initGoodsTypeService.initRolePower(sysCompany);
|
| | | initShopProductCateService.initShopProductCate(sysCompany);
|
| | | initBusParameterSettingService.initBusParameterSetting(sysCompany);
|
| | | initBusParameterSettingService.initBusParameterFenxiaoSetting(sysCompany);
|
| | |
|
| | | return i;
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | @Autowired
|
| | | private WarehouseDao warehouseDao;
|
| | | /**
|
| | | * 为新公司创建一个总部
|
| | | * @param sysCompany
|
| | | */
|
| | | private SysShopInfo addZbShop(SysCompany sysCompany) {
|
| | | SysShopInfo zbShopInfo=new SysShopInfo();
|
| | | zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU);
|
| | | zbShopInfo.setShopName(sysCompany.getComName()+"(总部)");
|
| | | zbShopInfo.setCompanyId(sysCompany.getComId());
|
| | | zbShopInfo.setShopTel(sysCompany.getComTel());
|
| | | zbShopInfo.setShopShortName("总部");
|
| | | zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET);
|
| | | zbShopInfo.setShopNo(StringUtils.getRandomString(10));
|
| | | shopInfoDao.insert(zbShopInfo);
|
| | |
|
| | | //新增一个总部仓库
|
| | | Warehouse warehouse=new Warehouse();
|
| | | warehouse.setCompanyId(sysCompany.getComId());
|
| | | warehouse.setName("总部仓库");
|
| | | warehouse.setShopId(zbShopInfo.getId());
|
| | | warehouse.setSort("1");
|
| | | warehouseDao.insert(warehouse);
|
| | | return zbShopInfo;
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) {
|
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
|
| | | newSysCompany.setUpdateBy(user.getSuName());
|
| | |
|
| | | updatePower(newSysCompany);
|
| | | Map<String, Object> modifyMap = null;
|
| | | try {
|
| | | if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) {
|
| | | return MatrixConstance.DML_SUCCESSS;
|
| | | }
|
| | |
|
| | | modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany);
|
| | | } catch (Exception e) {
|
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName());
|
| | | }
|
| | | if (modifyMap.size() > 0) {
|
| | | modifyMap.put("comId", oldSysCompany.getComId());
|
| | | return sysCompanyDao.updateByMap(modifyMap);
|
| | | }
|
| | | return MatrixConstance.DML_SUCCESSS;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 更新公司员工权限
|
| | | * |
| | | * @author JIANGYOUYAO
|
| | | * @email 935090232@qq.com
|
| | | * @date 2017年12月5日
|
| | | * @param newSysCompany
|
| | | */
|
| | | private void updatePower(SysCompany newSysCompany) {
|
| | | List<String> oldFunctions = null;
|
| | | String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions();
|
| | | if (functions == null || functions.equals("")) {
|
| | | oldFunctions = new ArrayList<>();
|
| | | } else {
|
| | | oldFunctions = StringUtils
|
| | | .strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ",");
|
| | | }
|
| | | List<String> newFunctions = new ArrayList<>();
|
| | | if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) {
|
| | | newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ",");
|
| | | }
|
| | |
|
| | | for (String old : oldFunctions) {
|
| | | // 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限
|
| | | if (!newFunctions.contains(old)) {
|
| | | SysRole role = new SysRole();
|
| | | role.setCompanyId(newSysCompany.getComId());
|
| | | List<SysRole> roles = sysRoleDao.selectByModel(role);
|
| | | // 获取该公司下所有的权限信息
|
| | | List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>();
|
| | | for (SysRole tempRole : roles) {
|
| | | SysRolePwoerFn r = new SysRolePwoerFn();
|
| | | r.setRoleId(tempRole.getRoleId());
|
| | | compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r));
|
| | | }
|
| | | // 记录要删除的id
|
| | | List<String> delRolePwoer = new ArrayList<>();
|
| | | for (SysRolePwoerFn rolePwoer : compalyRolePwoer) {
|
| | | // 如果有一个老权限则删除这个权限
|
| | | if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) {
|
| | | delRolePwoer.add(rolePwoer.getRpfId()+"");
|
| | | }
|
| | | }
|
| | | // 如果获取到了就删除
|
| | | if (!delRolePwoer.isEmpty()) {
|
| | | rolePwoerFnDao.deleteByIds(delRolePwoer);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int modifyByModel(SysCompany sysCompany) {
|
| | |
|
| | | return sysCompanyDao.updateByModel(sysCompany);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int remove(List<String> list) {
|
| | |
|
| | | return sysCompanyDao.deleteByIds(list);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int removeById(String comId) {
|
| | |
|
| | | return sysCompanyDao.deleteById(Long.parseLong(comId));
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int removeByModel(SysCompany sysCompany) {
|
| | |
|
| | | return sysCompanyDao.deleteByModel(sysCompany);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) {
|
| | |
|
| | | return sysCompanyDao.selectInPage(sysCompany, pageVo);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<SysCompany> findByModel(SysCompany sysCompany) {
|
| | |
|
| | | return sysCompanyDao.selectByModel(sysCompany);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int findTotal(SysCompany sysCompany) {
|
| | |
|
| | | return sysCompanyDao.selectTotalRecord(sysCompany);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public SysCompany findById(String comId) {
|
| | |
|
| | | return sysCompanyDao.selectById(Long.parseLong(comId));
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysRole; |
| | | import com.matrix.system.common.bean.SysRolePwoerFn; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dao.SysRoleDao; |
| | | import com.matrix.system.common.dao.SysRolePwoerFnDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.Warehouse; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.dao.WarehouseDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 公司管理 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date Dec 11, 2017 |
| | | */ |
| | | @Service |
| | | public class SysCompanyServiceImpl implements SysCompanyService { |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | @Autowired |
| | | private SysRoleDao sysRoleDao; |
| | | @Autowired |
| | | private SysRolePwoerFnDao rolePwoerFnDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | @Autowired |
| | | private InitCustomerDataDictionaryService initCustomerDataDictionaryService; |
| | | |
| | | |
| | | @Autowired |
| | | private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService; |
| | | |
| | | |
| | | @Autowired |
| | | private InitRolePowerService initRolePowerService; |
| | | |
| | | @Autowired |
| | | private InitGoodsTypeService initGoodsTypeService; |
| | | |
| | | @Autowired |
| | | private InitShopProductCateService initShopProductCateService; |
| | | |
| | | @Autowired |
| | | private InitBusParameterSettingService initBusParameterSettingService; |
| | | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public int add(SysCompany sysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysCompany.setCreateBy(user.getSuName()); |
| | | sysCompany.setUpdateBy(user.getSuName()); |
| | | int i = sysCompanyDao.insert(sysCompany); |
| | | SysShopInfo zbShop = addZbShop(sysCompany); |
| | | initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany); |
| | | initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany, zbShop); |
| | | initRolePowerService.initRolePower(sysCompany); |
| | | initGoodsTypeService.initRolePower(sysCompany); |
| | | initShopProductCateService.initShopProductCate(sysCompany); |
| | | initBusParameterSettingService.initBusParameterSetting(sysCompany); |
| | | initBusParameterSettingService.initBusParameterFenxiaoSetting(sysCompany); |
| | | |
| | | return i; |
| | | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private WarehouseDao warehouseDao; |
| | | |
| | | /** |
| | | * 为新公司创建一个总部 |
| | | * |
| | | * @param sysCompany |
| | | */ |
| | | private SysShopInfo addZbShop(SysCompany sysCompany) { |
| | | SysShopInfo zbShopInfo = new SysShopInfo(); |
| | | zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU); |
| | | zbShopInfo.setShopName(sysCompany.getComName() + "(总部)"); |
| | | zbShopInfo.setCompanyId(sysCompany.getComId()); |
| | | zbShopInfo.setShopTel(sysCompany.getComTel()); |
| | | zbShopInfo.setShopShortName("总部"); |
| | | zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET); |
| | | zbShopInfo.setShopNo(StringUtils.getRandomString(10)); |
| | | shopInfoDao.insert(zbShopInfo); |
| | | |
| | | //新增一个总部仓库 |
| | | Warehouse warehouse = new Warehouse(); |
| | | warehouse.setCompanyId(sysCompany.getComId()); |
| | | warehouse.setName("总部仓库"); |
| | | warehouse.setShopId(zbShopInfo.getId()); |
| | | warehouse.setSort("1"); |
| | | warehouseDao.insert(warehouse); |
| | | return zbShopInfo; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | newSysCompany.setUpdateBy(user.getSuName()); |
| | | |
| | | updatePower(newSysCompany); |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) { |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | | modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName()); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("comId", oldSysCompany.getComId()); |
| | | return sysCompanyDao.updateByMap(modifyMap); |
| | | } |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | | /** |
| | | * 更新公司员工权限 |
| | | * |
| | | * @param newSysCompany |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | */ |
| | | private void updatePower(SysCompany newSysCompany) { |
| | | List<String> oldFunctions = null; |
| | | String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(); |
| | | if (functions == null || functions.equals("")) { |
| | | oldFunctions = new ArrayList<>(); |
| | | } else { |
| | | oldFunctions = StringUtils |
| | | .strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ","); |
| | | } |
| | | List<String> newFunctions = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) { |
| | | newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ","); |
| | | } |
| | | |
| | | Collections.sort(newFunctions); |
| | | Collections.sort(oldFunctions); |
| | | if (Objects.equals(JSONUtil.toJsonStr(newFunctions), JSONUtil.toJsonStr(oldFunctions))) { |
| | | //没有更新的权限 |
| | | return; |
| | | } |
| | | |
| | | List<String> finalNewFunctions = newFunctions; |
| | | List<String> deletedFn = oldFunctions.stream().map(old -> { |
| | | if (finalNewFunctions.stream().noneMatch(newFn -> Objects.equals(newFn, old))) { |
| | | return old; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }).filter(item->StringUtils.isNotBlank(item)).collect(Collectors.toList()); |
| | | |
| | | if(CollectionUtils.isNotEmpty(deletedFn)){ |
| | | rolePwoerFnDao.deleteByFns(newSysCompany.getComId(),deletedFn); |
| | | //有更新权限清空缓存 |
| | | SysUsers sysUsers = new SysUsers(); |
| | | sysUsers.setCompanyId(newSysCompany.getComId()); |
| | | sysUsers.setSuValid(AppConstance.RECORD_VALID); |
| | | List<SysUsers> users = sysUsersService.findByModel(sysUsers); |
| | | users.forEach(user -> { |
| | | String userKey = SecureUtil.md5(user.getSuId() + ""); |
| | | LocalCache.remove(DefaultAuthorityManager.USER_POWER_REDISKEY_PC + userKey); |
| | | LocalCache.remove(AppAuthorityManager.USER_POWER_REDISKEY_APP + userKey); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | /* for (String old : oldFunctions) { |
| | | // 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限 |
| | | if (!newFunctions.contains(old)) { |
| | | SysRole role = new SysRole(); |
| | | role.setCompanyId(newSysCompany.getComId()); |
| | | List<SysRole> roles = sysRoleDao.selectByModel(role); |
| | | // 获取该公司下所有的权限信息 |
| | | List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>(); |
| | | for (SysRole tempRole : roles) { |
| | | SysRolePwoerFn r = new SysRolePwoerFn(); |
| | | r.setRoleId(tempRole.getRoleId()); |
| | | compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r)); |
| | | } |
| | | // 记录要删除的id |
| | | List<String> delRolePwoer = new ArrayList<>(); |
| | | for (SysRolePwoerFn rolePwoer : compalyRolePwoer) { |
| | | // 如果有一个老权限则删除这个权限 |
| | | if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) { |
| | | delRolePwoer.add(rolePwoer.getRpfId() + ""); |
| | | } |
| | | } |
| | | // 如果获取到了就删除 |
| | | if (!delRolePwoer.isEmpty()) { |
| | | rolePwoerFnDao.deleteByIds(delRolePwoer); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | @Autowired |
| | | SysUsersService sysUsersService; |
| | | |
| | | @Override |
| | | public int modifyByModel(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.updateByModel(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int remove(List<String> list) { |
| | | |
| | | return sysCompanyDao.deleteByIds(list); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int removeById(String comId) { |
| | | |
| | | return sysCompanyDao.deleteById(Long.parseLong(comId)); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int removeByModel(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.deleteByModel(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) { |
| | | |
| | | return sysCompanyDao.selectInPage(sysCompany, pageVo); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysCompany> findByModel(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.selectByModel(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int findTotal(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.selectTotalRecord(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public SysCompany findById(String comId) { |
| | | |
| | | return sysCompanyDao.selectById(Long.parseLong(comId)); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public List<AppVersion> findAppVersion() { |
| | | return sysUsersDao.selectAppVersion(); |
| | | } |
| | | |
| | | @Override |
| | | public SysUsers findByOpenId(String openId, Long companyId) { |
| | | return sysUsersDao.selectUserByOpenId(openId, companyId); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyUserOpenId(String openId, Long suId) { |
| | | return sysUsersDao.updateUserOpenId(openId, suId); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public static boolean hasAllShopAuth() { |
| | | 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()); |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | 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()); |
| | | |
| | | } |
| | | } |
| | |
| | | public @ResponseBody |
| | | ModelAndView printOrder(SysOrder order) throws GlobleException { |
| | | ModelAndView mv = new ModelAndView("admin/hive/beautySalon/print-order"); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | SysUsers user = getMe(); |
| | | String comRegisterCode = companyDao.selectById(user.getCompanyId()).getComRegisterCode(); |
| | | if (StringUtils.isNotBlank(comRegisterCode)) { |
| | | mv.addObject("page", comRegisterCode); |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.dto.ServiceOrderTimeDto; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.hive.vo.ServiceOrderInfoVo; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | 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.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询服务单简单信息 |
| | | */ |
| | | @RequestMapping(value = "/findServiceOrderInfoVo/{id}") |
| | | public @ResponseBody |
| | | AjaxResult findServiceOrderInfoVo(@PathVariable Long id) { |
| | | // 获取服务单信息 |
| | | SysProjServices projServices = sysProjServicesService.findById(id); |
| | | |
| | | ServiceOrderInfoVo serviceOrderInfoVo= BeanUtil.copyProperties(projServices,ServiceOrderInfoVo.class); |
| | | |
| | | return AjaxResult.buildSuccessInstance(serviceOrderInfoVo); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/updateOrderTime") |
| | | public @ResponseBody |
| | | AjaxResult updateOrderTime(SysProjServices serviceQuery) { |
| | | SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId()); |
| | | sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId()); |
| | | AjaxResult updateOrderTime(@RequestBody ServiceOrderTimeDto serviceOrderTimeDto) { |
| | | sysProjServicesDao.updateOrderTime(serviceOrderTimeDto); |
| | | // 更新业绩时间 |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | achieveNew.setServiceOrderId(serviceQuery.getId()); |
| | | achieveNew.setDatatime(serviceQuery.getConsumeTime()); |
| | | achieveNew.setServiceOrderId(serviceOrderTimeDto.getId()); |
| | | achieveNew.setDatatime(serviceOrderTimeDto.getConsumeTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | |
| | | 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 { |
| | |
| | | */ |
| | | private String payMethods; |
| | | |
| | | /** |
| | | * 是否合作项目 |
| | | */ |
| | | private Integer isCooperate; |
| | | |
| | | public Integer getIsCooperate() { |
| | | return isCooperate; |
| | | } |
| | | |
| | | public void setIsCooperate(Integer isCooperate) { |
| | | this.isCooperate = isCooperate; |
| | | } |
| | | |
| | | public String getAchieveRuleName() { |
| | | return achieveRuleName; |
| | | } |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | private String name; |
| | | |
| | | private BigDecimal arrears; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | List<ErpOrderDetailVo> selectErpOrderList(ErpOrderListDto erpOrderListDto); |
| | | |
| | | ErpOrderDetailVo findUserOrderById(Long orderId); |
| | | |
| | | BigDecimal selectArrearsByVipId(Long vipId); |
| | | } |
| | |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.dto.ServiceOrderTimeDto; |
| | | import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | public SysProjServices selectById(Long id); |
| | | |
| | | public void updateOrderTime(@Param("consumeTime") Date createTime, @Param("id") Long id); |
| | | public void updateOrderTime(@Param("serviceOrderTimeDto") ServiceOrderTimeDto serviceOrderTimeDto); |
| | | |
| | | List<ServiceOrderListVo> selectApiServiceOrderListInPage(@Param("record") ServiceOrderListDto serviceOrderListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ServiceOrderTimeDto { |
| | | |
| | | /** |
| | | * 服务单id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | private Date yyTime; |
| | | |
| | | /** |
| | | * 订单创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date createTime; |
| | | /** |
| | | * 订单划扣时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date consumeTime; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | public List<AchieveNew> findOrderItemAchieve(Long orderid); |
| | | |
| | | List<DailyBeautyListVo> findDailyBeautyList(AchieveNew achieveNew, PaginationVO pageVo); |
| | | int findDailyBeautyListTotal(AchieveNew achieveNew); |
| | | |
| | | } |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpSession; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder); |
| | | |
| | | BigDecimal findVipArrearsByVipId(Long vipId); |
| | | |
| | | } |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | |
| | | boolean flag = projServicesService.skipServiceOrderStep(Dictionary.SALE_MAN_IS_CONSUME_ACHIEVE); |
| | | |
| | | |
| | | |
| | | |
| | | Set<Long> beautyIds = new HashSet<>(); |
| | | for (SysBeauticianState beauticianState : beauticianStateList) { |
| | | // 是否第一次计算改美疗师 |
| | | boolean isFirst = true; |
| | |
| | | // } |
| | | } |
| | | |
| | | 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())) { |
| | |
| | | achieveNew.setProjTime(beauticianState.getExcTime()); |
| | | isFirst = false; |
| | | } |
| | | |
| | | beautyIds.add(achieveNew.getBeaultId()); |
| | | achieveNewList.add(achieveNew); |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(achieveNewList)) { |
| | | achieveNewDao.batchInsert(achieveNewList); |
| | | achieveNumOfPeople(beautyIds, projServices.getVipId()); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 合并订单与服务单人头逻辑,即每一个客户对美疗师/顾问来说,每一天同一个客户只算一个人头。 |
| | | * 如若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(); |
| | | } |
| | | |
| | | if (CollUtil.isNotEmpty(achieveNewList)) { |
| | | 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()) { |
| | | |
| | |
| | | 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()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 设置顾问人头业绩 |
| | | saleAchieveNumOfPeople(achieveNew); |
| | | // saleAchieveNumOfPeople(achieveNew); |
| | | |
| | | achieveNew.setOrderType(Dictionary.ORDER_TYPE_SEAL); |
| | | achieveNew.setOrderId(pageOrder.getId()); |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | |
| | | sysInstoreInfoService.check(instoreInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal findVipArrearsByVipId(Long vipId) { |
| | | return sysOrderDao.selectArrearsByVipId(vipId); |
| | | } |
| | | } |
| | |
| | | @Autowired |
| | | ScoreVipDetailService scoreVipDetailService; |
| | | |
| | | @Autowired |
| | | private SysOrderDao sysOrderDao; |
| | | |
| | | |
| | | /** |
| | | * 新增会员储值卡 |
| | |
| | | |
| | | @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 |
| | |
| | | } |
| | | |
| | | |
| | | @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); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @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)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | public void exportShowList( @RequestParam Map<String , Object> param, HttpServletResponse response) throws Exception { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | String title = "项目剩余次数明细"; |
| | | String[] header = {"客户名", "服务名称", "到期日期", "剩余次数", "单价", "项目类型", "套餐类型", "是否使用完成", "备注", "来源", "订单号"}; |
| | | String[] column = {"VIP_NAME", "PROJ_NAME", "FAIL_TIME", "SURPLUS_COUNT", "PRICE", "TYPE_NAME", "type", "IS_OVER", "remark", "SOURCE", "ORDER_NO"}; |
| | | String[] header = {"客户名", "客户所属门店", "服务名称", "到期日期", "剩余次数", "单价", "项目类型", "套餐类型", "是否使用完成", "备注", "来源", "订单号"}; |
| | | String[] column = {"VIP_NAME", "SHOP_NAME", "PROJ_NAME", "FAIL_TIME", "SURPLUS_COUNT", "PRICE", "TYPE_NAME", "type", "IS_OVER", "remark", "SOURCE", "ORDER_NO"}; |
| | | |
| | | if(!DataAuthUtil.hasAllShopAuth()){ |
| | | param.put("shopId", sysUsers.getShopId()); |
| | |
| | | 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; |
| | |
| | | @Autowired |
| | | private AchieveNewService achieveNewService; |
| | | |
| | | @Autowired |
| | | private SysVipInfoService sysVipInfoService; |
| | | |
| | | @RequestMapping(value = "/vipConsumeStatistics") |
| | | @ResponseBody |
| | | public AjaxResult vipConsumeStatistics(AchieveNew achieveNew, PaginationVO pageVo) { |
| | |
| | | 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); |
| | | } |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 简单服务单信息展示对象不含明细 |
| | | */ |
| | | @Data |
| | | public class ServiceOrderInfoVo { |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | private String serviceNo; |
| | | |
| | | /** |
| | | * 服务单金额 |
| | | */ |
| | | private Double money; |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | private Date yyTime; |
| | | |
| | | /** |
| | | * 订单创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date createTime; |
| | | /** |
| | | * 订单划扣时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date consumeTime; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | private Date endTime; |
| | | /** |
| | | * 超时时间 |
| | | */ |
| | | private String isOverTime; |
| | | |
| | | /** |
| | | * 服务状态 0.待预约 1.预约失败,2预约成功待处理,3需配料,4配料中,5配料完成,6,服务中,7服务完成 |
| | | */ |
| | | private String state; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | BusParameterSettings secret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_SECRET, companyId); |
| | | return secret.getParamValue(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 清空token |
| | |
| | | |
| | | 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; |
| | |
| | | |
| | | #线上测试环境 |
| | | # |
| | | #spring.datasource.username=ct_test |
| | | #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=ct_test |
| | | spring.datasource.password=123456 |
| | | spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?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.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 |
| | |
| | | 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 |
| | | |
| | |
| | | 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 |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | spring.datasource.username=ct_test |
| | | 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.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | #spring.datasource.username=chuhuan |
| | | #spring.datasource.password=chuhuan |
| | |
| | | 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 |
| | | gzh_secret=ecb408af170e3890e6544290cad33760 |
| | | |
| | |
| | | <if test="_parameter.containsKey('comPlats')"> |
| | | com_plats = #{comPlats}, |
| | | </if> |
| | | <if test="_parameter.containsKey('comCode')"> |
| | | com_code = #{comCode}, |
| | | </if> |
| | | </set> |
| | | WHERE com_id=#{comId} |
| | | </update> |
| | |
| | | com_logo, |
| | | com_valid, |
| | | com_functions, |
| | | com_plats |
| | | com_plats, |
| | | com_code |
| | | from sys_company |
| | | where com_id=#{comId} |
| | | </select> |
| | |
| | | com_logo, |
| | | com_valid, |
| | | com_functions, |
| | | com_plats |
| | | com_plats, |
| | | com_code |
| | | from sys_company |
| | | <where> |
| | | <if test="record!=null"> |
| | |
| | | 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> |
| | |
| | | </if> |
| | | </where> |
| | | </delete> |
| | | |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <delete id="deleteByFns"> |
| | | DELETE a |
| | | FROM |
| | | sys_role_pwoer_fn a , sys_role b |
| | | WHERE |
| | | a.role_id = b.role_id |
| | | and b.company_id=#{companyId} |
| | | and a.fn_id in <foreach collection="list" index="index" item="item" open="(" |
| | | separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectInPage" resultMap="SysRolePwoerFnMap"> |
| | | select |
| | | rpf_id, |
| | |
| | | <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} |
| | |
| | | <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> |
| | | |
| | | <update id="updateUserOpenId"> |
| | | update sys_users |
| | | set open_ids=#{openId} |
| | | where su_id=#{suId} |
| | | </update> |
| | | </mapper> |
| | |
| | | <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 |
| | |
| | | </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 |
| | |
| | | <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 |
| | |
| | | </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 |
| | |
| | | |
| | | |
| | | </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> |
| | |
| | | invalid_time, |
| | | pay_methods, |
| | | is_infinite, |
| | | achieve_rule_id |
| | | |
| | | achieve_rule_id, |
| | | is_cooperate |
| | | ) |
| | | VALUES ( |
| | | #{id}, |
| | |
| | | #{invalidTime}, |
| | | #{payMethods}, |
| | | #{isInfinite}, |
| | | #{achieveRuleId} |
| | | |
| | | #{achieveRuleId}, |
| | | #{isCooperate} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | 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> |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectArrearsByVipId" resultType="java.math.BigDecimal"> |
| | | select sum(arrears) from sys_order |
| | | where vip_id=#{vipId} and statu='欠款' |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <!-- 根据id更新 部分更新 --> |
| | | <update id="updateOrderTime"> |
| | | UPDATE sys_proj_services set consume_time=#{consumeTime} WHERE id=#{id} |
| | | UPDATE sys_proj_services set |
| | | consume_time=#{serviceOrderTimeDto.consumeTime}, |
| | | yy_time=#{serviceOrderTimeDto.yyTime}, |
| | | create_time=#{serviceOrderTimeDto.createTime} |
| | | WHERE id=#{serviceOrderTimeDto.id} |
| | | </update> |
| | | |
| | | <!-- 设置服务单为已通知 --> |
| | |
| | | a.type, |
| | | a.SOURCE, |
| | | e.ORDER_NO, |
| | | a.remark |
| | | a.remark, |
| | | s.SHOP_NAME |
| | | from sys_proj_use a |
| | | left join shopping_goods b on a.proj_id = b.id |
| | | left join sys_vip_info c on c.ID = a.VIP_ID |
| | | left join sys_shop_info s on c.SHOP_ID=s.id |
| | | left join sys_order_item d on d.id = a.ORDER_ITEM_ID |
| | | left join sys_order e on e.id = d.ORDER_ID |
| | | left join shopping_goods_category f on f.id = b.cate_id |
| | | |
| | | |
| | | |
| | | <where> |
| | |
| | | <collection property="taocanProjUse" ofType="com.matrix.system.hive.bean.SysProjUse"> |
| | | <id property="id" column="proj_info_id" /> |
| | | <result property="projName" column="proj_proj_name"/> |
| | | <result property="source" column="proj_source"/> |
| | | <result property="price" column="proj_price"/> |
| | | <result property="failTime" column="proj_FAIL_TIME"/> |
| | | <result property="surplusCount" column="proj_SURPLUS_COUNT"/> |
| | | <result property="timeLength" column="proj_time_length"/> |
| | |
| | | e.SURPLUS_COUNT proj_SURPLUS_COUNT, |
| | | e.id proj_info_id, |
| | | e.proj_id proj_projId, |
| | | e.source proj_source, |
| | | e.price proj_price, |
| | | e.status proj_status, |
| | | f.time_length proj_time_length, |
| | | f.img proj_img |
| | |
| | | c.LEVEL_NAME vipLevel, |
| | | a.POINT_ALL integral, |
| | | e.shop_short_name shopName, |
| | | sum(IFNULL(b.gift_money, 0) + IFNULL(b.real_money, 0)) totalBalance, |
| | | sum(IFNULL(b.real_money, 0)) totalBalance, |
| | | sum(IFNULL(b.gift_money, 0)) giftBalance, |
| | | (select sum(IFNULL(d.goods_cash, 0) + IFNULL(d.proj_cash, 0) + IFNULL(d.card_cash, 0)) from achieve_new d where d.vip_id=a.id) totalShopping |
| | | from sys_vip_info a |
| | |
| | | |
| | | |
| | | |
| | | <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> |
| | | |
| | |
| | | .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();"> |
| | |
| | | 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() { |
| | |
| | | |
| | | |
| | | var MTools = { |
| | | closeIframe: function () { |
| | | parent.layer.close(parent.layer.getFrameIndex(window.name)); |
| | | }, |
| | | |
| | | /** 返回一个随机字符串 */ |
| | | uuid : function() { |
| | | |
| | |
| | | <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%} |
| | |
| | | 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();"> |
| | |
| | | .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();"> |
| | |
| | | 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() { |
| | |
| | | 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> |
| | |
| | | <input autocomplete="off" placeholder="姓名/编号/电话" name="vipQueryKey" type="text" class="form-control" > |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label >所属门店</label> <select |
| | | class="form-control autoFull" |
| | | data-url="/admin/shopInfo/findShops" data-value="id" |
| | | data-filed="shopName" name="shopId"> |
| | | <option value="">--请选择所属门店--</option> |
| | | </select> |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>到期时间</label><!-- 入库时间的查询增加一个查询的其实时间两个字段 --> |
| | |
| | | <tr> |
| | | <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px" >序号</th> |
| | | <th data-field="VIP_NAME" >客户名</th> |
| | | <th data-field="SHOP_NAME" >客户门店</th> |
| | | <th data-field="PROJ_NAME" >服务名称</th> |
| | | <th data-field="FAIL_TIME" data-formatter="MGrid.getTime" data-sortable="true" >到期日期</th> |
| | | <th data-field="SURPLUS_COUNT" data-sortable="true" >剩余次数</th> |
| | |
| | | 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, |
| | |
| | | title: "修改订单时间", |
| | | maxmin: true, |
| | | area: [MUI.SIZE_L, '500px'], |
| | | content: [basePath + '/admin/projService/toServiceOrderUpdateTime?id=' + id] |
| | | content: [basePath + '/admin/redirect/hive/beautySalon/updateServiceOrderTimeV2?id=' +id] |
| | | }); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!DOCTYPE HTML> |
| | | <!DOCTYPE HTML> |
| | | <html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta charset="utf-8"> |
New file |
| | |
| | | <!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"/> |
| | | <!-- 本框架基本脚本和样式 --> |
| | | <script type="text/javascript" th:src="@{/js/systools/MBaseVue.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"/> |
| | | |
| | | </head> |
| | | <body> |
| | | <div class="ibox-content" id="app" v-cloak > |
| | | <el-form :model="serviceOrder" ref="form" label-width="100px" class="demo-form"> |
| | | |
| | | |
| | | <el-form-item label="创建时间"> |
| | | <el-date-picker v-model="serviceOrder.createTime" type="datetime"></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="预约时间"> |
| | | <el-date-picker v-model="serviceOrder.yyTime" type="datetime"></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="划扣时间"> |
| | | <el-date-picker v-model="serviceOrder.consumeTime" type="datetime" ></el-date-picker> |
| | | <span>修改划扣时间才会同步修改服务单业绩</span> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm('form')" >保存</el-button> |
| | | <el-button @click="closeFram()">关闭</el-button> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | </div> |
| | | </body> |
| | | <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="@{/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 src="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.umd.min.js"></script> |
| | | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@riophae/vue-treeselect@^0.4.0/dist/vue-treeselect.min.css"> |
| | | |
| | | |
| | | <script> |
| | | var id = $.query.get("id"); |
| | | |
| | | |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | |
| | | //表单数据 |
| | | serviceOrder:{} |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 初始化数据表 |
| | | */ |
| | | created: function () { |
| | | this.loadData() |
| | | }, |
| | | |
| | | methods: { |
| | | loadData(){ |
| | | let _this=this; |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/projService/findServiceOrderInfoVo/'+id, |
| | | callback: function (data) { |
| | | _this.serviceOrder = data.data; |
| | | } |
| | | }); |
| | | }, |
| | | submitForm(){ |
| | | let _this=this; |
| | | let data={ |
| | | id:this.serviceOrder.id, |
| | | yyTime:this.serviceOrder.yyTime, |
| | | createTime:this.serviceOrder.createTime, |
| | | consumeTime:this.serviceOrder.consumeTime |
| | | } |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data: data, |
| | | contentType: 'application/json', |
| | | url: basePath + '/admin/projService/updateOrderTime', |
| | | callback: function (data) { |
| | | |
| | | _this.$message.success("修改成功"); |
| | | if(parent.myGrid){ |
| | | parent.myGrid.serchData() |
| | | } |
| | | if(parent.app){ |
| | | parent.app.serviceOrderQuery(); |
| | | } |
| | | setInterval(MTools.closeIframe(), 1000); |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | closeFram: function () { |
| | | |
| | | parent.layer.close(parent.layer.getFrameIndex(window.name)); |
| | | |
| | | }, |
| | | |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | | |
| | |
| | | </el-col> |
| | | </el-col> |
| | | <el-col :span="8" style="float: right; margin-right: 20px;"> |
| | | |
| | | <el-button type="primary" plain @click="recharge">充值</el-button> |
| | | <el-button type="warning" plain @click="addOrder">开单</el-button> |
| | | <el-button type="success" plain @click="addServiceOrder">开服务单</el-button> |
| | | <el-button type="info" plain @click="exportExcel">导出项目</el-button> |
| | | <el-button type="primary" plain @click="openAdd">会员注册</el-button> |
| | | </el-col> |
| | | </el-header> |
| | | <el-container> |
| | |
| | | <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> |
| | |
| | | } |
| | | }, |
| | | methods : { |
| | | openAdd(){ |
| | | layer.full(layer.open({ |
| | | type : 2, |
| | | title : "添加会员信息", |
| | | area : [ MUI.SIZE_L, '450px' ], |
| | | content : [ basePath+'/admin/vipInfo/editForm' ] |
| | | })); |
| | | }, |
| | | //打开订单详情页面 |
| | | openOrder(index,row){ |
| | | layer.full(layer.open({ |
| | |
| | | title: "修改订单时间", |
| | | maxmin: true, |
| | | area: [MUI.SIZE_L, '500px'], |
| | | content: [basePath + '/admin/projService/toServiceOrderUpdateTime?id=' + row.id] |
| | | content: [basePath + '/admin/redirect/hive/beautySalon/updateServiceOrderTimeV2?id=' + row.id] |
| | | }); |
| | | }, |
| | | /********* 服务单tab end ***********/ |
| | |
| | | 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> |
| | |
| | | </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> |
| | | |
| | |
| | | //表单数据 |
| | | form: { |
| | | isPresent: '否', |
| | | isCooperate: '2', |
| | | staus: '上架', |
| | | //产品组合 |
| | | assembleGoods: [], |
New file |
| | |
| | | |
| | | <!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> |
| | |
| | | <label>会员</label> |
| | | <input autocomplete="off" placeholder="姓名/编号/电话" name="vipQueryKey" type="text" class="form-control" > |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label >所属门店</label> <select |
| | | class="form-control autoFull" |
| | | data-url="/admin/shopInfo/findShops" data-value="id" |
| | | data-filed="shopName" name="shopId"> |
| | | <option value="">--请选择所属门店--</option> |
| | | </select> |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>到期时间</label><!-- 入库时间的查询增加一个查询的其实时间两个字段 --> |
New file |
| | |
| | | |
| | | <!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> |
| | |
| | | <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> |
| | |
| | | .drawer { |
| | | overflow: scroll; |
| | | } |
| | | |
| | | .assembly-style .el-form-item__content{ |
| | | margin-left: 0px !important; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .assembly-style .el-input{ |
| | | width: 100px !important; |
| | | } |
| | | .assembly-style i{ |
| | | font-size: 30px; |
| | | } |
| | | .assembly-style .active{ |
| | | color: #409eff; |
| | | } |
| | | |
| | | .module-property{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | .module-property .el-form-item__content{ |
| | | margin-left: 0px !important; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .module-property .el-input{ |
| | | width: 100px !important; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | </el-col>--> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="CSS样式"> |
| | | <el-input v-model="currentNode.nodeStyleStr"></el-input> |
| | | <!-- <el-form-item label="CSS样式">--> |
| | | <!-- <el-input v-model="currentNode.nodeStyleStr"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="组件宽高" class="assembly-style"> |
| | | <el-input v-model="zjwidth" v-on:input="widthChange"></el-input> |
| | | <i :class="selected ? 'el-icon-link active' : 'el-icon-link'" @click="fixedProportion"></i> |
| | | <el-input v-model="zjheight" v-on:input="heightChange"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="节点属性"> |
| | | <el-input v-model="currentNode.nodeAttribute"></el-input> |
| | | <!-- <el-form-item label="节点属性">--> |
| | | <!-- <el-input v-model="currentNode.nodeAttribute"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="组件属性"> |
| | | <!-- 1.图片--> |
| | | <!-- 6.滑块--> |
| | | <!-- 3.轮播图--> |
| | | <!-- 4.视频--> |
| | | <!-- 5.跑马灯文字--> |
| | | <el-from class="module-property" > |
| | | <el-form-item label="自动切换时间间隔(毫秒)"> |
| | | <el-input v-model="interval"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="前边距"> |
| | | <el-input v-model="previousMargin"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="后边距"> |
| | | <el-input v-model="nextMargin"></el-input> |
| | | </el-form-item> |
| | | </el-from> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="页面组"> |
| | | <el-input v-model="currentNode.pageCode"></el-input> |
| | |
| | | |
| | | |
| | | <script> |
| | | |
| | | var id = $.query.get("id"); |
| | | |
| | | |
| | |
| | | pageList:[], |
| | | //当前编辑页面 |
| | | currentPage:{}, |
| | | zjwidth:'', |
| | | zjheight:'', |
| | | selected:false, |
| | | //宽高比 |
| | | aspectRatio:'', |
| | | interval:'', |
| | | previousMargin:'', |
| | | nextMargin:'', |
| | | |
| | | }, |
| | | created: function () { |
| | |
| | | mounted: function () { |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | | widthChange(){ |
| | | if(this.selected){ |
| | | this.zjheight = parseInt(this.zjwidth/this.aspectRatio) |
| | | } |
| | | }, |
| | | heightChange(){ |
| | | if(this.selected){ |
| | | this.zjwidth = parseInt(this.zjheight*this.aspectRatio) |
| | | } |
| | | }, |
| | | getHeight() { |
| | | this.height = window.innerHeight - 40 + 'px'; |
| | | }, |
| | |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }); |
| | | let f = e.target.files[0]; |
| | | let reader = new FileReader(); |
| | | reader.onload = function (e) { |
| | | let data = e.target.result; |
| | | //加载图片获取图片真实宽度和高度 |
| | | let image = new Image(); |
| | | image.onload=function(){ |
| | | let width = image.width; |
| | | let height = image.height; |
| | | _this.aspectRatio= width/height |
| | | }; |
| | | image.src= data; |
| | | }; |
| | | reader.readAsDataURL(f); |
| | | |
| | | uploadForImage( |
| | | basePath + "/admin/multipleUploadFile/doUpload", |
| | | e.target.files[0], |
| | | function (d, result) { |
| | | |
| | | _this.process = d + "%"; |
| | | if (d == 100) { |
| | | |
| | | if (result) { |
| | | if (result.status == 200) { |
| | | |
| | | loading.close(); |
| | | _this.currentNode.ads[index].imgUrl = result.path; |
| | | } else { |
| | |
| | | }, |
| | | |
| | | clickNode(node) { |
| | | console.log(node) |
| | | var _this = this; |
| | | this.currentNode = node; |
| | | this.drawer = !this.drawer; |
| | | this.zjwidth = node.nodeStyle.width.substring(0,node.nodeStyle.width.length-2); |
| | | this.zjheight = node.nodeStyle.height.substring(0,node.nodeStyle.height.length-2); |
| | | let nodeAttribute = JSON.parse(node.nodeAttribute) |
| | | console.log(1111) |
| | | console.log(nodeAttribute) |
| | | if(nodeAttribute.interval){ |
| | | _this.interval = nodeAttribute['interval']; |
| | | _this.previousMargin = nodeAttribute['previous-margin']; |
| | | _this.nextMargin = nodeAttribute['next-margin']; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | let image = new Image(); |
| | | image.onload = function() { |
| | | let width = image.width; // 宽 px |
| | | let height = image.height; // 高 px |
| | | _this.aspectRatio = width/height; |
| | | console.log(1111); |
| | | console.log(_this.aspectRatio); |
| | | } |
| | | if(node.ads){ |
| | | image.src = node.ads[0].imgUrl; |
| | | }else { |
| | | image.src = node.nodeValue; |
| | | } |
| | | |
| | | }, |
| | | |
| | | //改变编辑页面,切换页面元素 |
| | |
| | | |
| | | this.currentPage=this.pageList[index]; |
| | | this.currentPageCode=this.pageList[index].code; |
| | | console.log(this.currentPageCode); |
| | | this.loadPageAds(); |
| | | }, |
| | | loadPageAds() { |
| | |
| | | if (node.nodeStyle != null && node.nodeStyle.length > 1) { |
| | | node.nodeStyleStr = node.nodeStyle; |
| | | node.nodeStyle = JSON.parse(node.nodeStyle); |
| | | _this.zjwidth = node.nodeStyle.width.substring(0,node.nodeStyle.width.length-2); |
| | | _this.zjheight = node.nodeStyle.height.substring(0,node.nodeStyle.height.length-2); |
| | | } |
| | | } |
| | | _this.adNodes = data.rows; |
| | |
| | | if (!this.validation(cNode)) { |
| | | return false; |
| | | } |
| | | let zjw = this.zjwidth; |
| | | let zjh = this.zjheight; |
| | | if(zjw != null && zjh != null){ |
| | | cNode.nodeStyleStr = '{"width":"'+zjw+'px","height":"'+zjh+'px"}'; |
| | | } |
| | | if(this.interval != null && this.previousMargin != null && this.nextMargin != null){ |
| | | cNode.nodeAttribute = '{"interval":'+this.interval+',"previous-margin":'+this.previousMargin+',"next-margin":'+this.nextMargin+'}'; |
| | | } |
| | | |
| | | if (cNode.nodeStyleStr != null && cNode.nodeStyleStr.length > 1) { |
| | | cNode.nodeStyle = JSON.parse(cNode.nodeStyleStr); |
| | | |
| | | } |
| | | |
| | | let data = { |
| | |
| | | "1" |
| | | ); |
| | | }, |
| | | |
| | | fixedProportion(){ |
| | | let _this = this; |
| | | _this.selected = !_this.selected |
| | | if(_this.selected){ |
| | | _this.zjwidth = 0 |
| | | _this.zjheight = 0 |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | destroyed() { |
| | |
| | | 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; |
| | | |
| | | //兑换所需金额 |
| | |
| | | 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> |
| | |
| | | <!DOCTYPE HTML> |
| | | <html> |
| | | <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" /> |
| | | <!-- 本框架基本脚本和样式 --> |
| | | <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> |
| | | <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" /> |
| | | <!-- 本框架基本脚本和样式 --> |
| | | <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> |
| | | |
| | | <!-- 界面单独引入的其他样式和脚本 --> |
| | | <link rel="stylesheet" |
| | | th:href="@{/plugin/zTree/zTreeStyle/zTreeStyle.css}" type="text/css"> |
| | | <script type="text/javascript" |
| | | th:src="@{/plugin/zTree/jquery.ztree.core-3.5.min.js}"></script> |
| | | <script type="text/javascript" |
| | | th:src="@{/plugin/zTree/jquery.ztree.excheck.min.js}"></script> |
| | | <!-- 界面单独引入的其他样式和脚本 --> |
| | | <link rel="stylesheet" |
| | | th:href="@{/plugin/zTree/zTreeStyle/zTreeStyle.css}" type="text/css"> |
| | | <script type="text/javascript" |
| | | th:src="@{/plugin/zTree/jquery.ztree.core-3.5.min.js}"></script> |
| | | <script type="text/javascript" |
| | | th:src="@{/plugin/zTree/jquery.ztree.excheck.min.js}"></script> |
| | | <style> |
| | | #treeDemo{ |
| | | height: 500px; |
| | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="ibox-content"> |
| | | <form class="form-horizontal" id="dataform" |
| | | onsubmit="javascripr:return false;"> |
| | | <input type="hidden" name="tokenUrl" th:value="${tokenUrl}"> <input |
| | | type="hidden" name="token" th:value="${token}"> <input |
| | | type="hidden" name="comId" th:value="${obj.comId }"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">公司名称<span |
| | | <div class="ibox-content"> |
| | | <form class="form-horizontal" id="dataform" |
| | | onsubmit="javascripr:return false;"> |
| | | <input type="hidden" name="tokenUrl" th:value="${tokenUrl}"> <input |
| | | type="hidden" name="token" th:value="${token}"> <input |
| | | type="hidden" name="comId" th:value="${obj.comId }"> |
| | | <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="comName" th:value="${obj.comName }" |
| | | nullmsg="公司名称不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <label class="col-sm-2 control-label">联系人<span |
| | | class="text-danger">*</span></label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="*1-50" class="form-control" |
| | | th:value="${obj.comBoss }" name="comBoss" nullmsg="联系人不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">联系电话</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="*11-11" class="form-control" |
| | | name="comBossTel" ignore="ignore" th:value="${obj.comBossTel }" |
| | | nullmsg="联系电话不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <label class="col-sm-2 control-label">地址</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="*1-510" class="form-control" |
| | | ignore="ignore" th:value="${obj.comAddress }" name="comAddress" |
| | | nullmsg="地址不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">网站地址</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" class="form-control" |
| | | th:value="${obj.comWebUrl }" name="comWebUrl" |
| | | nullmsg="网站不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <label class="col-sm-2 control-label">企业可以用店铺数</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="n" class="form-control" |
| | | ignore="ignore" th:value="${obj.comAge}" name="comAge" |
| | | nullmsg="企业可以用店铺数不能为空"> |
| | | <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="comName" th:value="${obj.comName }" |
| | | nullmsg="公司名称不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <label class="col-sm-2 control-label">联系人<span |
| | | class="text-danger">*</span></label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="*1-50" class="form-control" |
| | | th:value="${obj.comBoss }" name="comBoss" nullmsg="联系人不能为空"> |
| | | 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="col-sm-4"> |
| | | <input type="text" dataType="*11-11" class="form-control" |
| | | name="comBossTel" ignore="ignore" th:value="${obj.comBossTel }" |
| | | nullmsg="联系电话不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <label class="col-sm-2 control-label">地址</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="*1-510" class="form-control" |
| | | ignore="ignore" th:value="${obj.comAddress }" name="comAddress" |
| | | nullmsg="地址不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">企业功能</label> |
| | | <div class=" ztree col-sm-9" id="treeDemo"></div> |
| | | </div> |
| | | <div class="form-group "> |
| | | <div class="col-sm-12 text-center"> |
| | | <a href="javascript:;" onclick="myForm.submit()" |
| | | class="btn btn-success radius"><i class="fa fa-check"></i> 保存</a> |
| | | <a class="btn btn-danger radius" href="javascript:;" |
| | | onclick="MTools.closeForm()"><i class="fa fa-close"></i> 关闭</a> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">网站地址</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" class="form-control" |
| | | th:value="${obj.comWebUrl }" name="comWebUrl" |
| | | nullmsg="网站不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | <label class="col-sm-2 control-label">企业可以用店铺数</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="n" class="form-control" |
| | | ignore="ignore" th:value="${obj.comAge}" name="comAge" |
| | | 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> |
| | | </div> |
| | | <div class="form-group "> |
| | | <div class="col-sm-12 text-center"> |
| | | <a href="javascript:;" onclick="myForm.submit()" |
| | | class="btn btn-success radius"><i class="fa fa-check"></i> 保存</a> |
| | | <a class="btn btn-danger radius" href="javascript:;" |
| | | onclick="MTools.closeForm()"><i class="fa fa-close"></i> 关闭</a> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script th:inline="javascript"> |
| | | var invokeUrl = basePath+"/admin/sysCompany/addCompany"; |
| | | /*<![CDATA[*/ |
| | | var obj=/*[[${obj}]]*/ |
| | | /*]]>*/ |
| | | if(obj.comId!=null){ |
| | | invokeUrl = basePath+"/admin/sysCompany/modifyCompany"; |
| | | } |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script th:inline="javascript"> |
| | | var invokeUrl = basePath+"/admin/sysCompany/addCompany"; |
| | | /*<![CDATA[*/ |
| | | var obj=/*[[${obj}]]*/ |
| | | /*]]>*/ |
| | | if(obj.comId!=null){ |
| | | invokeUrl = basePath+"/admin/sysCompany/modifyCompany"; |
| | | } |
| | | |
| | | var myForm = null; |
| | | var tree = null; |
| | | $(function() { |
| | | MTools.autoFullSelect(); |
| | | $(".select2").select2({ |
| | | 'width' : '100%' |
| | | }); |
| | | myForm = MForm.initForm({ |
| | | invokeUrl : invokeUrl, |
| | | beforeSubmit : function() { |
| | | var items = tree.getCheckedNodes(); |
| | | var keys = ""; |
| | | for (var i = 0; i < items.length; i++) { |
| | | keys += items[i]["id"] + ","; |
| | | } |
| | | myForm.initParam.extendParam = { |
| | | "comFunctions" : keys |
| | | }; |
| | | }, |
| | | afterSubmit : function() { |
| | | parent.myGrid.serchData(); |
| | | }, |
| | | }); |
| | | initFunctionList(); |
| | | var myForm = null; |
| | | var tree = null; |
| | | $(function() { |
| | | MTools.autoFullSelect(); |
| | | $(".select2").select2({ |
| | | 'width' : '100%' |
| | | }); |
| | | myForm = MForm.initForm({ |
| | | invokeUrl : invokeUrl, |
| | | beforeSubmit : function() { |
| | | var items = tree.getCheckedNodes(); |
| | | var keys = ""; |
| | | for (var i = 0; i < items.length; i++) { |
| | | keys += items[i]["id"] + ","; |
| | | } |
| | | myForm.initParam.extendParam = { |
| | | "comFunctions" : keys |
| | | }; |
| | | }, |
| | | afterSubmit : function() { |
| | | parent.myGrid.serchData(); |
| | | }, |
| | | }); |
| | | initFunctionList(); |
| | | }); |
| | | |
| | | function initFunctionList() { |
| | | var zNodes = new Array(); |
| | | $.AjaxProxy().invoke( |
| | | basePath+"/admin/sysFunction/all", |
| | | function(loj) { |
| | | for (var i = 0; i < loj.getRowCount(); i++) { |
| | | zNodes[i] = createNode(loj.getString(i, "fnId"), |
| | | loj.getString(i, "fnParentId"), loj |
| | | .getString(i, "fnName")); |
| | | } |
| | | initTree(zNodes); |
| | | }); |
| | | } |
| | | function initFunctionList() { |
| | | var zNodes = new Array(); |
| | | $.AjaxProxy().invoke( |
| | | basePath+"/admin/sysFunction/all", |
| | | function(loj) { |
| | | for (var i = 0; i < loj.getRowCount(); i++) { |
| | | zNodes[i] = createNode(loj.getString(i, "fnId"), |
| | | loj.getString(i, "fnParentId"), loj |
| | | .getString(i, "fnName")); |
| | | } |
| | | initTree(zNodes); |
| | | }); |
| | | } |
| | | |
| | | function initTree(zNodes) { |
| | | var setting = { |
| | | check : { |
| | | function initTree(zNodes) { |
| | | var setting = { |
| | | check : { |
| | | enable : true, |
| | | chkStyle : "checkbox", |
| | | radioType : "level", |
| | | chkboxType : { |
| | | "Y" : "ps", |
| | | "N" : "ps" |
| | | } |
| | | }, |
| | | view : { |
| | | dblClickExpand : false, |
| | | showLine : true, |
| | | }, |
| | | data : { |
| | | simpleData : { |
| | | enable : true, |
| | | chkStyle : "checkbox", |
| | | radioType : "level", |
| | | chkboxType : { |
| | | "Y" : "ps", |
| | | "N" : "ps" |
| | | } |
| | | }, |
| | | view : { |
| | | dblClickExpand : false, |
| | | showLine : true, |
| | | }, |
| | | data : { |
| | | simpleData : { |
| | | enable : true, |
| | | idKey : "id", |
| | | pIdKey : "pId", |
| | | rootPId : "" |
| | | } |
| | | }, |
| | | idKey : "id", |
| | | pIdKey : "pId", |
| | | rootPId : "" |
| | | } |
| | | }, |
| | | |
| | | }; |
| | | tree = $.fn.zTree.init($("#treeDemo"), setting, zNodes); |
| | | } |
| | | }; |
| | | tree = $.fn.zTree.init($("#treeDemo"), setting, zNodes); |
| | | } |
| | | |
| | | function createNode(id, parentId, name) { |
| | | var o = new Object(); |
| | | o.id = id; |
| | | o.pId = parentId; |
| | | o.name = name; |
| | | o.open = true; |
| | | //如果是编辑则设置节点选中 |
| | | function createNode(id, parentId, name) { |
| | | var o = new Object(); |
| | | o.id = id; |
| | | o.pId = parentId; |
| | | o.name = name; |
| | | o.open = true; |
| | | //如果是编辑则设置节点选中 |
| | | if(obj.comId!=null){ |
| | | //var fns = "${obj.comFunctions}"; |
| | | var fns = obj.comFunctions; |
| | |
| | | o.checked = true; |
| | | } |
| | | } |
| | | |
| | | return o; |
| | | } |
| | | </script> |
| | | |
| | | return o; |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <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> |
| | |
| | | newSetting11.setCategory("店务配置"); |
| | | newSettings.add(newSetting11); |
| | | |
| | | |
| | | |
| | | for (ParameterSettings newSetting : newSettings) { |
| | | List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting); |
| | | if(CollectionUtil.isEmpty(parameterSettings)){ |