# Conflicts:
#	fuintAdmin_zt/.env.development
#	fuintCashierWeb/.env.development
This commit is contained in:
DESKTOP-369JRHT\12997 2024-06-05 17:31:04 +08:00
commit 791e98aa14
19 changed files with 149 additions and 159 deletions

View File

@ -11,8 +11,6 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_PUBLIC_PATH = '/' VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址 # 后端接口地址
#VUE_APP_SERVER_URL = 'http://192.168.31.55:8081/' VUE_APP_SERVER_URL = 'http://localhost:8080/'
VUE_APP_SERVER_URL = 'http://192.168.31.178:8081'
# http://192.168.0.121:8080/

View File

@ -12,9 +12,8 @@ VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址 # 后端接口地址
#VUE_APP_SERVER_URL = 'http://192.168.31.96:8080/' #VUE_APP_SERVER_URL = 'http://192.168.31.96:8080/'
VUE_APP_SERVER_URL = 'http://192.168.31.178:8081' #VUE_APP_SERVER_URL = 'http://192.168.31.178:8081'
VUE_APP_SERVER_URL = 'http://localhost:8080/'
# cp端地址 # cp端地址
VUE_PC_SERVER_URL = 'http://47.95.206.185:85/' # VUE_PC_SERVER_URL = 'http://47.95.206.185:85/'

View File

@ -33,7 +33,7 @@ spring.redis.pool.min-idle=0
spring.redis.timeout=5000 spring.redis.timeout=5000
# \u7CFB\u7EDF\u540D\u79F0 # \u7CFB\u7EDF\u540D\u79F0
system.name = \u84DD\u9CB8\u667A\u6167\u6CB9\u7AD9\u7CFB\u7EDF system.name = \u767E\u4E1A\u5174\u667A\u6167\u6CB9\u7AD9\u7CFB\u7EDF
# \u524D\u7AEFh5\u5730\u5740 # \u524D\u7AEFh5\u5730\u5740
website.url=https://www.fuint.cn/h5/ website.url=https://www.fuint.cn/h5/

View File

@ -33,7 +33,7 @@ spring.redis.pool.min-idle=0
spring.redis.timeout=5000 spring.redis.timeout=5000
# \u7CFB\u7EDF\u540D\u79F0 # \u7CFB\u7EDF\u540D\u79F0
system.name = \u84DD\u9CB8\u667A\u6167\u6CB9\u7AD9\u7CFB\u7EDF system.name = \u767E\u4E1A\u5174\u667A\u6167\u6CB9\u7AD9\u7CFB\u7EDF
# \u524D\u7AEFh5\u5730\u5740 # \u524D\u7AEFh5\u5730\u5740
website.url=https://www.fuint.cn/h5/ website.url=https://www.fuint.cn/h5/

View File

@ -49,13 +49,13 @@ public class Const {
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB"; public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
//小程序异步通知(回调地址) //小程序异步通知(回调地址)
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify"; public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
// public static String notify_url = "http://k40180f897.goho.co/api/fyPay/notify"; // public static String notify_url = "http://k40180f897.goho.co/api/fyPay/notify";
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify"; // public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
//主扫异步通知(回调地址) //主扫异步通知(回调地址)
// public static String notify_url_scan = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notifyScan"; public static String notify_url_scan = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notifyScan";
public static String notify_url_scan = "https://8q4f124343.yicp.fun/api/fyPay/notifyScan"; //public static String notify_url_scan = "https://8q4f124343.yicp.fun/api/fyPay/notifyScan";
//主扫下单 //主扫下单
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate"; public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";

View File

@ -32,6 +32,8 @@ import com.fuint.business.marketingActivity.cardFuleOrders.service.CardFuleOrder
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper; import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService; import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
import com.fuint.business.marketingActivity.cardValueOrders.mapper.CardValueOrdersMapper;
import com.fuint.business.marketingActivity.cardValueOrders.service.CardValueOrdersService; import com.fuint.business.marketingActivity.cardValueOrders.service.CardValueOrdersService;
import com.fuint.business.member.entity.LJStaff; import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.member.service.ILJStaffService;
@ -53,6 +55,7 @@ import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.util.RedisLock; import com.fuint.common.util.RedisLock;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -269,6 +272,12 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
if ("CASH".equals(cardFuelRecordDTO.getPaymentType())) { if ("CASH".equals(cardFuelRecordDTO.getPaymentType())) {
AllOrderInfo allOrderInfo = getAllOrderInfo(cardFuelRecordDTO); AllOrderInfo allOrderInfo = getAllOrderInfo(cardFuelRecordDTO);
allOrderInfoService.insertAllOrderInfo(allOrderInfo); allOrderInfoService.insertAllOrderInfo(allOrderInfo);
CardValueOrders cardValueOrders = new CardValueOrders();
BeanUtils.copyProperties(allOrderInfo, cardValueOrders);
cardValueOrders.setPayAmount(allOrderInfo.getPayMoney());
cardValueOrders.setDiscount(allOrderInfo.getDiscountAmount());
cardValueOrders.setAmount(allOrderInfo.getPayMoney());
cardValueOrdersMapper.insert(cardValueOrders);
cardValueOrdersService.updateBalances(orderNo,"paid"); cardValueOrdersService.updateBalances(orderNo,"paid");
} }
@ -317,6 +326,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
return cardFuelRecordDTO; return cardFuelRecordDTO;
} }
@Resource
private CardValueOrdersMapper cardValueOrdersMapper;
private static AllOrderInfo getAllOrderInfo(CardFuelRecordDTO cardFuelRecordDTO) { private static AllOrderInfo getAllOrderInfo(CardFuelRecordDTO cardFuelRecordDTO) {
AllOrderInfo allOrderInfo = new AllOrderInfo(); AllOrderInfo allOrderInfo = new AllOrderInfo();

View File

@ -170,11 +170,17 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardValueOrders.setRechargeType("1"); cardValueOrders.setRechargeType("1");
cardValueOrders.setBidBalance(cardValue.getBidBalance()); cardValueOrders.setBidBalance(cardValue.getBidBalance());
cardValueOrders.setRechargeBalance(cardValue.getRechargeBalance()); cardValueOrders.setRechargeBalance(cardValue.getRechargeBalance());
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){ if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance()) && cardValueRecordDTO.getBalance() >= cardValue.getRechargeBalance()){
cardValueOrders.setGiftBalance(cardValue.getGiftBalance()); cardValueOrders.setGiftBalance(cardValue.getGiftBalance());
cardValueOrders.setPoints(cardValue.getPoints());
cardValueOrders.setGrowthValue(cardValue.getGrowthValue());
}else {
cardValueOrders.setGiftBalance(0.0);
cardValueOrders.setPoints(0);
cardValueOrders.setGrowthValue(0);
} }
cardValueOrders.setPoints(cardValue.getPoints()); cardValueOrders.setAmount(cardValueRecordDTO.getBalance() + cardValueOrders.getGiftBalance());
cardValueOrders.setGrowthValue(cardValue.getGrowthValue()); cardValueOrders.setPayAmount(cardValueRecordDTO.getBalance());
if (ObjectUtils.isNotEmpty(cardValue.getFringeBenefit())){ if (ObjectUtils.isNotEmpty(cardValue.getFringeBenefit())){
cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit()); cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit());
} }
@ -201,20 +207,6 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit()); cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit());
} }
} }
//查询储值卡信息
/* CardValueVO cardValue = cardValueService.getOneById(cardValueRecordDTO.getId());
cardValueOrders.setCardValueId(cardValue.getId());
cardValueOrders.setRechargeType("0");
cardValueOrders.setBidBalance(cardValue.getBidBalance());
cardValueOrders.setRechargeBalance(cardValue.getRechargeBalance());
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
cardValueOrders.setGiftBalance(cardValue.getGiftBalance());
}
cardValueOrders.setPoints(cardValue.getPoints());
cardValueOrders.setGrowthValue(cardValue.getGrowthValue());
if (ObjectUtils.isNotEmpty(cardValue.getFringeBenefit())){
cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit());
}*/
//优惠券优惠金额 //优惠券优惠金额
if (ObjectUtils.isNotEmpty(cardValueRecordDTO.getCardFavorableId())){ if (ObjectUtils.isNotEmpty(cardValueRecordDTO.getCardFavorableId())){
CardFavorable cardFavorable = cardFavorableService.getById(cardValueRecordDTO.getCardFavorableId()); CardFavorable cardFavorable = cardFavorableService.getById(cardValueRecordDTO.getCardFavorableId());
@ -258,14 +250,16 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardValueOrders.setAmountCommission(cardValue.getAmountCommission()); cardValueOrders.setAmountCommission(cardValue.getAmountCommission());
} }
//订单金额 //订单金额
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){ if (!cardValueRecordDTO.getTypes().equals("1")
&& ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
//订单金额 //订单金额
BigDecimal add = BigDecimal.valueOf(cardValue.getRechargeBalance()).add(BigDecimal.valueOf(cardValue.getGiftBalance())); BigDecimal add = BigDecimal.valueOf(cardValue.getRechargeBalance()).add(BigDecimal.valueOf(cardValue.getGiftBalance()));
cardValueOrders.setAmount(add.doubleValue()); cardValueOrders.setAmount(add.doubleValue());
//支付金额 //支付金额
cardValueOrders.setPayAmount(cardValue.getRechargeBalance()); cardValueOrders.setPayAmount(cardValue.getRechargeBalance());
} }
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance()) && ObjectUtils.isNotEmpty(cardValueRecordDTO.getBalance())){ if (!cardValueRecordDTO.getTypes().equals("1")
&& ObjectUtils.isNotEmpty(cardValue.getGiftBalance()) && ObjectUtils.isNotEmpty(cardValueRecordDTO.getBalance())){
//订单金额 //订单金额
BigDecimal add = BigDecimal.valueOf(cardValue.getGiftBalance()); BigDecimal add = BigDecimal.valueOf(cardValue.getGiftBalance());
cardValueOrders.setAmount(add.doubleValue() + cardValueRecordDTO.getBalance()); cardValueOrders.setAmount(add.doubleValue() + cardValueRecordDTO.getBalance());
@ -282,7 +276,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
cardValueOrders.setCardRecordId(cardValueRecordDTO.getCardRecordId()); cardValueOrders.setCardRecordId(cardValueRecordDTO.getCardRecordId());
} }
//优惠金额 //优惠金额
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){ if (!cardValueRecordDTO.getTypes().equals("1")
&& ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
BigDecimal add = BigDecimal.valueOf(cardValue.getGiftBalance()).add(BigDecimal.valueOf(cardFavorableValue)); BigDecimal add = BigDecimal.valueOf(cardValue.getGiftBalance()).add(BigDecimal.valueOf(cardFavorableValue));
cardValueOrders.setDiscount(add.doubleValue()); cardValueOrders.setDiscount(add.doubleValue());
} }

View File

@ -116,15 +116,15 @@ public class CardValueOrdersController extends BaseController {
@PostMapping("getOneByOrderNo") @PostMapping("getOneByOrderNo")
public void getOneByOrderNo(@RequestBody Map<String,String> map){ public ResponseObject getOneByOrderNo(@RequestBody Map<String,String> map){
String orderNo = map.get("orderNo"); String orderNo = map.get("orderNo");
cardValueOrdersService.getOneByOrderNo(orderNo); return getSuccessResult(cardValueOrdersService.getOneByOrderNo(orderNo));
} }
@PostMapping("getOneByOrderNos") /*@PostMapping("getOneByOrderNos")
public ResponseObject getOneByOrderNos(@RequestBody Map<String,String> map){ public ResponseObject getOneByOrderNos(@RequestBody Map<String,String> map){
String orderNo = map.get("orderNo"); String orderNo = map.get("orderNo");
return getSuccessResult(cardValueOrdersService.getOneByOrderNos(orderNo)); return getSuccessResult(cardValueOrdersService.getOneByOrderNos(orderNo));
} }*/
} }

View File

@ -11,6 +11,8 @@ import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.mapper.AllOrderInfoMapper; import com.fuint.business.order.mapper.AllOrderInfoMapper;
import com.fuint.business.order.service.AllOrderInfoService; import com.fuint.business.order.service.AllOrderInfoService;
import com.fuint.business.order.vo.AllOrderInfoVo; import com.fuint.business.order.vo.AllOrderInfoVo;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.UserBalance; import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.service.UserBalanceService; import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
@ -36,6 +38,9 @@ public class CardValueOrdersServiceImpl extends ServiceImpl<CardValueOrdersMappe
@Resource @Resource
private AllOrderInfoService allOrderInfoService; private AllOrderInfoService allOrderInfoService;
@Resource
private ILJStoreService iljStoreService;
/** /**
* 根据订单编号返回订单信息 * 根据订单编号返回订单信息
* @param orderNo * @param orderNo
@ -94,9 +99,10 @@ public class CardValueOrdersServiceImpl extends ServiceImpl<CardValueOrdersMappe
public void updateBalances(String orderNo, String status) { public void updateBalances(String orderNo, String status) {
AllOrderInfoVo oneByOrderNo = allOrderInfoService.getOneByOrderNo(orderNo); AllOrderInfoVo oneByOrderNo = allOrderInfoService.getOneByOrderNo(orderNo);
if (ObjectUtil.isNotEmpty(oneByOrderNo)){ if (ObjectUtil.isNotEmpty(oneByOrderNo)){
oneByOrderNo.setPayMoney(oneByOrderNo.getGoodsMoney());
if ("paid".equals(status)){ if ("paid".equals(status)){
UserBalance userBalance = userBalanceService.selectUserBalanceByStorId(oneByOrderNo.getUserId(),oneByOrderNo.getStoreId()); LJStore ljStore = iljStoreService.selectStoreByStoreId(oneByOrderNo.getStoreId());
UserBalance userBalance = userBalanceService.selectUserBalance(oneByOrderNo.getUserId(),ljStore.getChainStoreId());
Double cardBalance = 0.0; Double cardBalance = 0.0;
cardBalance = userBalance.getCardBalance() + oneByOrderNo.getPayMoney(); cardBalance = userBalance.getCardBalance() + oneByOrderNo.getPayMoney();
userBalance.setCardBalance(cardBalance); userBalance.setCardBalance(cardBalance);

View File

@ -129,6 +129,47 @@ public class QrCodeUtils {
} }
} }
public void createLogoCodePictures(String tagCodeSn,InputStream logoStream, String url, String outImgPath, Integer staffId, Integer storeId,String urls) {
try {
Image srcImg = ImageIO.read(logoStream);
//获取图片的宽
int srcImgWidth = srcImg.getWidth(null);
//获取图片的高
int srcImgHeight = srcImg.getHeight(null);
BufferedImage bufImg = new BufferedImage(srcImgWidth, srcImgHeight, BufferedImage.TYPE_INT_RGB);
Graphics2D g = bufImg.createGraphics();
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
//使用工具类生成二维码
Image image = createQrCode(null, url, 360, 360);
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置
g.drawImage(image, (bufImg.getWidth()-360)/2, (bufImg.getHeight()-360)/2-30, null);
// 设置字体样式字体大小
// g.setFont(new Font("TimesRoman", Font.BOLD, 40));
g.setFont(chineseFont());
//设置颜色
g.setColor(Color.BLACK);
g.drawString("SN"+tagCodeSn, returnX(g, bufImg.getWidth(), "SN"+tagCodeSn), 440);
g.dispose();
// 输出图片
String urlsss = "/temp/qrCode/";
if (ObjectUtils.isNotEmpty(urls)){
urlsss = urls;
}
File file1 = new File(urlsss);
// 判断目录是否存在
if (!file1.exists()) {
file1.mkdirs();
}
FileOutputStream outImgStream = new FileOutputStream(outImgPath);
ImageIO.write(bufImg, "jpg", outImgStream);
outImgStream.flush();
outImgStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public void createLogoCodePictureByPos(InputStream backgroundStream, InputStream logoStream, String url, String outImgPath, Integer staffId, Integer storeId,String urls) { public void createLogoCodePictureByPos(InputStream backgroundStream, InputStream logoStream, String url, String outImgPath, Integer staffId, Integer storeId,String urls) {
try { try {
// 读取原图片信息 // 读取原图片信息
@ -166,56 +207,7 @@ public class QrCodeUtils {
} }
} }
public void createLogoCodePictures(InputStream logoStream, String url, String outImgPath, Integer staffId, Integer storeId,String urls) {
try {
// 读取原图片信息
//得到文件
//// File file = ResourceUtils.getFile(roundImage);
// ClassPathResource resource = new ClassPathResource(roundImage);
// ClassPathResource logoResource = new ClassPathResource(logoImage);
// File file = resource.getFile();
//文件转化为图片
// 加水印
//使用工具类生成二维码
Image image = createQrCode(logoStream, url, 360, 360);
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置
// 查询当前店铺信息
if (ObjectUtils.isNotEmpty(storeId)){
LJStore store = storeService.selectStoreByStoreId(storeId);
// 查询加油员信息
LJStaff staff = null;
if (ObjectUtil.isNotEmpty(staffId)){
staff = staffService.selectStaffById(staffId);
}
LJStaff staff1 = staffService.selectStaffByStoreId(storeId);
}else {
//drawStringWithMultiLine(g,"欢迎光临", bufImg.getWidth()-20,20,940,10 );
}
// // 将码牌编号文字绘制到指定位置
// g.drawString(storeNumber, 200, 800);
// 输出图片
String urlsss = "/temp/qrCode/";
if (ObjectUtils.isNotEmpty(urls)){
urlsss = urls;
}
File file1 = new File(urlsss);
// 判断目录是否存在
if (!file1.exists()) {
file1.mkdirs();
}
FileOutputStream outImgStream = new FileOutputStream(outImgPath);
ImageIO.write((RenderedImage) image, "jpg", outImgStream);
outImgStream.flush();
outImgStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public Font chineseFont() throws Exception { public Font chineseFont() throws Exception {

View File

@ -86,12 +86,16 @@ public class OilTagController extends BaseController {
LambdaQueryWrapper<TagCodeRecord> queryWrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TagCodeRecord> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(TagCodeRecord::getOilTagId,oilTagId); queryWrapper1.eq(TagCodeRecord::getOilTagId,oilTagId);
TagCodeRecord one = tagCodeRecordService.getOne(queryWrapper1); TagCodeRecord one = tagCodeRecordService.getOne(queryWrapper1);
OilTagVO oilTagVO = new OilTagVO(); OilTagVO oilTagVO = new OilTagVO();
BeanUtils.copyProperties(record,oilTagVO); BeanUtils.copyProperties(record,oilTagVO);
if (ObjectUtils.isNotEmpty(one)){ if (ObjectUtils.isNotEmpty(one)){
oilTagVO.setStoreName(one.getStoreName()); oilTagVO.setStoreName(one.getStoreName());
if (ObjectUtils.isNotEmpty(one.getStaffName())){
oilTagVO.setMtStatus("1");
oilTagVO.setStaffName(one.getStaffName());
}
} }
oilTagVOArrayList.add(oilTagVO); oilTagVOArrayList.add(oilTagVO);
} }
page1.setRecords(oilTagVOArrayList); page1.setRecords(oilTagVOArrayList);

View File

@ -59,8 +59,6 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
@Autowired @Autowired
private BackendFileController backendFileController; private BackendFileController backendFileController;
//private static final String IMAGE_DIRECTORY = "D:\\temp\\qrCode";
@Override @Override
@Transactional @Transactional
public ResponseEntity<InputStreamResource> add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception { public ResponseEntity<InputStreamResource> add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception {
@ -74,29 +72,21 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
for (int i = 0; i < total; i++) { for (int i = 0; i < total; i++) {
Random random = new Random(); Random random = new Random();
int i1 = random.nextInt(90000000); int i1 = random.nextInt(90000000);
//String url = "https://oil.youkerr.com/";
String url = "https://www.tuofeng.cc/oilRefuel?sn=byx"+i1; String url = "https://www.tuofeng.cc/oilRefuel?sn=byx"+i1;
// String finalPath="/temp/qrCode/" + oilTag.getSnCode() + ".jpg";
//String finalPath="D:\\office\\document\\photos\\tagCode\\"+"str"+i+".jpg";
//String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg";
//String finalPath="/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "/"+i2 + "byx"+i1 + ".jpg";
TagCode tagCode = new TagCode(); TagCode tagCode = new TagCode();
tagCode.setCollection(url); tagCode.setCollection(url);
tagCode.setTagCodeSn("byx"+i1); tagCode.setTagCodeSn("byx"+i1);
tagCode.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString())); tagCode.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
//在图片上生成二维码 //在图片上生成二维码
String backgroundImage = "static/qrCodeImg/huanyingguanglin.jpg"; String backgroundImage = "static/qrCodeImg/white2.jpg";
InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage); InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage);
String urls = ""; String urls = "";
urls = "/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "-"+i2; urls = "/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "-"+i2;
File file1 = new File(urls); File file1 = new File(urls);
// String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg";
String finalPath=urls+"/" + "byx"+i1 + ".jpg"; String finalPath=urls+"/" + "byx"+i1 + ".jpg";
qrCodeUtils.createLogoCodePictures(null, url, finalPath, null,null,urls); qrCodeUtils.createLogoCodePictures(tagCode.getTagCodeSn(),backgroundStream, url, finalPath, null,null,urls);
// 判断目录是否存在 // 判断目录是否存在
if (!file1.exists()) { if (!file1.exists()) {
@ -105,17 +95,13 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
File file =new File(finalPath); File file =new File(finalPath);
FileInputStream fileInputStream =new FileInputStream(file); FileInputStream fileInputStream =new FileInputStream(file);
// FileInputStream fileInputStream =new FileInputStream(file1);
MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream); MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream);
// 返回图片路径 // 返回图片路径
String saveFile = backendFileController.saveFile(resFile); String saveFile = backendFileController.saveFile(resFile);
//return saveFile;
tagCode.setImageUrl(saveFile); tagCode.setImageUrl(saveFile);
flag = save(tagCode); flag = save(tagCode);
} }
//导出码牌 //导出码牌
//String IMAGE_DIRECTORY = "D:\\temp\\tagCode\\"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2;
String IMAGE_DIRECTORY = "/temp/tagCode/"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2; String IMAGE_DIRECTORY = "/temp/tagCode/"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2;
List<File> imageFiles = getImageFiles(IMAGE_DIRECTORY); List<File> imageFiles = getImageFiles(IMAGE_DIRECTORY);
@ -135,12 +121,6 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
return ResponseEntity.ok() return ResponseEntity.ok()
.body(new InputStreamResource(inputStream)); .body(new InputStreamResource(inputStream));
} }
//String IMAGE_DIRECTORY = "D:\\temp\\qrCode\\DateUtil.formatDate(new Date(), \"yyyyMMdd\") +";
//return flag;
} }

View File

@ -9,4 +9,5 @@ import java.io.Serializable;
public class OilTagVO extends OilTag implements Serializable { public class OilTagVO extends OilTag implements Serializable {
//店铺名字 //店铺名字
private String storeName; private String storeName;
private String staffName;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -227,7 +227,7 @@
<version>1.4.19</version> <version>1.4.19</version>
</dependency> </dependency>
<!-- mvn install:install-file -DgroupId=yly_sdk -DartifactId=yly_sdk -Dversion=2.2 -Dpackaging=jar -Dfile=D:\workspaces\oilSystem\fuintBackend\lib\yly_sdk_2.2.jar--> <!-- mvn install:install-file -DgroupId=yly_sdk -DartifactId=yly_sdk -Dversion=2.2 -Dpackaging=jar -Dfile=D:\office\proj\oilSystem\fuintBackend\lib\yly_sdk_2.2.jar-->
<dependency> <dependency>
<groupId>yly_sdk</groupId> <groupId>yly_sdk</groupId>

View File

@ -13,4 +13,6 @@ VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址 # 后端接口地址
#VUE_APP_SERVER_URL = 'http://192.168.31.96:8080/' #VUE_APP_SERVER_URL = 'http://192.168.31.96:8080/'
VUE_APP_SERVER_URL = 'http://192.168.31.178:8081' #VUE_APP_SERVER_URL = 'http://192.168.31.178:8081'
#VUE_APP_SERVER_URL = 'http://192.168.31.55:8081/'
VUE_APP_SERVER_URL = 'http://localhost:8080/'

View File

@ -734,7 +734,7 @@
@click="recharge(index)"> @click="recharge(index)">
<!-- <div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>--> <!-- <div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>-->
<div style="font-size: 14px">售价<span style="color: #00afff;">{{ item.rechargeBalance }}</span></div> <div style="font-size: 14px">售价<span style="color: #00afff;">{{ item.rechargeBalance }}</span></div>
<div style="font-size: 14px">锁价<span style="color: #00afff;">{{ item.lockupPrice }}</span>/</div> <div style="font-size: 14px">锁价<span style="color: #00afff;">{{ item.lockPrice }}</span>/</div>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -2160,7 +2160,7 @@
this.cardFuelDieselForm.type = file.type this.cardFuelDieselForm.type = file.type
this.cardFuelDieselForm.chainStorId = file.chainStorId this.cardFuelDieselForm.chainStorId = file.chainStorId
this.cardFuelDieselForm.incomeLitres = file.incomeLitres this.cardFuelDieselForm.incomeLitres = file.incomeLitres
this.cardFuelDieselForm.lockupPrice = file.lockupPrice this.cardFuelDieselForm.lockupPrice = file.lockPrice
this.cardFuelDieselForm.cardFuelId = file.id this.cardFuelDieselForm.cardFuelId = file.id
this.cardFuelDieselForm.expireTime = file.expireTime this.cardFuelDieselForm.expireTime = file.expireTime
@ -3196,53 +3196,55 @@
_this.paymentActive.oilId = item.oilName _this.paymentActive.oilId = item.oilName
_this.paymentActive.storeId = item.storeId _this.paymentActive.storeId = item.storeId
getPaymentActive(_this.paymentActive).then(res => { getPaymentActive(_this.paymentActive).then(async res => {
item.activeId = res.data.activeId item.activeId = res.data.activeId
item.type = res.data.type item.type = res.data.type
let discount = {type:"",discount:0,oilName:item.oilName,gunName:item.gunName} let discount = { type: "", discount: 0, oilName: item.oilName, gunName: item.gunName }
let oilData = {oilName:item.oilName,oilPreferential: {}} let oilData = { oilName: item.oilName, oilPreferential: {} }
// this.preferentialData1 = res.data // this.preferentialData1 = res.data
oilData.oilPreferential = res.data oilData.oilPreferential = res.data
_this.oilPreferentialData.push(oilData) _this.oilPreferentialData.push(oilData)
// if (_this.consumeRefuelMoney==0){ // if (_this.consumeRefuelMoney==0){
if (res.data.memberFavorableAmount){ if (res.data.memberFavorableAmount) {
discount.discount = res.data.memberFavorableAmount discount.discount = res.data.memberFavorableAmount
_this.gradeDiscount.push(discount) _this.gradeDiscount.push(discount)
if(!this.isOilStorageCard) { if (!this.isOilStorageCard) {
_this.oilDiscount = res.data.memberFavorableAmount _this.oilDiscount = res.data.memberFavorableAmount
_this.checkAll2 = true _this.checkAll2 = true
this.checkedCities2.push(discount.gunName) this.checkedCities2.push(discount.gunName)
}
} }
if (res.data.cardFavorableAmount){ }
discount.discount = res.data.cardFavorableAmount if (res.data.cardFavorableAmount) {
_this.couponDiscount.push(discount) discount.discount = res.data.cardFavorableAmount
if(!this.isOilStorageCard) { _this.couponDiscount.push(discount)
_this.cardFavorableId = res.data.cardFavorableId if (!this.isOilStorageCard) {
_this.recordId = res.data.recordId _this.cardFavorableId = res.data.cardFavorableId
_this.couponAmount = res.data.cardFavorableAmount _this.recordId = res.data.recordId
_this.checkAll5 = true _this.couponAmount = res.data.cardFavorableAmount
} _this.checkAll5 = true
} }
if (res.data.activeFavorableAmount){ }
discount.discount = res.data.activeFavorableAmount if (res.data.activeFavorableAmount) {
discount.type = res.data.type discount.discount = res.data.activeFavorableAmount
_this.fullReduceDiscount.push(discount) discount.type = res.data.type
if(!this.isOilStorageCard) { _this.fullReduceDiscount.push(discount)
_this.fullReduction = res.data.activeFavorableAmount if (!this.isOilStorageCard) {
_this.checkAll1 = true _this.fullReduction = res.data.activeFavorableAmount
this.checkedCities1.push(discount.gunName) _this.checkAll1 = true
} this.checkedCities1.push(discount.gunName)
} }
}
// } // }
if(this.isOilStorageCard){ console.log(_this.oilDiscount, 111)
this.countAmountFull() this.countAmountFull()
if (this.isOilStorageCard) {
await this.countAmountFull()
} }
if (type==1){ if (type == 1) {
this.countAmountUnBalance() await this.countAmountUnBalance()
} }
if (type==0){ if (type == 0) {
this.countAmountFull() await this.countAmountFull()
} }
}) })
}) })
@ -3377,7 +3379,7 @@
}else { }else {
this.oilActualPay = this.oilAmount.toFixed(2) this.oilActualPay = this.oilAmount.toFixed(2)
} }
console.log("不使用囤油卡",this.oilAmount, this.oilDiscount,this.couponAmount,this.fullReduction,this.oilCardAmount) console.log("不使用囤油卡", this.consumeAmount ,this.oilAmount, this.oilDiscount,this.couponAmount,this.fullReduction,this.oilCardAmount)
}, },
// 使 // 使
countAmountUnBalance(){ countAmountUnBalance(){
@ -3893,7 +3895,7 @@
} }
}) })
// oilCardAmount // oilCardAmount
if (flag) amount = item.oilPrice * item.liters if (flag) amount = item.amount
oilAmount += amount oilAmount += amount
}) })
if (oilAmount>0) this.oilCardAmount = this.oilAmount - oilAmount if (oilAmount>0) this.oilCardAmount = this.oilAmount - oilAmount

View File

@ -385,7 +385,7 @@
// uni.reLaunch({ // uni.reLaunch({
// url: '/pagesRefuel/orderSuccess/index' // url: '/pagesRefuel/orderSuccess/index'
// }) // })
uni.navigateTo({ uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.orderNo, url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.orderNo,
}) })
return; return;
@ -426,10 +426,10 @@
// console.log(res); // console.log(res);
// }) // })
// uni.reLaunch({ // uni.reLaunch({
// url: '/pagesRefuel/orderSuccess/index'
// }) // })
uni.navigateTo({ uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this
.orderNo, .orderNo,
}) })
@ -472,7 +472,7 @@
// url: '/pagesRefuel/orderSuccess/index' // url: '/pagesRefuel/orderSuccess/index'
// }) // })
uni.navigateTo({ uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this
.orderNo, .orderNo,
}) })
@ -1063,4 +1063,4 @@
position: fixed; position: fixed;
top: 0px; top: 0px;
} }
</style> </style>

View File

@ -553,7 +553,7 @@
getspearIndex(num, data) { getspearIndex(num, data) {
this.spearIndex = num this.spearIndex = num
this.oilGunNum = data.id this.oilGunNum = data.id
this.oils = data.oilName this.oilName = data.oilName
this.tankId = data.tankId this.tankId = data.tankId
this.oilPrice = data.oilPrice this.oilPrice = data.oilPrice
this.getPaymentPreferential() this.getPaymentPreferential()