From db6d7f9c855e01e73f901cb00986c5f82030c72a Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Fri, 12 Jan 2024 17:03:22 +0800 Subject: [PATCH] bug --- .../controller/OilGunController.java | 9 ++ .../controller/OilNumberController.java | 9 ++ .../service/OilGunService.java | 6 ++ .../service/impl/OilGunServiceImpl.java | 10 ++ .../service/impl/OilNumberServiceImpl.java | 4 + fuintCashierWeb/src/api/cashier/oilGuns.js | 24 +++++ fuintCashierWeb/src/api/cashier/oilnumber.js | 10 ++ .../views/cashier/NewComponents/homeindex.vue | 2 +- .../cashier/orderComponents/order_Cashier.vue | 28 ++--- .../cashier/orderComponents/order_Oil.vue | 102 +++++++++--------- .../cashier/orderComponents/order_Unpaid.vue | 46 ++++++-- 11 files changed, 172 insertions(+), 78 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilGunController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilGunController.java index acad763c0..3660ca759 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilGunController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilGunController.java @@ -115,5 +115,14 @@ public class OilGunController extends BaseController { public ResponseObject queryGunList(@PathVariable Integer numberId){ return getSuccessResult(oilGunService.selectOilGunByNumberId(numberId)); } + + /** + * 查询当前店铺所有油枪列表信息 + * @return + */ + @GetMapping("/queryOilGunList") + public ResponseObject selectGunList(){ + return getSuccessResult(oilGunService.selectOilGuns()); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java index b33e6b82c..ce9a0e96f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilNumberController.java @@ -129,6 +129,15 @@ public class OilNumberController extends BaseController { return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(storeId)); } + /** + * 根据店铺id查询油号信息 + * @return + */ + @GetMapping("/getOilNumber") + public ResponseObject queryOilNumbers(){ + return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(null)); + } + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilGunService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilGunService.java index 0d1a20425..4ee679a44 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilGunService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilGunService.java @@ -67,4 +67,10 @@ public interface OilGunService { * @return */ List selectOilGunByNumberId(Integer numberId); + + /** + * 根据油号id查询油枪列表信息 + * @return + */ + List selectOilGuns(); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilGunServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilGunServiceImpl.java index 582087b30..f0ff6aecd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilGunServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilGunServiceImpl.java @@ -140,7 +140,17 @@ public class OilGunServiceImpl implements OilGunService { public List selectOilGunByNumberId(Integer numberId) { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.eq("number_id",numberId); + queryWrapper.eq("status","启用"); List list = oilGunDao.selectList(queryWrapper); return list; } + + @Override + public List selectOilGuns() { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("store_id",nowAccountInfo.getStoreId()); + queryWrapper.eq("status","启用"); + return oilGunDao.selectList(queryWrapper); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java index 244de6c25..7b44e8914 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilNumberServiceImpl.java @@ -96,6 +96,10 @@ public class OilNumberServiceImpl extends ServiceImpl selectOilNumberNameByStoreId(Integer storeId) { + if (storeId==null){ + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + storeId = nowAccountInfo.getStoreId(); + } return baseMapper.selectOilNumberNameByStoreId(storeId); } diff --git a/fuintCashierWeb/src/api/cashier/oilGuns.js b/fuintCashierWeb/src/api/cashier/oilGuns.js index 90ff565a1..a5110d209 100644 --- a/fuintCashierWeb/src/api/cashier/oilGuns.js +++ b/fuintCashierWeb/src/api/cashier/oilGuns.js @@ -16,3 +16,27 @@ export function getOilTank(id) { method: 'get', }) } + +// 查询油罐信息 +export function getOilGunInfo(numberId) { + return request({ + url: '/business/petrolStationManagement/oilGun/queryGunList/'+numberId, + method: 'get', + }) +} + +// 查询油罐信息 +export function getOilGuns() { + return request({ + url: '/business/petrolStationManagement/oilGun/queryOilGunList', + method: 'get', + }) +} + +// 查询油罐信息 +export function getOilNumberGun() { + return request({ + url: '/business/petrolStationManagement/oilGun/selectByNumberTGUn', + method: 'get', + }) +} diff --git a/fuintCashierWeb/src/api/cashier/oilnumber.js b/fuintCashierWeb/src/api/cashier/oilnumber.js index a3c253db1..f277d87ac 100644 --- a/fuintCashierWeb/src/api/cashier/oilnumber.js +++ b/fuintCashierWeb/src/api/cashier/oilnumber.js @@ -17,3 +17,13 @@ export function oilNumberList() { // data: data }) } + + +// 查询所有油号 +export function oilNumbers() { + return request({ + url: '/business/petrolStationManagement/oilNumber/getOilNumber', + method: 'get', + // data: data + }) +} diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 00f8a3c6c..c6b6136ee 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -2557,7 +2557,7 @@ this.gunList.forEach(item => { if (item.id==data.id){ this.form.id = item.id - this.form.gunName = item.gunName + this.form.gunName = item.id } }) }) diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue index 140668d0b..8682bd074 100644 --- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue +++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue @@ -94,28 +94,22 @@ - - + - + + - + + - - - + + - - + - + - - - - + + - - - - - + + + - + - - +