diff --git a/fuintAdmin/src/views/staff/tag/list.vue b/fuintAdmin/src/views/staff/tag/list.vue index 46aebdda7..b59684e76 100644 --- a/fuintAdmin/src/views/staff/tag/list.vue +++ b/fuintAdmin/src/views/staff/tag/list.vue @@ -32,13 +32,13 @@ - + @@ -46,12 +46,12 @@ - + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java index 404acf702..2dfd96ae0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java @@ -434,7 +434,9 @@ public class FyPayServiceImpl implements FyPayService { } if (!reqMap.get("trans_stat").equals("USERPAYING")) { - this.insertAllOrderInfo(receiveParameter, payStatus,discountAmount); + String payChannel = "cashier"; + if (ObjectUtil.isNotEmpty(map1.get("payChannel"))) payChannel = map1.get("payChannel"); + this.insertAllOrderInfo(receiveParameter, payStatus,discountAmount,payChannel); } if (ObjectUtil.isNotEmpty(merchantConfig)) { @@ -569,7 +571,7 @@ public class FyPayServiceImpl implements FyPayService { /** * 添加所有订单信息 */ - private void insertAllOrderInfo(ReceiveParameter receiveParameter, String payStatus,Double discountAmount) { + private void insertAllOrderInfo(ReceiveParameter receiveParameter, String payStatus,Double discountAmount,String payChannel) { AllOrderInfo allOrderInfo = new AllOrderInfo(); allOrderInfo.setOrderNo(receiveParameter.getOrderNo()); allOrderInfo.setType(receiveParameter.getType()); @@ -578,7 +580,7 @@ public class FyPayServiceImpl implements FyPayService { allOrderInfo.setPayMoney(receiveParameter.getGoodsMoney()); allOrderInfo.setPayType(receiveParameter.getPayType()); allOrderInfo.setUserId(receiveParameter.getUserId()); - allOrderInfo.setPayChannel("cashier"); + allOrderInfo.setPayChannel(payChannel); allOrderInfo.setStatus(payStatus); allOrderInfo.setDiscountAmount(discountAmount); if (payStatus.equals("paid")) { @@ -749,7 +751,7 @@ public class FyPayServiceImpl implements FyPayService { BeanUtils.copyProperties(receiveParameterPos, receiveParameter); Double discountAmount = 0.0; if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount(); - this.insertAllOrderInfo(receiveParameter, receiveParameterPos.getPayType(),discountAmount); + this.insertAllOrderInfo(receiveParameter, receiveParameterPos.getPayType(),discountAmount,"POS"); if (reqMap.get("trans_stat").equals("SUCCESS")) { payStatus = "paid"; if (!ObjectUtil.isEmpty(oilOrder)) { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index 09ef61ac6..627cd4e15 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -1246,6 +1246,10 @@ public class OilOrderServiceImpl extends ServiceImpl i UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId()); // 根据用户id查询用户信息 LJUserVo userVo1 = userService.selectUserById(userId, storeId); + if (ObjectUtil.isEmpty(userVo1)){ + res.put("error", "当前会员不存在!"); + return res; + } // 根据日期生成订单信息 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java index 1f1427e2b..2d1c06314 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java @@ -34,6 +34,7 @@ public class PrintIntegralReport { for (Map stringStringMap : o) { sb.append(""+stringStringMap.get("giftName")+""); sb.append(""+((ObjectUtil.isNotEmpty(stringStringMap.get("markPurchases")))?stringStringMap.get("markPurchases").toString():"0")+""); + sb.append(""+ stringStringMap.get("price")+""); } sb.append(""); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java index aeeaa55ea..33900f53a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java @@ -49,6 +49,9 @@ public class TagCodeRecordController extends BaseController { @Resource private OilTagService oilTagService; + @Resource + private TagCodeService tagCodeService; + @Resource private ILJStaffService mtStaffService; @@ -80,6 +83,18 @@ public class TagCodeRecordController extends BaseController { tagCodeRecord.setId(tagCodeRecordDTO.getId()); tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId()); tagCodeRecord.setStaffName(ljStaff.getRealName()); + TagCodeRecord tagCodeRecord1 = tagCodeRecordService.getById(tagCodeRecordDTO.getId()); + OilTag oilTag = oilTagService.getById(tagCodeRecord1.getOilTagId()); + TagCode tagCode = tagCodeService.selectByTagCodeSn(oilTag.getTagCodeSn()); + String collection = tagCode.getCollection(); + if(collection.contains("staffId")){ + String[] split = collection.split("&staffId"); + collection = split[0]+"&staffId="+tagCodeRecordDTO.getStaffId(); + }else { + collection = collection+"&staffId="+tagCodeRecordDTO.getStaffId(); + } + tagCode.setCollection(collection); + tagCodeService.updateById(tagCode); return getSuccessResult(this.tagCodeRecordService.updateById(tagCodeRecord)); } // 一键解绑 @@ -185,8 +200,6 @@ public class TagCodeRecordController extends BaseController { return getSuccessResult("该员工暂未绑定码牌!"); } - @Resource - private TagCodeService tagCodeService; /** * 码牌与油站解绑 * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java index 5e5493ce3..76f673351 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java @@ -20,5 +20,7 @@ public interface TagCodeService extends IService { ResponseEntity add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception; ResponseEntity exportZip(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception; + + TagCode selectByTagCodeSn(String tagCodeSn); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java index 5d6ecba99..798ccb96b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java @@ -59,6 +59,9 @@ public class TagCodeServiceImpl extends ServiceImpl impl @Autowired private BackendFileController backendFileController; + @Autowired + private TagCodeMapper tagCodeMapper; + @Override @Transactional public ResponseEntity add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception { @@ -165,80 +168,14 @@ public class TagCodeServiceImpl extends ServiceImpl impl return ResponseEntity.ok() .body(new InputStreamResource(zipInputStream)); -// boolean flag = false; -// if (ObjectUtils.isNotEmpty(tagCodeDTO) && ObjectUtils.isNotEmpty(tagCodeDTO.getTotal())){ -// int total = tagCodeDTO.getTotal(); -// Random random1 = new Random(); -// int i2 = random1.nextInt(1000); -// for (int i = 0; i < total; i++) { -// Random random = new Random(); -// int i1 = random.nextInt(90000000); -// //String url = "https://oil.youkerr.com/"; -// 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.setCollection(url); -// tagCode.setTagCodeSn("byx"+i1); -// tagCode.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString())); -// -// //在图片上生成二维码 -// String backgroundImage = "static/qrCodeImg/huanyingguanglin.jpg"; -// InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage); -// String urls = ""; -// urls = "/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "-"+i2; -// File file1 = new File(urls); -// // String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg"; -// String finalPath=urls+"/" + "byx"+i1 + ".jpg"; -// qrCodeUtils.createLogoCodePictures(null, url, finalPath, null,null,urls); -// -// -// // 判断目录是否存在 -// if (!file1.exists()) { -// file1.mkdirs(); -// } -// -// File file =new File(finalPath); -// FileInputStream fileInputStream =new FileInputStream(file); -// // FileInputStream fileInputStream =new FileInputStream(file1); -// MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream); -//// 返回图片路径 -// String saveFile = backendFileController.saveFile(resFile); -// //return saveFile; -// tagCode.setImageUrl(saveFile); -// 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; -// -// List imageFiles = getImageFiles(IMAGE_DIRECTORY); -// InputStream zipInputStream = createZipInputStream(imageFiles); -// -// response.setHeader("Content-Disposition", "attachment; filename=\"images.zip\""); -// -// return ResponseEntity.ok() -// .body(new InputStreamResource(zipInputStream)); -// }else { -// InputStream inputStream = new InputStream() { -// @Override -// public int read() throws IOException { -// return 0; -// } -// }; -// return ResponseEntity.ok() -// .body(new InputStreamResource(inputStream)); -// } - - - //String IMAGE_DIRECTORY = "D:\\temp\\qrCode\\DateUtil.formatDate(new Date(), \"yyyyMMdd\") +"; - + } + @Override + public TagCode selectByTagCodeSn(String tagCodeSn) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(TagCode::getTagCodeSn, tagCodeSn); + TagCode tagCodes = tagCodeMapper.selectOne(queryWrapper); + return tagCodes; } private List getImageFiles(String directory) { diff --git a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/logo.png b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/logo.png deleted file mode 100644 index b5771e209..000000000 Binary files a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/logo.png and /dev/null differ diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 7420ef80b..e861358bd 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -195,10 +195,10 @@
-
囤油卡 -
+
-->
储值卡 @@ -218,7 +218,7 @@
¥{{ ((+oilActualPay) + (+goodsActualPay)).toFixed(2) }}
-
优惠合计:{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}元/{{consumeRefuelMoney.toFixed(2)}}L
+
优惠合计:{{ (oilDiscount + goodsDiscount + fullReduction + couponAmount).toFixed(2) }}元
立即结算
@@ -1126,7 +1126,7 @@
支付宝
银联二维码
挂账
-
囤油卡
+
储值卡
小程序码
@@ -1147,10 +1147,10 @@
储值卡付款
¥{{ consumeAmount }}
-
+
实付款
¥0.00
@@ -1926,6 +1926,7 @@ this_.isQuery = false; clearInterval(timer); } + await this_.getMemberAfter(); } }) }, 1000); @@ -3166,15 +3167,15 @@ }) this.goodsActualPay = this.goodsAmount - this.goodsDiscount; }, - getOilCoupon(){ + async getOilCoupon() { let type = 0; // if (this.consumeAmount==0){ - if (this.consumeRefuelMoney>0){ + if (this.consumeRefuelMoney > 0) { type = 1; - }else { - if (this.consumeAmount>0){ + } else { + if (this.consumeAmount > 0) { type = 0; - }else { + } else { type = 2; } } @@ -3191,12 +3192,12 @@ this.paymentActive.mtUserLevel = this.member.gradeId this.paymentActive.userId = this.member.id let _this = this - this.oilOrder.forEach(item => { + for (const item of this.oilOrder) { _this.paymentActive.amount = item.amount _this.paymentActive.oilId = item.oilName _this.paymentActive.storeId = item.storeId - getPaymentActive(_this.paymentActive).then(async res => { + await getPaymentActive(_this.paymentActive).then(async res => { item.activeId = res.data.activeId item.type = res.data.type let discount = { type: "", discount: 0, oilName: item.oilName, gunName: item.gunName } @@ -3235,7 +3236,7 @@ } } // } - console.log(_this.oilDiscount, 111) + console.log(_this.oilDiscount, _this.couponAmount, _this.fullReduction, 3239) this.countAmountFull() if (this.isOilStorageCard) { await this.countAmountFull() @@ -3247,7 +3248,7 @@ await this.countAmountFull() } }) - }) + } }, // 调用优惠券接口 getCoupon(){ @@ -3876,6 +3877,7 @@ }, // 囤油卡变化后总金额的变化 changeRefuelMoney(){ + this.isOilStorageCard = false getRecord({mtUserId:this.member.id}).then(res => { this.oilCardAmount = 0 let oilAmount = 0 @@ -3888,7 +3890,7 @@ if (item.oilName==i.oilType){ item.lockupPrice = i.lockupPrice amount = item.lockupPrice * item.liters - this.isOilStorageCard = true + if (amount>0) this.isOilStorageCard = true flag = false }else { flag = true @@ -3898,6 +3900,7 @@ if (flag) amount = item.amount oilAmount += amount }) + console.log("3903", this.isOilStorageCard) if (oilAmount>0) this.oilCardAmount = this.oilAmount - oilAmount this.countAmountFull() }) diff --git a/gasStation-uni/pagesHome/MyCard/MyCard.vue b/gasStation-uni/pagesHome/MyCard/MyCard.vue index 6103d909a..af8fea5c5 100644 --- a/gasStation-uni/pagesHome/MyCard/MyCard.vue +++ b/gasStation-uni/pagesHome/MyCard/MyCard.vue @@ -56,9 +56,9 @@ 电子囤油卡 - {{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].refuelMoney || '0'}}L +