From b0d060edf08a1242103f602470d9b6150f267459 Mon Sep 17 00:00:00 2001 From: "DESKTOP-369JRHT\\12997" <9> Date: Fri, 31 May 2024 18:15:41 +0800 Subject: [PATCH] no message --- fuintAdmin/src/views/setting/print/index.vue | 6 ++--- .../service/impl/IntegralGiftServiceImpl.java | 17 +++++++------ .../controller/AllOrderInfoController.java | 2 +- .../order/mapper/xml/AllOrderInfoMapper.xml | 10 ++++---- .../printer/entity/PrintDeviceInfo.java | 2 +- .../mapper/xml/PrintDeviceInfoMapper.xml | 24 +++++++++---------- .../impl/PrintDeviceInfoServiceImpl.java | 4 ++-- .../pagesHome/BusinessData/BusinessData.vue | 7 ++++-- .../pagesHome/changeShifts/changeShifts.vue | 20 ++++++++++++++-- 9 files changed, 57 insertions(+), 35 deletions(-) diff --git a/fuintAdmin/src/views/setting/print/index.vue b/fuintAdmin/src/views/setting/print/index.vue index 79a4fa172..bbd09d4bf 100644 --- a/fuintAdmin/src/views/setting/print/index.vue +++ b/fuintAdmin/src/views/setting/print/index.vue @@ -114,7 +114,7 @@ @@ -150,7 +150,7 @@ export default { appPublicKey: '', // 应用公钥(key) platformPublicKey: '', // 平台公钥(publicKey) accessToken: '', // token - isAcquiesce: false // token + acquiesce: false // token }, // 是否显示弹出层 open: false, @@ -271,7 +271,7 @@ export default { appPublicKey: '', // 应用公钥(key) platformPublicKey: '', // 平台公钥(publicKey) accessToken: '' , // token - isAcquiesce: false // token + acquiesce: false // token } }, } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java index 57a818960..8d227e62a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java @@ -227,14 +227,17 @@ public class IntegralGiftServiceImpl implements IntegralGiftService { String lockKey = "integralGift-"+id; Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS); if (isLock) { - redisLock.unlock(lockKey); - - IntegralGift integralGift = integralGiftDao.queryById(id); - if (editInventory.compareTo(integralGift.getRemainingInventory())>0) { - throw new RuntimeException("该积分商品库存不足!"); - }else { - integralGiftDao.updateInventoryByLock(id, editInventory); + try { + IntegralGift integralGift = integralGiftDao.queryById(id); + if (editInventory.compareTo(integralGift.getRemainingInventory())>0) { + throw new RuntimeException("该积分商品库存不足!"); + }else { + integralGiftDao.updateInventoryByLock(id, editInventory); + } + }finally { + redisLock.unlock(lockKey); } + } return true; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java index 7afddb0e4..f23e84aa4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/AllOrderInfoController.java @@ -223,7 +223,7 @@ public class AllOrderInfoController extends BaseController { @GetMapping("getIndexData4Pos") public ResponseObject getIndexData4Pos(){ - AllOrderInfoVo indexData4Pos = allOrderInfoService.getIndexData4Pos(); +// AllOrderInfoVo indexData4Pos = allOrderInfoService.getIndexData4Pos(); return getSuccessResult(allOrderInfoService.getIndexData4Pos()); } @GetMapping("getOperatingDataPos") diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml index 0267154f2..63001b722 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/AllOrderInfoMapper.xml @@ -321,10 +321,10 @@ SUM(CASE WHEN aoi.content = '油品充值' THEN pay_money ELSE 0 END) AS oilBalance, COUNT(CASE WHEN aoi.content = '油品充值' THEN 0 END) AS oilBalanceCount, - SUM(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'WECHAT' THEN pay_money ELSE 0 END) AS userBalanceByWechat, - COUNT(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'WECHAT' THEN 0 END) AS userBalanceCountByWechat, - SUM(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'ALIPAY' THEN pay_money ELSE 0 END) AS userBalanceByAli, - COUNT(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'ALIPAY' THEN 0 END) AS userBalanceCountByali + SUM(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'WECHAT' THEN pay_money ELSE 0 END) AS userBalanceByWechat, + COUNT(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'WECHAT' and pay_type = 'WECHAT' THEN 0 END) AS userBalanceCountByWechat, + SUM(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'ALIPAY' THEN pay_money ELSE 0 END) AS userBalanceByAli, + COUNT(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'ALIPAY' THEN 0 END) AS userBalanceCountByali @@ -373,7 +373,7 @@ FROM all_order_info where store_id = #{allOrderInfo.storeId} - AND pay_time = CURDATE() + AND DATE(pay_time) = CURDATE() select - id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,is_acquiesce from print_device_info + id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,acquiesce from print_device_info where id = #{id} - insert into print_device_info(is_acquiesce,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ) - values (#{is_acquiesce},#{machineCode},#{msign},#{deviceName},#{userId}, + insert into print_device_info(acquiesce,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ) + values (#{acquiesce},#{machineCode},#{msign},#{deviceName},#{userId}, #{appKey},#{appSecret},#{appPublicKey},#{platformPublicKey},#{accessToken},#{payment}, #{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId}) @@ -194,8 +194,8 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev store_id = #{storeId}, - - is_acquiesce = #{isAcquiesce}, + + acquiesce = #{acquiesce}, where id = #{id} @@ -205,11 +205,11 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev delete from print_device_info where id = #{id} - - update print_device_info set is_acquiesce = false where store_id = #{storeId} + + update print_device_info set acquiesce = false where store_id = #{storeId} - diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/service/impl/PrintDeviceInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/service/impl/PrintDeviceInfoServiceImpl.java index 7785f2af8..eeb2cb170 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/service/impl/PrintDeviceInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/service/impl/PrintDeviceInfoServiceImpl.java @@ -60,7 +60,7 @@ public class PrintDeviceInfoServiceImpl implements PrintDeviceInfoService { public PrintDeviceInfo insert(PrintDeviceInfo printDeviceInfo) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); printDeviceInfo.setStoreId(nowAccountInfo.getStoreId()); - if (printDeviceInfo.getIsAcquiesce()) { + if (printDeviceInfo.getAcquiesce()) { printDeviceInfoMapper.updateIsAcquiesce(nowAccountInfo.getStoreId()); } this.printDeviceInfoMapper.insert(printDeviceInfo); @@ -75,7 +75,7 @@ public class PrintDeviceInfoServiceImpl implements PrintDeviceInfoService { */ @Override public PrintDeviceInfo update(PrintDeviceInfo printDeviceInfo) { - if (printDeviceInfo.getIsAcquiesce()) { + if (printDeviceInfo.getAcquiesce()) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); printDeviceInfoMapper.updateIsAcquiesce(nowAccountInfo.getStoreId()); } diff --git a/pos-uni/pagesHome/BusinessData/BusinessData.vue b/pos-uni/pagesHome/BusinessData/BusinessData.vue index abcefc4f6..5a5960131 100644 --- a/pos-uni/pagesHome/BusinessData/BusinessData.vue +++ b/pos-uni/pagesHome/BusinessData/BusinessData.vue @@ -28,7 +28,9 @@ 会员充值/笔数 - ¥{{dataForm.userBalance}}/{{dataForm.userBalanceCount}} + + ¥{{ (Number) (dataForm.userBalance)+(Number)(dataForm.oilBalance) }}/{{(Number)(dataForm.userBalanceCount)+(Number)(dataForm.oilBalanceCount)}} + @@ -36,7 +38,6 @@ 退款金额/笔数 ¥{{dataForm.refBalance}}/{{dataForm.refBalanceCount}} - @@ -128,6 +129,8 @@ alipaycount: '0', userBalanceByAli: '0', userBalanceCountByali: '0', + oilBalance: '0', + oilBalanceCount: '0', }, form: { diff --git a/pos-uni/pagesHome/changeShifts/changeShifts.vue b/pos-uni/pagesHome/changeShifts/changeShifts.vue index 866afbcf5..bec46d282 100644 --- a/pos-uni/pagesHome/changeShifts/changeShifts.vue +++ b/pos-uni/pagesHome/changeShifts/changeShifts.vue @@ -43,11 +43,14 @@ - + 交班 + + @@ -62,6 +65,8 @@ data() { return { titles: "交接班", + showModal: false, + showLoading: false, handoverList: "", indexData: { totalPayMoney: '0', @@ -134,6 +139,8 @@ }, // 获取销售数据 shift() { + this.showModal = false + this.showLoading = true let recordData = this.handoverList let handoverRecord = { @@ -141,7 +148,6 @@ recordData: JSON.stringify(recordData), type: 0, status: this.handoverList.baseInfo.handoverType, - staffId: this.staff.staffId } request({ url: 'business/handoverRecord/addByPos', @@ -150,12 +156,22 @@ }).then((res) => { if (res.code == 200) { this.indexData = res.data + this.handoverByPos() + this.showLoading = false + + // 交班成功 + uni.showToast({ + title: "交班成功!", + icon: "none" + }) } else { uni.showToast({ title: res.data, icon: "none" }) } + this.showLoading = false + }) } }