添加商品类型和机构选择父级的时候只能从父级或者旁级选择的控制
This commit is contained in:
@@ -33,14 +33,14 @@
|
||||
<resultMap id="BaseTreeResultMap" type="com.jsh.erp.datasource.vo.TreeNode">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="text"/>
|
||||
<collection column="id" property="children" javaType="java.util.ArrayList"
|
||||
<collection column="{currentId=currentId,id=id}" property="children" javaType="java.util.ArrayList"
|
||||
ofType="com.jsh.erp.datasource.vo.TreeNode" select="getNextNodeTree"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="NextTreeResultMap" type="com.jsh.erp.datasource.vo.TreeNode">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="text"/>
|
||||
<collection column="id" property="children" javaType="java.util.ArrayList"
|
||||
<collection column="{currentId=currentId,id=id}" property="children" javaType="java.util.ArrayList"
|
||||
ofType="com.jsh.erp.datasource.vo.TreeNode" select="getNextNodeTree"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -50,19 +50,25 @@
|
||||
|
||||
<select id="getNextNodeTree" resultMap="NextTreeResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>,#{currentId} as currentId
|
||||
FROM jsh_materialcategory
|
||||
WHERE ParentId = #{id}
|
||||
<if test="currentId != null">
|
||||
and id !=#{currentId}
|
||||
</if>
|
||||
and status !='2'
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
<select id="getNodeTree" resultMap="BaseTreeResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>,#{currentId} as currentId
|
||||
FROM jsh_materialcategory
|
||||
WHERE ParentId = -1
|
||||
and status !='2'
|
||||
<if test="currentId != null">
|
||||
and id !=#{currentId}
|
||||
</if>
|
||||
order by sort asc
|
||||
</select>
|
||||
<insert id="addMaterialCategory" parameterType="com.jsh.erp.datasource.entities.MaterialCategory"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<result column="id" property="id"/>
|
||||
<result column="org_abr" property="text"/>
|
||||
<result column="org_no" property="attributes"/>
|
||||
<collection column="org_no" property="children" javaType="java.util.ArrayList"
|
||||
<collection column="{currentId=currentId,org_no=org_no}" property="children" javaType="java.util.ArrayList"
|
||||
ofType="com.jsh.erp.datasource.vo.TreeNode" select="getNextNodeTree"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<result column="id" property="id"/>
|
||||
<result column="org_abr" property="text"/>
|
||||
<result column="org_no" property="attributes"/>
|
||||
<collection column="org_no" property="children" javaType="java.util.ArrayList"
|
||||
<collection column="{currentId=currentId,org_no=org_no}" property="children" javaType="java.util.ArrayList"
|
||||
ofType="com.jsh.erp.datasource.vo.TreeNode" select="getNextNodeTree"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -24,18 +24,24 @@
|
||||
|
||||
<select id="getNextNodeTree" resultMap="NextTreeResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>,#{currentId} as currentId
|
||||
FROM jsh_organization
|
||||
WHERE org_parent_no = #{org_no}
|
||||
<if test="currentId != null">
|
||||
and id !=#{currentId}
|
||||
</if>
|
||||
and org_stcd !='5'
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
<select id="getNodeTree" resultMap="BaseTreeResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
<include refid="Base_Column_List"/>,#{currentId} as currentId
|
||||
FROM jsh_organization
|
||||
WHERE org_parent_no = -1
|
||||
<if test="currentId != null">
|
||||
and id !=#{currentId}
|
||||
</if>
|
||||
and org_stcd !='5'
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user