干奶录入查询问题
This commit is contained in:
@@ -34,24 +34,33 @@
|
||||
<where>
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
AND s.bs_manage_tags IN
|
||||
<foreach collection="manageTagsList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
<foreach collection="manageTagsList" item="tag" open="(" separator="," close=")">
|
||||
#{tag}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(manageTagsList == null or manageTagsList.size() == 0) and manageTags != null and manageTags != ''">
|
||||
AND s.bs_manage_tags like concat('%', #{manageTags}, '%')
|
||||
</if>
|
||||
|
||||
<if test="technicianList != null and technicianList.size() > 0">
|
||||
AND d.tecahnician IN
|
||||
<foreach collection="technicianList" item="tech" open="(" separator="," close=")">
|
||||
#{tech}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(technicianList == null or technicianList.size() == 0) and tecahnician != null and tecahnician != ''">
|
||||
AND d.tecahnician like concat('%', #{tecahnician}, '%')
|
||||
</if>
|
||||
|
||||
<if test="params.beginTime != null and params.beginTime != ''">
|
||||
AND d.datetime >= #{params.beginTime}
|
||||
AND date_format(d.datetime,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''">
|
||||
AND d.datetime <= #{params.endTime}
|
||||
AND date_format(d.datetime,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
|
||||
<if test="status != null "> and d.status = #{status}</if>
|
||||
<if test="sheepfold != null "> and d.sheepfold = #{sheepfold}</if>
|
||||
<if test="tecahnician != null and tecahnician != ''"> and d.tecahnician like concat('%', #{tecahnician}, '%')</if>
|
||||
<if test="variety != null and variety != ''"> and s.variety like concat('%', #{variety}, '%')</if>
|
||||
</where>
|
||||
order by d.datetime desc
|
||||
@@ -64,6 +73,13 @@
|
||||
LIMIT 20
|
||||
</select>
|
||||
|
||||
<select id="searchTechnicianList" resultType="String">
|
||||
SELECT nick_name
|
||||
FROM sys_user
|
||||
WHERE nick_name LIKE concat('%', #{query}, '%')
|
||||
LIMIT 20
|
||||
</select>
|
||||
|
||||
<select id="selectScDryMilkById" parameterType="Long" resultMap="ScDryMilkResult">
|
||||
<include refid="selectScDryMilkVo"/>
|
||||
where d.id = #{id}
|
||||
|
||||
Reference in New Issue
Block a user