From 5aa407dd55a0a8f37774308743bb0a593bd8da3c Mon Sep 17 00:00:00 2001
From: Administrator <hbal>
Date: 星期一, 12 十二月 2022 14:26:10 +0800
Subject: [PATCH] 增加客户、备注

---
 JavaSource/com/mandi/fendan/mapper/BusinessMapper.java |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/JavaSource/com/mandi/fendan/mapper/BusinessMapper.java b/JavaSource/com/mandi/fendan/mapper/BusinessMapper.java
index 16953e5..6fc27b9 100644
--- a/JavaSource/com/mandi/fendan/mapper/BusinessMapper.java
+++ b/JavaSource/com/mandi/fendan/mapper/BusinessMapper.java
@@ -22,8 +22,25 @@
 	})
 	public Map<String,Object> existsIssueCardByNos(@Param("bussinessNos") String bussinessNos);
 
-	@Select({"select top 1 bussinessNo from bussinesssheet where cardno=#{cardno} and sstatus='鍦ㄥ姙' order by indx" })
-	public String getBusinessNoByCardNo(@Param("cardno") String cardno);
+	/**
+	 * 鍙栭攢鍞湪鐢ㄥ崱
+	 * @param cardno
+	 * @param numberplates
+	 * @param sdepartNo
+	 * @return
+	 */
+	@Select({"<script>" +
+			"select top 1 bussinessNo from bussinesssheet " +
+			"<where>",
+			"cardno=#{cardno} and sstatus='鍦ㄥ姙' and numberplates = #{numberplates} " ,
+			"<if test=\"sdepartNo!='' and sdepartNo!=null\">",
+			" and sdepartNo=#{sdepartNo}",
+			"</if>",
+//			"and btid=3", //3涓烘垚鍝侀攢鍞�
+			"</where>",
+			" order by indx",
+			"</script>" })
+	public String getBusinessNoByCardNo(@Param("cardno") String cardno,@Param("numberplates") String numberplates,@Param("sdepartNo")String sdepartNo);
 
 	@Deprecated
 	@Select("select top 1 * from bussinesssheet a left join gbusi_type b on a.btid=b.id where b.businesstypeNo=#{btNo} and a.numberplates=#{vehicleID} and a.sstatus=#{sstatus} and a.sdepartNo=#{sdepartNo} ")

--
Gitblit v1.9.3