소스 검색

固定资产菜单模糊查询

Sun 3 년 전
부모
커밋
a64331ca7d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      ruoyi-anpin/src/main/resources/mapper/anpin/TAssetsMapper.xml

+ 2 - 2
ruoyi-anpin/src/main/resources/mapper/anpin/TAssetsMapper.xml

@@ -42,14 +42,14 @@
     <select id="selectTAssetsList" parameterType="TAssets" resultMap="TAssetsResult">
         <include refid="selectTAssetsVo"/>
         <where>
-            <if test="fDept != null  and fDept != ''">and f_dept = #{fDept}</if>
+            <if test="fDept != null  and fDept != ''">and f_dept like concat('%', #{fDept}, '%')</if>
             <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
             <if test="fSpec != null  and fSpec != ''">and f_spec = #{fSpec}</if>
             <if test="fUnit != null  and fUnit != ''">and f_unit = #{fUnit}</if>
             <if test="fNumber != null ">and f_number = #{fNumber}</if>
             <if test="fAmount != null ">and f_amount = #{fAmount}</if>
             <if test="fImage != null  and fImage != ''">and f_image = #{fImage}</if>
-            <if test="fCode != null  and fCode != ''">and f_code = #{fCode}</if>
+            <if test="fCode != null  and fCode != ''">and f_code like concat('%', #{fCode}, '%')</if>
         </where>
     </select>