Commit 65f4169e authored by qiankunpingtai's avatar qiankunpingtai
Browse files

修改可能存在的sql问题

parent d90841a6
...@@ -68,11 +68,15 @@ ...@@ -68,11 +68,15 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and dh.OperTime &lt;= #{endTime} and dh.OperTime &lt;= #{endTime}
</if> </if>
<if test="materialParam != null"> <if test="materialParam != null and materialParam != ''">
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%') <bind name="materialParam" value="'%' + _parameter.materialParam + '%'"/>
and (m.Name like #{materialParam} or m.Model like #{materialParam})
</if> </if>
<if test="depotIds != null"> <if test="depotIds != null and depotIds != ''">
and di.DepotId in (${depotIds}) and di.DepotId in
<foreach item="did" index="index" collection="depotIds.split(',')" open="(" separator="," close=")">
#{did}
</foreach>
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_Flag,'0') !='1'
order by dh.Id desc order by dh.Id desc
...@@ -103,11 +107,15 @@ ...@@ -103,11 +107,15 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and dh.OperTime &lt;= #{endTime} and dh.OperTime &lt;= #{endTime}
</if> </if>
<if test="materialParam != null"> <if test="materialParam != null and materialParam != ''">
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%') <bind name="materialParam" value="'%' + _parameter.materialParam + '%'"/>
and (m.Name like #{materialParam} or m.Model like #{materialParam})
</if> </if>
<if test="depotIds != null"> <if test="depotIds != null and depotIds != ''">
and di.DepotId in (${depotIds}) and di.DepotId in
<foreach item="did" index="index" collection="depotIds.split(',')" open="(" separator="," close=")">
#{did}
</foreach>
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_Flag,'0') !='1'
</select> </select>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment