From ee0fc4d9b4412cc1c0365b8ac7dd43b78f98a038 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 13 Apr 2021 19:56:40 +0800
Subject: [PATCH] Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop
---
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
index 155bb91..1582cad 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
+++ b/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;
@@ -186,13 +187,7 @@
AjaxResult result = AjaxResult.buildSuccessInstance("查询成功");
SysProjUse queryUse = new SysProjUse();
- if(Objects.nonNull(vipId)){
- queryUse.setVipId(vipId);
- }else{
- SysVipInfo vipInfo = getCurrentVioInfo();
- queryUse.setVipId(vipInfo.getId());
- }
-
+ queryUse.setVipId(vipId);
queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM);
queryUse.setTaocanId(-1L);
queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
@@ -495,8 +490,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, "没有选中可消耗的项目");
@@ -511,7 +505,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));
@@ -526,8 +522,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, "没有选中可消耗的项目");
@@ -565,6 +561,18 @@
}
}
+ /**
+ * 删除服务单项目/套餐
+ * @param id
+ * @return
+ */
+ @RequestMapping(value = "/delServiceOrderItems")
+ @ResponseBody
+ public AjaxResult delServiceOrderItems(Long id) {
+ sysProjServicesService.deleteProjServiceItemById(id);
+ return AjaxResult.buildSuccessInstance("删除成功");
+ }
+
// 准备页面数据
private void pageDate() {
--
Gitblit v1.9.1