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.*; |
| | |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysProjServicesDao sysProjServicesDao; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | |
| | | if (StringUtils.isBlank(pageVo.getOrder())) { |
| | | pageVo.setOrder("desc"); |
| | | } |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, orderService.findInPage(sysOrder, pageVo), |
| | | orderService.findTotal(sysOrder)); |
| | | } |
| | |
| | | |
| | | //查询会有所有有效的会员卡 |
| | | result.putInMap("totalMoney", moneyCardUseDao.selectVipCardTotalMoney(order.getVipId())); |
| | | |
| | | |
| | | |
| | | return result; |
| | |
| | | } |
| | | //=======================================页面转发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.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") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 执行订单导出,总部和门店共用,但是搜索条件不一样 |
| | | * |
| | | * @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); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | 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{ |
| | | if(sysOrderItem.getPrice()<=0){ |
| | | //等于0取原价 |
| | | if (taocanId == null) { |
| | | puse.setPrice(goodsAssemble.getShoppingGoods().getPrice() ); |
| | |
| | | puse.setPrice(goodsAssemble.getPrice()); |
| | | } |
| | | } |
| | | |
| | | }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()); |
| | | } |
| | | }else{ |
| | | puse.setPrice(0D); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(newShopProductParamRefs)){ |
| | | |
| | | shopProductParamRefDao.batchInsert(newShopProductParamRefs); |
| | | } |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, "产品表"); |
| | | }else { |
| | | throw new GlobleException(SystemErrorCode.DATA_ADD_FAIL); |
| | |
| | | @Service |
| | | public class WeChatApiTools { |
| | | |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | |
| | | if (StringUtils.isBlank(bindingPhoneNumber.getPhoneNumber())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "手机号码不能为空"); |
| | | } |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | |
| | | |
| | | 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 loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | |
| | | sysVipInfo.setId(loginUser.getId()); |
| | | if(loginUser.getShopId()==null){ |
| | | sysVipInfo.setShopId(bindingPhoneNumber.getShopId()); |
| | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 手机号码解密 |
| | |
| | | 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"; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | void checkNeedToBeSalesman(SysVipInfo sysVipInfo, SysVipInfo loginUser) { |
| | | //查询是否需要自动成为分销员 |
| | | if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2) |
| | |
| | | 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()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | 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> |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectVipConsumeStatisticsList" resultMap="AchieveNewMap"> |
| | | <select id="selectVipConsumeStatisticsList" resultType="java.util.HashMap"> |
| | | select |
| | | a.VIP_NAME, |
| | | a.VIP_NAME vipName, |
| | | 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 |
| | | 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 test='record.t1 == "on"'> |
| | | and a.BEATUY_ID is not null |
| | | </if> |
| | | group by a.PHONE |
| | | </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 test='record.t1 == "on"'> |
| | | and a.BEATUY_ID is not null |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | 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) { |