bug修复以及数据分离操作
This commit is contained in:
@@ -24,11 +24,15 @@
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScBreastRatingVo">
|
||||
select sbr.*,
|
||||
bs.manage_tags as manageTags,
|
||||
sbr.user_id,
|
||||
sbr.dept_id,
|
||||
bsv.id as varietyId,
|
||||
bsv.variety as varietyName,
|
||||
'乳房评分' as event_type,
|
||||
@@ -60,6 +64,13 @@
|
||||
<if test="sc.isDelete != null">
|
||||
and bs.is_delete = #{sc.isDelete}
|
||||
</if>
|
||||
<if test="sc.technician != null and sc.technician != ''">
|
||||
and sbr.technician = #{sc.technician}
|
||||
</if>
|
||||
<if test="sc.score != null">
|
||||
and sbr.score = #{sc.score}
|
||||
</if>
|
||||
${sc.params.dataScope}
|
||||
</where>
|
||||
ORDER BY sbr.create_time DESC
|
||||
</select>
|
||||
@@ -84,6 +95,8 @@
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
@@ -98,6 +111,8 @@
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -137,6 +152,15 @@
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags LIMIT 50
|
||||
ORDER BY bs.manage_tags
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectLatestBySheepIdBeforeDate" resultMap="ScBreastRatingResult">
|
||||
SELECT *
|
||||
FROM sc_breast_rating
|
||||
WHERE sheep_id = #{sheepId}
|
||||
AND event_date <= #{measureDate}
|
||||
ORDER BY event_date DESC, create_time DESC LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user