第三次提交,添加模糊搜索

master
duhl 6 years ago
parent b784c53704
commit 5c0294fa1e

@ -24,9 +24,9 @@
</li>
<li class="select-time">
<label>记录时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginRecordtime]"/>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endRecordtime]"/>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>

@ -21,11 +21,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBaseCarbrandList" parameterType="BaseCarbrand" resultMap="BaseCarbrandResult">
<include refid="selectBaseCarbrandVo"/>
<where>
<if test="branno != null and branno != ''"> and BranNo = #{branno}</if>
<if test="cartype != null and cartype != ''"> and CarType = #{cartype}</if>
<if test="recorderid != null and recorderid != ''"> and RecorderID = #{recorderid}</if>
<if test="branno != null and branno != ''">
AND BranNo like '%'+#{branno}+ '%'
</if>
<if test="cartype != null and cartype != ''">
AND CarType like '%'+#{cartype}+ '%'
</if>
<if test="recorderid != null and recorderid != ''">
AND RecorderID like '%'+#{recorderid}+ '%'
</if>
<if test="deleteflag != null and deleteflag != ''"> and DeleteFlag = #{deleteflag}</if>
<if test="remark != null and remark != ''"> and Remark = #{remark}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND datediff(dd,#{params.beginTime},recordtime)>=0
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND datediff(dd,recordtime,#{params.endTime})>=0
</if>
<if test="recordtime != null "> and RecordTime = #{recordtime}</if>
</where>
</select>

Loading…
Cancel
Save