From c4db16795ded4b42deef5779c3565910e39a292f Mon Sep 17 00:00:00 2001
From: xd <844539747@qq.com>
Date: Fri, 9 Aug 2024 14:30:45 +0800
Subject: [PATCH] '123'
---
.../web/controller/quot/QuotController.java | 14 +++-
.../com/ruoyi/quot/mapper/QuotMapper.java | 9 ++-
.../com/ruoyi/quot/service/IQuotService.java | 9 ++-
.../quot/service/impl/QuotServiceImpl.java | 13 +++-
.../domain/RegisteredCompany.java | 28 ++++----
.../main/resources/mapper/quot/QuotMapper.xml | 5 +-
.../RegisteredCompanyMapper.xml | 12 +++-
.../registeredCompany/index.vue | 72 ++++++++++++-------
8 files changed, 115 insertions(+), 47 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java
index f0573f2..29c1cc6 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java
@@ -446,6 +446,18 @@ public class QuotController extends BaseController
}
}
+ //根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
+ Boolean isExist = false;
+ String quotCustomerBm = quot.getQuotCustomerBm();
+ String tax = SapHanaUtils.selectTaxByBm(quotCustomerBm);
+ if(StringUtils.isNotEmpty(tax)){
+ isExist = quotService.selectRegisteredCompanyByTax2(tax);
+ }
+
+ if(isExist){
+ return error("该单位有不良记录,暂停报价");
+ }
+
String quot_id = quot.getQuotId();
quot.setUpdateBy(getUsername());
@@ -749,7 +761,7 @@ public class QuotController extends BaseController
}
/**
- * 校验该客户税号是否在经营部注册公司名单里
+ * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param quot
* @return
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java b/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java
index 0bafb0e..c75ce5c 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java
@@ -160,12 +160,19 @@ public interface QuotMapper
void saveQuotFeedbackExplanation(Quot quot);
/**
- * 根据客户税号查询经营部注册公司名单里是否存在
+ * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param tax
* @return
*/
String selectRegisteredCompanyByTax(String tax);
+ /**
+ * 根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
+ * @param tax
+ * @return
+ */
+ String selectRegisteredCompanyByTax2(String tax);
+
/**
* 统计有效报价单模块-获取报价单数据
* @param quot
diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java
index 3c46988..187def4 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java
@@ -145,12 +145,19 @@ public interface IQuotService
void saveQuotFeedbackExplanation(Quot quot);
/**
- * 根据客户税号查询经营部注册公司名单里是否存在
+ * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param tax
* @return
*/
Boolean selectRegisteredCompanyByTax(String tax);
+ /**
+ * 根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
+ * @param tax
+ * @return
+ */
+ Boolean selectRegisteredCompanyByTax2(String tax);
+
/**
* 统计有效报价单模块-获取报价单数据
* @param quot
diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java
index 37639d0..76c5c20 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java
@@ -325,7 +325,7 @@ public class QuotServiceImpl implements IQuotService
}
/**
- * 根据客户税号查询经营部注册公司名单里是否存在
+ * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param tax
* @return
*/
@@ -334,4 +334,15 @@ public class QuotServiceImpl implements IQuotService
String count = quotMapper.selectRegisteredCompanyByTax(tax);
return !"0".equals(count);
}
+
+ /**
+ * 根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
+ * @param tax
+ * @return
+ */
+ @Override
+ public Boolean selectRegisteredCompanyByTax2(String tax) {
+ String count = quotMapper.selectRegisteredCompanyByTax2(tax);
+ return !"0".equals(count);
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/registeredCompany/domain/RegisteredCompany.java b/ruoyi-system/src/main/java/com/ruoyi/registeredCompany/domain/RegisteredCompany.java
index a83c430..88d610f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/registeredCompany/domain/RegisteredCompany.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/registeredCompany/domain/RegisteredCompany.java
@@ -38,6 +38,14 @@ public class RegisteredCompany extends BaseEntity
@Excel(name = "状态",dictType = "common_state")
private String regState;
+ /** 是否允许特批报价-报价组提交OA(0-允许,1-禁止) */
+ @Excel(name = "是否允许特批报价",dictType = "allow_tp_state")
+ private String regAllowTpState;
+
+ /** 是否允许询价-业务员提交询价单(0-允许,1-禁止) */
+ @Excel(name = "是否允许询价",dictType = "allow_quot_state")
+ private String regAllowQuotState;
+
public void setRegId(String regId)
{
this.regId = regId;
@@ -92,20 +100,10 @@ public class RegisteredCompany extends BaseEntity
{
return regState;
}
+ public String getRegAllowTpState() { return regAllowTpState; }
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("regId", getRegId())
- .append("regSalesmanCode", getRegSalesmanCode())
- .append("regSalesmanName", getRegSalesmanName())
- .append("regCompany", getRegCompany())
- .append("regTax", getRegTax())
- .append("regState", getRegState())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .toString();
- }
+ public void setRegAllowTpState(String regAllowTpState) { this.regAllowTpState = regAllowTpState; }
+ public String getRegAllowQuotState() { return regAllowQuotState; }
+
+ public void setRegAllowQuotState(String regAllowQuotState) { this.regAllowQuotState = regAllowQuotState; }
}
diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml
index 44be5d7..0e29c4a 100644
--- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml
@@ -223,7 +223,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
diff --git a/ruoyi-system/src/main/resources/mapper/registeredCompany/RegisteredCompanyMapper.xml b/ruoyi-system/src/main/resources/mapper/registeredCompany/RegisteredCompanyMapper.xml
index 89db97c..0af5716 100644
--- a/ruoyi-system/src/main/resources/mapper/registeredCompany/RegisteredCompanyMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/registeredCompany/RegisteredCompanyMapper.xml
@@ -11,6 +11,8 @@
+
+
@@ -18,7 +20,9 @@
- select reg_id, reg_salesman_code, reg_salesman_name, reg_company, reg_tax, reg_state, create_by, create_time, update_by, update_time from registered_company
+ select reg_id, reg_salesman_code, reg_salesman_name, reg_company, reg_tax,
+ reg_state, reg_allow_tp_state, reg_allow_quot_state, create_by, create_time, update_by, update_time
+ from registered_company