Merge remote-tracking branch 'origin/score_shop' into score_shop
# Conflicts:
# zq-erp/src/main/java/com/matrix/system/app/vo/ServiceProjVo.java
1 files added
50 files modified
New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
| | | import org.springframework.web.filter.CorsFilter; |
| | | |
| | | /** |
| | | * @author JIANGYOUYAO |
| | | * @date 2021/5/29 0029 |
| | | */ |
| | | @Configuration |
| | | public class CrossOriginConfig { |
| | | |
| | | private CorsConfiguration buildConfig() { |
| | | CorsConfiguration corsConfiguration = new CorsConfiguration(); |
| | | corsConfiguration.addAllowedOrigin("*"); |
| | | corsConfiguration.addAllowedHeader("*"); |
| | | corsConfiguration.addAllowedMethod("*"); |
| | | corsConfiguration.setAllowCredentials(true); |
| | | return corsConfiguration; |
| | | } |
| | | |
| | | @Bean |
| | | public CorsFilter corsFilter() { |
| | | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); |
| | | source.registerCorsConfiguration("/**", buildConfig()); |
| | | return new CorsFilter(source); |
| | | } |
| | | |
| | | } |
| | |
| | | urlDto.setName("美度专线"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://localhost:8080"); |
| | | urlDto.setName("开发环境"); |
| | | data.add(urlDto); |
| | | |
| | | return AjaxResult.buildSuccessInstance(data); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public BigDecimal getConsumePay() { |
| | | return consumePay; |
| | | return consumePay.setScale(2, BigDecimal.ROUND_HALF_UP); |
| | | } |
| | | |
| | | public void setConsumePay(BigDecimal consumePay) { |
| | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | @ApiModelProperty(value = " 使用情况余额") |
| | | private Double balance; |
| | | |
| | | @ApiModelProperty(value = "项目状态 有效/无效") |
| | | private String status; |
| | | |
| | |
| | | } else { |
| | | return "2"; |
| | | } |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.authority.strategy.ScanQrCodeLogin; |
| | | 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.ProjExceptionDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dto.WebLoginDto; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.statistics.StatisticsBusinessDataJob; |
| | |
| | | |
| | | @Autowired |
| | | SysShopInfoDao sysShopInfoDao; |
| | | |
| | | @Autowired |
| | | SysCompanyDao sysCompanyDao; |
| | | |
| | | /** |
| | | * 页面定向方法,每个权限模块公用一个,每个模块共享一个一级路径,已便于进行权限过滤 |
| | |
| | | AjaxResult result = new AjaxResult(); |
| | | authorityManager.initUserPower(result); |
| | | |
| | | SysCompany sysCompany = sysCompanyDao.selectById(user.getCompanyId()); |
| | | WebUtil.setSessionAttribute(HostInterceptor.ATTR_COMPANY, sysCompany); |
| | | |
| | | result.putInMap("user",user); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.tools.FileType; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.tools.UploadUtil; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | public String doImageUpload(HttpServletResponse response, MultipartHttpServletRequest request) |
| | | throws IOException, FileUploadException, NoSuchAlgorithmException { |
| | | SysUsers user = getSessionUser(); |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, user.getSuId()); |
| | | |
| | | SysCompany company = WebUtil.getSessionAttribute(HostInterceptor.ATTR_COMPANY); |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, company.getComId()); |
| | | String callBack = request.getParameter("callBack"); |
| | | String inputId = request.getParameter("inputId"); |
| | | request.setAttribute("callBack", callBack); |
| | |
| | | |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.constance.SystemMessageCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.InternationaUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.constance.AppVocabularyCode; |
| | | import com.matrix.system.common.init.InitWebContainer; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | public static final String BEV = "SYSCOMPANY_BEV"; |
| | | |
| | | |
| | | @Autowired |
| | | InitWebContainer initWebContainer; |
| | | |
| | | /** |
| | | * 列表显示 |
| | |
| | | public @ResponseBody |
| | | AjaxResult addCompany(SysCompany sysCompany) { |
| | | int i = sysCompanyService.add(sysCompany); |
| | | initWebContainer.initParams(); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("创建成功"); |
| | | } else { |
| | |
| | | AjaxResult modifyCompany(SysCompany sysCompany) { |
| | | AjaxResult result = modify(sysCompanyService, WebUtil.getSessionAttribute(BEV), sysCompany, |
| | | AppVocabularyCode.COMPANY); |
| | | initWebContainer.initParams(); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | return result; |
| | | } |
| | |
| | | /** |
| | | * 所有客户权限 |
| | | */ |
| | | private String coustomer; |
| | | private String customer; |
| | | |
| | | /** |
| | | * 功能集合 |
| | |
| | | @Extend |
| | | private String menuKeys; |
| | | |
| | | public String getCoustomer() { |
| | | return coustomer; |
| | | public String getCustomer() { |
| | | return customer; |
| | | } |
| | | |
| | | public void setCoustomer(String coustomer) { |
| | | this.coustomer = coustomer; |
| | | public void setCustomer(String customer) { |
| | | this.customer = customer; |
| | | } |
| | | |
| | | public Integer getIsDefault() { |
| | |
| | | public static final String SHOP_MANAGE_JJCPAS_CONSUME = "shopManageJjcpasConsume"; |
| | | |
| | | /** |
| | | * 门店是否只能取消待付款订单,服务单 |
| | | */ |
| | | public static final String SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER = "shopManageAbleCancelDfkOrder"; |
| | | |
| | | /** |
| | | * 赠送金额购买产品算赠送购买 |
| | | */ |
| | | public static final String SHOP_MANAGE_GIFTISFREE = "shopManageGiftisfree"; |
| | |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | | if ("dev".equals(evn)) { |
| | | SysUsers sysUsers = sysUsersDao.selectById(1022L); |
| | | request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | return true; |
| | | } |
| | | // if ("dev".equals(evn)) { |
| | | // SysUsers sysUsers = sysUsersDao.selectById(1022L); |
| | | // request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | // return true; |
| | | // } |
| | | |
| | | String token = resolveToken(request,privateKey); |
| | | AjaxResult ajaxResult = new AjaxResult(); |
| | |
| | | */ |
| | | @RequestMapping(value = "/all") |
| | | public @ResponseBody AjaxResult all(SysVipLevel sysVipLevel) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysVipLevel.setShopId(users.getShopId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, cardLevelService.findByModel(sysVipLevel), null); |
| | | } |
| | | } |
| | |
| | | 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.BusParameterSettings; |
| | | 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.dao.SysCompanyDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysProjServicesDao sysProjServicesDao; |
| | | |
| | | @Value("${evn}") |
| | |
| | | total = total.add(new BigDecimal(item.getPrice() * item.getCount())); |
| | | } |
| | | SysOrder sysOrderResult = new SysOrder(); |
| | | sysOrderResult.setZkTotal(zkTotal.setScale(2,BigDecimal.ROUND_DOWN).doubleValue()); |
| | | sysOrderResult.setZkTotal(zkTotal.setScale(2, BigDecimal.ROUND_DOWN).doubleValue()); |
| | | sysOrderResult.setTotal(total.doubleValue()); |
| | | |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrderResult)); |
| | |
| | | orderService.updateReceiptMoney(sysOrder); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | UniformMsgParam uniformMsgParam = new UniformMsgParam(user.getCompanyId(), UniformMsgParam.GZH_GMCG); |
| | | uniformMsgParam.put("orderId", sysOrder.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, uniformMsgParam.toJSONString()); |
| | | |
| | | |
| | | //处理用户购买的产品 |
| | |
| | | @ResponseBody |
| | | public AjaxResult refundOrder(@RequestBody SysOrder sysOrder) { |
| | | //储值卡订单不能通过退款渠道退款 |
| | | if(CollectionUtils.isNotEmpty(sysOrder.getItems())){ |
| | | if (CollectionUtils.isNotEmpty(sysOrder.getItems())) { |
| | | List<SysOrderItem> orderItem = orderItemService.findByOrderId(sysOrder.getItems().get(0).getOrderId()); |
| | | if(orderItem.size()==1){ |
| | | if(orderItem.get(0).getShoppingGoods().getCode().equals("vipCzk")){ |
| | | if (orderItem.size() == 1) { |
| | | if (orderItem.get(0).getShoppingGoods().getCode().equals("vipCzk")) { |
| | | return AjaxResult.buildFailInstance("充值订单请直接冲负数金额退款!"); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | |
| | | if (StringUtils.isBlank(pageVo.getOrder())) { |
| | | pageVo.setOrder("desc"); |
| | | } |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, orderService.findInPage(sysOrder, pageVo), |
| | | orderService.findTotal(sysOrder)); |
| | | } |
| | |
| | | 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); |
| | | String comRegisterCode = companyDao.selectById(user.getCompanyId()).getComRegisterCode(); |
| | | if(StringUtils.isNotBlank(comRegisterCode)){ |
| | | mv.addObject("page",comRegisterCode); |
| | | }else { |
| | | mv.addObject("page","taiyan"); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | String comRegisterCode = companyDao.selectById(user.getCompanyId()).getComRegisterCode(); |
| | | if (StringUtils.isNotBlank(comRegisterCode)) { |
| | | mv.addObject("page", comRegisterCode); |
| | | } else { |
| | | mv.addObject("page", "taiyan"); |
| | | } |
| | | return mv; |
| | | } |
| | |
| | | achieveNew.setDatatime(sysOrder.getPayTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | //更新收款流水时间 |
| | | sysOrderFlowDao.updateTimeByOrderId(sysOrder.getId(),sysOrder.getPayTime()); |
| | | sysOrderFlowDao.updateTimeByOrderId(sysOrder.getId(), sysOrder.getPayTime()); |
| | | |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(order.getVipId()); |
| | | |
| | | if (cardUseInfo == null) { |
| | | cardUseInfo=sysVipInfoService.addVipDefaultCard(order.getVipId()); |
| | | cardUseInfo = sysVipInfoService.addVipDefaultCard(order.getVipId()); |
| | | } |
| | | |
| | | //打印需求加入门店信息 |
| | |
| | | |
| | | //查询会有所有有效的会员卡 |
| | | result.putInMap("totalMoney", moneyCardUseDao.selectVipCardTotalMoney(order.getVipId())); |
| | | |
| | | |
| | | |
| | | return result; |
| | |
| | | @ResponseBody |
| | | public AjaxResult findOrderDetailByIdOrNo(SysOrder orderVo) { |
| | | // 根据id查到对应的订单信息 |
| | | SysOrder order=null; |
| | | if(orderVo.getId()!=null){ |
| | | order = orderService.findById(orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | SysOrder order = null; |
| | | if (orderVo.getId() != null) { |
| | | order = orderService.findById(orderVo.getId()); |
| | | } else if (StringUtils.isNotBlank(orderVo.getOrderNo())) { |
| | | List<SysOrder> byModel = orderService.findByModel(orderVo); |
| | | if(byModel.size()==1){ |
| | | order=orderService.findById(byModel.get(0).getId()); |
| | | if (byModel.size() == 1) { |
| | | order = orderService.findById(byModel.get(0).getId()); |
| | | } |
| | | } |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(order.getId()); |
| | |
| | | @RequestMapping(value = "/orderItem") |
| | | public String orderItem(SysOrder orderVo) { |
| | | |
| | | if(orderVo.getId()!=null){ |
| | | if (orderVo.getId() != null) { |
| | | WebUtil.getRequest().setAttribute("orderParam", orderVo.getId()); |
| | | WebUtil.getRequest().setAttribute("orderId", orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | } else if (StringUtils.isNotBlank(orderVo.getOrderNo())) { |
| | | WebUtil.getRequest().setAttribute("orderParam", orderVo.getOrderNo()); |
| | | WebUtil.getRequest().setAttribute("orderNo", orderVo.getOrderNo()); |
| | | } |
| | |
| | | } |
| | | //=======================================页面转发END================================== |
| | | |
| | | |
| | | /** |
| | | * 2021-08-20 新增:erp系统取消订单接口,不做订单状态校验 |
| | | * 取消订单 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/cancelOrder") |
| | | @RequestMapping(value = "/erpCancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(Long id, Integer del) { |
| | | AjaxResult erpCancelOrder(Long id) { |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | SysOrder order = orderService.findById(id); |
| | |
| | | } |
| | | |
| | | orderService.cancelOrder(id); |
| | | // if (del > 0) { |
| | | // orderService.removeById(id); |
| | | // result.setInfo("删除成功!"); |
| | | // } else { |
| | | result.setInfo("取消成功!"); |
| | | // } |
| | | |
| | | result.setInfo("取消成功!"); |
| | | |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消订单 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/cancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(Long id, Integer del) { |
| | | |
| | | SysOrder order = orderService.findById(id); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, order.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && shopManageAbleCancelDfkOrder.getParamValue().equals(Dictionary.FLAG_YES)) { |
| | | if (!Dictionary.ORDER_STATU_DFK.equals(order.getStatu())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待付款订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(id); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel") |
| | |
| | | */ |
| | | @RequestMapping(value = "/erpExportExcel") |
| | | public void erpExportExcel(ModelMap model, HttpServletRequest request, HttpServletResponse response, |
| | | SysOrder sysOrder) throws Exception { |
| | | SysOrder sysOrder) throws Exception { |
| | | doExportOrder(response, sysOrder); |
| | | return; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 执行订单导出,总部和门店共用,但是搜索条件不一样 |
| | | * |
| | | * @param response |
| | | * @param sysOrder |
| | | * @throws IOException |
| | |
| | | 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.BusParameterSettings; |
| | | 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.dao.SysCompanyDao; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 根据id取消预约 |
| | |
| | | @RequestMapping(value = "/cancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(SysProjServices services) { |
| | | |
| | | SysProjServices checkProjServices = sysProjServicesDao.selectById(services.getId()); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, checkProjServices.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && shopManageAbleCancelDfkOrder.getParamValue().equals(Dictionary.FLAG_YES)) { |
| | | if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY) |
| | | && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DQR)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待预约订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(services); |
| | | } |
| | | /** |
| | | * 根据id取消预约 |
| | | */ |
| | | @RequestMapping(value = "/erpCancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult erpCancelOrder(SysProjServices services) { |
| | | int i = sysProjServicesService.modifyCancelProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置服务单划扣成功 |
| | |
| | | List<Object> objects = taocanDataList.get(j); |
| | | LogUtil.info("导入套餐第" + j + "行" + objects); |
| | | Object vipName = objects.get(0); |
| | | String vipNameStr = vipName.toString(); |
| | | String vipNameStr = vipName==null?"":vipName.toString(); |
| | | if (taocan == null |
| | | || (taocan != null && StringUtils.isNotBlank(vipNameStr))) { |
| | | //切换下一个套餐 |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | |
| | | public @ResponseBody AjaxResult findAllWithPermi(SysShopInfo shopInfo) { |
| | | QueryUtil.setQueryLimitCom(shopInfo); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | shopInfo.setId(sysUsers.getShopId()); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); |
| | |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.ShoppingGoodsService; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | |
| | | } |
| | | } |
| | | shoppingGoods.setIsDel(ShoppingGoods.NORMAL); |
| | | shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods)); |
| | | return result; |
| | |
| | | |
| | | public List<AchieveNew> findSumDailyInfoNew(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | |
| | | List<AchieveNew> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | List<Map<String, Object>> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectVipConsumeStatisticsTotal(@Param("record") AchieveNew achieveNew); |
| | | |
| | |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | |
| | | |
| | | public void modifyAchieveTime(AchieveNew achieveNew); |
| | | |
| | | List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); |
| | | List<Map<String, Object>> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); |
| | | |
| | | int findVipConsumeStatisticsTotal(AchieveNew achieveNew); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | public List<Map<String, Object>> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | return achieveNewDao.selectVipConsumeStatisticsList(achieveNew, pageVo); |
| | | } |
| | | |
| | |
| | | * 检查产品销售次数 |
| | | */ |
| | | private void checkSealLimit(SysOrder pageOrder) { |
| | | pageOrder.getItems().forEach(item->{ |
| | | ShoppingGoods shopGoods = shoppingGoodsDao.selectById(item.getGoodsId()); |
| | | pageOrder.getItems().forEach(item->{ |
| | | ShoppingGoods shopGoods = shoppingGoodsDao.selectById(item.getGoodsId()); |
| | | |
| | | //最大销售次数检测 |
| | | Integer maxNum = shopGoods.getCarMaxSaleCount(); |
| | | if (maxNum != null && maxNum != 0) { |
| | | Integer buyNum = orderItemDao.selectByGoodsId(shopGoods.getId(),null); |
| | | if ((buyNum + item.getCount()) > maxNum) { |
| | | throw new GlobleException(shopGoods.getName() + "已超过最大销售数量"); |
| | | } |
| | | if ((buyNum + item.getCount()) == maxNum) { |
| | | if (!shopGoods.getStaus().equals(Dictionary.BUSINESS_STATE_DOWN)) { |
| | | shopGoods.setStaus(Dictionary.BUSINESS_STATE_DOWN); |
| | | shoppingGoodsDao.update(shopGoods); |
| | | } |
| | | } |
| | | } |
| | | //每人限购次数检测 |
| | | Integer onceCount = shopGoods.getIsOnce(); |
| | | if(onceCount!=null && onceCount!=0){ |
| | | Integer buyOnceCount = orderItemDao.selectByGoodsId(shopGoods.getId(),pageOrder.getVipId()); |
| | | //最大销售次数检测 |
| | | Integer maxNum = shopGoods.getCarMaxSaleCount(); |
| | | if (maxNum != null && maxNum != 0) { |
| | | Integer buyNum = orderItemDao.selectByGoodsId(shopGoods.getId(),null); |
| | | if ((buyNum + item.getCount()) > maxNum) { |
| | | throw new GlobleException(shopGoods.getName() + "已超过最大销售数量"); |
| | | } |
| | | if ((buyNum + item.getCount()) == maxNum) { |
| | | if (!shopGoods.getStaus().equals(Dictionary.BUSINESS_STATE_DOWN)) { |
| | | shopGoods.setStaus(Dictionary.BUSINESS_STATE_DOWN); |
| | | shoppingGoodsDao.update(shopGoods); |
| | | } |
| | | } |
| | | } |
| | | //每人限购次数检测 |
| | | Integer onceCount = shopGoods.getIsOnce(); |
| | | if(onceCount!=null && onceCount!=0){ |
| | | Integer buyOnceCount = orderItemDao.selectByGoodsId(shopGoods.getId(),pageOrder.getVipId()); |
| | | |
| | | if ((buyOnceCount + item.getCount()) > onceCount) { |
| | | throw new GlobleException(shopGoods.getName() + "每人限购"+onceCount+"次"); |
| | | } |
| | | } |
| | | if ((buyOnceCount + item.getCount()) > onceCount) { |
| | | throw new GlobleException(shopGoods.getName() + "每人限购"+onceCount+"次"); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | //添加自己的积分 |
| | | if(selfScore>0){ |
| | | scoreVipDetailService.addScore( |
| | | vipInfo.getId(), |
| | | pageOrder.getStaffId(), |
| | | pageOrder.getShopId(), |
| | | selfScore, |
| | | pageOrder.getId(), |
| | | ScoreVipDetail.SCORE_VIP_TYPE_CASH, |
| | | "消费奖励" |
| | | ); |
| | | scoreVipDetailService.addScore( |
| | | vipInfo.getId(), |
| | | pageOrder.getStaffId(), |
| | | pageOrder.getShopId(), |
| | | selfScore, |
| | | pageOrder.getId(), |
| | | ScoreVipDetail.SCORE_VIP_TYPE_CASH, |
| | | "消费奖励" |
| | | ); |
| | | } |
| | | |
| | | if(vipInfo.getRecommendId()!=null){ |
| | |
| | | } |
| | | |
| | | sourceOrder.setArrears(sourceOrder.getArrears() - refundTotal); |
| | | sourceOrder.setCardPay(sourceOrder.getCardPay() + cardPayTotal); |
| | | sourceOrder.setCashPay(sourceOrder.getCashPay() + cashPayTotal); |
| | | sourceOrder.setCardPay(sourceOrder.getCardPay()==null?0:sourceOrder.getCardPay() + cardPayTotal); |
| | | sourceOrder.setCashPay(sourceOrder.getCashPay()==null?0:sourceOrder.getCashPay() + cashPayTotal); |
| | | sysOrderDao.update(sourceOrder); |
| | | } |
| | | |
| | |
| | | List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(sysOrderItem.getGoodsId(), ShoppingGoods.SHOPPING_GOODS_TYPE_XM); |
| | | assembleList.forEach(item -> { |
| | | //TODO 补综合卡逻辑 |
| | | createProjuseByAssemble(order, sysOrderItem, item, null, null); |
| | | createProjuseByAssemble(order, sysOrderItem, item, null, null,null,0); |
| | | }); |
| | | |
| | | //处理综合卡中包含的套餐 |
| | |
| | | * 通过组合关系创建用户项目余次 |
| | | */ |
| | | private SysProjUse createProjuseByAssemble(SysOrder order, SysOrderItem sysOrderItem, |
| | | ShoppingGoodsAssemble goodsAssemble, Long taocanId, Date failTime) { |
| | | ShoppingGoodsAssemble goodsAssemble, Long taocanId, Date failTime,String source,Integer maxCount) { |
| | | //计算折扣 |
| | | Double zk = sysOrderItem.getZkPrice() / sysOrderItem.getPrice(); |
| | | |
| | |
| | | puse.setIsOver(Dictionary.DELETED_N); |
| | | puse.setOrderItemId(sysOrderItem.getId()); |
| | | puse.setProjId(goodsAssemble.getAssembleGoodId()); |
| | | puse.setSurplusCount(goodsAssemble.getTotal()); |
| | | puse.setSurplusCount(goodsAssemble.getTotal()==null?maxCount: goodsAssemble.getTotal()); |
| | | puse.setDeductionNum(goodsAssemble.getDeductionNum()); |
| | | puse.setProjName(goodsAssemble.getShoppingGoods().getName()); |
| | | puse.setVipId(order.getVipId()); |
| | | puse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | puse.setTaocanId(taocanId); |
| | | puse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | puse.setSource(source); |
| | | |
| | | if (taocanId == null) { |
| | | puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() * zk); |
| | | } else { |
| | | puse.setPrice(goodsAssemble.getPrice() * zk); |
| | | } |
| | | |
| | | // 赠送和打折后金额为0的都视为赠送项目 |
| | | if (sysOrderItem.getIsFree().equals(Dictionary.FLAG_NO) && sysOrderItem.getZkPrice() > 0) { |
| | | puse.setSource(Dictionary.TAOCAN_SOURCE_GM); |
| | | } else { |
| | | |
| | | puse.setSource(Dictionary.TAOCAN_SOURCE_ZS); |
| | | //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 |
| | | boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); |
| | | if(zsConsumeAchieve){ |
| | | if(sysOrderItem.getPrice()>0){ |
| | | |
| | | |
| | | |
| | | |
| | | }else{ |
| | | //等于0取原价 |
| | | if (taocanId == null) { |
| | | puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() ); |
| | | } else { |
| | | puse.setPrice(goodsAssemble.getPrice()); |
| | | } |
| | | //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 |
| | | boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); |
| | | if(zsConsumeAchieve){ |
| | | if(sysOrderItem.getPrice()<=0){ |
| | | //等于0取原价 |
| | | if (taocanId == null) { |
| | | puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() ); |
| | | } else { |
| | | puse.setPrice(goodsAssemble.getPrice()); |
| | | } |
| | | |
| | | }else{ |
| | | puse.setPrice(0D); |
| | | } |
| | | |
| | | |
| | | }else{ |
| | | puse.setPrice(0D); |
| | | } |
| | | |
| | | puse.setBalance(MoneyUtil.mul(puse.getPrice(), Double.valueOf(puse.getSurplusCount()))); |
| | | puse.setFailTime(failTime); |
| | | sysProjUseDao.insert(puse); |
| | |
| | | //创建套餐绑定的项目 |
| | | List<ShoppingGoodsAssemble> assembleList = shoppingGoodsAssembleDao.selectGoodsByShoppingGoodsIdAndType(projId, ShoppingGoods.SHOPPING_GOODS_TYPE_XM); |
| | | for (ShoppingGoodsAssemble assemble : assembleList) { |
| | | SysProjUse tempUse = createProjuseByAssemble(order, sysOrderItem, assemble, taocanProjUse.getId(),taocanProjUse.getFailTime()); |
| | | SysProjUse tempUse = createProjuseByAssemble(order, sysOrderItem, assemble, taocanProjUse.getId(),taocanProjUse.getFailTime(),taocanProjUse.getSource(),taocanShoppingGoods.getCarUseCount()); |
| | | sumBanance += tempUse.getBalance(); |
| | | surplusCount += tempUse.getSurplusCount(); |
| | | } |
| | | if (Dictionary.FLAG_NO_N.equals(taocanShoppingGoods.getIsCourse())) { |
| | | //固定套餐,剩余次数等于绑定项目的次数 |
| | | taocanProjUse.setSurplusCount(surplusCount); |
| | | //合计套餐余额 |
| | | taocanProjUse.setBalance(sumBanance); |
| | | } else { |
| | | //任选套餐剩余次数等于最大使用次数 |
| | | taocanProjUse.setSurplusCount(taocanShoppingGoods.getCarUseCount()); |
| | | taocanProjUse.setBalance(sysOrderItem.getZkPrice()); |
| | | } |
| | | //合计套餐余额 |
| | | taocanProjUse.setBalance(sumBanance); |
| | | |
| | | sysProjUseDao.update(taocanProjUse); |
| | | } |
| | | |
| | |
| | | //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 |
| | | boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); |
| | | if(zsConsumeAchieve){ |
| | | if(sysOrderItem.getPrice()>0){ |
| | | puse.setPrice(sysOrderItem.getZkPrice()); |
| | | }else{ |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | } |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | }else{ |
| | | puse.setPrice(0D); |
| | | } |
| | |
| | | |
| | | int sub = sysProjUse.getSurplusCount() - item.getCount(); |
| | | if (sub < 0) { |
| | | throw new GlobleException("项目余次不足"); |
| | | throw new GlobleException("项目余次不足"); |
| | | }else if(sub==0){ |
| | | sysProjUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.CustomerDataDictionary; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | |
| | | public @ResponseBody |
| | | AjaxResult findSumDailyInfoNew(@RequestBody AchieveNew achieveNew) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, achieveNewService.findSumDailyInfoNew(achieveNew, null), |
| | |
| | | AjaxResult findDailyInfoNew(@RequestBody AchieveNew achieveNew) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | achieveNew.setCompanyId(sysUsers.getCompanyId()); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | PaginationVO pageVo = new PaginationVO(); |
| | |
| | | , "服务提成", "人头", "项目个数", "服务时间", "订单类型"}; |
| | | orderSheet.setHeaders(header); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | queryDto.setShopId(sysUsers.getShopId()); |
| | | } |
| | | queryDto.setCompanyId(sysUsers.getCompanyId()); |
| | |
| | | |
| | | |
| | | orderSheet.setHeaders(header); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | |
| | |
| | | package com.matrix.system.hive.statistics; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.BusinessesDto; |
| | | import com.matrix.system.app.vo.BusinessesDataShowVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.bean.SysBusinessData; |
| | | import com.matrix.system.hive.dao.SysBusinessDataDao; |
| | | import com.matrix.system.hiveErp.analysUtil.StatisticsTimeDaoParam; |
| | | import com.matrix.system.hiveErp.analysUtil.StatisticsTimeUtil; |
| | |
| | | public @ResponseBody |
| | | AjaxResult showList(BusinessDataShowVo businessDataShowVo, PaginationVO pageVo) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | businessDataShowVo.setShopId(sysUsers.getShopId()+""); |
| | | } |
| | | pageVo.setSort("createTime"); |
| | |
| | | return AjaxResult.buildSuccessInstance(result, total); |
| | | } |
| | | |
| | | @RequestMapping(value = "/findShopBusinessesData") |
| | | @ResponseBody |
| | | public AjaxResult findShopBusinessesData(BusinessDataShowVo businessDataShowVo, PaginationVO pageVo) { |
| | | int start = pageVo.getOffset(); |
| | | int size = pageVo.getLimit(); |
| | | int calenderUnit = Calendar.DATE; |
| | | Long shopId = null; |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | if (StrUtil.isNotBlank(businessDataShowVo.getShopId())) { |
| | | shopId = Long.parseLong(businessDataShowVo.getShopId()); |
| | | } else { |
| | | shopId = sysUsers.getShopId(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | if (businessDataShowVo.getBeginTime() != null) { |
| | | calendar.setTime(businessDataShowVo.getBeginTime()); |
| | | } |
| | | calendar.add(calenderUnit, 1); |
| | | calendar.add(calenderUnit, -start); |
| | | String endTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | calendar.add(calenderUnit, -size); |
| | | String startTime = DateUtil.dateToString(calendar.getTime(), DateUtil.DATE_FORMAT_DD); |
| | | |
| | | List<Date> xAxis = StatisticsTimeUtil.getTimeSpace(startTime, endTime, "日"); |
| | | List<StatisticsTimeDaoParam> timeSpaceParam = StatisticsTimeUtil.buidParam(xAxis); |
| | | List<StatisticsTimeDaoParam> statisticsTimeDaoParams = timeSpaceParam.subList(0, timeSpaceParam.size() - 2); |
| | | List<BusinessesDataShowVo> list = sysBusinessDataDao.selectApiBusinessData(statisticsTimeDaoParams, shopId, sysUsers.getCompanyId()); |
| | | |
| | | |
| | | List<BusinessesDataShowVo> result = new ArrayList<>(); |
| | | for (int i = list.size() - 1; i >= 0; i--) { |
| | | BusinessesDataShowVo item = list.get(i); |
| | | String dataTime = item.getDataTime(); |
| | | item.setDataTime(DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.DATE_FORMAT_DD), DateUtil.DATE_FORMAT_DD)); |
| | | result.add(item); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(result, 100); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 客户数据统计 |
| | |
| | | @ResponseBody |
| | | public AjaxResult vipConsumeStatistics(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | List<AchieveNew> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); |
| | | List<Map<String, Object>> list = achieveNewService.findVipConsumeStatisticsList(achieveNew, pageVo); |
| | | int total = achieveNewService.findVipConsumeStatisticsTotal(achieveNew); |
| | | return AjaxResult.buildSuccessInstance(list, total); |
| | | } |
| | |
| | | pageVo.setSort("create_time"); |
| | | pageVo.setOrder("desc"); |
| | | shopDeliveryInfo.setCompanyId(sysUsers.getCompanyId()); |
| | | // shopDeliveryInfo.setShopId(sysUsers.getShopId()); |
| | | List<ShopDeliveryInfo> dataList = shopDeliveryInfoDao.selectInPage(shopDeliveryInfo, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, |
| | | shopDeliveryInfoDao.selectTotalRecord(shopDeliveryInfo)); |
| | |
| | | info.setRemarks(deliveryInfo.getRemarks()); |
| | | info.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE); |
| | | info.setDeliveryTime(new Date()); |
| | | info.setCompanyId(user.getCompanyId()); |
| | | shopDeliveryInfoDao.updateByModel(info); |
| | | |
| | | //构建需要修改订单信息Map |
| | |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.constance.SystemMessageCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.shopXcx.bean.*; |
| | | import com.matrix.system.shopXcx.dao.*; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.*; |
| | | |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 产品表 |
| | |
| | | shopProductParamRef.setUpdateBy(user.getSuName()); |
| | | newShopProductParamRefs.add(shopProductParamRef); |
| | | } |
| | | shopProductParamRefDao.batchInsert(newShopProductParamRefs); |
| | | if(CollectionUtils.isNotEmpty(newShopProductParamRefs)){ |
| | | |
| | | shopProductParamRefDao.batchInsert(newShopProductParamRefs); |
| | | } |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, "产品表"); |
| | | }else { |
| | |
| | | @Service |
| | | public class WeChatApiTools { |
| | | |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | |
| | | if (StringUtils.isBlank(bindingPhoneNumber.getPhoneNumber())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "手机号码不能为空"); |
| | | } |
| | | //验证通过将手机号加入相应的用户数据中 |
| | | SysVipInfo sysVipInfo = new SysVipInfo(); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | sysVipInfo.setId(loginUser.getId()); |
| | | if(loginUser.getShopId()==null){ |
| | | sysVipInfo.setShopId(bindingPhoneNumber.getShopId()); |
| | | |
| | | |
| | | SysVipInfo oldeUser = sysVipInfoDao.selectByPhone(bindingPhoneNumber.getPhoneNumber(), loginUser.getCompanyId()); |
| | | if(oldeUser!=null){ |
| | | oldeUser.setIsSales(loginUser.getIsSales()); |
| | | oldeUser.setOpenId(loginUser.getOpenId()); |
| | | oldeUser.setSessionKey(loginUser.getSessionKey()); |
| | | oldeUser.setPhoto(loginUser.getAvatarUrl()); |
| | | oldeUser.setAvatarUrl(loginUser.getAvatarUrl()); |
| | | sysVipInfoDao.update(oldeUser); |
| | | sysVipInfoDao.deleteById(loginUser.getId()); |
| | | String token = redisUserLoginUtils.saveUserInfo(oldeUser); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("绑定成功"); |
| | | result.putInMap("token",token); |
| | | result.putInMap("userInfo",oldeUser); |
| | | return result; |
| | | }else{ |
| | | |
| | | //验证通过将手机号加入相应的用户数据中 |
| | | SysVipInfo sysVipInfo = new SysVipInfo(); |
| | | |
| | | sysVipInfo.setId(loginUser.getId()); |
| | | if(loginUser.getShopId()==null){ |
| | | sysVipInfo.setShopId(bindingPhoneNumber.getShopId()); |
| | | } |
| | | sysVipInfo.setPhone(bindingPhoneNumber.getPhoneNumber()); |
| | | sysVipInfoDao.update(sysVipInfo); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "绑定成功"); |
| | | } |
| | | sysVipInfo.setPhone(bindingPhoneNumber.getPhoneNumber()); |
| | | sysVipInfoDao.update(sysVipInfo); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "绑定成功"); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.tools.ImageUtil; |
| | | import com.matrix.component.tools.WxacodeUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import com.matrix.system.shopXcx.api.pojo.QrcodeImgParam; |
| | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | @Value(value = "${qrcodeBackgroundImgPath}") |
| | | private String qrcodeBackgroundImgPath; |
| | | |
| | | |
| | | @Value(value = "${qrcodeFrontImgPath}") |
| | | private String qrcodeFrontImgPath; |
| | |
| | | // 图片访问URL |
| | | String baseSaveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL); |
| | | String productImg = shopProduct.getImgMobile(); |
| | | productImg = productImg.replace(baseSaveUrl, baseSavePath); |
| | | String productPath = baseSavePath + "wxacode" + File.separatorChar + MD5Util.strToMD5(loginUser.getOpenId()) + "poster.png"; |
| | | ImageUtil.downloadPicture(productImg, productPath); |
| | | // productImg = productImg.replace(baseSaveUrl, baseSavePath); |
| | | String targetImg = UUIDUtil.getRandomID() + ".png"; |
| | | |
| | | QrcodeImgParam qrcodeImgParam = new QrcodeImgParam(); |
| | |
| | | qrcodeImgParam.qrcodeSavePath = qrcodeSavePath; |
| | | qrcodeImgParam.qrcodeBackgroundImgPath = qrcodeBackgroundImgPath; |
| | | qrcodeImgParam.qrcodeFrontImgPath = qrcodeFrontImgPath; |
| | | qrcodeImgParam.productImgPath = productImg; |
| | | qrcodeImgParam.productImgPath = productPath; |
| | | qrcodeImgParam.urlPath = baseSaveUrl + "/" + "wxacode" + "/" + targetImg; |
| | | qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg; |
| | | qrcodeImgParam.title = shopProduct.getTitle(); |
| | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | QrcodeImgParam qrcodeImgParam = new QrcodeImgParam(); |
| | | qrcodeImgParam.qrcodeSavePath = "C:\\Users\\Administrator\\Desktop\\dd\\ewm.png"; |
| | | qrcodeImgParam.qrcodeSavePath = "C:\\Users\\Administrator\\Desktop\\ewm.png"; |
| | | qrcodeImgParam.qrcodeBackgroundImgPath = "C:\\Users\\Administrator\\Desktop\\dd\\bj1.png"; |
| | | qrcodeImgParam.qrcodeFrontImgPath = "C:\\Users\\Administrator\\Desktop\\dd\\qj2.png"; |
| | | qrcodeImgParam.productImgPath = "C:\\Users\\Administrator\\Desktop\\dd\\banner.jpg"; |
| | | // qrcodeImgParam.productImgPath = "C:\\Users\\Administrator\\Desktop\\dd\\banner.jpg"; |
| | | qrcodeImgParam.productImgPath = "C:\\Users\\Administrator\\Desktop\\6cbfee5df0474fe0b864be142bc474ab.jpg"; |
| | | qrcodeImgParam.targetImg = "C:\\Users\\Administrator\\Desktop\\dd\\banner111.jpg"; |
| | | qrcodeImgParam.title = "盐酸米多君片"; |
| | | qrcodeImgParam.price = "¥30"; |
| | |
| | | sysVipInfo.setVipNo(openId); |
| | | sysVipInfoService.add(sysVipInfo); |
| | | |
| | | }else{ |
| | | } else { |
| | | sysVipInfo.setSessionKey(sessionKey); |
| | | sysVipInfoDao.update(sysVipInfo); |
| | | } |
| | |
| | | sysVipInfo.setBalance(moneyCardUseDao.selectVipCardTotalMoney(loginUser.getId())); |
| | | AjaxResult res = new AjaxResult(); |
| | | res.putInMap("couponCount", shopCouponRecordDao.countUnuseCouponRecord(loginUser.getId())); |
| | | res.putInMap("prizeCount",activitySignReceiveRecordDao.getSignAwardReceiveCount(loginUser.getId(),loginUser.getCompanyId())); |
| | | res.putInMap("prizeCount", activitySignReceiveRecordDao.getSignAwardReceiveCount(loginUser.getId(), loginUser.getCompanyId())); |
| | | res.putInMap("userInfo", sysVipInfo); |
| | | //查询会员等级 |
| | | if(sysVipInfo.getSalesmanGrade()!=null){ |
| | | if (sysVipInfo.getSalesmanGrade() != null) { |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(sysVipInfo.getSalesmanGrade()); |
| | | res.putInMap("vipLevel", shopSalesmanGrade.getName()); |
| | | }else if(sysVipInfo.getVipLevel()!=null){ |
| | | } else if (sysVipInfo.getVipLevel() != null) { |
| | | res.putInMap("vipLevel", sysVipInfo.getVipLevel().getLevelName()); |
| | | }else{ |
| | | } else { |
| | | res.putInMap("vipLevel", "初级会员"); |
| | | } |
| | | res.setStatus(AjaxResult.STATUS_SUCCESS); |
| | |
| | | public @ResponseBody |
| | | AjaxResult findUserInfo(@PathVariable String openId) { |
| | | SysVipInfo sysVipInfo = sysVipInfoService.findByOpenId(openId); |
| | | SysVipInfo bizUserQuery=new SysVipInfo(); |
| | | SysVipInfo bizUserQuery = new SysVipInfo(); |
| | | bizUserQuery.setNickName(sysVipInfo.getNickName()); |
| | | bizUserQuery.setAvatarUrl(sysVipInfo.getAvatarUrl()); |
| | | bizUserQuery.setOpenId(openId); |
| | |
| | | AjaxResult saveUserInfo(@RequestBody XcxUserSaveUserInfoDto xcxUserSaveUserInfoDto) { |
| | | |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo=new SysVipInfo(); |
| | | SysVipInfo sysVipInfo = new SysVipInfo(); |
| | | sysVipInfo.setId(loginUser.getId()); |
| | | |
| | | BeanUtil.copyProperties(xcxUserSaveUserInfoDto,sysVipInfo); |
| | | BeanUtil.copyProperties(xcxUserSaveUserInfoDto, sysVipInfo); |
| | | sysVipInfo.setPhone(xcxUserSaveUserInfoDto.getPhoneNumber()); |
| | | if(StringUtils.isBlank(loginUser.getVipName())||loginUser.getVipName().equals("微信用户")){ |
| | | if (StringUtils.isBlank(loginUser.getVipName()) || loginUser.getVipName().equals("微信用户")) { |
| | | sysVipInfo.setVipName(xcxUserSaveUserInfoDto.getNickName()); |
| | | } |
| | | if(StringUtils.isBlank(loginUser.getSex())){ |
| | | sysVipInfo.setSex(xcxUserSaveUserInfoDto.getGender()==1?"男":"女"); |
| | | if (StringUtils.isBlank(loginUser.getSex())) { |
| | | sysVipInfo.setSex(xcxUserSaveUserInfoDto.getGender() == 1 ? "男" : "女"); |
| | | } |
| | | |
| | | int i = sysVipInfoDao.update(sysVipInfo); |
| | |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(sysVipInfo)); |
| | | } |
| | | |
| | | |
| | | |
| | | void checkNeedToBeSalesman(SysVipInfo sysVipInfo, SysVipInfo loginUser) { |
| | |
| | | queryWrapper.eq("apply_status", ShopSalesmanApply.APPLY_STATUS_DSH); |
| | | ShopSalesmanApply shopSalesmanApply = salesmanApplyDao.selectOne(queryWrapper); |
| | | if (shopSalesmanApply == null) {//没有待审核记录 |
| | | try { |
| | | shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getId(), null, null, 2); |
| | | }catch (Exception e){ |
| | | LogUtil.debug(e.getMessage()); |
| | | } |
| | | |
| | | shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getId(), null, null, 2); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<CouponReceiveInfoVO> usefulCoupon = new ArrayList<>(); |
| | | CouponReceiveInfoVO shopCoupon = new CouponReceiveInfoVO(); |
| | | //满足店铺活动的订单不能使用优惠券 |
| | | if (conditionsGroupCount > 0) { |
| | | if (conditionsGroupCount <= 0) { |
| | | //计算可用优惠券 |
| | | usefulCoupon = wxShopCouponService.getCartVoCouponList(sysVipInfo.getCompanyId(), orderItemDtos); |
| | | //获取用户使用的优惠券 |
| | |
| | | |
| | | traverseFolder(file2); |
| | | } else { |
| | | if(file2.length()>_1mb*100){ |
| | | if(file2.length()>_1mb*50){ |
| | | System.out.println( file2.length()/_1mb+"MB"+"\t"+file2.getAbsolutePath()); |
| | | } |
| | | } |
| | |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="plates" column="plates" /> |
| | | <result property="shopAble" column="shop_able" /> |
| | | <result property="coustomer" column="coustomer" /> |
| | | <result property="customer" column="customer" /> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | company_id, |
| | | plates, |
| | | is_default, |
| | | coustomer, |
| | | customer, |
| | | shop_able |
| | | ) |
| | | VALUES ( |
| | |
| | | #{companyId}, |
| | | #{plates}, |
| | | #{isDefault}, |
| | | #{coustomer}, |
| | | #{customer}, |
| | | #{shopAble} |
| | | ) |
| | | </insert> |
| | |
| | | company_id, |
| | | plates, |
| | | is_default, |
| | | coustomer, |
| | | customer, |
| | | shop_able |
| | | ) |
| | | VALUES |
| | |
| | | #{item.companyId}, |
| | | #{item.plates}, |
| | | #{item.isDefault}, |
| | | #{item.coustomer}, |
| | | #{item.customer}, |
| | | #{item.shopAble} |
| | | ) |
| | | </foreach> |
| | |
| | | <if test="_parameter.containsKey('shopAble')"> |
| | | shop_able = #{shopAble}, |
| | | </if> |
| | | <if test="_parameter.containsKey('coustomer')"> |
| | | coustomer = #{coustomer}, |
| | | <if test="_parameter.containsKey('customer')"> |
| | | customer = #{customer}, |
| | | </if> |
| | | </set> |
| | | WHERE role_id=#{roleId} |
| | |
| | | <if test="(shopAble!=null and shopAble!='') or (shopAble!='' and shopAble==0)"> |
| | | shop_able = #{shopAble}, |
| | | </if> |
| | | <if test="(coustomer!=null and coustomer!='') or (coustomer!='' and coustomer==0)"> |
| | | coustomer = #{coustomer}, |
| | | <if test="(customer!=null and customer!='') or (customer!='' and customer==0)"> |
| | | customer = #{customer}, |
| | | </if> |
| | | </set> |
| | | WHERE role_id=#{roleId} |
| | |
| | | company_id, |
| | | plates, |
| | | is_default, |
| | | coustomer, |
| | | customer, |
| | | shop_able |
| | | from sys_role |
| | | <where> |
| | |
| | | company_id, |
| | | plates, |
| | | is_default, |
| | | coustomer, |
| | | customer, |
| | | shop_able |
| | | from sys_role |
| | | where role_id=#{roleId} |
| | |
| | | company_id, |
| | | plates, |
| | | is_default, |
| | | coustomer, |
| | | customer, |
| | | shop_able |
| | | from sys_role |
| | | <where> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.matrix.system.hive.dao.AchieveNewDao"> |
| | | <!-- 定义AchieveNew 的复杂关联map --> |
| | |
| | | and a.company_id = #{record.companyId} |
| | | <if test="record!=null"> |
| | | <if |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | and a.shop_id = #{record.shopId} |
| | | </if> |
| | | <if test="record.achieveRuleId != null "> |
| | |
| | | |
| | | </select> |
| | | <select id="findDayFlowTotal" |
| | | resultType="java.lang.Integer"> |
| | | resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from |
| | | achieve_new a |
| | |
| | | <where> |
| | | <if test="record!=null"> |
| | | <if |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | and a.shop_id = #{record.shopId} |
| | | </if> |
| | | <if test="record.year != null and record.year !='' "> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- |
| | | <!-- |
| | | |
| | | 统计员工业绩 |
| | | 统计员工业绩 |
| | | |
| | | select |
| | | u.name, |
| | | g.su_name guwen, |
| | | cast(SUM(b.ZK_TOTAL) AS decimal(15,2)) as zk_total, |
| | | cast(SUM(a.his_consume) AS decimal(15,2)), |
| | | cast(SUM(a.free_consume) AS decimal(15,2)), |
| | | cast(SUM(a.proj_percentage) AS decimal(15,2)), |
| | | cast(SUM(a.number_of_people) AS decimal(15,2)), |
| | | cast(SUM(a.proj_num) AS decimal(15,2)), |
| | | cast(SUM(a.proj_time) AS decimal(15,2)), |
| | | h.shop_short_name shop_name, |
| | | a.order_type, |
| | | a.achieveType |
| | | from |
| | | achieve_new 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_vip_level d on c.LEVEL_ID=d.id |
| | | left join shopping_goods e on a.shopping_goods_id=e.id |
| | | LEFT JOIN sys_users f on a.beault_id=f.su_id |
| | | LEFT JOIN sys_users g on a.sale_id = g.su_id |
| | | LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID |
| | | LEFT JOIN shopping_goods_category i ON e.cate_id = i.id |
| | | left join sys_proj_services l on a.service_order_id=l.id |
| | | left join sys_order_item j on a.order_item_id=j.ID |
| | | left join achieve_rule u on u.id=e.achieve_rule_id |
| | | where h.shop_short_name='龙华店' |
| | | GROUP BY g.su_name , a.order_type, h.id,a.achieveType |
| | | ORDER BY g.su_name |
| | | select |
| | | u.name, |
| | | g.su_name guwen, |
| | | cast(SUM(b.ZK_TOTAL) AS decimal(15,2)) as zk_total, |
| | | cast(SUM(a.his_consume) AS decimal(15,2)), |
| | | cast(SUM(a.free_consume) AS decimal(15,2)), |
| | | cast(SUM(a.proj_percentage) AS decimal(15,2)), |
| | | cast(SUM(a.number_of_people) AS decimal(15,2)), |
| | | cast(SUM(a.proj_num) AS decimal(15,2)), |
| | | cast(SUM(a.proj_time) AS decimal(15,2)), |
| | | h.shop_short_name shop_name, |
| | | a.order_type, |
| | | a.achieveType |
| | | from |
| | | achieve_new 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_vip_level d on c.LEVEL_ID=d.id |
| | | left join shopping_goods e on a.shopping_goods_id=e.id |
| | | LEFT JOIN sys_users f on a.beault_id=f.su_id |
| | | LEFT JOIN sys_users g on a.sale_id = g.su_id |
| | | LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID |
| | | LEFT JOIN shopping_goods_category i ON e.cate_id = i.id |
| | | left join sys_proj_services l on a.service_order_id=l.id |
| | | left join sys_order_item j on a.order_item_id=j.ID |
| | | left join achieve_rule u on u.id=e.achieve_rule_id |
| | | where h.shop_short_name='龙华店' |
| | | GROUP BY g.su_name , a.order_type, h.id,a.achieveType |
| | | ORDER BY g.su_name |
| | | |
| | | --> |
| | | --> |
| | | |
| | | |
| | | <select id="findSumDailyInfoNew" resultMap="AchieveNewMap"> |
| | |
| | | <where> |
| | | <if test="record!=null"> |
| | | <if |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | and a.shop_id = #{record.shopId} |
| | | </if> |
| | | <if test="record.year != null and record.year !='' "> |
| | |
| | | |
| | | <if test="record!=null"> |
| | | <if |
| | | test="(record.id!=null and record.id!='') or (record.id!='' and record.id==0) "> |
| | | test="(record.id!=null and record.id!='') or (record.id!='' and record.id==0) "> |
| | | and id = #{record.id} |
| | | </if> |
| | | <if test="record.companyId != null and record.companyId !='' "> |
| | | and company_id = #{record.companyId} |
| | | </if> |
| | | <if |
| | | test="(record.saleId!=null and record.saleId!='') or (record.saleId!='' and record.saleId==0) "> |
| | | test="(record.saleId!=null and record.saleId!='') or (record.saleId!='' and record.saleId==0) "> |
| | | and sale_id = #{record.saleId} |
| | | </if> |
| | | <if |
| | | test="(record.beaultId!=null and record.beaultId!='') or (record.beaultId!='' and record.beaultId==0) "> |
| | | test="(record.beaultId!=null and record.beaultId!='') or (record.beaultId!='' and record.beaultId==0) "> |
| | | and beault_id = #{record.beaultId} |
| | | </if> |
| | | <if |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | and shop_id = #{record.shopId} |
| | | </if> |
| | | <if |
| | | test="(record.datatime!=null and record.datatime!='') or (record.datatime!='' and record.datatime==0) "> |
| | | test="(record.datatime!=null and record.datatime!='') or (record.datatime!='' and record.datatime==0) "> |
| | | and datatime = #{record.datatime} |
| | | </if> |
| | | <if |
| | | test="(record.orderId!=null and record.orderId!='') or (record.orderId!='' and record.orderId==0) "> |
| | | test="(record.orderId!=null and record.orderId!='') or (record.orderId!='' and record.orderId==0) "> |
| | | and order_id = #{record.orderId} |
| | | </if> |
| | | <if |
| | | test="(record.orderItemId!=null and record.orderItemId!='') or (record.orderItemId!='' and record.orderItemId==0) "> |
| | | test="(record.orderItemId!=null and record.orderItemId!='') or (record.orderItemId!='' and record.orderItemId==0) "> |
| | | and order_item_id = #{record.orderItemId} |
| | | </if> |
| | | <if |
| | | test="(record.shoppingGoodsId!=null and record.shoppingGoodsId!='') or (record.shoppingGoodsId!='' and record.shoppingGoodsId==0) "> |
| | | test="(record.shoppingGoodsId!=null and record.shoppingGoodsId!='') or (record.shoppingGoodsId!='' and record.shoppingGoodsId==0) "> |
| | | and shopping_goods_id = #{record.shoppingGoodsId} |
| | | </if> |
| | | <if |
| | | test="(record.serviceOrderId!=null and record.serviceOrderId!='') or (record.serviceOrderId!='' and record.serviceOrderId==0) "> |
| | | test="(record.serviceOrderId!=null and record.serviceOrderId!='') or (record.serviceOrderId!='' and record.serviceOrderId==0) "> |
| | | and service_order_id = #{record.serviceOrderId} |
| | | </if> |
| | | <if |
| | | test="(record.vipId!=null and record.vipId!='') or (record.vipId!='' and record.vipId==0) "> |
| | | test="(record.vipId!=null and record.vipId!='') or (record.vipId!='' and record.vipId==0) "> |
| | | and vip_id = #{record.vipId} |
| | | </if> |
| | | <if |
| | | test="(record.freeConsume!=null and record.freeConsume!='') or (record.freeConsume!='' and record.freeConsume==0) "> |
| | | test="(record.freeConsume!=null and record.freeConsume!='') or (record.freeConsume!='' and record.freeConsume==0) "> |
| | | and free_consume = #{record.freeConsume} |
| | | </if> |
| | | <if |
| | | test="(record.hisConsume!=null and record.hisConsume!='') or (record.hisConsume!='' and record.hisConsume==0) "> |
| | | test="(record.hisConsume!=null and record.hisConsume!='') or (record.hisConsume!='' and record.hisConsume==0) "> |
| | | and his_consume = #{record.hisConsume} |
| | | </if> |
| | | |
| | | |
| | | <if |
| | | test="(record.goodsCash!=null and record.goodsCash!='') or (record.goodsCash!='' and record.goodsCash==0) "> |
| | | test="(record.goodsCash!=null and record.goodsCash!='') or (record.goodsCash!='' and record.goodsCash==0) "> |
| | | and goods_cash = #{record.goodsCash} |
| | | </if> |
| | | <if |
| | | test="(record.projNum!=null and record.projNum!='') or (record.projNum!='' and record.projNum==0) "> |
| | | test="(record.projNum!=null and record.projNum!='') or (record.projNum!='' and record.projNum==0) "> |
| | | and proj_num = #{record.projNum} |
| | | </if> |
| | | <if |
| | | test="(record.numberOfPeople!=null and record.numberOfPeople!='') or (record.numberOfPeople!='' and record.numberOfPeople==0) "> |
| | | test="(record.numberOfPeople!=null and record.numberOfPeople!='') or (record.numberOfPeople!='' and record.numberOfPeople==0) "> |
| | | and number_of_people = #{record.numberOfPeople} |
| | | </if> |
| | | <if |
| | | test="(record.shopName!=null and record.shopName!='') or (record.shopName!='' and record.shopName==0) "> |
| | | test="(record.shopName!=null and record.shopName!='') or (record.shopName!='' and record.shopName==0) "> |
| | | and shop_name = #{record.shopName} |
| | | </if> |
| | | <if |
| | | test="(record.projTime!=null and record.projTime!='') or (record.projTime!='' and record.projTime==0) "> |
| | | test="(record.projTime!=null and record.projTime!='') or (record.projTime!='' and record.projTime==0) "> |
| | | and proj_time = #{record.projTime} |
| | | </if> |
| | | <if |
| | | test="(record.remark!=null and record.remark!='') or (record.remark!='' and record.remark==0) "> |
| | | test="(record.remark!=null and record.remark!='') or (record.remark!='' and record.remark==0) "> |
| | | and remark = #{record.remark} |
| | | </if> |
| | | <if |
| | | test="(record.orderType!=null and record.orderType!='') or (record.orderType!='' and record.orderType==0) "> |
| | | test="(record.orderType!=null and record.orderType!='') or (record.orderType!='' and record.orderType==0) "> |
| | | and order_type = #{record.orderType} |
| | | </if> |
| | | <if |
| | | test="(record.projPercentage!=null and record.projPercentage!='') or (record.projPercentage!='' and record.projPercentage==0) "> |
| | | test="(record.projPercentage!=null and record.projPercentage!='') or (record.projPercentage!='' and record.projPercentage==0) "> |
| | | and proj_percentage = #{record.projPercentage} |
| | | </if> |
| | | <if |
| | | test="(record.t1!=null and record.t1!='') or (record.t1!='' and record.t1==0) "> |
| | | test="(record.t1!=null and record.t1!='') or (record.t1!='' and record.t1==0) "> |
| | | and t1 = #{record.t1} |
| | | </if> |
| | | <if |
| | | test="(record.t2!=null and record.t2!='') or (record.t2!='' and record.t2==0) "> |
| | | test="(record.t2!=null and record.t2!='') or (record.t2!='' and record.t2==0) "> |
| | | and t2 = #{record.t2} |
| | | </if> |
| | | <if |
| | | test="(record.achieveType!=null and record.achieveType!='') or (record.achieveType!='' and record.achieveType==0) "> |
| | | test="(record.achieveType!=null and record.achieveType!='') or (record.achieveType!='' and record.achieveType==0) "> |
| | | and achieveType = #{record.achieveType} |
| | | </if> |
| | | <if |
| | | test="(record.t4!=null and record.t4!='') or (record.t4!='' and record.t4==0) "> |
| | | test="(record.t4!=null and record.t4!='') or (record.t4!='' and record.t4==0) "> |
| | | and t4 = #{record.t4} |
| | | </if> |
| | | <if |
| | | test="(record.t5!=null and record.t5!='') or (record.t5!='' and record.t5==0) "> |
| | | test="(record.t5!=null and record.t5!='') or (record.t5!='' and record.t5==0) "> |
| | | and t5 = #{record.t5} |
| | | </if> |
| | | <if |
| | | test="(record.t6!=null and record.t6!='') or (record.t6!='' and record.t6==0) "> |
| | | test="(record.t6!=null and record.t6!='') or (record.t6!='' and record.t6==0) "> |
| | | and t6 = #{record.t6} |
| | | </if> |
| | | <if |
| | | test="(record.t8!=null and record.t8!='') or (record.t8!='' and record.t8==0) "> |
| | | test="(record.t8!=null and record.t8!='') or (record.t8!='' and record.t8==0) "> |
| | | and t8 = #{record.t8} |
| | | </if> |
| | | <if |
| | | test="(record.t9!=null and record.t9!='') or (record.t9!='' and record.t9==0) "> |
| | | test="(record.t9!=null and record.t9!='') or (record.t9!='' and record.t9==0) "> |
| | | and t9 = #{record.t9} |
| | | </if> |
| | | </if> |
| | |
| | | |
| | | <!-- 插入方法 --> |
| | | <insert id="insert" parameterType="com.matrix.system.hive.bean.AchieveNew" |
| | | useGeneratedKeys="true" keyProperty="item.id"> |
| | | useGeneratedKeys="true" keyProperty="item.id"> |
| | | INSERT INTO achieve_new ( |
| | | <include refid="columns"></include> |
| | | ) |
| | |
| | | ) |
| | | VALUES |
| | | <foreach collection="list" item="item" index="index" |
| | | separator=","> |
| | | separator=","> |
| | | ( |
| | | <include refid="propertys"></include> |
| | | ) |
| | |
| | | UPDATE achieve_new set datatime = #{record.datatime} |
| | | <where> |
| | | <if |
| | | test="(record.id!=null and record.id!='') or (record.id!='' and record.id==0) "> |
| | | test="(record.id!=null and record.id!='') or (record.id!='' and record.id==0) "> |
| | | and id = #{record.id} |
| | | </if> |
| | | <if |
| | | test="(record.orderId!=null and record.orderId!='') or (record.orderId!='' and record.orderId==0) "> |
| | | test="(record.orderId!=null and record.orderId!='') or (record.orderId!='' and record.orderId==0) "> |
| | | and order_id = #{record.orderId} |
| | | </if> |
| | | <if |
| | | test="(record.serviceOrderId!=null and record.serviceOrderId!='') or (record.serviceOrderId!='' and record.serviceOrderId==0) "> |
| | | test="(record.serviceOrderId!=null and record.serviceOrderId!='') or (record.serviceOrderId!='' and record.serviceOrderId==0) "> |
| | | and service_order_id = #{record.serviceOrderId} |
| | | </if> |
| | | </where> |
| | |
| | | vip_id = #{record.vipId}, |
| | | </if> |
| | | <if |
| | | test="record.freeConsume != null and record.freeConsume != '' "> |
| | | test="record.freeConsume != null and record.freeConsume != '' "> |
| | | free_consume = #{record.freeConsume}, |
| | | </if> |
| | | <if test="record.hisConsume != null "> |
| | |
| | | <delete id="deleteByIds" parameterType="java.util.List"> |
| | | delete from achieve_new where id in |
| | | <foreach collection="list" index="index" item="item" open="(" |
| | | separator="," close=")"> |
| | | separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </delete> |
| | |
| | | |
| | | <!-- 查询总条数 --> |
| | | <select id="selectTotalRecord" |
| | | resultType="java.lang.Integer"> |
| | | resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from achieve_new |
| | | where 1=1 |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectVipConsumeStatisticsList" resultMap="AchieveNewMap"> |
| | | <select id="selectVipConsumeStatisticsList" resultType="java.util.HashMap"> |
| | | select |
| | | a.VIP_NAME, |
| | | a.PHONE t9, |
| | | GROUP_CONCAT(DISTINCT e.su_name) meiliao, |
| | | d.cnt arrive_cnt, |
| | | sum(b.buyConsume) goods_cash, |
| | | sum(b.freeConsume) free_consume, |
| | | sum(b.hisConsume) his_consume |
| | | a.VIP_NAME vipName, |
| | | a.PHONE t9, |
| | | b.su_name meiliao, |
| | | (SELECT sum(IFNULL(goods_cash,0)) from achieve_new where pay_method='现金' and VIP_ID=a.id |
| | | <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> |
| | | <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'goodsCash' , |
| | | (SELECT sum(IFNULL(goods_cash,0)) from achieve_new where pay_method='划扣' and VIP_ID=a.id |
| | | <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> |
| | | <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if>) as 'cardCash' , |
| | | (SELECT sum(IFNULL(free_consume,0)) from achieve_new where VIP_ID=a.id |
| | | <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> |
| | | <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'freeConsume' , |
| | | (SELECT sum(IFNULL(number_of_people,0)) from achieve_new where VIP_ID=a.id |
| | | <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> |
| | | <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'arriveCnt' , |
| | | (SELECT sum(IFNULL(his_consume,0)) from achieve_new where VIP_ID=a.id |
| | | <if test="record.beginTime != null"> and date_format(datatime, '%Y-%m-%d') >= date_format(#{record.beginTime}, '%Y-%m-%d') </if> |
| | | <if test="record.endTime != null"> <![CDATA[ and date_format(datatime, '%Y-%m-%d') < date_format(#{record.endTime}, '%Y-%m-%d') ]]> </if> ) as 'hisConsume' |
| | | from sys_vip_info a |
| | | inner join ( |
| | | select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) )) buyConsume from achieve_new a group by vip_id |
| | | ) b on a.ID = b.vip_id |
| | | inner join ( |
| | | select vip_id, count(1) cnt from ( |
| | | select vip_id, date_format(datatime, '%Y-%m-%d') |
| | | from achieve_new |
| | | group by date_format(datatime, '%Y-%m-%d'), vip_id |
| | | ) c group by vip_id |
| | | ) d on a.ID=d.vip_id |
| | | left join sys_users b on a.BEATUY_ID=b.su_id |
| | | inner join sys_shop_info c on c.id=a.SHOP_ID |
| | | <where> |
| | | |
| | | left join sys_users e on find_in_set(e.su_id, a.BEATUY_ID) |
| | | where 1=1 |
| | | <if test="record.vipName != null and record.vipName !=''"> |
| | | and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) |
| | | </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(b.datatime, '%Y-%m-%d') >= date_format(#{record.endTime}, '%Y-%m-%d') |
| | | </if> |
| | | <if test="record.beaultId != null and record.beaultId!=''"> |
| | | and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) |
| | | </if> |
| | | <if test='record.t1 == "on"'> |
| | | and a.BEATUY_ID is not null |
| | | </if> |
| | | group by a.PHONE |
| | | <if test="record.vipName != null and record.vipName !=''"> |
| | | and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) |
| | | </if> |
| | | <if test="record.shopId != null"> |
| | | and a.shop_id=#{record.shopId} |
| | | </if> |
| | | <if test="record.beaultId != null and record.beaultId!=''"> |
| | | and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) |
| | | </if> |
| | | <if test='record.t1 == "on"'> |
| | | and a.BEATUY_ID is not null |
| | | </if> |
| | | </where> |
| | | <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> |
| | | <if test="pageVo.sort !=null and pageVo.order !=null"> |
| | | order by |
| | |
| | | <select id="selectVipConsumeStatisticsTotal" resultType="java.lang.Integer"> |
| | | select count(1) |
| | | from sys_vip_info a |
| | | inner join ( |
| | | select vip_id,datatime, sum(a.free_consume) freeConsume, sum(a.his_consume) hisConsume, sum(IFNULL(goods_cash, 0) ) buyConsume from achieve_new a group by vip_id |
| | | ) b on a.ID = b.vip_id |
| | | inner join ( |
| | | select vip_id, count(1) cnt from ( |
| | | select vip_id, date_format(datatime, '%Y-%m-%d') |
| | | from achieve_new |
| | | group by date_format(datatime, '%Y-%m-%d'), vip_id |
| | | ) c group by vip_id |
| | | ) d on a.ID=d.vip_id |
| | | left join sys_users b on a.BEATUY_ID=b.su_id |
| | | inner join sys_shop_info c on c.id=a.SHOP_ID |
| | | <where> |
| | | |
| | | left join sys_users e on find_in_set(e.su_id, a.BEATUY_ID) |
| | | where 1=1 |
| | | <if test="record.vipName != null and record.vipName !=''"> |
| | | and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) |
| | | </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(b.datatime, '%Y-%m-%d') >= date_format(#{record.endTime}, '%Y-%m-%d') |
| | | </if> |
| | | <if test="record.beaultId != null and record.beaultId!=''"> |
| | | and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) |
| | | </if> |
| | | <if test='record.t1 == "on"'> |
| | | and a.BEATUY_ID is not null |
| | | </if> |
| | | <if test="record.vipName != null and record.vipName !=''"> |
| | | and (a.vip_name like CONCAT(CONCAT('%', #{record.vipName}), '%') or a.vip_no=#{record.vipName} or a.phone = #{record.vipName}) |
| | | </if> |
| | | <if test="record.shopId != null"> |
| | | and a.shop_id=#{record.shopId} |
| | | </if> |
| | | <if test="record.beaultId != null and record.beaultId!=''"> |
| | | and FIND_IN_SET(#{record.beaultId}, a.BEATUY_ID) |
| | | </if> |
| | | <if test='record.t1 == "on"'> |
| | | and a.BEATUY_ID is not null |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | select |
| | | sale_id id, |
| | | (select ifnull(sum(case pay_method when '现金' then goods_cash else 0 end),0) |
| | | from achieve_new a |
| | | where a.beault_id=#{userId} |
| | | and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d')) |
| | | from achieve_new a |
| | | where a.beault_id=#{userId} |
| | | and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d')) |
| | | ) orderCash, |
| | | (select ifnull(sum(case pay_method when '划扣' then goods_cash else 0 end),0) |
| | | from achieve_new a |
| | | where a.beault_id=#{userId} |
| | | and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d')) |
| | | from achieve_new a |
| | | where a.beault_id=#{userId} |
| | | and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d')) |
| | | ) cash, |
| | | sum(case order_type when '订单' then proj_percentage else 0 end) cardUse, |
| | | sum(IFNULL(his_consume, 0)) hisConsume, |
| | |
| | | sum(case order_type when '服务单' then proj_percentage else 0 end) projCommission |
| | | from achieve_new a |
| | | where a.beault_id=#{userId} |
| | | and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d')) |
| | | and (date_format(datatime, '%Y-%m-%d') >= date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') >= date_format(datatime, '%Y-%m-%d')) |
| | | </select> |
| | | |
| | | <select id="selectApiOrderItemAchieve" resultType="com.matrix.system.app.vo.OrderDetailAchieveItemVo"> |
| | |
| | | b.su_name name, |
| | | IFNULL(a.goods_cash, 0) achieve |
| | | from achieve_new a |
| | | inner join sys_users b on (a.beault_id=b.su_id or a.sale_id = b.su_id) |
| | | inner join sys_users b on (a.beault_id=b.su_id or a.sale_id = b.su_id) |
| | | where a.order_item_id=#{itemId} and order_type = '订单' |
| | | </select> |
| | | |
| | | <select id="selectShopConsumeAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo"> |
| | | select |
| | | b.shop_short_name name, |
| | | b.SHOP_IMAG photo, |
| | | sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume,0)) amount |
| | | b.shop_short_name name, |
| | | b.SHOP_IMAG photo, |
| | | sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume,0)) amount |
| | | from achieve_new a |
| | | left join sys_shop_info b on a.shop_id=b.ID and b.shop_type!=1 |
| | | <where> |
| | |
| | | |
| | | <select id="selectBeauticianConsumeAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo"> |
| | | select |
| | | b.su_name name, |
| | | b.su_id id, |
| | | b.su_photo photo, |
| | | sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume, 0) ) amount, |
| | | c.shop_short_name shopName |
| | | b.su_name name, |
| | | b.su_id id, |
| | | b.su_photo photo, |
| | | sum(IFNULL(a.free_consume,0) + IFNULL(a.his_consume, 0) ) amount, |
| | | c.shop_short_name shopName |
| | | from achieve_new a |
| | | inner join sys_users b on a.beault_id=b.su_id |
| | | left join sys_shop_info c on a.shop_id=c.ID |
| | |
| | | c.su_name meiliao, |
| | | TRUNCATE(d.count*d.zk_price,2) zk_total |
| | | from achieve_new a |
| | | left join shopping_goods b on a.shopping_goods_id=b.id |
| | | left join sys_users c on a.beault_id=c.su_id |
| | | left join sys_order_item d on a.order_item_id=d.id |
| | | left join shopping_goods b on a.shopping_goods_id=b.id |
| | | left join sys_users c on a.beault_id=c.su_id |
| | | left join sys_order_item d on a.order_item_id=d.id |
| | | where a.order_id=#{orderId} |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectShopSaleAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo"> |
| | | select |
| | | b.shop_short_name name, |
| | | b.SHOP_IMAG photo, |
| | | sum(IFNULL(a.amount,0)) amount |
| | | b.shop_short_name name, |
| | | b.SHOP_IMAG photo, |
| | | sum(IFNULL(a.amount,0)) amount |
| | | from sys_order_flow a |
| | | inner join sys_order c on a.order_id=c.id and c.STATU != '已取消' |
| | | inner join sys_shop_info b on a.shop_id=b.id and shop_type!=1 |
| | |
| | | <select id="achieveNewStatistics" resultType="com.matrix.system.hive.vo.AchieveNewStatisticsVo"> |
| | | |
| | | select |
| | | u.name ruleName, |
| | | f.su_name guwen, |
| | | f.su_id gwid, |
| | | g.su_name createBy, |
| | | g.su_id createId, |
| | | cast(SUM(b.ZK_TOTAL) AS decimal(15,2)) as zk_total, |
| | | cast(SUM(a.his_consume) AS decimal(15,2)) his_consume, |
| | | cast(SUM(a.free_consume) AS decimal(15,2)) free_consume, |
| | | cast(SUM(a.proj_percentage) AS decimal(15,2)) proj_percentage, |
| | | cast(SUM(a.number_of_people) AS decimal(15,2)) number_of_people, |
| | | cast(SUM(a.proj_num) AS decimal(15,2)) proj_num, |
| | | cast(SUM(case when a.pay_method = '划扣' then goods_cash end )AS decimal(15,2)) card_cash, |
| | | cast(SUM(a.proj_time) AS decimal(15,2)) proj_time, |
| | | cast(SUM(case when a.pay_method = '现金' then goods_cash end )AS decimal(15,2)) goods_cash, |
| | | h.shop_short_name shop_name, |
| | | a.order_type |
| | | u.name ruleName, |
| | | f.su_name guwen, |
| | | f.su_id gwid, |
| | | g.su_name createBy, |
| | | g.su_id createId, |
| | | cast(SUM(b.ZK_TOTAL) AS decimal(15,2)) as zk_total, |
| | | cast(SUM(a.his_consume) AS decimal(15,2)) his_consume, |
| | | cast(SUM(a.free_consume) AS decimal(15,2)) free_consume, |
| | | cast(SUM(a.proj_percentage) AS decimal(15,2)) proj_percentage, |
| | | cast(SUM(a.number_of_people) AS decimal(15,2)) number_of_people, |
| | | cast(SUM(a.proj_num) AS decimal(15,2)) proj_num, |
| | | cast(SUM(case when a.pay_method = '划扣' then goods_cash end )AS decimal(15,2)) card_cash, |
| | | cast(SUM(a.proj_time) AS decimal(15,2)) proj_time, |
| | | cast(SUM(case when a.pay_method = '现金' then goods_cash end )AS decimal(15,2)) goods_cash, |
| | | h.shop_short_name shop_name, |
| | | a.order_type |
| | | from |
| | | achieve_new 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_vip_level d on c.LEVEL_ID=d.id |
| | | left join shopping_goods e on a.shopping_goods_id=e.id |
| | | LEFT JOIN sys_users f on a.beault_id=f.su_id |
| | | LEFT JOIN sys_users g on a.sale_id = g.su_id |
| | | LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID |
| | | LEFT JOIN shopping_goods_category i ON e.cate_id = i.id |
| | | left join sys_proj_services l on a.service_order_id=l.id |
| | | left join sys_order_item j on a.order_item_id=j.ID |
| | | left join achieve_rule u on u.id=e.achieve_rule_id |
| | | achieve_new 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_vip_level d on c.LEVEL_ID=d.id |
| | | left join shopping_goods e on a.shopping_goods_id=e.id |
| | | LEFT JOIN sys_users f on a.beault_id=f.su_id |
| | | LEFT JOIN sys_users g on a.sale_id = g.su_id |
| | | LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID |
| | | LEFT JOIN shopping_goods_category i ON e.cate_id = i.id |
| | | left join sys_proj_services l on a.service_order_id=l.id |
| | | left join sys_order_item j on a.order_item_id=j.ID |
| | | left join achieve_rule u on u.id=e.achieve_rule_id |
| | | <where> |
| | | and a.company_id = #{record.companyId} |
| | | <if test="record.shopId != null"> |
| | |
| | | </if> |
| | | |
| | | <if test="record.staffName != null and record.staffName!=''"> |
| | | <!-- 创建人和归属人都有业绩 --> |
| | | <!-- 创建人和归属人都有业绩 --> |
| | | and (f.su_name like concat('%',#{record.staffName},'%') or g.su_name like concat('%',#{record.staffName},'%') ) |
| | | </if> |
| | | |
| | |
| | | group by b.id) t |
| | | </select> |
| | | |
| | | <!-- 美度不显示赠送金额 IFNULL(sum(IFNULL(gift_money, 0)),0)+--> |
| | | <select id="selectVipCardTotalMoney" resultType="java.lang.Double"> |
| | | SELECT IFNULL(sum(IFNULL(gift_money, 0)),0)+ IFNULL(sum(IFNULL(real_money, 0)),0) from money_card_use where vip_id=#{vipId} and `status` ='有效' |
| | | |
| | | SELECT IFNULL(sum(IFNULL(real_money, 0)),0) from money_card_use where vip_id=#{vipId} and `status` ='有效' |
| | | </select> |
| | | |
| | | |
| | |
| | | left join shopping_goods f on e.proj_id=f.id |
| | | where 1=1 and a.type='套餐' and a.TAOCAN_ID IS NULL |
| | | <if test="record.queryKey != null and record.queryKey !='' "> |
| | | and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(goods_no, #{record.queryKey})) |
| | | and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(b.goods_no, #{record.queryKey})) |
| | | </if> |
| | | <if test="record.isOver != null and record.isOver !='' "> |
| | | and a.IS_OVER = #{record.isOver} |
| | |
| | | <if test="(record.shopId!=null and record.shopId!='') or (record.shopId!='' and record.shopId==0) "> |
| | | and shop_id = #{record.shopId} |
| | | </if> |
| | | <if test="(record.companyId!=null and record.companyId!='') or (record.companyId!='' and record.companyId==0) "> |
| | | and company_id = #{record.companyId} |
| | | </if> |
| | | </if> |
| | | |
| | | </sql> |
| | |
| | | <if test="record.shopId != null "> |
| | | shop_id = #{record.shopId}, |
| | | </if> |
| | | <if test="record.companyId != null "> |
| | | company_id = #{record.companyId}, |
| | | </if> |
| | | </set> |
| | | WHERE id=#{record.id} |
| | | </update> |
| | |
| | | layer.confirm('确定取消此订单?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/cancelOrder?id='+id, {}, function(data){ |
| | | $.post(basePath+'/admin/projService/erpCancelOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | |
| | | layer.confirm('确定取消此订单?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/order/cancelOrder?id='+id+'&del=0', {}, function(data){ |
| | | $.post(basePath+'/admin/order/erpCancelOrder?id='+id+'&del=0', {}, function(data){ |
| | | if (data.status == '200') { |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | } else { |
| | |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>日期范围</label> |
| | | <input autocomplete="off" name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">- |
| | | <input autocomplete="off" name="endTime" type="text" class="form-control datetimepicker" id="endTime"> |
| | | <label>日期</label> |
| | | <input autocomplete="off" name="beginTime" type="text" class="form-control datetimepicker" id="beginTime"> |
| | | <!-- <input autocomplete="off" name="endTime" type="text" class="form-control datetimepicker" id="endTime">--> |
| | | </div> |
| | | <div class="form-group mr-20"> |
| | | <label >所属门店</label> <select id="select_id" |
| | |
| | | <tr> |
| | | <th data-formatter="MGrid.indexfn" data-align="center" |
| | | data-width="30px" data-footer-formatter="footCountTitle">序号</th> |
| | | <th data-field="time">日期</th> |
| | | <th data-field="shopName" >门店</th> |
| | | <th data-field="cashPay" data-footer-formatter="countColumn">收现金额</th> |
| | | <th data-field="cardPay" data-footer-formatter="countColumn">实收余额支付</th> |
| | | <th data-field="consumePay" data-footer-formatter="countColumn">消耗金额</th> |
| | | <th data-field="freeConsumePay" data-footer-formatter="countColumn">赠送消耗</th> |
| | | <th data-field="dataTime">日期</th> |
| | | <th data-field="cashPay" data-footer-formatter="countColumn">现金收款</th> |
| | | <th data-field="arrearsPay" data-footer-formatter="countColumn">欠款</th> |
| | | <th data-field="" data-footer-formatter="countColumn">还款</th> |
| | | <th data-field="productAchieve" data-footer-formatter="countColumn">产品业绩</th> |
| | | <th data-field="cardAchieve" data-footer-formatter="countColumn">卡项业绩</th> |
| | | <th data-field="refundCashPay" data-footer-formatter="countColumn">现金退款</th> |
| | | <th data-field="refundCardPay" data-footer-formatter="countColumn">卡项退款</th> |
| | | <th data-field="arrearsPay" data-footer-formatter="countColumn">欠款</th> |
| | | <th data-field="cardAmount" data-footer-formatter="countColumn">储值卡本金扣款</th> |
| | | <th data-field="cardFreeAmount" data-footer-formatter="countColumn">储值卡赠送扣款</th> |
| | | <th data-field="consumePay" data-footer-formatter="countColumn">本金消耗</th> |
| | | <th data-field="freeConsumePay" data-footer-formatter="countColumn">赠送消耗</th> |
| | | <th data-field="peopleCnt" data-footer-formatter="countColumn">人头数</th> |
| | | <th data-field="projConsumeCnt" data-footer-formatter="countColumn">项目消耗数</th> |
| | | <th data-field="timeLength" data-footer-formatter="countColumn">服务时长</th> |
| | | <th data-field="perCustomCnt" data-footer-formatter="countColumn">客单数</th> |
| | | <th data-field="customGoodsCnt" data-footer-formatter="countColumn">客品数</th> |
| | | <th data-field="perCustomPrice" data-footer-formatter="countColumn">客单价</th> |
| | | <th data-field="cost" data-footer-formatter="countColumn">成本</th> |
| | | <th data-field="grossProfit" data-footer-formatter="countColumn">毛利</th> |
| | | <th data-field="grossProfitRate" data-footer-formatter="countColumn">毛利率</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | $(function() { |
| | | MTools.autoFullSelect(); |
| | | myGrid = MGrid.initGrid({ |
| | | url : basePath+"/admin/sysBusinessData/showList", |
| | | url : basePath+"/admin/sysBusinessData/findShopBusinessesData", |
| | | showExport : true, |
| | | showFooter : true, |
| | | height:'', |
| | |
| | | return "<b>合计</b>"; |
| | | }; |
| | | function countColumn(data) { |
| | | console.log(data) |
| | | field = this.field; |
| | | var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { |
| | | console.log(sum,row[field]); |
| | | return sum + (+row[field]); |
| | | }, 0)).toFixed(2));//保留有效数字 |
| | | return "<b>"+resultsumQuantity+"</b>"; |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row class="vertical "> |
| | | <el-select v-model="goodsType" placeholder="商品类型" style="width: 120px" > |
| | | <el-option |
| | | v-for="item in goodsTypeList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-input class="searchInput" @input="searchGoods()" v-model="queryKey" |
| | | placeholder="搜索添加产品"></el-input> |
| | | <el-button @click="searchGoods()" type="primary">搜索</el-button> |
| | |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | |
| | | goodsType:"", |
| | | goodsTypeList:[{value:"",label:"全部"},{value:"套餐",label:"套餐"},{value:"项目",label:"项目"},{value:"充值卡",label:"充值卡"}], |
| | | //业绩设置框 |
| | | drawer: false, |
| | | direction: 'rtl', |
| | |
| | | app: _this, |
| | | contentType: 'application/x-www-form-urlencoded', |
| | | //TODO 优化下拉加载 |
| | | data: {name: _this.queryKey, limit: pageSize, offset : offset}, |
| | | data: {name: _this.queryKey,goodType:_this.goodsType , limit: pageSize, offset : offset}, |
| | | url: basePath + "/admin/shoppinggoods/showList", |
| | | callback: function (data) { |
| | | _this.searchTableData = data.rows; |
| | |
| | | <input autocomplete="off" name="closureTime" type="text" |
| | | class="form-control datetimepicker" id="endTime"> |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label >所属门店</label> |
| | | <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId" |
| | | th:data-url="@{/admin/shopInfo/findAll}"> |
| | | <option value=''>--请选择部所属门店--</option> |
| | | </select> |
| | | </div> |
| | | <input type="hidden" value="待预约" name="state" id="state"/> |
| | | <div class="form-group mr-20"> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn4" value="">全部</button> |
| | |
| | | <th data-field="totalTime" data-sortable="true">服务时长</th> |
| | | <th data-field="isOverTime" data-formatter="overTime">超时时间</th> |
| | | <th data-field="createStaffName">下单顾问</th> |
| | | <th data-field="shopName">门店</th> |
| | | <th data-sortable="true" data-field="id" data-formatter="buidOperate">操作</th> |
| | | </tr> |
| | | </thead> |
| | |
| | | <input autocomplete="off" name="endTimeVo" type="text" class="form-control datetimepicker" id="endTime"> |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label >所属门店</label> |
| | | <select class="form-control autoFull" data-filed="shopName" name="shopId" id="shopId" |
| | | th:data-url="@{/admin/shopInfo/findAll}"> |
| | | <option value=''>--请选择部所属门店--</option> |
| | | </select> |
| | | </div> |
| | | |
| | | <input autocomplete="off" type="hidden" name="statu" value="待付款" id="statu"/> |
| | | <div class="form-group mr-20"> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn0" value="" >全部</button> |
| | |
| | | |
| | | <th data-field="statu">订单状态</th> |
| | | <th data-field="remark">备注</th> |
| | | <th data-field="shopName">门店</th> |
| | | |
| | | </tr> |
| | | </thead> |
| | |
| | | </tr> |
| | | |
| | | <tr v-for="(item,index) in projService.serviceItems"> |
| | | <td>{{item.projInfo.name}}</td> |
| | | <td>{{item.projInfo.name}}【{{item.projUse.source}}】</td> |
| | | <td>{{item.count}}</td> |
| | | <td>{{item.projUse.price * item.count}}</td> |
| | | <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td> |
| | |
| | | </tr> |
| | | <template v-for="item in projService.serviceItems"> |
| | | <tr > |
| | | <td style="text-align: left;" colspan="4" >{{item.projInfo.name }}</td> |
| | | <td style="text-align: left;" colspan="4" >{{item.projInfo.name }}【{{item.projUse.source}}】</td> |
| | | </tr> |
| | | <tr > |
| | | <td>{{item.count }}</td> |
| | |
| | | </div> |
| | | |
| | | <div class="form-group mr-20"> |
| | | <label>日期范围</label> |
| | | <input autocomplete="off" name="beginTime" type="text" class="form-control datetimepicker" id="beginTime">- |
| | | <input autocomplete="off" name="endTime" type="text" class="form-control datetimepicker" id="endTime"> |
| | | <label>日期</label> |
| | | <input autocomplete="off" name="beginTime" type="text" class="form-control datetimepicker" id="beginTime"> |
| | | <!-- <input autocomplete="off" name="endTime" type="text" class="form-control datetimepicker" id="endTime">--> |
| | | </div> |
| | | |
| | | </form> |
| | |
| | | <tr> |
| | | <th data-formatter="MGrid.indexfn" data-align="center" |
| | | data-width="30px" data-footer-formatter="footCountTitle">序号</th> |
| | | <th data-field="time">日期</th> |
| | | <th data-field="cashPay" data-footer-formatter="countColumn">收现金额</th> |
| | | <th data-field="cardPay" data-footer-formatter="countColumn">实收余额支付</th> |
| | | <th data-field="consumePay" data-footer-formatter="countColumn">消耗金额</th> |
| | | <th data-field="freeConsumePay" data-footer-formatter="countColumn">赠送消耗</th> |
| | | <th data-field="dataTime">日期</th> |
| | | <th data-field="cashPay" data-footer-formatter="countColumn">现金收款</th> |
| | | <th data-field="arrearsPay" data-footer-formatter="countColumn">欠款</th> |
| | | <th data-field="" data-footer-formatter="countColumn">还款</th> |
| | | <th data-field="productAchieve" data-footer-formatter="countColumn">产品业绩</th> |
| | | <th data-field="cardAchieve" data-footer-formatter="countColumn">卡项业绩</th> |
| | | <th data-field="refundCashPay" data-footer-formatter="countColumn">现金退款</th> |
| | | <th data-field="refundCardPay" data-footer-formatter="countColumn">卡项退款</th> |
| | | <th data-field="arrearsPay" data-footer-formatter="countColumn">欠款</th> |
| | | <th data-field="cardAmount" data-footer-formatter="countColumn">储值卡本金扣款</th> |
| | | <th data-field="cardFreeAmount" data-footer-formatter="countColumn">储值卡赠送扣款</th> |
| | | <th data-field="consumePay" data-footer-formatter="countColumn">本金消耗</th> |
| | | <th data-field="freeConsumePay" data-footer-formatter="countColumn">赠送消耗</th> |
| | | <th data-field="peopleCnt" data-footer-formatter="countColumn">人头数</th> |
| | | <th data-field="projConsumeCnt" data-footer-formatter="countColumn">项目消耗数</th> |
| | | <th data-field="timeLength" data-footer-formatter="countColumn">服务时长</th> |
| | | <th data-field="perCustomCnt" data-footer-formatter="countColumn">客单数</th> |
| | | <th data-field="customGoodsCnt" data-footer-formatter="countColumn">客品数</th> |
| | | <th data-field="perCustomPrice" data-footer-formatter="countColumn">客单价</th> |
| | | <th data-field="cost" data-footer-formatter="countColumn">成本</th> |
| | | <th data-field="grossProfit" data-footer-formatter="countColumn">毛利</th> |
| | | <th data-field="grossProfitRate" data-footer-formatter="countColumn">毛利率</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | $(function() { |
| | | MTools.autoFullSelect(); |
| | | myGrid = MGrid.initGrid({ |
| | | url : basePath+"/admin/sysBusinessData/showList", |
| | | url : basePath+"/admin/sysBusinessData/findShopBusinessesData", |
| | | showExport : true, |
| | | showFooter : true, |
| | | height:'', |
| | |
| | | return "<b>合计</b>"; |
| | | }; |
| | | function countColumn(data) { |
| | | console.log(data) |
| | | field = this.field; |
| | | var resultsumQuantity = parseFloat((data.reduce(function(sum, row) { |
| | | console.log(sum,row[field]); |
| | | return sum + (+row[field]); |
| | | }, 0)).toFixed(2));//保留有效数字 |
| | | return "<b>"+resultsumQuantity+"</b>"; |
| | |
| | | MTools.ininDatetimepicker(".datetimepicker"); |
| | | var delUrl=""; |
| | | myGrid=MGrid.initGrid({ |
| | | url:basePath+"/admin/sysVipInfo/showList", |
| | | url:basePath+"/admin/vipInfo/showVipInfoList", |
| | | delUrl:delUrl, |
| | | }); |
| | | |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">可查询所有门店客户</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" name="coustomer"> |
| | | <option th:selected="${obj?.coustomer == '是'}" >是</option> |
| | | <option th:selected="${obj?.coustomer == '否'}" >否</option> |
| | | <select class="form-control" name="customer"> |
| | | <option th:selected="${obj?.customer == '是'}" >是</option> |
| | | <option th:selected="${obj?.customer == '否'}" >否</option> |
| | | </select> |
| | | </div> |
| | | <label class="col-sm-2 control-label">是否允许门店分配本角色</label> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">网站地址</label> |
| | | <div class="col-sm-4"> |
| | | <input type="text" dataType="url" class="form-control" |
| | | <input type="text" class="form-control" |
| | | ignore="ignore" th:value="${obj.comWebUrl }" name="comWebUrl" |
| | | nullmsg="网站不能为空"> |
| | | <div class="Validform_checktip"></div> |
| | |
| | | newSettings.add(newSetting7); |
| | | |
| | | |
| | | ParameterSettings newSetting8=new ParameterSettings(); |
| | | newSetting8.setCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER); |
| | | newSetting8.setName("门店是否只能取消待付款订单,服务单"); |
| | | newSetting8.setType(1); |
| | | newSetting8.setCategory("店务配置"); |
| | | newSettings.add(newSetting8); |
| | | |
| | | |
| | | for (ParameterSettings newSetting : newSettings) { |
| | | List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting); |
| | | if(CollectionUtil.isEmpty(parameterSettings)){ |
| | |
| | | var api = require('utils/service-api.js'); |
| | | App({ |
| | | |
| | | baseUrl: "https://xcxhive2.jyymatrix.cc", |
| | | baseUrl: "https://filehive2.jyymatrix.cc/xcxapi", |
| | | // baseUrl : "http://localhost:8080", |
| | | |
| | | //登录后获得的token |
| | |
| | | * 通用js |
| | | */ |
| | | |
| | | var debugHost='www.baidu.com'; |
| | | var debugHost='taiyan'; |
| | | |
| | | // api地址,请求参数,回调函数,是否遮罩 |
| | | function request(params) { |
| | |
| | | method: "POST", |
| | | header: { |
| | | 'content-type': 'application/json', |
| | | 'debugHost':debugHost |
| | | // 'host':'www.jyymatrix.cc' |
| | | //'debugHost':debugHost, |
| | | 'companyCode':'debugHost' |
| | | }, |
| | | data: {}, |
| | | success: function(res) { |
| | |
| | | method: option.method, |
| | | header: { |
| | | 'content-type': 'application/json', |
| | | 'debugHost':debugHost, |
| | | 'companyCode':debugHost, |
| | | 'token': getApp().loginToken |
| | | }, |
| | | data: data, |
| | |
| | | header: { |
| | | "Content-Type": "multipart/form-data", |
| | | 'token': res.data, |
| | | 'debugHost':debugHost |
| | | 'companyCode':debugHost |
| | | }, |
| | | formData: formData, |
| | | success: function(e) { |
| | |
| | | method: "POST", |
| | | header: { |
| | | 'content-type': 'application/json', |
| | | 'debugHost':debugHost |
| | | 'companyCode':debugHost |
| | | }, |
| | | data: {}, |
| | | success: function(res) { |