- 减少
- 增加
-
+ 兑换
+ 赠送
+
diff --git a/fuintAdmin/src/views/order/order_Added.vue b/fuintAdmin/src/views/order/order_Added.vue
index dbefc6176..257c58094 100644
--- a/fuintAdmin/src/views/order/order_Added.vue
+++ b/fuintAdmin/src/views/order/order_Added.vue
@@ -122,7 +122,7 @@
挂账订单列表
- 导出订单
+ 导出订单
@@ -306,6 +306,7 @@ import {
} from "@/api/order/hangbill";
import {getDicts} from "@/api/order/data";
import {listReturnRecord} from "@/api/order/returnrecord";
+import {exportExcelHangBillApi} from "@/api/order/exportExcel";
export default {
name: "order_Cashier",
@@ -365,6 +366,19 @@ export default {
},
methods: {
+ exportExcelCashier() {
+ // this.dateRange.push(this.beginTime)
+ // this.dateRange.push(this.endTime)
+ let dateRange = []
+ if (this.beginTime && this.endTime) {
+ dateRange.push(this.beginTime.toLocaleDateString())
+ dateRange.push(this.endTime.toLocaleDateString())
+ }
+ exportExcelHangBillApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
+ const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
+ this.$download.saveAs(blob,'挂账订单统计.xLsx')
+ })
+ },
// 归还记录详情弹框
returnRecord(id){
this.record = {}
diff --git a/fuintAdmin/src/views/order/order_Oil.vue b/fuintAdmin/src/views/order/order_Oil.vue
index a4a794dc1..c5f09e77b 100644
--- a/fuintAdmin/src/views/order/order_Oil.vue
+++ b/fuintAdmin/src/views/order/order_Oil.vue
@@ -115,19 +115,19 @@
油品总金额
-
{{orderStatistics.theTotalAmountOfOil}}
+
{{orderStatistics.theTotalAmountOfOil || 0}}
优惠总额
-
{{orderStatistics.theTotalAmountOfTheOffer}}
+
{{orderStatistics.theTotalAmountOfTheOffer || 0}}
交易数量
-
{{orderStatistics.numberOfTransactions}}
+
{{orderStatistics.numberOfTransactions || 0}}
实收总额
-
{{orderStatistics.totalAmountReceived}}
+
{{orderStatistics.totalAmountReceived || 0}}
微信
@@ -299,6 +299,8 @@
微信
支付宝
银联二维码
+
储值卡
+
囤油卡
小程序码
@@ -524,7 +526,12 @@
},
// 订单统计
getOrderStatistics() {
- orderStatisticsApi().then(res=>{
+ let dateRange = []
+ if (this.beginTime && this.endTime) {
+ dateRange.push(this.beginTime.toLocaleDateString())
+ dateRange.push(this.endTime.toLocaleDateString())
+ }
+ orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
this.orderStatistics = res.data
})
},
diff --git a/fuintAdmin/src/views/staff/storeInfo/index.vue b/fuintAdmin/src/views/staff/storeInfo/index.vue
index 1010042f4..90eadf8c7 100644
--- a/fuintAdmin/src/views/staff/storeInfo/index.vue
+++ b/fuintAdmin/src/views/staff/storeInfo/index.vue
@@ -186,6 +186,13 @@ export default {
this.getQRcode();
})
},
+ // 获取二维码信息
+ getQRCodeInfoByStoreId(){
+ listQRCode().then(response => {
+ this.qrcode = response.data.records;
+ this.getQRcode();
+ })
+ },
// 根据字符串获取二维码图片url地址
getQRcode(){
let opts = {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java
index 3d3145898..3fb6f5744 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java
@@ -48,6 +48,16 @@ public class LJGoodsController extends BaseController {
return getSuccessResult(goods);
}
+ /**
+ * 查询可使用兑换券的商品
+ * @return
+ */
+ @GetMapping("/queryGoods")
+ public ResponseObject queryGoods(){
+ List goods = goodsService.selectGoodsByCvsGoodsName();
+ return getSuccessResult(goods);
+ }
+
@GetMapping("/queryGoodsVoList")
public ResponseObject queryGoodsVoList(LJGoods goods){
List ljGoodsVos = goodsService.selectGoodsVoList(goods);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java
index 3c793cb61..59f8f1ce2 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java
@@ -88,6 +88,12 @@ public interface LJGoodsService extends IService {
*/
void batchGrounding(String ids,String status);
+ /**
+ * 查询可兑换商品品类下的商品信息
+ * @return
+ */
+ List selectGoodsByCvsGoodsName();
+
/**
* 修改商品库存
* @param goods
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java
index 10985b9ad..64ffc2b88 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java
@@ -9,10 +9,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.convenienceSore.dto.LJGoodsDto;
+import com.fuint.business.convenienceSore.entity.CvsGoods;
import com.fuint.business.convenienceSore.entity.LJGoods;
import com.fuint.business.convenienceSore.entity.StockStatistic;
import com.fuint.business.convenienceSore.entity.StockTrack;
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
+import com.fuint.business.convenienceSore.service.CvsGoodsService;
import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.convenienceSore.service.StockStatisticService;
import com.fuint.business.convenienceSore.service.StockTrackService;
@@ -31,6 +33,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.annotation.Resource;
import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ExecutionException;
@@ -224,6 +227,18 @@ public class LJGoodsServiceImpl extends ServiceImpl impl
}
}
+ @Override
+ public List selectGoodsByCvsGoodsName() {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("store_id", nowAccountInfo.getStoreId());
+ queryWrapper.eq("status","qy");
+ queryWrapper.eq("is_recovery","0");
+ queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("can_use_exchange","0");
+ return baseMapper.selectList(queryWrapper);
+ }
+
@Override
@Transactional
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java
index 493a8d575..f1eb87a4a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/ILJStaffService.java
@@ -100,4 +100,11 @@ public interface ILJStaffService extends IService {
* @return
*/
public List queryStaffs(int storeId);
+
+ /**
+ * 根据店铺id查询最早的油站站长信息
+ * @param storeId
+ * @return
+ */
+ LJStaff selectStaffByStoreId(int storeId);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java
index 7841df9f8..5724ebf8b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java
@@ -35,7 +35,6 @@ import java.util.Date;
import java.util.List;
import java.util.UUID;
-import static com.fuint.business.member.utils.QrCodeUtils.createLogoCodePicture;
/**
* 员工管理 业务层
@@ -44,6 +43,8 @@ import static com.fuint.business.member.utils.QrCodeUtils.createLogoCodePicture;
public class LJStaffServiceImpl extends ServiceImpl implements ILJStaffService {
@Autowired
private AccountService accountService;
+ @Autowired
+ private QrCodeUtils qrCodeUtils;
/**
* 根据条件分页查询员工信息
@@ -281,20 +282,22 @@ public class LJStaffServiceImpl extends ServiceImpl impl
@Override
public String createStaffQrCode(int id, HttpServletRequest request) throws Exception {
- ;;
// 根据id查询员工信息和店铺信息
LJStaff staff = this.selectStaffById(id);
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
//在图片上生成二维码
String backgroundImage = "static/qrCodeImg/laigeyouhui_bg.jpg";
String logoImage = "static/qrCodeImg/logo.png";
+// if (StringUtils.isNotEmpty(store.getLogo())){
+// logoImage = store.getLogo();
+// }
String url = staff.getStaffCode();
String area = store.getName();
String finalPath="/temp/qrCode/" + area + ".jpg";
InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage);
InputStream logoStream = this.getClass().getClassLoader().getResourceAsStream(logoImage);
//背景图片路径 loge图片 二维码 输出地址
- createLogoCodePicture(backgroundStream, logoStream, url, finalPath, area,store.getAddress());
+ qrCodeUtils.createLogoCodePicture(backgroundStream, logoStream, url, finalPath, staff.getId(),store.getId());
File file1 = new File("/temp/qrCode/");
// 判断目录是否存在
if (!file1.exists()) {
@@ -332,4 +335,20 @@ public class LJStaffServiceImpl extends ServiceImpl impl
List list = baseMapper.selectList(queryWrapper);
return list;
}
+
+ @Override
+ public LJStaff selectStaffByStoreId(int storeId) {
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("store_id",storeId);
+ queryWrapper.eq("status","qy");
+ queryWrapper.eq("if_delete","0");
+ queryWrapper.eq("role_id","12");
+ queryWrapper.orderByAsc("create_time");
+ List list = baseMapper.selectList(queryWrapper);
+ LJStaff staff = null;
+ if (list.size()>0){
+ staff = list.get(0);
+ }
+ return staff;
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java
index b79f89775..dbaca15ab 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java
@@ -1,13 +1,24 @@
package com.fuint.business.member.utils;
import cn.hutool.core.io.resource.ClassPathResource;
+import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.extra.qrcode.QrConfig;
+import com.fuint.business.member.entity.LJStaff;
+import com.fuint.business.member.service.ILJStaffService;
+import com.fuint.business.storeInformation.entity.LJStore;
+import com.fuint.business.storeInformation.service.ILJStoreService;
+import com.fuint.business.storeInformation.service.impl.LJStoreServiceImpl;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Component;
import org.springframework.util.ResourceUtils;
import javax.imageio.ImageIO;
+import javax.swing.*;
import java.awt.*;
+import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.*;
@@ -17,11 +28,22 @@ import java.io.*;
* @Date 2023/1/12 0012 13:38
* @Version 1.0
*/
+@Component
public class QrCodeUtils {
- /***
+ @Autowired
+ private ILJStoreService storeService;
+ @Autowired
+ @Lazy
+ private ILJStaffService staffService;
+
+ /**
* 在一张背景图上添加二维码
+ * @param url 二维码字符串
+ * @param outImgPath 输出路径
+ * @param staffId 员工id
+ * @param storeId 店铺id
*/
- public static void createLogoCodePicture(InputStream backgroundStream, InputStream logoStream, String url, String outImgPath, String storeName, String storeNumber) {
+ public void createLogoCodePicture(InputStream backgroundStream, InputStream logoStream, String url, String outImgPath, Integer staffId, Integer storeId) {
try {
// 读取原图片信息
//得到文件
@@ -45,11 +67,33 @@ public class QrCodeUtils {
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置。
g.drawImage(image, 260, 320, null);
// 设置字体,样式,字体大小
- g.setFont(new Font("TimesRoman", Font.BOLD, 50));
+ g.setFont(new Font("TimesRoman", Font.BOLD, 40));
//设置颜色。
g.setColor(Color.BLACK);
+
+// 查询当前店铺信息
+ LJStore store = storeService.selectStoreByStoreId(storeId);
+// 查询加油员信息
+ LJStaff staff = null;
+ if (ObjectUtil.isNotEmpty(staffId)){
+ staff = staffService.selectStaffById(staffId);
+ }
+ LJStaff staff1 = staffService.selectStaffByStoreId(storeId);
+
// 店铺名称位置文字绘制到指定位置
- g.drawString(storeName, 200, 880);
+ g.drawString(store.getName(), returnX(g,bufImg.getWidth(),store.getName()), 300);
+ // 加油员姓名位置文字绘制到指定位置
+ if (ObjectUtil.isNotEmpty(staff)) {
+ g.drawString("加油员:"+staff.getRealName(), returnX(g, bufImg.getWidth(), "加油员:"+staff.getRealName()), 750);
+ }
+ // 站长名称位置文字绘制到指定位置
+ g.drawString("站长名称:"+staff1.getRealName(), returnX(g, bufImg.getWidth(), "站长名称:"+staff1.getRealName()), 810);
+ // 服务监督电话位置文字绘制到指定位置
+ g.drawString("服务监督电话:"+staff1.getMobile(), returnX(g, bufImg.getWidth(), "服务监督电话:"+staff1.getMobile()), 870);
+ // 店铺地址位置文字绘制到指定位置
+// g.drawString(store.getAddress(), returnX(g,bufImg.getWidth(),store.getAddress()), 900);
+ drawStringWithMultiLine(g,store.getAddress(), bufImg.getWidth()-20,20,940,10 );
+
// // 将码牌编号文字绘制到指定位置
// g.drawString(storeNumber, 200, 800);
g.dispose();
@@ -69,6 +113,60 @@ public class QrCodeUtils {
}
}
+ public int returnX(Graphics2D g,Integer bufImgWidth,String name){
+ FontMetrics fm = g.getFontMetrics();
+ Rectangle2D stringBounds = fm.getStringBounds(name, g);
+ int x = (bufImgWidth - (int) stringBounds.getWidth())/2;
+ return x;
+ }
+ /**
+ * Graphic2D文本绘制换行,多行绘制
+ *
+ * @param graphics2D Graphics2D画笔实例
+ * @param text 需要绘制的文本内容
+ * @param maxWidth 一行的总宽度(像素)
+ * @param startX X坐标起始点(像素)
+ * @param startY Y坐标起始点(像素)
+ * @param heightSpace 每行间距(像素)
+ */
+ public void drawStringWithMultiLine(Graphics2D graphics2D, String text, int maxWidth, int startX, int startY, int heightSpace) {
+ // INFO: Dechert: 2021/1/7 获取画笔的字体
+ Font font = graphics2D.getFont();
+ // INFO: Dechert: 2021/1/7 通过JLabel获取文本的总长度和总高度
+ JLabel jLabel = new JLabel(text);
+ jLabel.setFont(font);
+ FontMetrics fontMetrics = jLabel.getFontMetrics(font);
+ int textLength = text.length();
+ int totalWidth = fontMetrics.stringWidth(text); //一行的总长度,用于判断是否超出了范围
+ int textHeight = fontMetrics.getHeight(); //计算一行的高度
+
+ if (totalWidth > maxWidth) {
+ // INFO: Dechert: 2021/1/7 总长度超过了整个长度限制
+ int alreadyWriteLine = 0; //已经写了多少行
+ int nowWidth = 0; //目前一行写的长度
+ for (int i = 0; i < textLength; i++) {
+ int oneWordWidth = fontMetrics.charWidth(text.charAt(i)); //获取单个字符的长度
+ int tempWidth = oneWordWidth + nowWidth; //判断目前的一行加上这个字符的长度是否超出了总长度
+ if (tempWidth > maxWidth) {
+ // INFO: Dechert: 2021/1/7 如果超出了一行的总长度,则要换成下一行
+ nowWidth = 0;
+ alreadyWriteLine++;
+ int writeY = startY + alreadyWriteLine * (textHeight + heightSpace);
+ graphics2D.drawString(text.charAt(i) + "", startX + nowWidth, writeY);
+ nowWidth = oneWordWidth;
+ } else {
+ // INFO: Dechert: 2021/1/7 当前行长度足够,可以直接画
+ int writeY = startY + alreadyWriteLine * (textHeight + heightSpace);
+ graphics2D.drawString(text.charAt(i) + "", startX + nowWidth, writeY);
+ nowWidth = tempWidth;
+ }
+ }
+ } else {
+ // INFO: Dechert: 2021/1/7 没有超过限制,直接画
+ graphics2D.drawString(text, startX, startY);
+ }
+ }
+
/**
* 将字符串转为二维码
*
@@ -78,7 +176,7 @@ public class QrCodeUtils {
* @return
* @throws IOException
*/
- private static BufferedImage createQrCode(InputStream logoStream, String url, int width, int height) throws IOException {
+ private BufferedImage createQrCode(InputStream logoStream, String url, int width, int height) throws IOException {
QrConfig config = new QrConfig(width, height);
Image image = ImageIO.read(logoStream);
config.setImg(image);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java
index f0efcb3fb..59420e4aa 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java
@@ -9,6 +9,7 @@ import com.fuint.business.order.service.HangBillService;
import com.fuint.business.order.vo.HangBillVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
+import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -108,8 +109,8 @@ public class HangBillController extends BaseController {
* @return
*/
@GetMapping("allAmount")
- public ResponseObject allAmount(){
- return getSuccessResult(hangBillService.selectAllAmount());
+ public ResponseObject allAmount(HangBillVo hangBill){
+ return getSuccessResult(hangBillService.selectAllAmount(hangBill));
}
/**
@@ -117,8 +118,8 @@ public class HangBillController extends BaseController {
* @return
*/
@GetMapping("allReturnAmount")
- public ResponseObject allReturnAmount(){
- return getSuccessResult(hangBillService.selectReturnAmount());
+ public ResponseObject allReturnAmount(HangBillVo hangBill){
+ return getSuccessResult(hangBillService.selectReturnAmount(hangBill));
}
/**
@@ -126,8 +127,8 @@ public class HangBillController extends BaseController {
* @return
*/
@GetMapping("allNoReturnAmount")
- public ResponseObject allNoReturnAmount(){
- return getSuccessResult(hangBillService.selectNoReturnAmount());
+ public ResponseObject allNoReturnAmount(HangBillVo hangBill){
+ return getSuccessResult(hangBillService.selectNoReturnAmount(hangBill));
}
/**
@@ -135,8 +136,8 @@ public class HangBillController extends BaseController {
* @return
*/
@GetMapping("returnTotal")
- public ResponseObject returnTotal(){
- return getSuccessResult(hangBillService.selectCountReturn());
+ public ResponseObject returnTotal(HangBillVo hangBill){
+ return getSuccessResult(hangBillService.selectCountReturn(hangBill));
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilBalanceChangeController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilBalanceChangeController.java
index 36d781cbb..8fb2c797f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilBalanceChangeController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/OilBalanceChangeController.java
@@ -56,6 +56,18 @@ public class OilBalanceChangeController extends BaseController {
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOilType())){
queryWrapper.eq(OilBalanceChange::getOilType,oilBalanceChange.getOilType());
}
+ if (ObjectUtils.isNotEmpty(oilBalanceChange.getChangeType())){
+ queryWrapper.eq(OilBalanceChange::getChangeType,oilBalanceChange.getChangeType());
+ }
+ if (ObjectUtils.isNotEmpty(oilBalanceChange.getOrderNo())){
+ queryWrapper.like(OilBalanceChange::getOrderNo,oilBalanceChange.getOrderNo());
+ }
+ if (ObjectUtils.isNotEmpty(oilBalanceChange.getParams()) && oilBalanceChange.getParams().size()==2){
+ String beginTime = oilBalanceChange.getParams().get("beginTime").toString();
+ String endTime = oilBalanceChange.getParams().get("endTime").toString();
+ endTime = endTime.substring(0,endTime.length()-1) + (Integer.valueOf(endTime.substring(endTime.length()-1)) + 1);
+ queryWrapper.between(OilBalanceChange::getCreateTime,beginTime,endTime);
+ }
queryWrapper.orderByDesc(OilBalanceChange::getCreateTime);
return getSuccessResult(this.oilBalanceChangeService.page(page, queryWrapper));
}
@@ -123,6 +135,18 @@ public class OilBalanceChangeController extends BaseController {
if (ObjectUtils.isNotEmpty(oilBalanceChange.getOilType())){
queryWrapper.eq(OilBalanceChange::getOilType,oilBalanceChange.getOilType());
}
+ if (ObjectUtils.isNotEmpty(oilBalanceChange.getChangeType())){
+ queryWrapper.eq(OilBalanceChange::getChangeType,oilBalanceChange.getChangeType());
+ }
+ if (ObjectUtils.isNotEmpty(oilBalanceChange.getOrderNo())){
+ queryWrapper.like(OilBalanceChange::getOrderNo,oilBalanceChange.getOrderNo());
+ }
+ if (ObjectUtils.isNotEmpty(oilBalanceChange.getParams()) && oilBalanceChange.getParams().size()==2){
+ String beginTime = oilBalanceChange.getParams().get("beginTime").toString();
+ String endTime = oilBalanceChange.getParams().get("endTime").toString();
+ endTime = endTime.substring(0,endTime.length()-1) + (Integer.valueOf(endTime.substring(endTime.length()-1)) + 1);
+ queryWrapper.between(OilBalanceChange::getCreateTime,beginTime,endTime);
+ }
List list = this.oilBalanceChangeService.list(queryWrapper);
//充值笔数
List collectIn = list.stream().filter(o -> o.getChangeType().equals("1")).collect(Collectors.toList());
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilBalanceChange.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilBalanceChange.java
index 42da32db7..8e5a0a4c2 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilBalanceChange.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilBalanceChange.java
@@ -3,12 +3,15 @@ package com.fuint.business.order.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
+import java.util.Map;
/**
* 余油变化表(OilBalanceChange)表实体类
@@ -54,5 +57,11 @@ public class OilBalanceChange extends Model {
private Date updateTime;
//更新人
private String updateBy;
+
+ /** 请求参数 */
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
+ @TableField(exist = false)
+ private Map params;
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java
index 2434c22ee..c1e286cd5 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java
@@ -48,17 +48,23 @@ public interface HangBillMapper extends BaseMapper {
* 查询当前店铺所有的订单总额
* @return
*/
- Double selectAllAmount(@Param("storeId") int storeId);
+ Double selectAllAmount(@Param("hangBill") HangBillVo hangBill);
/**
* 查询当前店铺归还的账单总额
* @return
*/
- Double selectReturnAmount(@Param("storeId") int storeId);
+ Double selectReturnAmount(@Param("hangBill") HangBillVo hangBill);
/**
* 查询当前店铺未归还的账单总额
* @return
*/
- Double selectNoReturnAmount(@Param("storeId") int storeId);
+ Double selectNoReturnAmount(@Param("hangBill") HangBillVo hangBill);
+
+ /**
+ * 查询当前店铺归还账单的数量
+ * @return
+ */
+ int selectCountReturn(@Param("hangBill") HangBillVo hangBill);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml
index ba6023653..2757425bb 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml
@@ -56,14 +56,107 @@
-
- select sum(${sumValue}) from mt_user_balance
+ select sum(${sumValue}) from
+ (select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
+ mub.second_card,mub.fixing_level,mub.chain_store_id
+ FROM mt_user mu
+ LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id) t
- chain_store_id = #{chainStoreId}
+
+ and t.chain_store_id = #{user.chainStoreId}
+
+
+ and t.store_id = #{user.storeId}
+
+
+ and t.mobile like concat('%', #{user.mobile}, '%')
+
+
+ and t.user_no like concat('%', #{user.userNo}, '%')
+
+
+ and t.name like concat('%', #{user.name}, '%')
+
+
+ and t.grade_id = #{user.gradeId}
+
+
+ and t.official = #{user.official}
+
+
+ and t.card_balance = 0
+
+
+ and t.card_balance != 0
+
+
+ and date_format(t.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
+
+
+ and date_format(t.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java
index dd762ce6a..5ccc62698 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java
@@ -126,8 +126,9 @@ public class LJUserServiceImpl extends ServiceImpl impleme
Integer storeId = nowAccountInfo.getStoreId();
LJStore store = storeService.selectStoreByStoreId(storeId);
Integer chainStoreId = store.getChainStoreId();
- Double balance = baseMapper.selectSumByStore(chainStoreId, "card_balance");
- Double point = baseMapper.selectSumByStore(chainStoreId, "points");
+ user.setChainStoreId(chainStoreId);
+ Double balance = baseMapper.selectSumByStore(user, "t.card_balance");
+ Double point = baseMapper.selectSumByStore(user, "t.points");
// Double literCard = baseMapper.selectSumByStore(storeId, "liter_card");
// Double refuelMoney = baseMapper.selectSumByStore(storeId, "refuel_money");
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java
index e60d532c5..bccd9507a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java
@@ -299,6 +299,15 @@ public class AccountServiceImpl extends ServiceImpl im
}
ljStaffMapper.insert(staff);
+// 添加员工码信息
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("mobile",param.get("mobile").toString());
+ queryWrapper.eq("store_id",mtStore.getId());
+ queryWrapper.eq("if_delete","0");
+ staff = ljStaffMapper.selectOne(queryWrapper);
+ staff.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff.getId());
+ ljStaffMapper.updateById(staff);
+
// LJStaff staff1 = ljStaffMapper.selectById(staff.getId());
if (ObjectUtil.isNotEmpty(staff.getId())){
editTAccount.setStaffId(staff.getId());
diff --git a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/laigeyouhui_bg1.png b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/laigeyouhui_bg1.png
new file mode 100644
index 000000000..b65e25fa3
Binary files /dev/null and b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/laigeyouhui_bg1.png differ
diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/Vip.vue b/fuintCashierWeb/src/views/cashier/NewComponents/Vip.vue
index f432e75a8..5ac3a932e 100644
--- a/fuintCashierWeb/src/views/cashier/NewComponents/Vip.vue
+++ b/fuintCashierWeb/src/views/cashier/NewComponents/Vip.vue
@@ -4,12 +4,12 @@
-
+
-
+
diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue
index 47ab28987..025acbd47 100644
--- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue
+++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Oil.vue
@@ -115,19 +115,19 @@
油品总金额
-
{{orderStatistics.theTotalAmountOfOil}}
+
{{orderStatistics.theTotalAmountOfOil || 0}}
优惠总额
-
{{orderStatistics.theTotalAmountOfTheOffer}}
+
{{orderStatistics.theTotalAmountOfTheOffer || 0}}
交易数量
-
{{orderStatistics.numberOfTransactions}}
+
{{orderStatistics.numberOfTransactions || 0}}
实收总额
-
{{orderStatistics.totalAmountReceived}}
+
{{orderStatistics.totalAmountReceived || 0}}
微信
@@ -308,6 +308,8 @@
微信
支付宝
银联二维码
+
储值卡
+
囤油卡
小程序码