组织开发

This commit is contained in:
lhx
2025-12-01 18:05:59 +08:00
parent bb3397c1a7
commit 30f7dc155a
10 changed files with 241 additions and 19 deletions

View File

@@ -21,5 +21,40 @@
</select>
<select id="getList" resultType="com.dc.dc_project.model.vo.OrgVo">
select
o.name as name,
o.code as code,
o.type as type,
o.sort_order as sortOrder,
o.remark as remark,
o.leader_id as leaderId,
p.name as leaderName,
o.parent_id as parentId,
o1.name as parentName,
o.id as id
from sys_org o
left join sys_personnel p on o.leader_id = p.id
left join sys_org o1 on o.parent_id = o1.id
left join sys_org_laboratory_standard ol on o.id = ol.org_id
<where>
and o.is_deleted = 0
<if test="queryDto.id != null">
and o.id = #{queryDto.id}
</if>
<if test="queryDto.name != null">
and o.name like concat('%',#{queryDto.name},'%')
</if>
<if test="queryDto.type != null">
and o.type = #{queryDto.type}
</if>
<if test="queryDto.code != null">
and o.code like concat('%',#{queryDto.code},'%')
</if>
<if test="queryDto.remark != null">
and o.remark like concat('%',#{queryDto.remark},'%')
</if>
<if test="queryDto.standardCategoryId != null">
and ol.standard_category_id = #{queryDto.standardCategoryId}
</if>
</where>
</select>
</mapper>

View File

@@ -4,20 +4,13 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dc.dc_project.mapper.StandardCategoryMapper">
<resultMap id="BaseResultMap" type="com.dc.dc_project.model.pojo.StandardCategory">
<id property="id" column="id" />
<result property="parent_id" column="parent_id" />
<result property="name" column="name" />
<result property="code" column="code" />
<result property="sort_order" column="sort_order" />
<result property="remark" column="remark" />
<result property="created_at" column="created_at" />
<result property="updated_at" column="updated_at" />
<result property="is_deleted" column="is_deleted" />
</resultMap>
<sql id="Base_Column_List">
id,parent_id,name,code,sort_order,remark,
created_at,updated_at,is_deleted
</sql>
<select id="selectListByOrgId" resultType="com.dc.dc_project.model.pojo.StandardCategory">
select ssc.*
from sys_standard_category ssc
where id in (select standard_category_id from sys_org_laboratory_standard where org_id=#{orgId})
</select>
</mapper>