Browse Source

派单选下级时姓名改成模糊搜索

anderx 7 years ago
parent
commit
5e1541412a

+ 2 - 2
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -409,7 +409,7 @@
     where a.id <![CDATA[ <> ]]> '1'
     and (a.status !='注销' or a.status is null)
     <if test = "name != null"> 
-    	and a.name = #{name,jdbcType=VARCHAR}
+    	and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')
     </if>
     <if test = "departmentId != null">
     	and a.department_id = #{departmentId,jdbcType=VARCHAR}
@@ -445,7 +445,7 @@
     where a.id <![CDATA[ <> ]]> '1'
     and (a.status != '注销' or a.status is null)
     <if test = "name != null"> 
-    	and a.name = #{name,jdbcType=VARCHAR}
+    	and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')
     </if>
     <if test = "departmentId != null">
     	and a.department_id = #{departmentId,jdbcType=VARCHAR}

+ 5 - 3
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -714,7 +714,7 @@ from
 			where a.id = #{contractId,jdbcType=VARCHAR}
 	  	</when>
 	  		<when test="buyerType == 1">
-	  		 select
+	  		select
 				a.id,
 				a.serial_number as serialNumber,
 				date_format(a.sign_date,'%Y-%m-%d %H:%i:%S') as signDate,
@@ -728,14 +728,16 @@ from
 				b.nickname as buyerName,
 				d.name as principalName,
 				f.name as buyerProvince,
-				g.cname as projectType
+				g.cname as projectType,
+				t.contract_no as contractNo
 			from
 				contract a left join user b on
 				a.uid = b.id left join admin d on
 				a.principal = d.id left join organization_identity e on
 				a.uid = e.uid left join district_glossory f on
 				e.location_province  = f.id left join business_varieties g on
-				a.type = g.id
+				a.type = g.id  left join t_order t on
+				a.order_no=t.order_no
 			where a.id = #{contractId,jdbcType=VARCHAR}
 	  	</when>
 	  </choose>