From ad31648c6f7a8bff1f7ccdf84b76006b9ffb78f8 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Sat, 17 Jul 2021 15:59:10 +0800
Subject: [PATCH] 1. 新增套餐中有效和无效的操作 2. 会员修改门店功能 3. 套餐新增编辑次数功能 4. 计算是否为赠送的条件为,全部为赠送金额购买且支付金额大于0 5. 打印小票功能调整间距,和收银人 6. PC端服务单新增划扣金额展示
---
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java | 67 +++++++--------------------------
1 files changed, 14 insertions(+), 53 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
index 1f50192..6198d78 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -4,20 +4,17 @@
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
-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.core.tools.excl.ExcelSheetPO;
import com.matrix.core.tools.excl.ExcelUtil;
import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.MoneyCardUseDao;
import com.matrix.system.hive.dao.ShoppingGoodsDao;
import com.matrix.system.hive.dao.SysProjUseDao;
import com.matrix.system.hive.dao.SysVipInfoDao;
-import com.matrix.system.hive.plugin.message.StringUtil;
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.system.hive.service.MoneyCardUseService;
import com.matrix.system.hive.service.SysProjUseService;
@@ -168,21 +165,7 @@
return new AjaxResult(AjaxResult.STATUS_FAIL, "项目转让失败");
}
- @RequestMapping(value = "/returnProj")
- public @ResponseBody
- AjaxResult returnTc(SysProjUse sysProjUse, Long moneyCardUseId, String tcRemark, Long shopId, Double money, String tcName) {
- MoneyCardUse card = null;
- if (moneyCardUseId != null) {
- card = moneyCardUseService.findById(moneyCardUseId);
- }
- int i = projUseService.returnMoneyProj(sysProjUse, card, moneyCardUseId);
- if (i > 0) {
-
- return new AjaxResult(AjaxResult.STATUS_SUCCESS, "退款成功");
- }
- return new AjaxResult(AjaxResult.STATUS_FAIL, "退款失败");
- }
/**
@@ -203,31 +186,6 @@
}
- /**
- * 退款
- *
- * @return
- */
- @RequestMapping(value = "/getEffectCard")
- public @ResponseBody
- AjaxResult getEffectCard(SysProjUse sysProjUse) {
- MoneyCardUse cardUse = moneyCardUseService.findByVipId(sysProjUse.getVipId());
- double money = projUseService.getTotalMoneyProj(sysProjUse);
- if (cardUse != null) {
- cardUse.setRealMoney(money);
- List<MoneyCardUse> list = new ArrayList<MoneyCardUse>();
- list.add(cardUse);
- return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, "有有效会籍卡", list, null);
- } else {
- //无会员卡则new一个,为了把钱传递到前台
- cardUse = new MoneyCardUse();
- cardUse.setRealMoney(money);
- List<MoneyCardUse> list = new ArrayList<MoneyCardUse>();
- list.add(cardUse);
- return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, "无有效会籍卡", list, null);
- }
-
- }
/**
* 冻结会员项目
@@ -285,8 +243,8 @@
public AjaxResult importVipInfo(HttpServletResponse response, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
String fileName = file.getOriginalFilename();
- String dirPath = "E:";
- //PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
+// String dirPath = "E:";
+ String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
File saveFile = new File(dirPath + "/" + fileName);
file.transferTo(saveFile);
@@ -295,7 +253,7 @@
List<ExcelSheetPO> excelSheetPOList = ExcelUtil.readExcel(saveFile, null, null);
-/*
+
//项目资料导入
List<List<Object>> dataList = excelSheetPOList.get(0).getDataList();
List<SysProjUse> projUseList = new ArrayList<>();
@@ -339,7 +297,6 @@
//套餐资料导入=======end===
-*/
//充值卡资料导入
List<List<Object>> cardList = excelSheetPOList.get(2).getDataList();
List<MoneyCardUse> cardUseArrayList = new ArrayList<>();
@@ -362,7 +319,7 @@
Object tel = objects.get(1);
if (tel != null) {
String telStr = tel.toString();
- SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr);
+ SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId());
if (vipInfo == null) {
vipInfo = new SysVipInfo();
vipInfo.setShopId(sysUsers.getShopId());
@@ -419,7 +376,7 @@
Object tel = objects.get(1);
if (tel != null) {
String telStr = tel.toString();
- SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr);
+ SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr,sysUsers.getCompanyId());
if (vipInfo == null) {
vipInfo = new SysVipInfo();
vipInfo.setShopId(sysUsers.getShopId());
@@ -429,10 +386,14 @@
vipInfoDao.insert(vipInfo);
}
String goodNo = String.valueOf(objects.get(3));
- String goodName = String.valueOf(objects.get(2)).trim();
-
-
ShoppingGoods goods = shoppingGoodsDao.findByCode(goodNo);
+
+ String goodName = String.valueOf(objects.get(2)).trim();
+ if("储值卡".equals(goodName)){
+ goods= shoppingGoodsDao.selectVipCzGoods();
+ }
+
+
if (goods != null || "储值卡".equals(goodName)) {
moneyCardUse.setVipId(vipInfo.getId());
--
Gitblit v1.9.1