From 5a5ec7c43cb0d161a0b4338aa6d66fdd1525ec93 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: Tue, 29 Oct 2024 15:29:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0=E6=89=93=E5=8D=B0?=
=?UTF-8?q?=E5=B0=8F=E7=A5=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/OilSuppliersController.java | 6 +++++-
.../mapper/OilSuppliersMapper.java | 8 ++++++++
.../mapper/xml/OilSuppliersMapper.xml | 4 ++++
.../service/OilSuppliersService.java | 2 +-
.../service/impl/OilSuppliersServiceImpl.java | 8 ++++++--
.../src/views/cashier/orderComponents/order_Cashier.vue | 7 -------
6 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilSuppliersController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilSuppliersController.java
index edbaa3a88..f1f3be3c2 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilSuppliersController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilSuppliersController.java
@@ -80,7 +80,11 @@ public class OilSuppliersController extends BaseController {
sysLog.setContent("新增油站供应商的数据信息");
sysLogService.saveVo(sysLog);
}catch (Exception ignored){}
- return getSuccessResult(this.oilSuppliersService.insert(oilSuppliers));
+ int mm =this.oilSuppliersService.insert(oilSuppliers);
+ if(mm==1){
+ return getFailureResult("供应商名称不能重复");
+ }
+ return getSuccessResult(mm);
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilSuppliersMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilSuppliersMapper.java
index 7653d6fec..787db0c68 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilSuppliersMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilSuppliersMapper.java
@@ -86,6 +86,14 @@ public interface OilSuppliersMapper {
*/
int deleteById(Integer id);
+ /**
+ * 通过名字查询油站信息
+ *
+ * @param name
+ * @return
+ */
+ List getSuppliersByName(String name);
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilSuppliersMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilSuppliersMapper.xml
index 224aaa66f..f3afad2f4 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilSuppliersMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilSuppliersMapper.xml
@@ -143,6 +143,10 @@
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilSuppliersService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilSuppliersService.java
index 6de628ffa..0775e3686 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilSuppliersService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilSuppliersService.java
@@ -40,7 +40,7 @@ public interface OilSuppliersService {
* @param oilSuppliers 实例对象
* @return 实例对象
*/
- OilSuppliers insert(OilSuppliers oilSuppliers);
+ Integer insert(OilSuppliers oilSuppliers);
/**
* 修改数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilSuppliersServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilSuppliersServiceImpl.java
index e0755dba1..30bd5e13d 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilSuppliersServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilSuppliersServiceImpl.java
@@ -56,12 +56,16 @@ public class OilSuppliersServiceImpl implements OilSuppliersService {
* @return 实例对象
*/
@Override
- public OilSuppliers insert(OilSuppliers oilSuppliers) {
+ public Integer insert(OilSuppliers oilSuppliers) {
+ List oilSuppliers1 =this.oilSuppliersDao.getSuppliersByName(oilSuppliers.getSupplierName());
+ if(oilSuppliers1.size()>0){
+ return 1;
+ }
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilSuppliers.setStoreId(nowAccountInfo.getStoreId());
oilSuppliers.setCreateBy(nowAccountInfo.getStaffId().toString());
this.oilSuppliersDao.insert(oilSuppliers);
- return oilSuppliers;
+ return 0;
}
/**
diff --git a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue
index af9cb3724..78aa9d79f 100644
--- a/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue
+++ b/fuintCashierWeb/src/views/cashier/orderComponents/order_Cashier.vue
@@ -1057,8 +1057,6 @@ export default {
// consumeAmount:this.consumeAmount,
// // 屯油卡付款
// consumeRefuelMoney:this.consumeRefuelMoney.toFixed(2),
-
-
},
// 打印商品支付后的订单
@@ -1080,13 +1078,10 @@ export default {
}
oilOrderR.push(o)
})
- console.log("111111111111111111111111111")
let goodsOrderR = []
if (this.goodsInfo) {
this.goodsInfo.forEach(order => {
- console.log("111111111111111111111111111")
-
let o = {
oilName: order.name,
unit: order.num + "" + order.unit,
@@ -1095,8 +1090,6 @@ export default {
goodsOrderR.push(o)
})
}
-
-
// 支付方式
const payTypeMap = {
'CASH': '现金',