From c0ef04123821c5d8b634295539ca3f5ece959d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Wed, 5 Jun 2024 17:33:31 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF?= =?UTF-8?q?=E4=BB=98bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/views/staff/tag/list.vue | 8 +- .../controller/TagCodeRecordController.java | 4 + .../business/tag/service/TagCodeService.java | 2 + .../tag/service/impl/TagCodeServiceImpl.java | 79 ++----------------- gasStation-uni/pagesHome/MyCard/MyCard.vue | 6 +- 5 files changed, 19 insertions(+), 80 deletions(-) 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/business/tag/controller/TagCodeRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java index aeeaa55ea..3eb99c4ad 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,7 @@ public class TagCodeRecordController extends BaseController { tagCodeRecord.setId(tagCodeRecordDTO.getId()); tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId()); tagCodeRecord.setStaffName(ljStaff.getRealName()); + tagCodeService.selectByTagCodeSn(tagCodeRecordDTO.getTagCodeSn()); return getSuccessResult(this.tagCodeRecordService.updateById(tagCodeRecord)); } // 一键解绑 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..ac3bacba4 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 @@ -165,80 +165,13 @@ 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) + return null; } private List getImageFiles(String directory) { 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 + + From 517ab6d9b47601fdee0678c5e68dd7e420eb1490 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 5 Jun 2024 17:38:50 +0800 Subject: [PATCH 3/6] bug --- gasStation-uni/pages/index/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index ab8152df3..fe0f1960a 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -102,10 +102,10 @@ {{store.name}}{{store.description ? "("+store.description+")" : ""}} - + From fcf5d4b06c32c0b18f0c445395ebeb7596ae081e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 6 Jun 2024 08:35:59 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF?= =?UTF-8?q?=E4=BB=98bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../printer/template/PrintIntegralReport.java | 2 +- .../tag/controller/TagCodeRecordController.java | 15 ++++++++++++--- .../tag/service/impl/TagCodeServiceImpl.java | 8 ++++++-- .../src/main/resources/static/qrCodeImg/logo.png | Bin 4023 -> 0 bytes 4 files changed, 19 insertions(+), 6 deletions(-) delete mode 100644 fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/logo.png 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 216678f3a..4df28fe62 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 @@ -33,7 +33,7 @@ public class PrintIntegralReport { List> o = (List>)handover.get("shoppingCart"); for (Map stringStringMap : o) { sb.append(""+stringStringMap.get("giftName")+""); - sb.append(""+((ObjectUtil.isNotEmpty(stringStringMap.get("markPurchases")))?stringStringMap.get("markPurchases").toString():"0"+""); + 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 3eb99c4ad..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 @@ -83,7 +83,18 @@ public class TagCodeRecordController extends BaseController { tagCodeRecord.setId(tagCodeRecordDTO.getId()); tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId()); tagCodeRecord.setStaffName(ljStaff.getRealName()); - tagCodeService.selectByTagCodeSn(tagCodeRecordDTO.getTagCodeSn()); + 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)); } // 一键解绑 @@ -189,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/impl/TagCodeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java index ac3bacba4..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 { @@ -170,8 +173,9 @@ public class TagCodeServiceImpl extends ServiceImpl impl @Override public TagCode selectByTagCodeSn(String tagCodeSn) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(TagCode::getTagCodeSn, tagCodeSn) - return null; + 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 b5771e209bb677e2ebd5ff766ad5ee11790f305a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4023 zcmaJ^c|25Y`#+XyC`+5OUafkYqmlSEl)+V zC53EJB$S8m@9Vz4*Y&-Yb3W(3Y;(d~fM1#)0003Cvn<7K1}HtM`$d{YenwQ;C^-S(Bw!dKGPRQ{5d$=<+Bb^=&62=9 zyT3g7ffNAnXPh^N0JjBz*>4v5+kn2(URc+5KlGCVF`&OikMw zfqqB8XK2+;V}LL3B>(G>)mVo1y5YXue4A!H*}eQbcg`t##g9HFply&`y$2%Ui`qzhj;o^=JbnXrW48s;xu1fDr z0))La)fp=QkX*N#V0eTJXiqO11AyvJlBY^iBrIQo0Kg>g;^BKnJ9a%2Wz`F2Ka;Jl zm*B>3H!<9`zg|z+c>6eWFMqydnvs-!J))2I(LEmNyxo~2!VjOpv<0SyMNVCup-60Z zm&|RDtd8R2HEIU!!OA0Ic6-G4K{`MZ8S%UjEL!s#vj{vLBWeqI(M&DkE;aT|aziV8 zRiTRN#GNwykvPx{R==`-rP>^pa`AyJ&s**Q!zU$j(pO&Q(YolGLT=2o0>3Wlhx?Gs z#|6b*$3F$ofzT`QIA#}2(Cg}Z?5V5KrtX)WrInh*aTCsP#{@V|*7<0lm`r^xmJQm^ z9n0J^3p#yCxWPX>G11)F(iv5vIIHkbqzdH37jX&JZ~&5AV*OAtL}axw*aLAt(b-!Vf)wRw=S8((e`~WLqlDBobRbj)NXB zS>W`fibSDA>uYN*&&Ml75iep!E%^%eV~SElj=}K;6TCNXs2gYG-L`En&3y~H9fP=W z(t?;5Xalv2F5ROUkg3?7C5~z>QYq|tok{Q}toT5u=~a9mBKDc4zfSM=`?OF-lS(V+pE1(m&x$HE_9vj;Cy)b@Oi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f)^KDGtUM8R*t#G@mH2=PKe4(Ipz-y*c zc~Kzl;GA)s+53_RGg-}F1`$4QjX29!BLu$pn{&KmMu86HO}Y2@q{Jb7v=N}{+PQWx zHF2LIb9qiO+DI~r+eb9ubK7oh6KFdUL6e;9wKv_RvXh$HuqHw)inh2kQGM>}%G4V% zmjkEYsw}?{m%gW>#P7wTXwk}cZO--qydYul`!3w~l(JgX@=yG7|6z{6kO^>c^P;zI zAmO}-iEA~6%U7@PbJN4EXW!v;|5owjl2$w4ZZqafWPCshmRxS}7Zwlg(*rDz;hg}s SYs}WS&%*SCNx89m_ Date: Thu, 6 Jun 2024 11:35:37 +0800 Subject: [PATCH 5/6] bug --- .../views/cashier/NewComponents/homeindex.vue | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 6ebaf5759..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
@@ -3167,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; } } @@ -3192,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 } @@ -3236,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() @@ -3248,7 +3248,7 @@ await this.countAmountFull() } }) - }) + } }, // 调用优惠券接口 getCoupon(){ @@ -3877,6 +3877,7 @@ }, // 囤油卡变化后总金额的变化 changeRefuelMoney(){ + this.isOilStorageCard = false getRecord({mtUserId:this.member.id}).then(res => { this.oilCardAmount = 0 let oilAmount = 0 @@ -3889,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 @@ -3899,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() }) From a73308f067a1449de5f99d463ef2e7594f9d560c Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Thu, 6 Jun 2024 11:49:38 +0800 Subject: [PATCH 6/6] bug --- .../fuint/api/fuyou/service/impl/FyPayServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)) {