|
|
|
@ -30,11 +30,70 @@
|
|
|
|
|
<result column="name" property="name"/> |
|
|
|
|
<result column="type" property="type"/> |
|
|
|
|
</resultMap> |
|
|
|
|
<resultMap id="ownMap" type="com.logpm.basicdata.vo.BasicdataCategoryVO"> |
|
|
|
|
<result column="id" property="id"/> |
|
|
|
|
<result column="tenant_id" property="tenantId"/> |
|
|
|
|
<result column="create_user" property="createUser"/> |
|
|
|
|
<result column="create_time" property="createTime"/> |
|
|
|
|
<result column="update_user" property="updateUser"/> |
|
|
|
|
<result column="update_time" property="updateTime"/> |
|
|
|
|
<result column="status" property="status"/> |
|
|
|
|
<result column="is_deleted" property="isDeleted"/> |
|
|
|
|
<result column="create_dept" property="createDept"/> |
|
|
|
|
<result column="reserve1" property="reserve1"/> |
|
|
|
|
<result column="reserve2" property="reserve2"/> |
|
|
|
|
<result column="reserve3" property="reserve3"/> |
|
|
|
|
<result column="reserve4" property="reserve4"/> |
|
|
|
|
<result column="reserve5" property="reserve5"/> |
|
|
|
|
<result column="pid" property="pid"/> |
|
|
|
|
<result column="stair_code" property="stairCode"/> |
|
|
|
|
<result column="second_code" property="secondCode"/> |
|
|
|
|
<result column="stair_name" property="stairName"/> |
|
|
|
|
<result column="second_name" property="secondName"/> |
|
|
|
|
<result column="three_code" property="threeCode"/> |
|
|
|
|
<result column="three_name" property="threeName"/> |
|
|
|
|
<result column="four_code" property="fourCode"/> |
|
|
|
|
<result column="four_name" property="fourName"/> |
|
|
|
|
<result column="name" property="name"/> |
|
|
|
|
<result column="type" property="type"/> |
|
|
|
|
<result column="title" property="title"/> |
|
|
|
|
<result column="value" property="value"/> |
|
|
|
|
<result column="key" property="key"/> |
|
|
|
|
<result column="has_children" property="hasChildren"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBasicdataCategoryPage" resultMap="basicdataCategoryResultMap"> |
|
|
|
|
select * from logpm_basicdata_category where is_deleted = 0 |
|
|
|
|
</select> |
|
|
|
|
<select id="lazyTree" resultMap="ownMap"> |
|
|
|
|
select lbc.id,lbc.tenant_id,lbc.pid,lbc.name AS title,lbc.type, |
|
|
|
|
lbc.id AS "value", |
|
|
|
|
lbc.id AS "key", |
|
|
|
|
( |
|
|
|
|
SELECT |
|
|
|
|
CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
|
|
|
|
FROM |
|
|
|
|
logpm_basicdata_category |
|
|
|
|
WHERE |
|
|
|
|
pid = lbc.id and is_deleted = 0 |
|
|
|
|
) AS "has_children" |
|
|
|
|
|
|
|
|
|
from logpm_basicdata_category lbc |
|
|
|
|
<where> |
|
|
|
|
lbc.is_deleted = 0 |
|
|
|
|
<if test="param2 == 1 or param2 == ''"> |
|
|
|
|
and lbc.type = 1 |
|
|
|
|
</if> |
|
|
|
|
<if test="param2 != 1 and param2 != null and param2 != ''"> |
|
|
|
|
and lbc.pid = #{param2} |
|
|
|
|
</if> |
|
|
|
|
<if test="param1 != null and param1 != ''"> |
|
|
|
|
and lbc.tenant_id = #{param1} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
ORDER BY lbc.type |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="exportBasicdataCategory" resultType="com.logpm.basicdata.excel.BasicdataCategoryExcel"> |
|
|
|
|