Merge branch 'score_shop' into api_score_meger
13 files modified
2 files added
| | |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.3.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.guava</groupId> |
| | | <artifactId>guava</artifactId> |
| | | <version>26.0-jre</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | | <resources> |
| | |
| | | package com.matrix.core.tools; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.CommonRequest; |
| | |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.aliyuncs.http.MethodType; |
| | | import com.google.gson.JsonObject; |
| | | import com.matrix.config.properties.AliSmsProperties; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.system.hive.bean.SysSmsTemplate; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | CommonRequest request = commonRequest(SysSmsTemplate.SMS_ACTION_SEND); |
| | | request.putQueryParameter("PhoneNumbers", phoneNum); |
| | | request.putQueryParameter("TemplateCode", templateCode); |
| | | String jsonStr = JSONObject.toJSONString(values); |
| | | request.putQueryParameter("TemplateParam", jsonStr); |
| | | request.putQueryParameter("TemplateParam", JSONUtil.parse(values).toString()); |
| | | |
| | | CommonResponse response = null; |
| | | try { |
| | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public AjaxResult confirmServiceOrder(@RequestBody @Validated IdSubmitDto idSubmitDto) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(idSubmitDto.getId()); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = projServicesService.modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=projServicesService.findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | int i=projServicesService.confirmServiceOrder(idSubmitDto.getId()); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | |
| | | * 门店是否只能取消待付款订单,服务单 |
| | | */ |
| | | public static final String SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER = "shopManageAbleCancelDfkOrder"; |
| | | /** |
| | | * 服务记录跟进模板 |
| | | */ |
| | | public static final String SERVICE_FLOW_TEMPLATE = "SERVICE_FLOW_TEMPLATE"; |
| | | /** |
| | | * 开启短信提醒 |
| | | */ |
| | | public static final String OPEN_SMS_NOTICE = "OPEN_SMS_NOTICE"; |
| | | |
| | | /** |
| | | * 赠送金额购买产品算赠送购买 |
| | |
| | | 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.app.dto.IdSubmitDto; |
| | | 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.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public @ResponseBody AjaxResult confirmServiceOrder(Long id) { |
| | | int i=sysProjServicesService.confirmServiceOrder(id); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | |
| | | 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)) { |
| | | && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DQR)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待预约订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(services); |
| | | return erpCancelOrder(services); |
| | | } |
| | | /** |
| | | * 根据id取消预约 |
| | |
| | | int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto); |
| | | |
| | | public boolean skipServiceOrderStep(String step); |
| | | |
| | | /** |
| | | * 确认服务单 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int confirmServiceOrder(Long id); |
| | | } |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TaiYanAliyunSmsService.java |
| | | * packageName: com.matrix.system.hive.service |
| | | * date: 2021-10-28 11:18 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import com.google.common.collect.Maps; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.SmsUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TaiYanAliyunSmsService |
| | | * @packageName: com.matrix.system.hive.service |
| | | * @description: 肽妍短信提醒服务 |
| | | * @data: 2021-10-28 11:18 |
| | | **/ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class TaiYanAliyunSmsService { |
| | | |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | SmsUtils smsUtils; |
| | | |
| | | SysShopInfoService shopInfoService; |
| | | |
| | | SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 预约成功短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | @Async |
| | | public void sendYycgNotice(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return; |
| | | } |
| | | if (isCloseSmsNotice(services)){ |
| | | return; |
| | | } |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | | LogUtil.debug("发送阿里云预约成功短信,手机号={}", sysVipInfo.getPhone()); |
| | | if (StringUtils.isNotBlank(sysVipInfo.getPhone())) { |
| | | HashMap<String, String> param = Maps.newHashMap(); |
| | | param.put("date", date); |
| | | param.put("tel", shopInfo.getShopTel()); |
| | | param.put("shopName", shopInfo.getShopName()); |
| | | smsUtils.sendSms(sysVipInfo.getPhone(), "SMS_226995798", param); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断是否开启了短信提醒 |
| | | * @param services |
| | | * @return |
| | | */ |
| | | private boolean isCloseSmsNotice(SysProjServices services) { |
| | | BusParameterSettings openSmsNoticeSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.OPEN_SMS_NOTICE, services.getCompanyId()); |
| | | if (StringUtils.isBlank(openSmsNoticeSetting.getParamValue()) |
| | | || AppConstance.IS_N.equals(openSmsNoticeSetting.getParamValue())) { |
| | | LogUtil.debug("未开启短信提醒"); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目划扣短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | @Async |
| | | public void sendHkNotice(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return; |
| | | } |
| | | if (isCloseSmsNotice(services)){ |
| | | return; |
| | | } |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | | |
| | | List<SysBeauticianState> items = sysBeauticianStateService.findBySerId(services.getId()); |
| | | for (SysBeauticianState item : items) { |
| | | if (item.getProjInfo() != null) { |
| | | String projName = item.getProjInfo().getName(); |
| | | LogUtil.debug("发送阿里云项目划扣短信,手机号={}", sysVipInfo.getPhone()); |
| | | if (StringUtils.isNotBlank(sysVipInfo.getPhone())) { |
| | | HashMap<String, String> param = Maps.newHashMap(); |
| | | param.put("date", date); |
| | | param.put("projName", projName); |
| | | param.put("count", item.getCount() + ""); |
| | | param.put("balanceCount", item.getProjUse().getSurplusCount() + ""); |
| | | param.put("tel", shopInfo.getShopTel()); |
| | | param.put("shopName", shopInfo.getShopName()); |
| | | smsUtils.sendSms(sysVipInfo.getPhone(), "SMS_226995796", param); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | |
| | | // 更新收款时间 |
| | | pageOrder.setPayTime(new Date()); |
| | | pageOrder.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | sysOrderDao.update(pageOrder); |
| | | updateOrderInfo(pageOrder); |
| | | |
| | | // 获取用户信息 |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(pageOrder.getVipId()); |
| | |
| | | //设置会员积分 |
| | | addVipScore(pageOrder); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 付款后更新订单信息 |
| | | * @param pageOrder |
| | | */ |
| | | private void updateOrderInfo(SysOrder pageOrder) { |
| | | pageOrder.setPayTime(new Date()); |
| | | pageOrder.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | List<SysOrderFlow> flows = pageOrder.getFlows(); |
| | | |
| | | BigDecimal cashPayAmount = flows.stream() |
| | | .filter(item -> (!item.getPayMethod().equals("储值卡")) && (!item.getPayMethod().equals("欠款"))) |
| | | .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | BigDecimal cardPayAmount = flows.stream() |
| | | .filter(item -> item.getPayMethod().equals("储值卡") && item.getIsGift().equals("N")) |
| | | .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | pageOrder.setCardPay(cardPayAmount.doubleValue()); |
| | | pageOrder.setCashPay(cashPayAmount.doubleValue()); |
| | | //欠款金额在流水处理中处理了 |
| | | |
| | | sysOrderDao.update(pageOrder); |
| | | } |
| | | |
| | | private void checkOrder(SysOrder pageOrder) { |
| | |
| | | //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 |
| | | boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); |
| | | if (zsConsumeAchieve) { |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | //赠送情况下,如果收款金额大于0,就是赠送金额划扣的情况,金额即为划扣的折扣金额 |
| | | if(sysOrderItem.getZkPrice()>0){ |
| | | puse.setPrice(sysOrderItem.getZkPrice()); |
| | | }else{ |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | } |
| | | } else { |
| | | puse.setPrice(0D); |
| | | } |
| | | |
| | | |
| | | } |
| | | // 设置失效时间 |
| | | Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null); |
| | | puse.setFailTime(invalidTime); |
| | | puse.setBalance(sysOrderItem.getShoppingGoods().getSealPice() * puse.getSurplusCount()); |
| | | puse.setBalance(puse.getPrice() * puse.getSurplusCount()); |
| | | sysProjUseDao.insert(puse); |
| | | } |
| | | |
| | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | |
| | | private SysOutStoreItemDao sysOutStoreItemDao; |
| | | @Autowired |
| | | private SysBedInfoDao sysBedInfoDao; |
| | | |
| | | @Autowired |
| | | TaiYanAliyunSmsService taiYanAliyunSmsService; |
| | | |
| | | @Autowired |
| | | private SysStoreInfoDao storeInfoDao; |
| | |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getPuseId()); |
| | | |
| | | //检查是否已经处于无效状态 |
| | | if(Dictionary.TAOCAN_STATUS_WX.equals(sysProjUse.getStatus())){ |
| | | if(Dictionary.TAOCAN_STATUS_WX.equals(sysProjUse.getStatus())){ |
| | | return new VerifyResult(true, sysProjUse.getProjName() + "项目已经失效"); |
| | | } |
| | | |
| | |
| | | UniformMsgParam uniformMsgParam = new UniformMsgParam(projServices.getCompanyId(), UniformMsgParam.GZH_FWWC); |
| | | uniformMsgParam.put("serviceId", projServices.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | //发送划扣短信提醒 |
| | | taiYanAliyunSmsService.sendHkNotice(projServices); |
| | | |
| | | return result; |
| | | } |
| | |
| | | |
| | | return flag; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int confirmServiceOrder(Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(id); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | taiYanAliyunSmsService.sendYycgNotice(services); |
| | | |
| | | |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public void handle(Map<String,Object> param){ |
| | | try { |
| | | |
| | | JSONObject messageJsonParam=JSONObject.parseObject(param.get("messages").toString()); |
| | | |
| | | if(!messageJsonParam.containsKey("companyId")||(!messageJsonParam.containsKey("templateCode"))){ |
| | | if(!param.containsKey("companyId")||(!param.containsKey("templateCode"))){ |
| | | LogUtil.error("小程序消息推送参数格式异常发送模板消息需要传JSONO字符串作为格式 例如:{\"companyId\":17,\"templateCode\":10000} companyId 、templateCode 是必须属性"); |
| | | return; |
| | | } |
| | | Long companyId = Long.parseLong( messageJsonParam.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( messageJsonParam.get("templateCode").toString()); |
| | | Long companyId = Long.parseLong( param.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( param.get("templateCode").toString()); |
| | | |
| | | //获取公司微信配置参数 |
| | | BusParameterSettings xcxAppId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | |
| | | bulderParam.put("xcxAppId", xcxAppId.getParamValue()); |
| | | bulderParam.put("gzhAppid", gzhAppid.getParamValue()); |
| | | bulderParam.put("template_id", template.getUuid()); |
| | | bulderParam.put("messageJsonParam", messageJsonParam); |
| | | bulderParam.put("messageJsonParam", param); |
| | | //调用模板计算出消息体 |
| | | Map msgResult = templateMessageBulder.buildMsg(bulderParam); |
| | | |
| | |
| | | |
| | | #线上测试环境 |
| | | # |
| | | spring.datasource.username=ct_test |
| | | spring.datasource.password=123456 |
| | | spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | #spring.datasource.username=ct_test |
| | | #spring.datasource.password=123456 |
| | | #spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | #spring.datasource.username=xc_shop |
| | | #spring.datasource.password=xc_shop123!@# |
| | |
| | | #spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | #spring.datasource.username=root |
| | | #spring.datasource.password=root |
| | | #spring.datasource.url=jdbc:mysql://127.0.0.1:3306/md_test_local?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | spring.datasource.username=root |
| | | spring.datasource.password=root |
| | | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/md_test_local?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
| | |
| | | <div class="form-group mr-20"> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn4" value="">全部</button> |
| | | <button type="button" class="btn btn-my btn-sm active" id="btn1" value="待预约">待预约</button> |
| | | <!-- <button type="button" class="btn btn-my btn-sm" id="btn2" value="预约成功待处理">待派单</button>--> |
| | | <!-- <button type="button" class="btn btn-my btn-sm" id="btn2" value="预约成功待处理">待派单</button>--> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn3" value="需配料">待配料</button> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn3" value="配料完成">待服务</button> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn6" value="服务中">服务中</button> |
| | |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script type="text/javascript"> |
| | | |
| | | $("#vipPhone").val($.query.get('vipPhone')); |
| | | var _initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.ininDatetimepicker(_initParam); |
| | | //限制结束时间不小于开始时间 |
| | | var initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.limitStartEndTime(initParam); |
| | | $("#vipPhone").val($.query.get('vipPhone')); |
| | | var _initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.ininDatetimepicker(_initParam); |
| | | //限制结束时间不小于开始时间 |
| | | var initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.limitStartEndTime(initParam); |
| | | |
| | | var myGrid; |
| | | $(function () { |
| | |
| | | |
| | | } |
| | | } |
| | | var btns=[]; |
| | | btns[0]="",btns[1]="",btns[2]="",btns[3]="",btns[4]="",btns[5]="",btns[6]=""; |
| | | function buidOperate(value, row, index) { |
| | | var btns=[]; |
| | | btns[0]="",btns[1]="",btns[2]="",btns[3]="",btns[4]="",btns[5]="",btns[6]=""; |
| | | function buidOperate(value, row, index) { |
| | | var status = row.state; |
| | | var html ='<a class="text-primary mr-5" onClick="selectFwz(' + value + ')" title="查看"><i class="fa fa-eye">查看</i></a> ' |
| | | switch (status) { |
| | |
| | | case '服务完成': |
| | | html +=btns[4].replace('VALUE',value); |
| | | html += btns[2].replace('VALUE',value); |
| | | break; |
| | | case '待确认': |
| | | html +=btns[7].replace('VALUE',value); |
| | | break; |
| | | } |
| | | html += btns[5].replace('VALUE',value); |
| | |
| | | |
| | | |
| | | |
| | | function removeOrder(id) { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.confirm('确定取消此订单?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/cancelOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | function removeOrder(id) { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.confirm('确定取消此订单?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/cancelOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | //打开查看界面 |
| | | function openEdit2() { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.open({ |
| | | type : 2, |
| | | title : "查看服务单详情", |
| | | area : MUI.SIZE_M, |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/projService/serviceInfo?pageFlae=pc&id=' + id] |
| | | }); |
| | | } |
| | | function confirmServiceOrder(id) { |
| | | layer.confirm('确定确认订单吗?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/confirmServiceOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | |
| | | //导出 |
| | | //导出 |
| | | function exportExcel(){ |
| | | var param=MForm.toUrlParam("#serchform"); |
| | | window.location.href=basePath+"/admin/projService/exportExcel?"+param; |
| | | } |
| | | } |
| | | |
| | | |
| | | //打开查看界面 |
| | | function openEdit2() { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.open({ |
| | | type : 2, |
| | | title : "查看服务单详情", |
| | | area : MUI.SIZE_M, |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/projService/serviceInfo?pageFlae=pc&id=' + id] |
| | | }); |
| | | } |
| | | |
| | | //导出 |
| | | //导出 |
| | | function exportExcel(){ |
| | | var param=MForm.toUrlParam("#serchform"); |
| | | window.location.href=basePath+"/admin/projService/exportExcel?"+param; |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | <script matrix:btn="serviceClub-edit"> |
| | | btns[6]='<a class="text-primary mr-5" onclick="updateTime(\'VALUE\')" title="修改时间"><i class="fa fa-edit">修改时间</i></a> ' |
| | | </script> |
| | | <script matrix:btn="serviceClub-edit"> |
| | | btns[7]='<a class="text-primary mr-5" onclick="confirmServiceOrder(\'VALUE\')" title="确认服务单"><i class="fa fa-edit">确认服务单</i></a> ' |
| | | </script> |
| | | |
| | | </html> |
| | |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" v-if="paramSetting.type==5"> |
| | | <label class="col-md-2 control-label">{{paramSetting.name}}</label> |
| | | <div class="col-md-8"> |
| | | <el-input type="textarea" :rows="2" v-model="paramSetting.userValue"></el-input> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | |
| | |
| | | newSetting8.setCategory("店务配置"); |
| | | newSettings.add(newSetting8); |
| | | |
| | | ParameterSettings newSetting9=new ParameterSettings(); |
| | | newSetting9.setCode(AppConstance.SERVICE_FLOW_TEMPLATE); |
| | | newSetting9.setName("跟进记录模板"); |
| | | newSetting9.setType(5); |
| | | newSetting9.setCategory("店务配置"); |
| | | newSettings.add(newSetting9); |
| | | |
| | | ParameterSettings newSetting10=new ParameterSettings(); |
| | | newSetting10.setCode(AppConstance.OPEN_SMS_NOTICE); |
| | | newSetting10.setName("是否开启短信提醒"); |
| | | newSetting10.setType(1); |
| | | newSetting10.setCategory("店务配置"); |
| | | newSettings.add(newSetting10); |
| | | |
| | | for (ParameterSettings newSetting : newSettings) { |
| | | List<ParameterSettings> parameterSettings = parameterSettingsDao.selectByModel(newSetting); |
New file |
| | |
| | | package com.matrix; |
| | | |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.service.SysProjServicesService; |
| | | import com.matrix.system.hive.service.TaiYanAliyunSmsService; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | */ |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT) |
| | | public class TaiYanAliyunSmsServiceTest { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private TaiYanAliyunSmsService taiYanAliyunSmsService; |
| | | @Autowired |
| | | SysProjServicesService projServicesService; |
| | | |
| | | |
| | | @Test |
| | | public void addSendYycgNotice(){ |
| | | SysProjServices byId = projServicesService.findById(215550L); |
| | | byId.setVipId(5949L); |
| | | taiYanAliyunSmsService.sendYycgNotice(byId); |
| | | taiYanAliyunSmsService.sendHkNotice(byId); |
| | | |
| | | } |
| | | |
| | | |
| | | } |