羊只分组页面下拉框调整为嵌套查询,羊舍管理添加可视化
This commit is contained in:
@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
m.id,
|
||||
m.sheep_id,
|
||||
m.group_id,
|
||||
bsg.group_name,
|
||||
s.id AS bs_sheep_id,
|
||||
s.bs_manage_tags,
|
||||
s.variety,
|
||||
@@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
s.family
|
||||
FROM bas_sheep_group_mapping m
|
||||
JOIN sheep_file s ON s.id = m.sheep_id
|
||||
JOIN bas_sheep_group bsg ON m.group_id = bsg.group_id
|
||||
<where>
|
||||
<if test="sheepId != null"> AND m.sheep_id = #{sheepId}</if>
|
||||
<if test="groupId != null"> AND m.group_id = #{groupId}</if>
|
||||
@@ -125,4 +127,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
FROM bas_sheep_group_mapping
|
||||
WHERE group_id = #{groupId}
|
||||
</select>
|
||||
|
||||
<!-- 树形分组 -->
|
||||
<select id="selectGroupTree"
|
||||
resultType="com.zhyc.module.base.domain.BasGroupTreeVo">
|
||||
SELECT group_id AS groupId,
|
||||
group_name AS groupName,
|
||||
parent_id AS parentId
|
||||
FROM bas_sheep_group
|
||||
ORDER BY parent_id, group_id
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -25,6 +25,7 @@
|
||||
columns,
|
||||
comment
|
||||
from da_sheepfold
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectDaSheepfoldList" parameterType="DaSheepfold" resultMap="DaSheepfoldResult">
|
||||
@@ -33,6 +34,10 @@
|
||||
<if test="ranchId != null ">and ranch_id = #{ranchId}</if>
|
||||
<if test="sheepfoldTypeId != null ">and sheepfold_type_id = #{sheepfoldTypeId}</if>
|
||||
</where>
|
||||
|
||||
order by
|
||||
SUBSTRING_INDEX(row_no, '-', 1),
|
||||
CAST(columns AS UNSIGNED)
|
||||
</select>
|
||||
|
||||
<select id="selectDaSheepfoldById" parameterType="Long" resultMap="DaSheepfoldResult">
|
||||
|
||||
Reference in New Issue
Block a user