Merge branch 'score_shop' into api_score_meger
# Conflicts:
# zq-erp/src/main/resources/config/prd/application.properties
# zq-erp/src/main/resources/templates/views/super/sysCompany-form.html
10 files added
116 files modified
| | |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.3.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.guava</groupId> |
| | | <artifactId>guava</artifactId> |
| | | <version>26.0-jre</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | | <resources> |
| | |
| | | |
| | | //小程序公司与域名对应关系拦截 |
| | | 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.core.tools; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.CommonRequest; |
| | |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.aliyuncs.http.MethodType; |
| | | import com.google.gson.JsonObject; |
| | | import com.matrix.config.properties.AliSmsProperties; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.system.hive.bean.SysSmsTemplate; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | CommonRequest request = commonRequest(SysSmsTemplate.SMS_ACTION_SEND); |
| | | request.putQueryParameter("PhoneNumbers", phoneNum); |
| | | request.putQueryParameter("TemplateCode", templateCode); |
| | | String jsonStr = JSONObject.toJSONString(values); |
| | | request.putQueryParameter("TemplateParam", jsonStr); |
| | | request.putQueryParameter("TemplateParam", JSONUtil.parse(values).toString()); |
| | | |
| | | CommonResponse response = null; |
| | | try { |
| | |
| | | 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 SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER = "shopManageAbleCancelDfkOrder"; |
| | | /** |
| | | * 服务记录跟进模板 |
| | | */ |
| | | public static final String SERVICE_FLOW_TEMPLATE = "SERVICE_FLOW_TEMPLATE"; |
| | | /** |
| | | * 开启短信提醒 |
| | | */ |
| | | public static final String OPEN_SMS_NOTICE = "OPEN_SMS_NOTICE"; |
| | | |
| | | /** |
| | | * 服务单自动配料 |
| | | */ |
| | | public static final String OPEN_SERVICE_ORDER_AUTO_BATCHING = "OPEN_SERVICE_ORDER_AUTO_BATCHING"; |
| | | |
| | | /** |
| | | * 赠送金额购买产品算赠送购买 |
| | |
| | | */ |
| | | 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); |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.service; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.score.constant.ScoreSettingConstant; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class BusParameterSettingService { |
| | | |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 判断某个设置是否是开启状态 |
| | | * 未配置,或者无效settingkey都返回false |
| | | */ |
| | | public boolean isSettingOpen(String settingKey,Long companyId) { |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(settingKey, companyId); |
| | | return ( |
| | | Objects.nonNull(busParameterSettings) |
| | | && StringUtils.isNotBlank(busParameterSettings.getParamValue()) |
| | | && AppConstance.IS_Y.equals(busParameterSettings.getParamValue()) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | 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()); |
| | | |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/showCardFlowList") |
| | | public @ResponseBody |
| | | AjaxResult showCardFlowList(MoneyCardUseFlow moneyCardUseFlow, PaginationVO pageVo) { |
| | | MoneyCardUse vipCard = cardUseService.findByVipId(moneyCardUseFlow.getVipId()); |
| | | if (vipCard != null) { |
| | | moneyCardUseFlowDao.updateVipCardId(moneyCardUseFlow.getVipId(), vipCard.getId()); |
| | | } |
| | | List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectInPage(moneyCardUseFlow, pageVo); |
| | | return AjaxResult.buildSuccessInstance(dataList, moneyCardUseFlowDao.selectTotalRecord(moneyCardUseFlow)); |
| | | } |
| | |
| | | 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; |
| | |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(id); |
| | | if (CollUtil.isNotEmpty(beauticianStateList)) { |
| | | for (SysBeauticianState sysBeauticianState : beauticianStateList) { |
| | | SysProjUse item = sysBeauticianState.getProjUse(); |
| | | |
| | | // 若项目/套餐无效,则打印时,不显示余次 |
| | | if (!"无效".equals(item.getStatus())) { |
| | | item.setRemainCount(item.getSurplusCount()); |
| | | } else { |
| | | item.setRemainCount(null); |
| | | } |
| | | |
| | | if (sysBeauticianState.getProjUse().getTaocanId() != null) { |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId()); |
| | | if (!"无效".equals(sysProjUse.getStatus())) { |
| | | item.setRemainCount(sysProjUse.getSurplusCount()); |
| | | } else { |
| | | item.setRemainCount(null); |
| | | } |
| | | |
| | | sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName()+"--"+sysBeauticianState.getProjInfo().getName()); |
| | | if ("Y".equals(sysProjUse.getIsCourse()) && "Y".equals(sysProjUse.getIsInfinite())) { |
| | | int count = projUseService.findTaocanCountForCourseAndInfinite(sysBeauticianState.getProjUse().getTaocanId(), projServices.getVipId()); |
| | | item.setRemainCount(count); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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, "修改成功"); |
| | | } |
| | |
| | | String title = "商品资料"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"商品名称", "商品编号", "售价/(本金)", "参考价/(赠送金额)", "真实销量", "状态", "是否赠送", "类型", "分类", "是否固定套餐", "产品归属"}; |
| | | String[] header = {"商品名称", "商品编号", "售价/(本金)", "参考价/(赠送金额)", "真实销量", "状态", "是否赠送", "类型", "分类", "是否固定套餐", "产品归属","时长"}; |
| | | orderSheet.setHeaders(header); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findAll(shoppingGoods); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | |
| | | temp.add(item.getCateName()); |
| | | temp.add(item.getIsCourse()); |
| | | temp.add(item.getHeadquarters() == 1 ? "总部产品" : "本店产品"); |
| | | temp.add(item.getTimeLength()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | |
| | | 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 { |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | |
| | | */ |
| | | public class AchieveNew extends EntityDTOExt { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | |
| | |
| | | */ |
| | | private String payMethods; |
| | | |
| | | /** |
| | | * 是否合作项目 |
| | | */ |
| | | private Integer isCooperate; |
| | | |
| | | public Integer getIsCooperate() { |
| | | return isCooperate; |
| | | } |
| | | |
| | | public void setIsCooperate(Integer isCooperate) { |
| | | this.isCooperate = isCooperate; |
| | | } |
| | | |
| | | public String getAchieveRuleName() { |
| | | return achieveRuleName; |
| | | } |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | |
| | | * @author wzy |
| | | * @date 2021-01-07 |
| | | **/ |
| | | @Data |
| | | public class SysOrderFlow implements Serializable { |
| | | private static final long serialVersionUID = 7519131902836023680L; |
| | | |
| | |
| | | private Long vipId; |
| | | |
| | | private Long cardId; |
| | | /** |
| | | * 扩展字段-支付卡名称 |
| | | */ |
| | | @Extend |
| | | private String cardName; |
| | | |
| | | private String isGift; |
| | | |
| | |
| | | |
| | | private Long companyId; |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public Long getCardId() { |
| | | return cardId; |
| | | } |
| | | |
| | | public void setCardId(Long cardId) { |
| | | this.cardId = cardId; |
| | | } |
| | | |
| | | public String getIsGift() { |
| | | return isGift; |
| | | } |
| | | |
| | | public void setIsGift(String isGift) { |
| | | this.isGift = isGift; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getFlowNo() { |
| | | return flowNo; |
| | | } |
| | | |
| | | public void setFlowNo(String flowNo) { |
| | | this.flowNo = flowNo; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getFlowContent() { |
| | | return flowContent; |
| | | } |
| | | |
| | | public void setFlowContent(String flowContent) { |
| | | this.flowContent = flowContent; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | } |
| | |
| | | @Extend |
| | | private String updateRemark; |
| | | |
| | | /** |
| | | * 套餐/项目剩余次数 |
| | | */ |
| | | private Integer remainCount; |
| | | |
| | | public Integer getRemainCount() { |
| | | return remainCount; |
| | | } |
| | | |
| | | public void setRemainCount(Integer remainCount) { |
| | | this.remainCount = remainCount; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | |
| | | 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); |
| | | } |
| | |
| | | public int selectTotalRecord(@Param("record") MoneyCardUseFlow moneyCardUseFlow); |
| | | |
| | | public MoneyCardUseFlow selectById(Long id); |
| | | |
| | | int updateVipCardId(@Param("vipId") Long vipId, @Param("cardId") Long cardId); |
| | | |
| | | } |
| | |
| | | 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); |
| | | |
| | |
| | | Integer selectProjUseFlowTotal(@Param("record") SysProjUseFlow projUseFlow); |
| | | |
| | | List<SysProjUse> selectTaoCanListWithProj(@Param("record") SysProjUse sysProjUse); |
| | | |
| | | int selectTaocanCountForCourseAndInfinite(@Param("taocanId") Long taocanId, @Param("vipId") Long vipId); |
| | | } |
| | |
| | | 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); |
| | | |
| | | } |
| | |
| | | public List<SysProjUse> selectTaocanProjUse(Long id, String status); |
| | | |
| | | public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse); |
| | | |
| | | int findTaocanCountForCourseAndInfinite(Long taocanId, 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); |
| | | } |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TaiYanAliyunSmsService.java |
| | | * packageName: com.matrix.system.hive.service |
| | | * date: 2021-10-28 11:18 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import com.google.common.collect.Maps; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.SmsUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.service.BusParameterSettingService; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TaiYanAliyunSmsService |
| | | * @packageName: com.matrix.system.hive.service |
| | | * @description: 肽妍短信提醒服务 |
| | | * @data: 2021-10-28 11:18 |
| | | **/ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class TaiYanAliyunSmsService { |
| | | |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | SmsUtils smsUtils; |
| | | |
| | | SysShopInfoService shopInfoService; |
| | | |
| | | SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | BusParameterSettingService busParameterSettingService; |
| | | /** |
| | | * 预约成功短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | @Async |
| | | public void sendYycgNotice(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (chackSetting(services)) return; |
| | | |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | | LogUtil.debug("发送阿里云预约成功短信,手机号={}", sysVipInfo.getPhone()); |
| | | if (StringUtils.isNotBlank(sysVipInfo.getPhone())) { |
| | | HashMap<String, String> param = Maps.newHashMap(); |
| | | param.put("date", date); |
| | | param.put("tel", shopInfo.getShopTel()); |
| | | param.put("shopName", shopInfo.getShopName()); |
| | | smsUtils.sendSms(sysVipInfo.getPhone(), "SMS_226995798", param); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目划扣短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | @Async |
| | | public void sendHkNotice(SysProjServices services) { |
| | | if (chackSetting(services)) return; |
| | | |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | | |
| | | List<SysBeauticianState> items = sysBeauticianStateService.findBySerId(services.getId()); |
| | | for (SysBeauticianState item : items) { |
| | | if (item.getProjInfo() != null) { |
| | | String projName = item.getProjInfo().getName(); |
| | | LogUtil.debug("发送阿里云项目划扣短信,手机号={}", sysVipInfo.getPhone()); |
| | | if (StringUtils.isNotBlank(sysVipInfo.getPhone())) { |
| | | HashMap<String, String> param = Maps.newHashMap(); |
| | | param.put("date", date); |
| | | param.put("projName", projName); |
| | | param.put("count", item.getCount() + ""); |
| | | param.put("balanceCount", item.getProjUse().getSurplusCount() + ""); |
| | | param.put("tel", shopInfo.getShopTel()); |
| | | param.put("shopName", shopInfo.getShopName()); |
| | | smsUtils.sendSms(sysVipInfo.getPhone(), "SMS_226995796", param); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private boolean chackSetting(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return true; |
| | | } |
| | | if (!busParameterSettingService.isSettingOpen(AppConstance.OPEN_SMS_NOTICE, services.getCompanyId())) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setBalance(cardUser.getGiftMoney() + cardUser.getRealMoney()); |
| | | moneyCardUseFlow.setCarUseId(cardUser.getId()); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | |
| | | order.setFlows(czVo.getFlows()); |
| | |
| | | |
| | | sysInstoreInfoService.check(instoreInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal findVipArrearsByVipId(Long vipId) { |
| | | return sysOrderDao.selectArrearsByVipId(vipId); |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.common.service.BusParameterSettingService; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | |
| | | private SysOutStoreItemDao sysOutStoreItemDao; |
| | | @Autowired |
| | | private SysBedInfoDao sysBedInfoDao; |
| | | |
| | | @Autowired |
| | | TaiYanAliyunSmsService taiYanAliyunSmsService; |
| | | |
| | | @Autowired |
| | | private SysStoreInfoDao storeInfoDao; |
| | |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | BusParameterSettingService busParameterSettingService; |
| | | |
| | | @Autowired |
| | | ScoreVipDetailService scoreVipDetailService; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | |
| | | @Autowired |
| | | ShoppingGoodsAssembleDao goodsAssembleDao; |
| | | |
| | | /** |
| | | * 新增服务单 jyy |
| | |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getPuseId()); |
| | | |
| | | //检查是否已经处于无效状态 |
| | | if(Dictionary.TAOCAN_STATUS_WX.equals(sysProjUse.getStatus())){ |
| | | if (Dictionary.TAOCAN_STATUS_WX.equals(sysProjUse.getStatus())) { |
| | | return new VerifyResult(true, sysProjUse.getProjName() + "项目已经失效"); |
| | | } |
| | | |
| | |
| | | lastList.add(lastWork); |
| | | } |
| | | LastestWorkBeatuistaffDao.batchInsert(lastList); |
| | | return sysProjServicesDao.update(projServices); |
| | | int i = sysProjServicesDao.update(projServices); |
| | | |
| | | //根据配置是否完成自动配料 |
| | | if (busParameterSettingService.isSettingOpen(AppConstance.OPEN_SERVICE_ORDER_AUTO_BATCHING, checkProjServices.getCompanyId())){ |
| | | autoBatching(projServices); |
| | | } |
| | | |
| | | |
| | | return i; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据配置是否完成自动配料 |
| | | * |
| | | * @param projServices |
| | | */ |
| | | private void autoBatching(SysProjServices projServices) { |
| | | |
| | | //获取最新的服务单信息 |
| | | projServices=findById(projServices.getId()); |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId()); |
| | | |
| | | |
| | | List<SysOutStoreItem> outStoreItemList = Lists.newLinkedList(); |
| | | beauticianStateList.stream().forEach(item -> { |
| | | |
| | | List<ShoppingGoodsAssemble> shoppingGoodsAssembles = goodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(item.getProjId(), ShoppingGoods.SHOPPING_GOODS_TYPE_JJCP); |
| | | |
| | | if (CollUtil.isNotEmpty(shoppingGoodsAssembles)) { |
| | | outStoreItemList.addAll(shoppingGoodsAssembles.stream().map(assemble -> { |
| | | SysOutStoreItem outStoreItem = new SysOutStoreItem(); |
| | | outStoreItem.setSkuId(assemble.getAssembleGoodId()); |
| | | outStoreItem.setAmount(Double.parseDouble(assemble.getTotal()+"")); |
| | | outStoreItem.setRemark("自动配料"); |
| | | return outStoreItem; |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | }); |
| | | //组合配料参数 |
| | | projServices.setOutStoreItem(outStoreItemList); |
| | | //调用配料出库方法 |
| | | try { |
| | | modifyPLProjServices(projServices); |
| | | }catch (GlobleException e){ |
| | | LogUtil.debug("配料失败:{}",e.getMessage()); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam = new UniformMsgParam(projServices.getCompanyId(), UniformMsgParam.GZH_FWWC); |
| | | uniformMsgParam.put("serviceId", projServices.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG, uniformMsgParam); |
| | | //发送划扣短信提醒 |
| | | taiYanAliyunSmsService.sendHkNotice(projServices); |
| | | |
| | | return result; |
| | | } |
| | |
| | | return flag; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int confirmServiceOrder(Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | |
| | | int i = modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | services = findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam = new UniformMsgParam(services.getCompanyId(), UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId", services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG, uniformMsgParam); |
| | | |
| | | taiYanAliyunSmsService.sendYycgNotice(services); |
| | | |
| | | |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse) { |
| | | return sysProjUseDao.selectTaoCanListWithProj(sysProjUse); |
| | | } |
| | | |
| | | @Override |
| | | public int findTaocanCountForCourseAndInfinite(Long taocanId, Long vipId) { |
| | | return sysProjUseDao.selectTaocanCountForCourseAndInfinite(taocanId, 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)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | orderSheet.setSheetName("交易流水"); |
| | | orderSheet.setTitle("交易流水"); |
| | | String[] header = new String[]{"订单编号", "交易内容", "交易时间", "交易类型", "交易金额", "会员姓名", |
| | | "支付方式", "支付流水号", "操作人", "门店名称"}; |
| | | "支付方式","储值卡名称", "支付流水号", "操作人", "门店名称"}; |
| | | orderSheet.setHeaders(header); |
| | | List<List<Object>> body = new ArrayList<>(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); |
| | |
| | | bodyItem.add(flowVo.getAmount()); |
| | | bodyItem.add(flowVo.getVipName()); |
| | | bodyItem.add(flowVo.getPayMethod()); |
| | | bodyItem.add(flowVo.getCardName()); |
| | | bodyItem.add(flowVo.getFlowNo()); |
| | | bodyItem.add(flowVo.getStaffName()); |
| | | bodyItem.add(flowVo.getShopName()); |
| | |
| | | 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 = {"SHOP_NAME", "pay_time", "ORDER_NO", "goodsName", "cateName", "VIP_NAME", "COUNT", "ZK_PRICE", "su_name", "pay_method", "status"}; |
| | | String[] header = {"门店", "销售日期", "订单号", "商品名称", "分类", "客户名", "购买数量", "单价","小计", "健康顾问", "支付方式", "状态"}; |
| | | String[] column = {"SHOP_NAME", "pay_time", "ORDER_NO", "goodsName", "cateName", "VIP_NAME", "COUNT", "ZK_PRICE", "total","su_name", "pay_method", "statu"}; |
| | | |
| | | if(!DataAuthUtil.hasAllShopAuth()){ |
| | | param.put("shopId", sysUsers.getShopId()); |
| | |
| | | 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; |
| | | } |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2021-01-27 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "OrderFlowVo", description = "订单流水返回参数类") |
| | | public class OrderFlowVo { |
| | | |
| | |
| | | @ApiModelProperty(value = "订单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value ="交易类型") |
| | | @ApiModelProperty(value = "交易类型") |
| | | private String flowType; |
| | | |
| | | @ApiModelProperty(value ="支付方式") |
| | | @ApiModelProperty(value = "支付方式") |
| | | private String payMethod; |
| | | |
| | | @ApiModelProperty(value = "会员姓名") |
| | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "支付卡名称") |
| | | private String cardName; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getFlowContent() { |
| | | return flowContent; |
| | | } |
| | | |
| | | public void setFlowContent(String flowContent) { |
| | | this.flowContent = flowContent; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public String getFlowNo() { |
| | | return flowNo; |
| | | } |
| | | |
| | | public void setFlowNo(String flowNo) { |
| | | this.flowNo = flowNo; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | | |
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; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.oa.bean.OaFixedAssets; |
| | | import com.matrix.system.oa.dao.OaFixedAssetsDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author |
| | | * @description 固定资产 |
| | | * @author |
| | | * @date 2019-12-13 07:19 |
| | | */ |
| | | @Controller |
| | | @RequestMapping(value = "admin/oaFixedAssets") |
| | | public class OaFixedAssetsAction { |
| | | |
| | | @Autowired |
| | | private OaFixedAssetsDao oaFixedAssetsDao; |
| | | |
| | | //记录编辑前的值Before_Edit_Value |
| | | public static final String BEV="OaFixedAssets_BEV"; |
| | | |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | | @RequestMapping(value = "/showList") |
| | | public @ResponseBody AjaxResult showList(OaFixedAssets oaFixedAssets, PaginationVO pageVo) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | oaFixedAssets.setCompanyId(user.getCompanyId()); |
| | | List<OaFixedAssets> dataList = oaFixedAssetsDao.selectInPage(oaFixedAssets, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, |
| | | oaFixedAssetsDao.selectTotalRecord(oaFixedAssets)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RemoveRequestToken |
| | | @RequestMapping(value = "/addOaFixedAssets") |
| | | public @ResponseBody AjaxResult addOaFixedAssets(OaFixedAssets oaFixedAssets) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | oaFixedAssets.setCreateBy(user.getSuName()); |
| | | oaFixedAssets.setUpdateBy(user.getSuName()); |
| | | oaFixedAssets.setCompanyId(user.getCompanyId()); |
| | | int i=oaFixedAssetsDao.insert(oaFixedAssets); |
| | | if(i > 0){ |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, "固定资产"); |
| | | }else { |
| | | throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RemoveRequestToken |
| | | @RequestMapping(value = "/modifyOaFixedAssets") |
| | | public @ResponseBody AjaxResult modifyOaFixedAssets(OaFixedAssets newOaFixedAssets) { |
| | | OaFixedAssets oldOaFixedAssets = WebUtil.getSessionAttribute(BEV); |
| | | int i = 0; |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldOaFixedAssets, newOaFixedAssets)) { |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | modifyMap = ModelUtils.comparePojo2Map(oldOaFixedAssets, newOaFixedAssets); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newOaFixedAssets); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("id", oldOaFixedAssets.getId()); |
| | | oaFixedAssetsDao.updateByMap(modifyMap); |
| | | } |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "固定资产"); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 进入修改界面 |
| | | */ |
| | | @SaveRequestToken |
| | | @RequestMapping(value = "/editForm") |
| | | public ModelAndView editForm(String id) { |
| | | OaFixedAssets oaFixedAssets = new OaFixedAssets(); |
| | | ModelAndView modelAndView = new ModelAndView("admin/oa/assets/fixeAssets-form"); |
| | | if (id != null) { |
| | | oaFixedAssets = oaFixedAssetsDao.selectById(id); |
| | | WebUtil.setSessionAttribute(BEV, oaFixedAssets); |
| | | } |
| | | modelAndView.addObject("obj",oaFixedAssets); |
| | | return modelAndView; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/del") |
| | | public @ResponseBody AjaxResult del(String keys) { |
| | | List<String> ids = StringUtils.strToCollToString(keys, ","); |
| | | int i = oaFixedAssetsDao.deleteByIds(ids); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.DELETE_SUCCES, i); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_DELETE_FAIL); |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private OaFixedAssetsDao oaFixedAssetsDao; |
| | | |
| | | //记录编辑前的值Before_Edit_Value |
| | | public static final String BEV = "OaFixedAssets_BEV"; |
| | | |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | | @RequestMapping(value = "/showList") |
| | | public @ResponseBody |
| | | AjaxResult showList(OaFixedAssets oaFixedAssets, PaginationVO pageVo) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | oaFixedAssets.setCompanyId(user.getCompanyId()); |
| | | List<OaFixedAssets> dataList = oaFixedAssetsDao.selectInPage(oaFixedAssets, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, |
| | | oaFixedAssetsDao.selectTotalRecord(oaFixedAssets)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RemoveRequestToken |
| | | @RequestMapping(value = "/addOaFixedAssets") |
| | | public @ResponseBody |
| | | AjaxResult addOaFixedAssets(OaFixedAssets oaFixedAssets) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | oaFixedAssets.setCreateBy(user.getSuName()); |
| | | oaFixedAssets.setUpdateBy(user.getSuName()); |
| | | oaFixedAssets.setCompanyId(user.getCompanyId()); |
| | | int i = oaFixedAssetsDao.insert(oaFixedAssets); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, "固定资产"); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RemoveRequestToken |
| | | @RequestMapping(value = "/modifyOaFixedAssets") |
| | | public @ResponseBody |
| | | AjaxResult modifyOaFixedAssets(OaFixedAssets newOaFixedAssets) { |
| | | OaFixedAssets oldOaFixedAssets = WebUtil.getSessionAttribute(BEV); |
| | | int i = 0; |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldOaFixedAssets, newOaFixedAssets)) { |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | modifyMap = ModelUtils.comparePojo2Map(oldOaFixedAssets, newOaFixedAssets); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newOaFixedAssets); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("id", oldOaFixedAssets.getId()); |
| | | oaFixedAssetsDao.updateByMap(modifyMap); |
| | | } |
| | | i = MatrixConstance.DML_SUCCESSS; |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.UPDATE_SUCCES, "固定资产"); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 进入修改界面 |
| | | */ |
| | | @SaveRequestToken |
| | | @RequestMapping(value = "/editForm") |
| | | public ModelAndView editForm(String id) { |
| | | OaFixedAssets oaFixedAssets = new OaFixedAssets(); |
| | | ModelAndView modelAndView = new ModelAndView("admin/oa/assets/fixeAssets-form"); |
| | | if (id != null) { |
| | | oaFixedAssets = oaFixedAssetsDao.selectById(id); |
| | | WebUtil.setSessionAttribute(BEV, oaFixedAssets); |
| | | } |
| | | modelAndView.addObject("obj", oaFixedAssets); |
| | | return modelAndView; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/del") |
| | | public @ResponseBody |
| | | AjaxResult del(String keys) { |
| | | List<String> ids = StringUtils.strToCollToString(keys, ","); |
| | | int i = oaFixedAssetsDao.deleteByIds(ids); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.DELETE_SUCCES, i); |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.DATA_DELETE_FAIL); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 总部导出服务单导出,不限门店 |
| | | */ |
| | | @RequestMapping(value = "/exportExcel") |
| | | public void erpExportExcel(ModelMap model, HttpServletRequest request, HttpServletResponse response, OaFixedAssets oaFixedAssets) throws Exception { |
| | | |
| | | |
| | | doExportServiceOrder(response, oaFixedAssets); |
| | | } |
| | | |
| | | |
| | | private void doExportServiceOrder(HttpServletResponse response, OaFixedAssets oaFixedAssets) throws IOException { |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "固定资产明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"资产类型", "资产编号", "资产型号", "所在部门", "成本价", "数量", "往来单位", "使用人"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | List<OaFixedAssets> dataList = oaFixedAssetsDao.selectByModel(oaFixedAssets); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (dataList.size() > 0) { |
| | | for (OaFixedAssets item : dataList) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | temp.add(item.getAssetsType()); |
| | | temp.add(item.getName()); |
| | | temp.add(item.getNumber()); |
| | | temp.add(item.getModel()); |
| | | temp.add(item.getDepartment()); |
| | | temp.add(item.getPrice()); |
| | | temp.add(item.getCount()); |
| | | temp.add(item.getSupplier()); |
| | | temp.add(item.getUser()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | | orderSheet.setDataList(list); |
| | | res.add(orderSheet); |
| | | response = ResponseHeadUtil.setExcelHead(response); |
| | | response.setHeader("Content-Disposition", |
| | | "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8")); |
| | | OutputStream os = response.getOutputStream(); |
| | | ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | 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; |
| | |
| | | shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS); |
| | | |
| | | List<ShopOrderDetails> details = new ArrayList<>(); |
| | | // 是否包含实物商品 |
| | | boolean hasRealGoods = false; |
| | | |
| | | Integer orderCount = 0; |
| | | for (OrderItemDto orderItemDto : shopOrderDto.getOrderItemList()) { |
| | | ShopOrderDetails shopOrderDetails = new ShopOrderDetails(); |
| | | shopOrderDetails.setCreateBy(AppConstance.SYSTEM_USER); |
| | | shopOrderDetails.setUpdateBy(AppConstance.SYSTEM_USER); |
| | | shopOrderDetails.setpId(orderItemDto.getProductId()); |
| | | |
| | | if (!hasRealGoods) { |
| | | ShopProduct shopProduct = shopProductDao.selectById(orderItemDto.getProductId()); |
| | | if (shopProduct.getIsUnrealProduct() == 2) { |
| | | hasRealGoods = true; |
| | | } |
| | | } |
| | | |
| | | shopOrderDetails.setsId(orderItemDto.getSkuId()); |
| | | shopOrderDetails.setCount(orderItemDto.getCount()); |
| | | if(ShopOrderDetails.PAYTYPE_MICRO==orderItemDto.getPayType()){ |
| | |
| | | shopOrder.setOrderType(ShopOrder.ORDER_TYPE_GOODS); |
| | | //购买方式 |
| | | shopOrder.setShippingMethod(shopOrderDto.getDeliverySelect()); |
| | | // 客户选择的物流配送,且没有实物产品(全是虚拟产品), 则直接门店自提,无需填写配送单 |
| | | if (ShopOrder.SHIPPING_METHOD_WL == shopOrderDto.getDeliverySelect() && !hasRealGoods) { |
| | | shopOrder.setShippingMethod(ShopOrder.SHIPPING_METHOD_MDZT); |
| | | } |
| | | //生成订单号 |
| | | shopOrder.setOrderNo(WxUtils.getOrderNum()); |
| | | //设置支付状态 |
| | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | /** |
| | | * 是否虚拟产品 1/是 2/否 |
| | | */ |
| | | private Integer isUnrealProduct; |
| | | |
| | | } |
| | |
| | | |
| | | #线上测试环境 |
| | | # |
| | | #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.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 |
| | | spring.datasource.password=root |
| | | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/md_test_local?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | #spring.datasource.username=root |
| | | #spring.datasource.password=root |
| | | #spring.datasource.url=jdbc:mysql://127.0.0.1:3306/md_test_local?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
| | |
| | | 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> |
| | |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <update id="updateVipCardId"> |
| | | update money_card_use_flow |
| | | set car_use_id=#{cardId} |
| | | where vip_id=#{vipId} and type='会员充值' |
| | | </update> |
| | | </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> |
| | |
| | | <result property="vipId" column="vip_id" /> |
| | | <result property="payMethod" column="pay_method" /> |
| | | <result property="cardId" column="card_id" /> |
| | | <result property="cardName" column="card_name" /> |
| | | <result property="isGift" column="is_gift" /> |
| | | |
| | | <result property="orderNo" column="order_no" /> |
| | |
| | | </delete> |
| | | |
| | | <select id="selectByOrderId" resultMap="SysOrderFlowMap"> |
| | | select a.*, b.order_no from sys_order_flow a |
| | | select a.*, b.order_no,c.card_name from sys_order_flow a |
| | | left join sys_order b on a.order_id=b.id |
| | | left join money_card_use c on a.card_id=c.id |
| | | where order_id=#{orderId} |
| | | </select> |
| | | |
| | |
| | | a.pay_method as payMethod, |
| | | a.flow_no as flowNo, |
| | | d.shop_short_name as shopName, |
| | | f.card_name as cardName, |
| | | e.su_name as staffName |
| | | from sys_order_flow a |
| | | LEFT JOIN sys_order b on a.order_id=b.ID |
| | | LEFT JOIN sys_vip_info c on a.vip_id=c.ID |
| | | LEFT JOIN sys_shop_info d on a.shop_id=d.ID |
| | | LEFT JOIN sys_users e on e.su_id=b.STAFF_ID |
| | | left join money_card_use f on a.card_id=f.id |
| | | |
| | | <where> |
| | | |
| | | and a.company_id=#{record.companyId} |
| | |
| | | c.name as goodsName, |
| | | g.name as cateName, |
| | | a.COUNT, |
| | | a.COUNT * a.ZK_PRICE as total, |
| | | a.refundCount, |
| | | a.ZK_PRICE, |
| | | a.IS_FREE, |
| | | a.pay_method, |
| | | a.status |
| | | b.statu |
| | | from sys_order_item a |
| | | left join sys_order b on a.ORDER_ID=b.ID |
| | | left join shopping_goods c on a.goods_id=c.id |
| | |
| | | <if test="guwenId != null and guwenId != '' "> |
| | | and b.STAFF_ID=#{guwenId} |
| | | </if> |
| | | <if test="status != null and status != '' "> |
| | | and a.status=#{status} |
| | | <if test="statu != null and statu != '' "> |
| | | and b.statu=#{statu} |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | <if test="guwenId != null and guwenId != '' "> |
| | | and b.STAFF_ID=#{guwenId} |
| | | </if> |
| | | <if test="status != null and status != '' "> |
| | | and a.status=#{status} |
| | | <if test="statu != null and statu != '' "> |
| | | and b.statu=#{statu} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | |
| | | <!-- 根据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 |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectTaocanCountForCourseAndInfinite" resultType="java.lang.Integer"> |
| | | select count(1) from sys_proj_use |
| | | where taocan_id=#{taocanId} and vip_id=#{vipId} |
| | | </select> |
| | | </mapper> |
| | |
| | | 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> |
| | | |
| | |
| | | <result property="ableScorePay" column="able_score_pay"/> |
| | | <result property="ableSales" column="able_sales"/> |
| | | <result property="scoreCategoryId" column="score_category_id"/> |
| | | <result property="isUnrealProduct" column="is_unreal_product"/> |
| | | |
| | | <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById" |
| | | column="{id=couponId}"></association> |
| | |
| | | company_id, |
| | | able_score_pay, |
| | | able_sales, |
| | | is_unreal_product, |
| | | score_category_id |
| | | |
| | | </sql> |
| | |
| | | #{item.shopIds}, |
| | | #{item.companyId}, |
| | | #{item.ableScorePay}, |
| | | #{item.ableSales}, |
| | | #{item.ableSales}, |
| | | #{item.isUnrealProduct}, |
| | | #{item.scoreCategoryId} |
| | | |
| | | </sql> |
| | |
| | | able_sales = #{record.ableSales}, |
| | | </if> |
| | | <if test="record.scoreCategoryId != null and record.scoreCategoryId "> |
| | | score_category_id = #{record.scoreCategoryId}, |
| | | score_category_id = #{record.scoreCategoryId}, |
| | | </if> |
| | | <if test="record.isUnrealProduct != null and record.isUnrealProduct"> |
| | | is_unreal_product = #{record.isUnrealProduct}, |
| | | </if> |
| | | |
| | | </set> |
| | |
| | | a.able_score_pay, |
| | | a.able_sales, |
| | | a.score_category_id, |
| | | a.is_unreal_product, |
| | | (SELECT SUM(s.stock) from shop_sku s where s.p_id = a.id) as stockNum, |
| | | (SELECT ROUND(SUM(s.stock),2) from shop_sku s where s.p_id = a.id) as stockNum, |
| | | shop_ids |
| | |
| | | .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() { |
| | |
| | | <body> |
| | | <div class="panel-body" id="app" v-cloak> |
| | | <el-row> |
| | | <el-card class="box-card" style="background-color: #0a628f;"> |
| | | <div style="padding:10px;font-size: 20px;">¥{{basicdetail.balance}}</div> |
| | | <div>订单总金额</div> |
| | | </el-card > |
| | | <el-card class="box-card" style="background-color: #0f9aef;"> |
| | | <div style="padding:10px;font-size: 20px;">¥{{basicdetail.balance}}</div> |
| | | <div>待计算金额</div> |
| | |
| | | </el-form-item> |
| | | <el-button type="primary" @click="search" >搜索</el-button> |
| | | <el-button @click="resetForm('form')">重置</el-button> |
| | | <el-button>导出</el-button> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | } |
| | | _this.shfs = data.mapInfo.shfs; |
| | | _this.sqtj = data.mapInfo.sqtj; |
| | | _this.order = data.mapInfo.order; |
| | | if (!data.mapInfo.order && data.mapInfo.order != null) { |
| | | _this.order = data.mapInfo.order; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.pushToSelectGoods(row); |
| | | }, |
| | | pushToSelectGoods(goods) { |
| | | |
| | | console.log(this.order) |
| | | //判断是否被选中 |
| | | let selected = false; |
| | | for(let i = 0; i < this.order.length; i++){ |
| | |
| | | label="支付方式"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cardName" |
| | | label="储值卡名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowNo" |
| | | label="流水号"> |
| | | </el-table-column> |
| | |
| | | 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> |
| | |
| | | achieveRulsList : [], |
| | | shopList : [], |
| | | achieveUsers : [], |
| | | years : [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021], |
| | | years : [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,2022], |
| | | months : ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"], |
| | | days : [], |
| | | form : { |
| | |
| | | label="支付方式"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cardName" |
| | | sortable="custom" |
| | | label="储值卡名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowNo" |
| | | label="支付流水号"> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | <div class="form-group mr-20"> |
| | | <label >订单状态</label> |
| | | <select class="form-control " name="status" > |
| | | <select class="form-control " name="statu" > |
| | | <option value=''>--请选择订单状态--</option> |
| | | <option value='欠款'>欠款</option> |
| | | <option value='待付款'>待付款</option> |
| | |
| | | <th data-field="VIP_NAME" >客户名</th> |
| | | <th data-field="COUNT" data-sortable="true" >购买数量</th> |
| | | <th data-field="ZK_PRICE" data-sortable="true" >单价</th> |
| | | <th data-field="total" >小计</th> |
| | | <th data-field="su_name" >健康顾问</th> |
| | | <th data-field="pay_method" >支付方式</th> |
| | | <th data-field="status" >状态</th> |
| | | <th data-field="statu" >状态</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | <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> |
| | |
| | | userList: [], |
| | | treeSelect : [], |
| | | payMoneys : [], |
| | | order:{}, |
| | | printPaper : false, |
| | | }, |
| | | created : function() { |
| | |
| | | data: _this.cardInfo, |
| | | url: url, |
| | | callback: function (data) { |
| | | _this.order.id = data.mapInfo.orderId; |
| | | |
| | | if (_this.printPaper) { |
| | | _this.$message.success(data.info); |
| | | _this.print(); |
| | | } else { |
| | | _this.$message.success({ |
| | | message : data.info, |
| | | duration : 1000, |
| | | onClose() { |
| | | _this.closeFrame(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if(parent.myGrid) { |
| | |
| | | parent.app.vipInfoFn(); |
| | | } |
| | | |
| | | _this.closeFrame(); |
| | | // _this.closeFrame(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | maxmin: true, |
| | | content: [basePath + '/admin/order/printOrder?id=' + this.order.id], |
| | | cancel: function (index, layero) { |
| | | _this.closeFram(); |
| | | _this.closeFrame(); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | 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, |
| | |
| | | //结算打印提示 |
| | | if (submitType == 1) { |
| | | if (_this.printPaper) { |
| | | _this.$message.success(data.info); |
| | | _this.print(); |
| | | } else { |
| | | _this.$message.success({ |
| | |
| | | label="支付方式"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cardName" |
| | | label="储值卡名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowNo" |
| | | label="流水号"> |
| | | </el-table-column> |
| | |
| | | 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 : "充值卡变更记录", |
| | | area : MUI.SIZE_M, |
| | | maxmin : true, |
| | | content : [ basePath + "/admin/redirect/hive/vip/moneyCardUseFlow-list?vipId=" + row.vipId ] |
| | | content : [ basePath + "/admin/redirect/hive/vip/moneyCardUseFlow-list?vipId=" + row.vipId + "&cardId=" + row.id ] |
| | | }); |
| | | }, |
| | | |
| | |
| | | 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> |
| | |
| | | <h1 style="text-align: center;font-size: 18px;margin: 20px auto;"> |
| | | {{order.shopName}} |
| | | </h1> |
| | | <table style="width: 100%; font-size:12px;line-height: 20px;"> |
| | | <table style="width: 100%; font-size:12px;"> |
| | | |
| | | <tr> |
| | | <td colspan="2"> |
| | |
| | | </tr> |
| | | </table> |
| | | <p>--------------------------------</p> |
| | | <table style="width: 80%;font-size:12px;margin-top: 20px;text-align: left"> |
| | | <table style="width: 80%;font-size:12px;margin-top: 10px;text-align: left; margin-bottom: 5px;"> |
| | | |
| | | <tr> |
| | | <th style="text-align: left;" colspan="4">产品</th> |
| | |
| | | </tr> |
| | | </table> |
| | | <p>--------------------------------</p> |
| | | <table style="width: 100%;font-size: 10px;line-height: 30px;"> |
| | | <table style="width: 100%;font-size: 10px; margin-bottom: 5px;"> |
| | | <tr > |
| | | <td> |
| | | <b >储值卡余额:</b><span >{{totalMoney}}</span> |
| | |
| | | <h1 style="text-align: center;font-size:18px;margin: 20px auto;"> |
| | | {{projService.shopName}} |
| | | </h1> |
| | | <table style="width: 100%; font-size:10px;line-height: 20px;"> |
| | | <table style="width: 100%; font-size:10px;"> |
| | | |
| | | <tr> |
| | | <td colspan="2"> |
| | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <table style="width: 80%;font-size:10px;margin-top: 20px;text-align: left"> |
| | | <table style="width: 80%;font-size:10px;margin-top: 10px;text-align: left; margin-bottom: 5px;"> |
| | | <tr> |
| | | <th style="text-align: left;" colspan="4">产品</th> |
| | | </tr> |
| | |
| | | <tr > |
| | | <td>{{item.count }}</td> |
| | | <td>{{item.projUse.price }}</td> |
| | | <td >{{item.projUse.surplusCount }}</td> |
| | | <td >{{item.projUse.remainCount == null ? "-" : item.projUse.remainCount}}</td> |
| | | <td>{{item.beautiStaffInfo?item.beautiStaffInfo.suName:''}}</td> |
| | | </tr> |
| | | </template> |
| | | </table> |
| | | <table style="width: 100%;font-size: 10px;line-height: 30px;"> |
| | | <table style="width: 100%;font-size: 10px; margin-bottom: 5px;"> |
| | | <tr> |
| | | <td> |
| | | <b>本次划扣:</b> <span >{{projService.money}}</span> |
| | |
| | | </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> |
| | |
| | | achieveRulsList : [], |
| | | shopList : [], |
| | | achieveUsers : [], |
| | | years : [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021], |
| | | years : [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022], |
| | | months : ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"], |
| | | days : [], |
| | | form : { |
| | |
| | | label="支付方式"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cardName" |
| | | sortable="custom" |
| | | label="储值卡名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="flowNo" |
| | | label="支付流水号"> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | <div class="form-group mr-20"> |
| | | <label >订单状态</label> |
| | | <select class="form-control " name="status" > |
| | | <select class="form-control " name="statu" > |
| | | <option value=''>--请选择订单状态--</option> |
| | | <option value='欠款'>欠款</option> |
| | | <option value='待付款'>待付款</option> |
| | |
| | | <th data-field="VIP_NAME" >客户名</th> |
| | | <th data-field="COUNT" data-sortable="true" >购买数量</th> |
| | | <th data-field="ZK_PRICE" data-sortable="true" >单价</th> |
| | | <th data-field="total" >小计</th> |
| | | <th data-field="su_name" >健康顾问</th> |
| | | <th data-field="pay_method" >支付方式</th> |
| | | <th data-field="status" >状态</th> |
| | | <th data-field="statu" >状态</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | <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><!-- 入库时间的查询增加一个查询的其实时间两个字段 --> |
| | |
| | | <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> |
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> |
| | |
| | | <form class="form-inline" id="serchform2"> |
| | | <!-- 用于套餐的查询 --> |
| | | <input autocomplete="off" type="hidden" name="vipId" th:value="${param.vipId}" class="vipId"> |
| | | <input autocomplete="off" type="hidden" name="carUseId" th:value="${param.cardId}" /> |
| | | </form> |
| | | </div> |
| | | <div class="row mt-10"> |
| | |
| | | <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> |
| | |
| | | <button matrix:btn="oaFixedAssets-add" onclick="openAdd()" type="button" class="btn btn-info btn-sm"><i class="fa fa-plus" ></i> 新增</button> |
| | | <button matrix:btn="oaFixedAssets-edit" onclick="openEdit()" type="button" class="btn btn-info btn-sm"><i class="fa fa-edit" ></i> 编辑</button> |
| | | <button matrix:btn="oaFixedAssets-dels" onclick="myGrid.delItems('id')" type="button" class="btn btn-danger btn-sm"><i class="fa fa-trash" ></i>批量删除</button> |
| | | <button onclick="exportExcel()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download" ></i> 导出</button> |
| | | </div> |
| | | <!-- 数据表格部分 --> |
| | | <table id="mgrid"> |
| | |
| | | content: [basePath + '/admin/oaFixedAssets/editForm?id=' + id] |
| | | }); |
| | | } |
| | | |
| | | function exportExcel(){ |
| | | var param=MForm.toUrlParam("#serchform"); |
| | | window.location.href=basePath+"/admin/oaFixedAssets/exportExcel?"+param; |
| | | } |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" v-if="paramSetting.type==5"> |
| | | <label class="col-md-2 control-label">{{paramSetting.name}}</label> |
| | | <div class="col-md-8"> |
| | | <el-input type="textarea" :rows="2" v-model="paramSetting.userValue"></el-input> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | |
| | |
| | | .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 && this.interval != '' && this.previousMargin != '' && this.nextMargin != ''){ |
| | | 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() { |
| | |
| | | |
| | | |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">是否虚拟产品 |
| | | </label> |
| | | <div class="col-sm-4"> |
| | | <select th:field="${obj.isUnrealProduct}" class="form-control select2 " size="1" |
| | | name="isUnrealProduct" |
| | | style="width: 100%"> |
| | | <option value="2" th:selected="${obj.isUnrealProduct == '2'}">否</option> |
| | | <option value="1" th:selected="${obj.isUnrealProduct == '1'}">是</option> |
| | | </option> |
| | | |
| | | </select> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | 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; |
| | | overflow: scroll; |
| | | width: 300px; |
| | | } |
| | | #treeDemo{ |
| | | height: 500px; |
| | | overflow: scroll; |
| | | width: 300px; |
| | | } |
| | | |
| | | </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 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> |
| | | <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 }" |
| | | <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 class="Validform_checktip"></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> |
| | | <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"> |
| | | <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> |
| | | <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> |
| | | <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> |
| | | </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}]]*/ |
| | | /*]]>*/ |
| | | </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"; |
| | | } |
| | | |
| | | 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 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, |
| | | idKey : "id", |
| | | pIdKey : "pId", |
| | | rootPId : "" |
| | | } |
| | | }, |
| | | |
| | | }; |
| | | 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; |
| | | //如果是编辑则设置节点选中 |
| | | if(obj.comId!=null){ |
| | | invokeUrl = basePath+"/admin/sysCompany/modifyCompany"; |
| | | //var fns = "${obj.comFunctions}"; |
| | | var fns = obj.comFunctions; |
| | | if (fns.indexOf(id) != -1) { |
| | | o.checked = true; |
| | | } |
| | | } |
| | | |
| | | 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 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, |
| | | idKey : "id", |
| | | pIdKey : "pId", |
| | | rootPId : "" |
| | | } |
| | | }, |
| | | |
| | | }; |
| | | 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; |
| | | //如果是编辑则设置节点选中 |
| | | if(obj.comId!=null){ |
| | | //var fns = "${obj.comFunctions}"; |
| | | var fns = obj.comFunctions; |
| | | if (fns.indexOf(id) != -1) { |
| | | 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> |
| | |
| | | newSetting8.setCategory("店务配置"); |
| | | newSettings.add(newSetting8); |
| | | |
| | | ParameterSettings newSetting9=new ParameterSettings(); |
| | | newSetting9.setCode(AppConstance.SERVICE_FLOW_TEMPLATE); |
| | | newSetting9.setName("跟进记录模板"); |
| | | newSetting9.setType(5); |
| | | newSetting9.setCategory("店务配置"); |
| | | newSettings.add(newSetting9); |
| | | |
| | | ParameterSettings newSetting10=new ParameterSettings(); |
| | | newSetting10.setCode(AppConstance.OPEN_SMS_NOTICE); |
| | | newSetting10.setName("是否开启短信提醒"); |
| | | newSetting10.setType(1); |
| | | newSetting10.setCategory("店务配置"); |
| | | newSettings.add(newSetting10); |
| | | |
| | | ParameterSettings newSetting11=new ParameterSettings(); |
| | | newSetting11.setCode(AppConstance.OPEN_SERVICE_ORDER_AUTO_BATCHING); |
| | | newSetting11.setName("开启服务单自动配料"); |
| | | newSetting11.setType(1); |
| | | newSetting11.setCategory("店务配置"); |
| | | newSettings.add(newSetting11); |
| | | |
| | | for (ParameterSettings newSetting : newSettings) { |
| | | List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting); |
| | | if(CollectionUtil.isEmpty(parameterSettings)){ |
| | | parameterSettingsDao.insert(newSetting); |
| | | System.out.println("新增配置"+newSetting.getName()); |
| | | }else { |
| | | System.out.println("配置"+newSetting.getName()+"已经存在"); |
| | | } |
| | | addSettingsTOAllCompany(newSetting); |
| | | } |
| | |
| | | busParameterSettings.setParamValue(""); |
| | | busParameterSettingsDao.insert(busParameterSettings); |
| | | System.out.println(sysCompany.getComName()+"新增成功"); |
| | | }else{ |
| | | System.out.println("公司"+sysCompany.getComName()+"已经存在配置"+newSetting.getName()); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix; |
| | | |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.service.SysProjServicesService; |
| | | import com.matrix.system.hive.service.TaiYanAliyunSmsService; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | */ |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT) |
| | | public class TaiYanAliyunSmsServiceTest { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private TaiYanAliyunSmsService taiYanAliyunSmsService; |
| | | @Autowired |
| | | SysProjServicesService projServicesService; |
| | | |
| | | |
| | | @Test |
| | | public void addSendYycgNotice(){ |
| | | SysProjServices byId = projServicesService.findById(215550L); |
| | | byId.setVipId(5949L); |
| | | taiYanAliyunSmsService.sendYycgNotice(byId); |
| | | taiYanAliyunSmsService.sendHkNotice(byId); |
| | | |
| | | } |
| | | |
| | | |
| | | } |