diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination
index 9ae2767..bc32de4 100644
--- a/ABAP_AS_WITH_POOL.jcoDestination
+++ b/ABAP_AS_WITH_POOL.jcoDestination
@@ -1,5 +1,5 @@
#for tests only !
-#Fri May 24 10:59:58 CST 2024
+#Fri May 24 13:35:10 CST 2024
jco.destination.pool_capacity=10
jco.client.lang=ZH
jco.client.ashost=172.19.0.120
@@ -7,5 +7,5 @@ jco.client.saprouter=
jco.client.user=RFC
jco.client.sysnr=00
jco.destination.peak_limit=10
-jco.client.passwd=eh#cz-.rtcXe[J,v=]]kN+:WMGkUk|l**Lw)XHiZ5XN)Zm0`
+jco.client.passwd=u?K-{MKso0NR;1AE/+Y9s/7g^0`/0Uo7Mk{RY=Aw!O|5bcY$
jco.client.client=300
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 67cfaa7..a59fc6e 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
@@ -279,6 +279,13 @@ public class QuotController extends BaseController
quot.setUpdateBy(getUsername());
quot.setQuotApprovalStatus("1");//报价单 状态设置为 协助中
quot.setQuotInquiryDate(DateUtils.getNowDate());//报价单 询价日期设置为 当前日期
+
+ // 校验 是否已有重复报价单(客户+项目名)
+ Boolean flag = quotService.checkExistQuot(getUsername(),quot.getQuotCustomerBm(),quot.getQuotProject());
+ if(flag){
+ return error("存在相同客户且项目名称一致的报价单,无法提交");
+ }
+
if(StringUtils.isEmpty(quot_id)){
quot.setQuotId(UUID.fastUUID().toString());
quot.setQuotCode(IdUtils.createNo("BJD_",2));
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 b1ac4be..f626dd0 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
@@ -3,6 +3,7 @@ package com.ruoyi.quot.mapper;
import java.util.List;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.domain.QuotMaterial;
+import org.apache.ibatis.annotations.Param;
/**
* 报价Mapper接口
@@ -98,4 +99,13 @@ public interface QuotMapper
* @return
*/
Quot selectQuotByQuotHjId(String quotHjId);
+
+ /**
+ * 校验 是否已有重复报价单(客户+项目名)
+ * @param username
+ * @param quotCustomerBm
+ * @param quotProject
+ * @return
+ */
+ String checkExistQuot(@Param("quotSalesmanCode") String username, @Param("quotCustomerBm") String quotCustomerBm, @Param("quotProject") String quotProject);
}
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 7a261ee..f4fa28b 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
@@ -81,4 +81,13 @@ public interface IQuotService
* @return
*/
int changQuotPrintStatus(Quot quot);
+
+ /**
+ * 校验 是否已有重复报价单(客户+项目名)
+ * @param username
+ * @param quotCustomerBm
+ * @param quotProject
+ * @return
+ */
+ Boolean checkExistQuot(String username, String quotCustomerBm, String quotProject);
}
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 09d3b80..f0e498e 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
@@ -144,6 +144,19 @@ public class QuotServiceImpl implements IQuotService
return quotMapper.updateQuot(quot);
}
+ /**
+ * 校验 是否已有重复报价单(客户+项目名)
+ * @param username
+ * @param quotCustomerBm
+ * @param quotProject
+ * @return
+ */
+ @Override
+ public Boolean checkExistQuot(String username, String quotCustomerBm, String quotProject) {
+ String count = quotMapper.checkExistQuot(username,quotCustomerBm,quotProject);
+ return !"0".equals(count);
+ }
+
/**
* 新增报价单-产品信息
*
@@ -159,6 +172,7 @@ public class QuotServiceImpl implements IQuotService
for (QuotMaterial quotMaterial : quotMaterialList)
{
quotMaterial.setMatId(UUID.fastUUID().toString());
+ //TODO 标准
quotMaterial.setQuotId(quotId);
list.add(quotMaterial);
}
diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml
index 034ae9e..e47cd01 100644
--- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml
@@ -154,6 +154,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.quot_id = #{quotId}
+
+
insert into quot