Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
691b494c
Commit
691b494c
authored
Mar 09, 2019
by
乾坤平台
Committed by
季圣华
Mar 09, 2019
Browse files
!32 添加机构信息管理功能
Merge pull request !32 from 乾坤平台/master
parents
b869d3b2
ac9b292a
Changes
22
Hide whitespace changes
Inline
Side-by-side
src/main/resources/mapper_xml/OrganizationMapperEx.xml
0 → 100644
View file @
691b494c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.OrganizationMapperEx"
>
<resultMap
id=
"BaseTreeResultMap"
type=
"com.jsh.erp.datasource.vo.TreeNode"
>
<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"
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=
"org_abr"
property=
"text"
/>
<result
column=
"org_no"
property=
"attributes"
/>
<collection
column=
"org_no"
property=
"children"
javaType=
"java.util.ArrayList"
ofType=
"com.jsh.erp.datasource.vo.TreeNode"
select=
"getNextNodeTree"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, org_abr,org_no
</sql>
<select
id=
"getNextNodeTree"
resultMap=
"NextTreeResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM jsh_organization
WHERE org_parent_no = #{org_no}
and org_stcd !='5'
order by sort asc
</select>
<select
id=
"getNodeTree"
resultMap=
"BaseTreeResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM jsh_organization
WHERE org_parent_no = -1
and org_stcd !='5'
order by sort asc
</select>
<insert
id=
"addOrganization"
parameterType=
"com.jsh.erp.datasource.entities.Organization"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into jsh_organization
(org_no, org_full_name,
org_abr, org_tpcd, org_stcd,
org_parent_no, sort, remark,
create_time, creator, update_time,
updater, org_create_time, org_stop_time)
values
(#{orgNo,jdbcType=VARCHAR}, #{orgFullName,jdbcType=VARCHAR},
#{orgAbr,jdbcType=VARCHAR}, #{orgTpcd,jdbcType=VARCHAR}, #{orgStcd,jdbcType=CHAR},
#{orgParentNo,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
#{updater,jdbcType=BIGINT}, #{orgCreateTime,jdbcType=TIMESTAMP}, #{orgStopTime,jdbcType=TIMESTAMP}
)
</insert>
<update
id=
"batchDeleteOrganizationByIds"
>
update jsh_organization
set update_Time=#{updateTime},updater=#{updater},org_stcd='5'
where id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
#{id}
</foreach>
)
</update>
<update
id=
"editOrganization"
>
update jsh_organization
set update_time=#{updateTime},updater=#{updater},
org_no = #{orgNo},org_full_name = #{orgFullName},
org_abr = #{orgAbr},org_tpcd = #{orgTpcd},
org_stcd = #{orgStcd},org_parent_no = #{orgParentNo},
sort = #{sort},remark = #{remark},
org_create_time = #{orgCreateTime},org_stop_time = #{orgStopTime}
where id =#{id}
</update>
<select
id=
"getOrganizationRootByIds"
resultMap=
"com.jsh.erp.datasource.mappers.OrganizationMapper.BaseResultMap"
>
select * from jsh_organization
where
1=1
and org_stcd!='5'
and org_parent_no='-1'
and org_abr='根机构'
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
#{id}
</foreach>
)
</select>
</mapper>
\ No newline at end of file
src/test/resources/generatorConfig.xml
View file @
691b494c
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<table tableName="jsh_asset" domainObjectName="Asset"></table>
<table tableName="jsh_asset" domainObjectName="Asset"></table>
<table tableName="jsh_assetcategory" domainObjectName="AssetCategory"></table>
<table tableName="jsh_assetcategory" domainObjectName="AssetCategory"></table>
<table tableName="jsh_assetname" domainObjectName="AssetName"></table>-->
<table tableName="jsh_assetname" domainObjectName="AssetName"></table>-->
<table
tableName=
"jsh_depot"
domainObjectName=
"Depot"
></table>
<!--
<table tableName="jsh_depot" domainObjectName="Depot"></table>
-->
<!--<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<!--<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table>
...
@@ -65,5 +65,7 @@
...
@@ -65,5 +65,7 @@
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>-->
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>-->
<!--<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<!--<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table
tableName=
"jsh_organization"
domainObjectName=
"Organization"
></table>
<!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>-->
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment