| | |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | query.setShopId(sysUsers.getShopId()); |
| | | } |
| | | query.setSuUserType("employee"); |
| | | query.setSuName(usersQueryDto.getQueryKey()); |
| | | List<SysUsers> list = sysUsersService.findByModel(query); |
| | | List<BeauticianVo> dataList = SysUsersMapper.INSTANCE.usersListToBeautyList(list); |
| | |
| | | return result; |
| | | } |
| | | |
| | | @RequestMapping(value = "/getUserById") |
| | | public @ResponseBody |
| | | AjaxResult getUserById(Long id) { |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | SysUsers user = sysUsersService.findById(id); |
| | | result.putInMap("user", user); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 条件查询所有员工,不分页 |
| | |
| | | |
| | | String SEX_MAN ="男"; |
| | | String SEX_WOMAN ="女"; |
| | | |
| | | String[] COLORS = { "#57c5d2", "#e3565e", "#2f343a", "#4d98db", "#4fbc9d", "#be9d4c"}; |
| | | } |
| | |
| | | orderService.updateReceiptMoney(sysOrder); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | // UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | // uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | // rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | |
| | | //处理用户购买的产品 |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.dao.SysVipLabelDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @Autowired |
| | | private SysVipLabelDao sysVipLabelDao; |
| | | |
| | | |
| | | @RequestMapping(value = "/showList") |
| | | @ResponseBody |
| | | private AjaxResult showList(SysVipLabel sysVipLabel, PaginationVO pageVo) { |
| | | SysUsers user = getMe(); |
| | | sysVipLabel.setCompanyId(user.getCompanyId()); |
| | | return AjaxResult.buildSuccessInstance(sysVipLabelDao.selectInPage(sysVipLabel, pageVo), sysVipLabelDao.selectTotal(sysVipLabel)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public AjaxResult add(SysVipLabel sysVipLabel) { |
| | | SysUsers sysUsers = getMe(); |
| | | |
| | | sysVipLabel.setIsAll(1); |
| | | sysVipLabel.setCompanyId(sysUsers.getCompanyId()); |
| | | List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | if (CollectionUtils.isNotEmpty(sysVipLabels)) { |
| | | return AjaxResult.buildFailInstance("已存在该标签"); |
| | |
| | | |
| | | sysVipLabel.setCreateBy(sysUsers.getSuName()); |
| | | sysVipLabel.setCreateTime(new Date()); |
| | | sysVipLabel.setColor(Dictionary.COLORS[new Random().nextInt(6)]); |
| | | |
| | | int i = sysVipLabelDao.insert(sysVipLabel); |
| | | if (i > 0) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("添加成功"); |
| | | ajaxResult.putInMap("label", sysVipLabel); |
| | | return ajaxResult; |
| | | } |
| | | return AjaxResult.buildFailInstance("添加失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/modify") |
| | | @ResponseBody |
| | | public AjaxResult modify(SysVipLabel sysVipLabel) { |
| | | SysUsers sysUsers = getMe(); |
| | | |
| | | SysVipLabel hasExist = sysVipLabelDao.selectById(sysVipLabel.getId()); |
| | | if (!sysVipLabel.getLabel().equals(hasExist.getLabel())) { |
| | | SysVipLabel query = new SysVipLabel(); |
| | | query.setIsAll(1); |
| | | query.setCompanyId(sysUsers.getCompanyId()); |
| | | query.setLabel(sysVipLabel.getLabel()); |
| | | List<SysVipLabel> sysVipLabels = sysVipLabelDao.selectByModel(sysVipLabel); |
| | | if (CollectionUtils.isNotEmpty(sysVipLabels)) { |
| | | return AjaxResult.buildFailInstance("已存在该标签"); |
| | | } |
| | | } |
| | | |
| | | sysVipLabel.setColor(Dictionary.COLORS[new Random().nextInt(6)]); |
| | | |
| | | int i = sysVipLabelDao.update(sysVipLabel); |
| | | if (i > 0) { |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("添加成功"); |
| | | ajaxResult.putInMap("label", sysVipLabel); |
| | |
| | | } |
| | | return AjaxResult.buildFailInstance("删除失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/edit") |
| | | public String edit(Long id) { |
| | | if (id != null) { |
| | | SysVipLabel sysVipLabel = sysVipLabelDao.selectById(id); |
| | | WebUtil.getRequest().setAttribute("obj", sysVipLabel); |
| | | } |
| | | return "admin/hive/operate/label-form"; |
| | | } |
| | | } |
| | |
| | | |
| | | private String color; |
| | | |
| | | private String shopName; |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Long getUserId() { |
| | | return userId; |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysVipLabel; |
| | | import com.matrix.system.hive.bean.SysVipLabelRelate; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | int update(SysVipLabel sysVipLabel); |
| | | |
| | | List<SysVipLabel> selectInPage(@Param("record") SysVipLabel sysVipLabel, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectTotal(@Param("record") SysVipLabel sysVipLabel); |
| | | |
| | | int deleteById(@Param("id") Long id); |
| | | |
| | | List<SysVipLabel> selectByVipId(@Param("vipId") Long vipId); |
| | |
| | | List<SysVipLabel> selectByModel(@Param("record") SysVipLabel sysVipLabel); |
| | | |
| | | int deleteRelateByVipId(@Param("vipId") Long vipId); |
| | | |
| | | SysVipLabel selectById(@Param("id") Long id); |
| | | } |
| | |
| | | moneyCardUse.setVipId(order.getVipId()); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | WebUtil.getRequest().setAttribute("orderParam", id); |
| | | |
| | | WebUtil.getRequest().setAttribute("cards", cards); |
| | | return "admin/hive-erp/order/orderXq-form"; |
| | | } |
| | |
| | | |
| | | #线上测试环境 |
| | | |
| | | #spring.datasource.username=ct_test |
| | | #spring.datasource.password=123456 |
| | | #spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | |
| | | spring.datasource.username=chuhuan |
| | | spring.datasource.password=chuhuan |
| | | spring.datasource.url=jdbc:mysql://175.6.132.141:3306/hive_v2_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | spring.datasource.username=ct_test |
| | | spring.datasource.password=123456 |
| | | spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 |
| | | |
| | | #spring.datasource.username=chuhuan |
| | | #spring.datasource.password=chuhuan |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="selectInPage" resultType="com.matrix.system.hive.bean.SysVipLabel"> |
| | | select |
| | | a.create_time createTime, |
| | | a.create_by createBy, |
| | | a.id, |
| | | a.label, |
| | | a.shop_id shopId, |
| | | a.company_id companyId, |
| | | a.is_all isAll, |
| | | a.user_id userId, |
| | | a.color, |
| | | b.shop_short_name shopName |
| | | from sys_vip_label a |
| | | left join sys_shop_info b on a.shop_id=b.id |
| | | where 1=1 |
| | | <if test="record!=null"> |
| | | <if test="record.label!=null and record.label!=''"> |
| | | and a.label like CONCAT('%', CONCAT(#{record.label},'%')) |
| | | </if> |
| | | <if test="record.isAll!=null and record.isAll!=0"> |
| | | and a.is_all=#{record.isAll} |
| | | </if> |
| | | <if test="record.userId!=null and record.userId!=''"> |
| | | and a.user_id=#{record.userId} |
| | | </if> |
| | | <if test="record.companyId!=null and record.companyId!=''"> |
| | | and a.company_id=#{record.companyId} |
| | | </if> |
| | | </if> |
| | | <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> |
| | | <if test="pageVo.sort !=null and pageVo.order !=null"> |
| | | order by |
| | | ${pageVo.sort} ${pageVo.order} |
| | | </if> |
| | | <if test="pageVo.offset >=0 and pageVo.limit >0"> |
| | | limit |
| | | #{pageVo.offset},#{pageVo.limit} |
| | | </if> |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectTotal" resultType="java.lang.Integer"> |
| | | select |
| | | count(1) |
| | | from sys_vip_label |
| | | where 1=1 |
| | | <if test="record!=null"> |
| | | <if test="record.label!=null and record.label!=''"> |
| | | and label like CONCAT('%', CONCAT(#{record.label},'%')) |
| | | </if> |
| | | <if test="record.isAll!=null and record.isAll!=0"> |
| | | and is_all=#{record.isAll} |
| | | </if> |
| | | <if test="record.userId!=null and record.userId!=''"> |
| | | and user_id=#{record.userId} |
| | | </if> |
| | | <if test="record.companyId!=null and record.companyId!=''"> |
| | | and company_id=#{record.companyId} |
| | | </if> |
| | | </if> |
| | | </select> |
| | | |
| | | <update id="update"> |
| | | update sys_vip_label |
| | | <set> |
| | |
| | | delete from sys_vip_label_relate |
| | | where vip_id=#{vipId} |
| | | </delete> |
| | | |
| | | <select id="selectById" resultType="com.matrix.system.hive.bean.SysVipLabel"> |
| | | select |
| | | create_time createTime, |
| | | create_by createBy, |
| | | id, |
| | | label, |
| | | shop_id shopId, |
| | | company_id companyId, |
| | | is_all isAll, |
| | | user_id userId, |
| | | color |
| | | from sys_vip_label |
| | | where id=#{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | direction: 'rtl', |
| | | //当前登录用户 |
| | | loginUser: {}, |
| | | staffUser:{}, |
| | | //业绩用户列表 |
| | | userList: [], |
| | | order: { |
| | |
| | | created: function () { |
| | | let _this = this; |
| | | |
| | | //获取登录用户信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/getLoginUser', |
| | | callback: function (data) { |
| | | _this.loginUser = data.mapInfo.user; |
| | | |
| | | if (id) { |
| | | //加载订单信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/order/findOrderById/' + id, |
| | | callback: function (data) { |
| | | _this.order = data.rows[0]; |
| | | //修改支付金额 |
| | | _this.changeVip(_this.order.vipId); |
| | | let items = _this.order.items; |
| | | let orderPayMoney = 0; |
| | | //设置欠款订单设置欠款金额等于支付金额,非欠款订单设置折扣金额等于支付金额 |
| | | items.forEach(item => { |
| | | if (item.arrears > 0) { |
| | | item.payMoney = item.arrears; |
| | | } else { |
| | | item.payMoney = item.zkPrice; |
| | | } |
| | | orderPayMoney += item.payMoney; |
| | | item.uuid = MTools.uuid(); |
| | | //业绩设置 |
| | | _this.achieveList.push({ |
| | | orderItem: item, |
| | | staff: _this.loginUser, |
| | | saleId: _this.loginUser.suId, |
| | | achieveMoney: item.payMoney, |
| | | commission : 0, |
| | | t3 : '现金业绩', |
| | | isShare: false, |
| | | }); |
| | | }); |
| | | _this.order.payMoney = orderPayMoney; |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | //获取门店信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/shopInfo/findUserShop', |
| | | callback: function (data) { |
| | | _this.order.shopName = data.rows[0].shopName; |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | |
| | | _this.initMethod() |
| | | if (vipId) { |
| | | _this.changeVip(vipId); |
| | | } |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | initMethod() { |
| | | let _this = this; |
| | | |
| | | //获取登录用户信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/getLoginUser', |
| | | callback: function (data) { |
| | | _this.loginUser = data.mapInfo.user; |
| | | |
| | | if (id) { |
| | | //加载订单信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/order/findOrderById/' + id, |
| | | callback: function (data) { |
| | | _this.order = data.rows[0]; |
| | | //修改支付金额 |
| | | _this.changeVip(_this.order.vipId); |
| | | |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/getUserById?id='+_this.order.staffId, |
| | | callback: function (data) { |
| | | _this.staffUser = data.mapInfo.user; |
| | | |
| | | let items = _this.order.items; |
| | | let orderPayMoney = 0; |
| | | //设置欠款订单设置欠款金额等于支付金额,非欠款订单设置折扣金额等于支付金额 |
| | | items.forEach(item => { |
| | | if (item.arrears > 0) { |
| | | item.payMoney = item.arrears; |
| | | } else { |
| | | item.payMoney = item.zkPrice; |
| | | } |
| | | orderPayMoney += item.payMoney; |
| | | item.uuid = MTools.uuid(); |
| | | //业绩设置 |
| | | _this.achieveList.push({ |
| | | orderItem: item, |
| | | staff: _this.staffUser, |
| | | saleId: _this.staffUser.suId, |
| | | achieveMoney: item.payMoney, |
| | | commission : 0, |
| | | t3 : '现金业绩', |
| | | isShare: false, |
| | | }); |
| | | }); |
| | | _this.order.payMoney = orderPayMoney; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | //获取门店信息 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | url: basePath + '/admin/shopInfo/findUserShop', |
| | | callback: function (data) { |
| | | _this.order.shopName = data.rows[0].shopName; |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //取消订单 |
| | | closeFram() { |
| | |
| | | if (submitType == 1) { |
| | | if (_this.printPaper) { |
| | | _this.print(); |
| | | } else { |
| | | _this.$message.success({ |
| | | message : data.info, |
| | | duration : 1000, |
| | | onClose() { |
| | | _this.closeFram(); |
| | | } |
| | | }); |
| | | } |
| | | // _this.closeFram(); |
| | | |
| | | // _this.$confirm('结算成功,是否立刻打印小票?', '提示', { |
| | | // confirmButtonText: '打印', |
| | | // cancelButtonText: '取消', |
| | |
| | | } else { |
| | | _this.$message.success(data.info); |
| | | } |
| | | |
| | | if(parent.myGrid) { |
| | | parent.myGrid.serchData(); |
| | | } |
| | |
| | | <div class="ibox-content"> |
| | | <form class="form-horizontal" id="dataform" onsubmit="javascript:return false;"> |
| | | <input autocomplete="off" type="hidden" name="id" th:value="${obj?.id}"> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">选择店铺<span class="text-danger">*</span></label> |
| | | <label class="col-sm-2 control-label">标签<span class="text-danger">*</span></label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control autoFull select2" dataType="*" |
| | | nullmsg="店铺不能为空" id="shopSelect" |
| | | th:data-url="@{/admin/shopInfo/findShops}" data-value="id" |
| | | data-filed="shopName" name="shopId"> |
| | | </select> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">分配类型<span class="text-danger">*</span></label> |
| | | <div class="col-sm-4"> |
| | | <label class="radio-inline"> |
| | | <input type="radio" name="type" id="optionsRadios1" value="1" checked>加 |
| | | </label> |
| | | |
| | | <label class="radio-inline"> |
| | | <input type="radio" name="type" id="optionsRadios2" value="2">减 |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">分配数量<span class="text-danger">*</span></label> |
| | | <div class="col-sm-4"> |
| | | <input autocomplete="off" dataType="n" class="form-control" name="remainingCnt" ></input> |
| | | <input autocomplete="off" dataType="*" class="form-control" name="label" ></input> |
| | | <div class="Validform_checktip"></div> |
| | | </div> |
| | | </div> |
| | |
| | | var obj=/*[[${obj}]]*/ |
| | | /*]]>*/ |
| | | |
| | | var invokeUrl=basePath+"/admin/smsShop/addSmsShop"; |
| | | var invokeUrl=basePath+"/admin/operate/add"; |
| | | if(obj.id!=null){ |
| | | invokeUrl = basePath+"/admin/smsShop/modifySmsShop"; |
| | | invokeUrl = basePath+"/admin/operate/modify"; |
| | | } |
| | | var myForm=MForm.initForm({ |
| | | invokeUrl:invokeUrl, |
| | |
| | | <div class="row mt-10" > |
| | | <div id="option-bar"> |
| | | <!-- 功能按钮部分 --> |
| | | <button matrix:btn="shopInfo-add" onclick="openAdd()" type="button" class="btn btn-info btn-sm"><i class="fa fa-add" ></i> 新增</button> |
| | | <button onclick="openAdd()" type="button" class="btn btn-info btn-sm"><i class="fa fa-add" ></i> 新增</button> |
| | | </div> |
| | | <table id="mgrid"> |
| | | <thead> |
| | |
| | | <th data-checkbox="true"></th> |
| | | <th data-formatter="MGrid.indexfn" data-align="center" data-width="30px" >序号</th> |
| | | <th data-align="center" data-formatter="buidOperate" data-field="id">操作</th> |
| | | <th data-field="shopName" data-align="center">店铺名称</th> |
| | | <th data-field="remainingCnt" data-align="center">短信余量</th> |
| | | <th data-field="label" data-align="center">标签内容</th> |
| | | <th data-field="createBy" data-align="center">创建人</th> |
| | | <th data-field="shopName" data-align="center">门店名称</th> |
| | | <th data-field="isAll" data-align="center" data-formatter="isAllFormat">是否所有门店</th> |
| | | </tr> |
| | | </thead> |
| | | </table> |
| | |
| | | var myGrid; |
| | | $(function(){ |
| | | var delUrl=""; |
| | | delUrl=basePath+"/admin/smsShop/del" ; |
| | | delUrl=basePath+"/admin/label/del" ; |
| | | myGrid=MGrid.initGrid({ |
| | | url:basePath+"/admin/smsShop/showList", |
| | | url:basePath+"/admin/label/showList", |
| | | delUrl:delUrl, |
| | | }); |
| | | |
| | |
| | | myGrid.delItems(); |
| | | } |
| | | |
| | | function buidOperate(value, row, index){ |
| | | console.log("----->",value) |
| | | function isAllFormat(value) { |
| | | if (value == 1) { |
| | | return "是" |
| | | } else { |
| | | return "否"; |
| | | } |
| | | } |
| | | |
| | | function buidOperate(value, row, index){ |
| | | var html = ""; |
| | | html += '<div class="btn-group">' |
| | | + '<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">' |
| | |
| | | function openAdd() { |
| | | layer.open({ |
| | | type : 2, |
| | | title : "短信分配", |
| | | title : "添加标签", |
| | | area : [ MUI.SIZE_L, '400px' ], |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/smsShop/editForm'] |
| | | content : [ basePath+'/admin/label/edit'] |
| | | }); |
| | | } |
| | | |
| | | function lookInfo(value) { |
| | | layer.open({ |
| | | type : 2, |
| | | title : "查看", |
| | | area : [ MUI.SIZE_L, '400px' ], |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/redirect/hive-erp/sms/sysSmsShopRecord-list?ssId='+value] |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |