From 1da831fd2bd26deb1484e46a2be04cb9f058d294 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 16 Oct 2024 11:31:40 +0800 Subject: [PATCH] 10.16 --- .../fleet/controller/FleetInfoController.java | 2 +- .../fleet/service/FleetInfoService.java | 2 +- .../service/impl/FleetInfoServiceImpl.java | 7 ++- .../service/impl/OilOrderServiceImpl.java | 6 +- .../service/impl/LJUserServiceImpl.java | 7 ++- .../views/cashier/NewComponents/newHome.vue | 27 +++++++-- .../newHomeComponents/carCard.vue | 55 +++++++++++++++++++ gasStation-uni/config.js | 4 +- 8 files changed, 97 insertions(+), 13 deletions(-) create mode 100644 fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java index 56770b4b0..dfbcd4052 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java @@ -93,7 +93,7 @@ public class FleetInfoController extends BaseController { */ @GetMapping("/getFleetInfoByStoreId") public ResponseObject getFleetInfoByStoreId(@Param("storeId")Integer storeId){ - return getSuccessResult(fleetInfoService.queryByStoreId(storeId)); + return getSuccessResult(fleetInfoService.queryByStoreId(storeId,null)); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java index fced3df7c..e57dc21e7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetInfoService.java @@ -68,7 +68,7 @@ public interface FleetInfoService { * @param storeId * @return */ - List queryByStoreId(Integer storeId); + List queryByStoreId(Integer storeId,Integer userId); /** * 新增车队信息(小程序) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java index 353559f07..a3b9de855 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java @@ -233,12 +233,15 @@ public class FleetInfoServiceImpl extends ServiceImpl queryByStoreId(Integer storeId) { + public List queryByStoreId(Integer storeId,Integer userId) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + if (ObjectUtil.isEmpty(userId)){ + userId = nowAccountInfo.getId(); + } //查询当前登录人的车队信息 List fleetMembers = fleetMemberMapper.selectList(new LambdaQueryWrapper() .eq(FleetMember::getStoreId, storeId) - .eq(FleetMember::getUserId, nowAccountInfo.getId())); + .eq(FleetMember::getUserId, userId)); //获取所在车队的id集合 List fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList()); if (CollUtil.isEmpty(fleetIds)) { 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 15162d936..f7c93fc68 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 @@ -22,6 +22,7 @@ import com.fuint.business.convenienceSore.entity.LJGoods; import com.fuint.business.convenienceSore.entity.SaleDetail; import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.SaleDetailService; +import com.fuint.business.fleet.service.FleetInfoService; import com.fuint.business.integral.service.IntegralSettingsService; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService; @@ -198,6 +199,8 @@ public class OilOrderServiceImpl extends ServiceImpl i private IMtUserFuelService userFuelService; @Autowired private CardValueRuleService cardValueRuleService; + @Autowired + private FleetInfoService fleetInfoService; @Override public IPage selectOilOrderList(Page page, OilOrder order) { @@ -487,7 +490,8 @@ public class OilOrderServiceImpl extends ServiceImpl i MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(storeId, transactionType, oilGunId); if (ObjectUtil.isEmpty(merchantConfig) && !payType.equals("CASH") && !payType.equals("after_pay") && - !map.get("allAmount").equals("0")) { + !map.get("allAmount").equals("0") && !payType.equals("card_value") && !payType.equals("fule_card") + && !payType.equals("car_card_value")) { orders.put("error", "请先配置支付通道"); return orders; } 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 bce6aede6..d774af90a 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 @@ -350,7 +350,7 @@ public class LJUserServiceImpl extends ServiceImpl impleme List list = userFuelService.list(queryWrapper); ljUserVo.setUserFuels(list); //判断当前用户是否存在车队 - List fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId); + List fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId,null); if (CollUtil.isNotEmpty(fleetInfoUniVos)) { ljUserVo.setFleetInfoUniVos(fleetInfoUniVos); } @@ -381,6 +381,11 @@ public class LJUserServiceImpl extends ServiceImpl impleme queryWrapper.eq(MtUserFuel::getStoreId,nowAccountInfo.getStoreId()).eq(MtUserFuel::getMtUserId,it.getId()); List list = userFuelService.list(queryWrapper); it.setUserFuels(list); + //判断当前用户是否存在车队 + List fleetInfoUniVos = fleetInfoService.queryByStoreId(nowAccountInfo.getStoreId(),it.getId()); + if (CollUtil.isNotEmpty(fleetInfoUniVos)) { + it.setFleetInfoUniVos(fleetInfoUniVos); + } }); return ljUserVos; } diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue index 80fc3ea87..85435a146 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue @@ -15,10 +15,12 @@ placement="bottom" trigger="hover">
储值卡:¥{{ chooseVipUser.cardBalance || 0 }}
-
储值卡:¥1000.00
-
储值卡:¥1000.00
-
储值卡:¥1000.00
-
储值卡:¥1000.00
+
+
囤油卡:¥{{ item.fuelAmount }}
+
+
+
车队卡:¥{{ item.totalBalance }}
+
@@ -533,6 +535,18 @@ + + + + + 取 消 + 确 定 + + + @@ -543,6 +557,7 @@ import pickUp from './newHomeComponents/pickUpTheOrder.vue' import accountPending from './newHomeComponents/accountPending.vue' import memberRecharge from './newHomeComponents/memberRecharge.vue' import refuelingAmount from './newHomeComponents/refuelingAmount.vue' +import carCard from "./newHomeComponents/carCard.vue"; import { cashRegisterList, cashRegisterGoodsList, @@ -569,6 +584,7 @@ export default { dicts: ['CardCoupon_type'], data() { return { + dialogVisible:false, isClickable: false, // 默认不可点击 payForm: { realyPayBills: 0.00, @@ -787,7 +803,8 @@ export default { pickUp, accountPending, memberRecharge, - refuelingAmount + refuelingAmount, + carCard }, created() { //初始化 油枪 商品 diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue new file mode 100644 index 000000000..acec171f4 --- /dev/null +++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/carCard.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/gasStation-uni/config.js b/gasStation-uni/config.js index c7170c716..88bdc848c 100644 --- a/gasStation-uni/config.js +++ b/gasStation-uni/config.js @@ -5,8 +5,8 @@ module.exports = { // baseUrl: 'https://www.tuofeng.cc/oilAdmin/', // baseUrl: 'https://oilapi.youkerr.com/oilAdmin/', // baseUrl: 'https://8q4f124343.yicp.fun/', - baseUrl: 'http://47.94.122.58:8080/', - // baseUrl: 'http://localhost:8080/', + // baseUrl: 'http://47.94.122.58:8080/', + baseUrl: 'http://localhost:8080/', // baseUrl: 'http://192.168.1.5:8002/cdJdc', imagesUrl: 'http://www.nuoyunr.com/lananRsc', // 应用信息