Helius
2021-04-14 1e4e6e8aa4b738320bf8b5a0ee43aa62ca2c13e7
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -1,6 +1,7 @@
package com.matrix.system.hive.action;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.matrix.core.anotations.RemoveRequestToken;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
@@ -276,6 +277,7 @@
        return "admin/hive/beautySalon/yypb-form";
    }
    /**
     * 进入预约排班详情
     *
@@ -451,6 +453,7 @@
        }
    }
    /**
     * 根据id取消预约
     */
@@ -489,8 +492,7 @@
    @RequestMapping(value = "/addService")
    public @ResponseBody
    AjaxResult servicceAdd(@RequestBody SysProjServices sysProjServices) {
        SysVipInfo vipInfo = getCurrentVioInfo();
        sysProjServices.setVipId(vipInfo.getId());
        if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目");
@@ -505,7 +507,9 @@
        if (balanceverifyResult.isError()) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg());
        }
        sysProjServices.setState(Dictionary.SERVICE_STATU_DYY);
        if (StrUtil.isEmpty(sysProjServices.getState())) {
            sysProjServices.setState(Dictionary.SERVICE_STATU_DYY);
        }
        SysProjServices newSysProjServices = sysProjServicesService.addSysProjServices(sysProjServices);
        if (newSysProjServices != null) {
            return AjaxResult.buildSuccessInstance(Arrays.asList(newSysProjServices));
@@ -520,8 +524,8 @@
    @RequestMapping(value = "/addServiceForForm")
    public @ResponseBody
    AjaxResult servicceAddForForm(SysProjServices sysProjServices) {
        SysVipInfo vipInfo = getCurrentVioInfo();
        sysProjServices.setVipId(vipInfo.getId());
        if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目");
@@ -560,6 +564,26 @@
    }
    @RequestMapping(value = "/addServiceProj")
    @ResponseBody
    public AjaxResult addServiceProj(SysProjServices sysProjServices) {
        return AjaxResult.buildSuccessInstance("保存成功");
    }
    /**
     * 删除服务单项目/套餐
     * @param id
     * @return
     */
    @RequestMapping(value = "/delServiceOrderItems")
    @ResponseBody
    public AjaxResult delServiceOrderItems(Long id) {
        sysProjServicesService.deleteProjServiceItemById(id);
        return AjaxResult.buildSuccessInstance("删除成功");
    }
    // 准备页面数据
    private void  pageDate() {
        // 根据岗位名称查询员工