Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
37832e4b
Commit
37832e4b
authored
Jun 23, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test2.0版本
parent
445c569b
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1331 additions
and
1139 deletions
+1331
-1139
bsoft-api/src/main/resources/application-test.properties
+1
-1
bsoft-api/src/main/resources/mapper/BlockValuesMapper.xml
+5
-4
bsoft-api/src/main/resources/mapper/DicDimMapper.xml
+61
-54
bsoft-api/src/main/resources/mapper/DicIndMapper.xml
+80
-59
bsoft-api/src/main/resources/mapper/DicOrgMapper.xml
+109
-83
bsoft-api/src/main/resources/mapper/SerBlockMapper.xml
+45
-43
bsoft-api/src/main/resources/mapper/SerDepartmentMapper.xml
+53
-51
bsoft-api/src/main/resources/mapper/SerDimValueMapper.xml
+58
-55
bsoft-api/src/main/resources/mapper/SerDiseaseDocRsMapper.xml
+98
-82
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
+16
-16
bsoft-api/src/main/resources/mapper/SerPageBlockRsMapper.xml
+50
-48
bsoft-api/src/main/resources/mapper/SerPageFieldMapper.xml
+25
-24
bsoft-api/src/main/resources/mapper/SerPageMapper.xml
+94
-92
bsoft-api/src/main/resources/mapper/SerPageProjMapper.xml
+25
-24
bsoft-api/src/main/resources/mapper/SerPageProjValueMapper.xml
+75
-60
bsoft-api/src/main/resources/mapper/SerPageValueConfigMapper.xml
+53
-50
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
+7
-7
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
+23
-23
bsoft-api/src/main/resources/mapper/SerProjValueSzMapper.xml
+79
-59
bsoft-api/src/main/resources/mapper/SysMenuMapper.xml
+92
-71
bsoft-api/src/main/resources/mapper/SysRoleMenuRsMapper.xml
+41
-39
bsoft-api/src/main/resources/mapper/SysUserMapper.xml
+113
-72
bsoft-api/src/main/resources/mapper/SysUserMenuRsMapper.xml
+41
-39
bsoft-api/src/main/resources/mapper/SysUserOrgRsMapper.xml
+41
-39
bsoft-api/src/main/resources/mapper/SysUserRoleRsMapper.xml
+46
-44
No files found.
bsoft-api/src/main/resources/application-test.properties
View file @
37832e4b
#### \u6D4B\u8BD5\u73AF\u5883 ###################################################
spring.datasource.url
=
jdbc:mysql://192.168.18.176:3306/scml_sy_test
1
.0?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE&serverTimezone=UTC
spring.datasource.url
=
jdbc:mysql://192.168.18.176:3306/scml_sy_test
2
.0?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE&serverTimezone=UTC
spring.datasource.username
=
root
spring.datasource.password
=
Suvalue2016
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
...
...
bsoft-api/src/main/resources/mapper/BlockValuesMapper.xml
View file @
37832e4b
...
...
@@ -2,11 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.bsoft.api.mapper.BlockValuesMapper"
>
<select
id=
"selectByWhere"
resultType=
"java.util.Map"
>
select *
from ${tableName}
${whereSql}
select *
from ${tableName}
${whereSql}
</select>
<select
id=
"selectByWhereNew"
resultType=
"java.util.Map"
>
select *
from ${tableName}
${whereSql}
select *
from ${tableName}
${whereSql}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/DicDimMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.DicDimMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.DicDim"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"DIM_NAME"
jdbcType=
"VARCHAR"
property=
"dimName"
/>
<result
column=
"DIM_FIELD"
jdbcType=
"VARCHAR"
property=
"dimField"
/>
<result
column=
"DIM_TYPE"
jdbcType=
"DECIMAL"
property=
"dimType"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from DIC_DIM
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.DicDim"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into DIC_DIM (CREATE_DATE, CREATE_USERID, `STATE`,
DIM_NAME, DIM_FIELD, DIM_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{dimName,jdbcType=VARCHAR}, #{dimField,jdbcType=VARCHAR}, #{dimType,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.DicDim"
>
update DIC_DIM
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
DIM_NAME = #{dimName,jdbcType=VARCHAR},
DIM_FIELD = #{dimField,jdbcType=VARCHAR},
DIM_TYPE = #{dimType,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
from DIC_DIM
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
from DIC_DIM
</select>
<select
id=
"selectByPageid"
resultMap=
"BaseResultMap"
>
select dd.* from SER_PAGE_DIM_RS spdr,DIC_DIM dd
where spdr.DIM_ID=dd.ID and spdr.PAGE_ID=#{pageID,jdbcType=DECIMAL}
</select>
<select
id=
"selectByPageCode"
resultMap=
"BaseResultMap"
>
SELECT d.*
from DIC_DIM d
JOIN(
SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE =#{pageCode,jdbcType=VARCHAR}) d2
on d.ID=d2.DIM_ID
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.DicDim"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"DIM_NAME"
jdbcType=
"VARCHAR"
property=
"dimName"
/>
<result
column=
"DIM_FIELD"
jdbcType=
"VARCHAR"
property=
"dimField"
/>
<result
column=
"DIM_TYPE"
jdbcType=
"DECIMAL"
property=
"dimType"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from dic_dim_info
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.DicDim"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dic_dim_info (CREATE_DATE, CREATE_USERID, `STATE`,
DIM_NAME, DIM_FIELD, DIM_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{dimName,jdbcType=VARCHAR}, #{dimField,jdbcType=VARCHAR}, #{dimType,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.DicDim"
>
update dic_dim_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
DIM_NAME = #{dimName,jdbcType=VARCHAR},
DIM_FIELD = #{dimField,jdbcType=VARCHAR},
DIM_TYPE = #{dimType,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
from dic_dim_info
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
from dic_dim_info
</select>
<select
id=
"selectByPageid"
resultMap=
"BaseResultMap"
>
select dd.*
from dic_page_dim_rs spdr,
dic_dim_info dd
where spdr.DIM_ID = dd.ID
and spdr.PAGE_ID = #{pageID,jdbcType=DECIMAL}
</select>
<select
id=
"selectByPageCode"
resultMap=
"BaseResultMap"
>
SELECT d.*
from dic_dim_info d
JOIN(
SELECT DISTINCT pdr.DIM_ID
FROM dic_page_dim_rs pdr
JOIN dic_page_info p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d2
on d.ID = d2.DIM_ID
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/DicIndMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.DicIndMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.DicInd"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"IND_CODE"
jdbcType=
"VARCHAR"
property=
"indCode"
/>
<result
column=
"IND_NAME"
jdbcType=
"VARCHAR"
property=
"indName"
/>
<result
column=
"IND_FIELD"
jdbcType=
"VARCHAR"
property=
"indField"
/>
<result
column=
"COMPUTE_MODE"
jdbcType=
"DECIMAL"
property=
"computeMode"
/>
<result
column=
"COLUMN_TYPE"
jdbcType=
"VARCHAR"
property=
"columnType"
/>
<result
column=
"EXEC_SQL"
jdbcType=
"VARCHAR"
property=
"execSql"
/>
<result
column=
"DESCRIBE"
jdbcType=
"VARCHAR"
property=
"describe"
/>
<result
column=
"CHECK_SQL"
jdbcType=
"VARCHAR"
property=
"checkSql"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from DIC_IND
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.DicInd"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
select SEQ_DIC_IND_ID.nextval from dual
</selectKey>
insert into DIC_IND (CREATE_DATE, CREATE_USERID, `STATE`,
IND_CODE, IND_NAME, COMPUTE_MODE,
EXEC_SQL, `DESCRIBE`)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{indCode,jdbcType=VARCHAR}, #{indName,jdbcType=VARCHAR}, #{computeMode,jdbcType=DECIMAL},
#{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.DicInd"
>
update DIC_IND
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
IND_CODE = #{indCode,jdbcType=VARCHAR},
IND_NAME = #{indName,jdbcType=VARCHAR},
COMPUTE_MODE = #{computeMode,jdbcType=DECIMAL},
EXEC_SQL = #{execSql,jdbcType=VARCHAR},
`DESCRIBE` = #{describe,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL,
`DESCRIBE`
from DIC_IND
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL,
`DESCRIBE`
from DIC_IND
</select>
<select
id=
"selectAllByFilter"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME,IND_FIELD, COMPUTE_MODE, EXEC_SQL,
`DESCRIBE`
from dic_ind_info
where INSTR(IND_NAME,#{filter,jdbcType=VARCHAR})>0
or INSTR(IND_FIELD,#{filter,jdbcType=VARCHAR})>0
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.DicInd"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"IND_CODE"
jdbcType=
"VARCHAR"
property=
"indCode"
/>
<result
column=
"IND_NAME"
jdbcType=
"VARCHAR"
property=
"indName"
/>
<result
column=
"IND_FIELD"
jdbcType=
"VARCHAR"
property=
"indField"
/>
<result
column=
"COMPUTE_MODE"
jdbcType=
"DECIMAL"
property=
"computeMode"
/>
<result
column=
"COLUMN_TYPE"
jdbcType=
"VARCHAR"
property=
"columnType"
/>
<result
column=
"EXEC_SQL"
jdbcType=
"VARCHAR"
property=
"execSql"
/>
<result
column=
"DESCRIBE"
jdbcType=
"VARCHAR"
property=
"describe"
/>
<result
column=
"CHECK_SQL"
jdbcType=
"VARCHAR"
property=
"checkSql"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from dic_ind_info
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.DicInd"
>
insert into dic_ind_info (CREATE_DATE, CREATE_USERID, `STATE`,
IND_CODE, IND_NAME, COMPUTE_MODE,
EXEC_SQL, `DESCRIBE`)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{indCode,jdbcType=VARCHAR}, #{indName,jdbcType=VARCHAR}, #{computeMode,jdbcType=DECIMAL},
#{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.DicInd"
>
update dic_ind_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
IND_CODE = #{indCode,jdbcType=VARCHAR},
IND_NAME = #{indName,jdbcType=VARCHAR},
COMPUTE_MODE = #{computeMode,jdbcType=DECIMAL},
EXEC_SQL = #{execSql,jdbcType=VARCHAR},
`DESCRIBE` = #{describe,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
COMPUTE_MODE,
EXEC_SQL,
`DESCRIBE`
from dic_ind_info
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
COMPUTE_MODE,
EXEC_SQL,
`DESCRIBE`
from dic_ind_info
</select>
<select
id=
"selectAllByFilter"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
IND_FIELD,
COMPUTE_MODE,
EXEC_SQL,
`DESCRIBE`
from dic_ind_info
where INSTR(IND_NAME, #{filter,jdbcType=VARCHAR}) > 0
or INSTR(IND_FIELD, #{filter,jdbcType=VARCHAR}) > 0
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/DicOrgMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.DicOrgMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.DicOrg"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"ORG_CODE"
jdbcType=
"VARCHAR"
property=
"orgCode"
/>
<result
column=
"ORG_NAME"
jdbcType=
"VARCHAR"
property=
"orgName"
/>
<result
column=
"ORG_NO"
jdbcType=
"VARCHAR"
property=
"orgNo"
/>
<result
column=
"ORG_SHORT_NAME"
jdbcType=
"VARCHAR"
property=
"orgShortName"
/>
<result
column=
"ORG_GROUP"
jdbcType=
"VARCHAR"
property=
"orgGroup"
/>
<result
column=
"ORG_TYPE"
jdbcType=
"VARCHAR"
property=
"orgType"
/>
<result
column=
"ORG_ADDRESS"
jdbcType=
"VARCHAR"
property=
"orgAddress"
/>
<result
column=
"PARENT_ID"
jdbcType=
"DECIMAL"
property=
"parentId"
/>
</resultMap>
<resultMap
id=
"SummaryDept"
type=
"com.bsoft.api.model.SerDepartment"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"ORG_ID"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
<result
column=
"KSBM"
jdbcType=
"VARCHAR"
property=
"ksbm"
/>
<result
column=
"KSMC"
jdbcType=
"VARCHAR"
property=
"ksmc"
/>
<result
column=
"KSJC"
jdbcType=
"VARCHAR"
property=
"ksjc"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from DIC_ORG
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.DicOrg"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into DIC_ORG (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.DicOrg"
>
update DIC_ORG
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
ORG_CODE = #{orgCode,jdbcType=VARCHAR},
ORG_NAME = #{orgName,jdbcType=VARCHAR},
ORG_NO = #{orgNo,jdbcType=VARCHAR},
ORG_SHORT_NAME = #{orgShortName,jdbcType=VARCHAR},
ORG_GROUP = #{orgGroup,jdbcType=VARCHAR},
ORG_TYPE = #{orgType,jdbcType=VARCHAR},
ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
from DIC_ORG
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
from DIC_ORG
</select>
<select
id=
"selectByUser"
resultMap=
"BaseResultMap"
>
SELECT o.*
FROM SYS_USER_ORG_RS uor,DIC_ORG o
where uor.ORG_ID=o.ID and uor.USER_ID= #{userId,jdbcType=DECIMAL}
and uor.STATE = 1 and o.STATE = 1 and o.PARENT_ID = 0
</select>
<select
id=
"selectDeptByUser"
resultMap=
"SummaryDept"
>
select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC,o.ORG_SHORT_NAME as KSJC
from SYS_USER_ORG_RS rs
join DIC_ORG o on o.id = rs.ORG_ID and rs.STATE = 1
where o.STATE = 1
<if
test=
"orgId!=null"
>
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL}
</if>
and rs.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.DicOrg"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"ORG_CODE"
jdbcType=
"VARCHAR"
property=
"orgCode"
/>
<result
column=
"ORG_NAME"
jdbcType=
"VARCHAR"
property=
"orgName"
/>
<result
column=
"ORG_NO"
jdbcType=
"VARCHAR"
property=
"orgNo"
/>
<result
column=
"ORG_SHORT_NAME"
jdbcType=
"VARCHAR"
property=
"orgShortName"
/>
<result
column=
"ORG_GROUP"
jdbcType=
"VARCHAR"
property=
"orgGroup"
/>
<result
column=
"ORG_TYPE"
jdbcType=
"VARCHAR"
property=
"orgType"
/>
<result
column=
"ORG_ADDRESS"
jdbcType=
"VARCHAR"
property=
"orgAddress"
/>
<result
column=
"PARENT_ID"
jdbcType=
"DECIMAL"
property=
"parentId"
/>
</resultMap>
<resultMap
id=
"SummaryDept"
type=
"com.bsoft.api.model.SerDepartment"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"ORG_ID"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
<result
column=
"KSBM"
jdbcType=
"VARCHAR"
property=
"ksbm"
/>
<result
column=
"KSMC"
jdbcType=
"VARCHAR"
property=
"ksmc"
/>
<result
column=
"KSJC"
jdbcType=
"VARCHAR"
property=
"ksjc"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from sys_subject
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.DicOrg"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_subject (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.DicOrg"
>
update sys_subject
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
ORG_CODE = #{orgCode,jdbcType=VARCHAR},
ORG_NAME = #{orgName,jdbcType=VARCHAR},
ORG_NO = #{orgNo,jdbcType=VARCHAR},
ORG_SHORT_NAME = #{orgShortName,jdbcType=VARCHAR},
ORG_GROUP = #{orgGroup,jdbcType=VARCHAR},
ORG_TYPE = #{orgType,jdbcType=VARCHAR},
ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
ORG_CODE,
ORG_NAME,
ORG_NO,
ORG_SHORT_NAME,
ORG_GROUP,
ORG_TYPE,
ORG_ADDRESS,
PARENT_ID
from sys_subject
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
ORG_CODE,
ORG_NAME,
ORG_NO,
ORG_SHORT_NAME,
ORG_GROUP,
ORG_TYPE,
ORG_ADDRESS,
PARENT_ID
from sys_subject
</select>
<select
id=
"selectByUser"
resultMap=
"BaseResultMap"
>
SELECT o.*
FROM sys_user_sbj_rs uor,
sys_subject o
where uor.ORG_ID = o.ID
and uor.USER_ID = #{userId,jdbcType=DECIMAL}
and uor.STATE = 1
and o.STATE = 1
and o.PARENT_ID = 0
</select>
<select
id=
"selectDeptByUser"
resultMap=
"SummaryDept"
>
select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC,o.ORG_SHORT_NAME as KSJC
from sys_user_sbj_rs rs
join sys_subject o on o.id = rs.ORG_ID and rs.STATE = 1
where o.STATE = 1
<if
test=
"orgId!=null"
>
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL}
</if>
and rs.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerBlockMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerBlockMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerBlock"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"BLOCK_CODE"
jdbcType=
"VARCHAR"
property=
"blockCode"
/>
<result
column=
"BLOCK_NAME"
jdbcType=
"VARCHAR"
property=
"blockName"
/>
<result
column=
"RETURN_TYPE"
jdbcType=
"DECIMAL"
property=
"returnType"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SER_BLOCK
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerBlock"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_BLOCK (CREATE_DATE, CREATE_USERID, `STATE`,
BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{blockCode,jdbcType=VARCHAR}, #{blockName,jdbcType=VARCHAR}, #{returnType,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerBlock"
>
update SER_BLOCK
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
BLOCK_CODE = #{blockCode,jdbcType=VARCHAR},
BLOCK_NAME = #{blockName,jdbcType=VARCHAR},
RETURN_TYPE = #{returnType,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
from SER_BLOCK
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
from SER_BLOCK
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerBlock"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"BLOCK_CODE"
jdbcType=
"VARCHAR"
property=
"blockCode"
/>
<result
column=
"BLOCK_NAME"
jdbcType=
"VARCHAR"
property=
"blockName"
/>
<result
column=
"RETURN_TYPE"
jdbcType=
"DECIMAL"
property=
"returnType"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from SER_BLOCK
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerBlock"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_BLOCK (CREATE_DATE, CREATE_USERID, `STATE`,
BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{blockCode,jdbcType=VARCHAR}, #{blockName,jdbcType=VARCHAR}, #{returnType,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerBlock"
>
update SER_BLOCK
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
BLOCK_CODE = #{blockCode,jdbcType=VARCHAR},
BLOCK_NAME = #{blockName,jdbcType=VARCHAR},
RETURN_TYPE = #{returnType,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
from SER_BLOCK
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
from SER_BLOCK
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerDepartmentMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerDepartmentMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerDepartment"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"ORG_ID"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
<result
column=
"KSBM"
jdbcType=
"VARCHAR"
property=
"ksbm"
/>
<result
column=
"KSMC"
jdbcType=
"VARCHAR"
property=
"ksmc"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_DEPARTMENT
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDepartment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DEPARTMENT (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_ID, KSBM, KSMC)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgId,jdbcType=VARCHAR}, #{ksbm,jdbcType=VARCHAR}, #{ksmc,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerDepartment"
>
update SER_DEPARTMENT
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=VARCHAR},
KSBM = #{ksbm,jdbcType=VARCHAR},
KSMC = #{ksmc,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, KSBM, KSMC
from SER_DEPARTMENT
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, KSBM, KSMC
from SER_DEPARTMENT
</select>
<select
id=
"selectSummaryDept"
resultMap=
"BaseResultMap"
>
select DEPT_CODE as KSBM,DEPT_NAME as KSMC
from SER_PROJ_VALUE
where 1=1
<if
test=
"date!=null"
>
and `DATE`=#{date}
</if>
GROUP BY DEPT_CODE,DEPT_NAME,SORT
order by SORT
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerDepartment"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"ORG_ID"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
<result
column=
"KSBM"
jdbcType=
"VARCHAR"
property=
"ksbm"
/>
<result
column=
"KSMC"
jdbcType=
"VARCHAR"
property=
"ksmc"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete
from SER_DEPARTMENT
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDepartment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DEPARTMENT (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_ID, KSBM, KSMC)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgId,jdbcType=VARCHAR}, #{ksbm,jdbcType=VARCHAR}, #{ksmc,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerDepartment"
>
update SER_DEPARTMENT
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=VARCHAR},
KSBM = #{ksbm,jdbcType=VARCHAR},
KSMC = #{ksmc,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, KSBM, KSMC
from SER_DEPARTMENT
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, KSBM, KSMC
from SER_DEPARTMENT
</select>
<select
id=
"selectSummaryDept"
resultMap=
"BaseResultMap"
>
select DEPT_CODE as KSBM,DEPT_NAME as KSMC
from VAL_PROJ_VALUE
where 1=1
<if
test=
"date!=null"
>
and `DATE`=#{date}
</if>
GROUP BY DEPT_CODE,DEPT_NAME,SORT
order by SORT
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerDimValueMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerDimValueMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerDimValue"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"ORG_ID"
jdbcType=
"DECIMAL"
property=
"orgId"
/>
<result
column=
"ITEM_NAME"
jdbcType=
"VARCHAR"
property=
"itemName"
/>
<result
column=
"ITEM_VALUE"
jdbcType=
"VARCHAR"
property=
"itemValue"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DIM_ID"
jdbcType=
"DECIMAL"
property=
"dimId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_DIM_VALUE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDimValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DIM_VALUE (ORG_ID, ITEM_NAME, ITEM_VALUE,
"DATE", DIM_ID)
values (#{orgId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{itemValue,jdbcType=VARCHAR},
#{date,jdbcType=DECIMAL}, #{dimId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerDimValue"
>
update SER_DIM_VALUE
set ORG_ID = #{orgId,jdbcType=DECIMAL},
ITEM_NAME = #{itemName,jdbcType=VARCHAR},
ITEM_VALUE = #{itemValue,jdbcType=VARCHAR},
"DATE" = #{date,jdbcType=DECIMAL},
DIM_ID = #{dimId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID
from SER_DIM_VALUE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID
from SER_DIM_VALUE
</select>
<select
id=
"selectByDimId"
resultMap=
"BaseResultMap"
>
SELECT dv.*
FROM SER_DIM_VALUE dv
LEFT JOIN ( SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr LEFT JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
ON dv.DIM_ID = d.DIM_ID
where 1=1
<if
test=
"dimId!=null"
>
and dv.DIM_ID=#{dimId,jdbcType=DECIMAL}
</if>
<if
test=
"orgId!=null"
>
and dv.ORG_ID=#{orgId,jdbcType=DECIMAL}
</if>
<if
test=
"date!=null"
>
and dv.`DATE`=#{date,jdbcType=VARCHAR}
</if>
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerDimValue"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"ORG_ID"
jdbcType=
"DECIMAL"
property=
"orgId"
/>
<result
column=
"ITEM_NAME"
jdbcType=
"VARCHAR"
property=
"itemName"
/>
<result
column=
"ITEM_VALUE"
jdbcType=
"VARCHAR"
property=
"itemValue"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DIM_ID"
jdbcType=
"DECIMAL"
property=
"dimId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete
from SER_DIM_VALUE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDimValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DIM_VALUE (ORG_ID, ITEM_NAME, ITEM_VALUE,
"DATE", DIM_ID)
values (#{orgId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{itemValue,jdbcType=VARCHAR},
#{date,jdbcType=DECIMAL}, #{dimId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerDimValue"
>
update SER_DIM_VALUE
set ORG_ID = #{orgId,jdbcType=DECIMAL},
ITEM_NAME = #{itemName,jdbcType=VARCHAR},
ITEM_VALUE = #{itemValue,jdbcType=VARCHAR},
"DATE" = #{date,jdbcType=DECIMAL},
DIM_ID = #{dimId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID
from SER_DIM_VALUE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID
from SER_DIM_VALUE
</select>
<select
id=
"selectByDimId"
resultMap=
"BaseResultMap"
>
SELECT dv.*
FROM SER_DIM_VALUE dv
LEFT JOIN ( SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr LEFT JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND
p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
ON dv.DIM_ID = d.DIM_ID
where 1=1
<if
test=
"dimId!=null"
>
and dv.DIM_ID=#{dimId,jdbcType=DECIMAL}
</if>
<if
test=
"orgId!=null"
>
and dv.ORG_ID=#{orgId,jdbcType=DECIMAL}
</if>
<if
test=
"date!=null"
>
and dv.`DATE`=#{date,jdbcType=VARCHAR}
</if>
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerDiseaseDocRsMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerDiseaseDocRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerDiseaseDocRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"ORG_ID"
jdbcType=
"DECIMAL"
property=
"orgId"
/>
<result
column=
"DOC_CODE"
jdbcType=
"VARCHAR"
property=
"docCode"
/>
<result
column=
"DOC_NAME"
jdbcType=
"VARCHAR"
property=
"docName"
/>
<result
column=
"MDC_CODE"
jdbcType=
"VARCHAR"
property=
"mdcCode"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"DEPT_NAME"
jdbcType=
"VARCHAR"
property=
"deptName"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_DISEASE_DOC_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDiseaseDocRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DISEASE_DOC_RS (ORG_ID, DOC_CODE, DOC_NAME,
MDC_CODE, "DATE", DEPT_CODE,
DEPT_NAME)
values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR},
#{mdcCode,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL}, #{deptCode,jdbcType=VARCHAR},
#{deptName,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerDiseaseDocRs"
>
update SER_DISEASE_DOC_RS
set ORG_ID = #{orgId,jdbcType=DECIMAL},
DOC_CODE = #{docCode,jdbcType=VARCHAR},
DOC_NAME = #{docName,jdbcType=VARCHAR},
MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
"DATE" = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
DEPT_NAME = #{deptName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
</select>
<select
id=
"selectByCode"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where 1=1
<if
test=
"docCode!=null"
>
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if
test=
"mdcCode!=null"
>
and MDC_CODE = #{mdcCode,jdbcType=VARCHAR}
</if>
<if
test=
"deptCode!=null"
>
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if
test=
"date!=null"
>
and `DATE` = #{date,jdbcType=VARCHAR}
</if>
</select>
<select
id=
"selectByRelation"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where 1=1
<if
test=
"docCode!=null"
>
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if
test=
"listMdcCode.length > 0"
>
and MDC_CODE in
<foreach
item=
"item"
index=
"index"
collection=
"listMdcCode"
open=
"("
separator=
","
close=
")"
>
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if
test=
"deptCode!=null"
>
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if
test=
"date!=null"
>
and `DATE` = #{date,jdbcType=VARCHAR}
</if>
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerDiseaseDocRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"ORG_ID"
jdbcType=
"DECIMAL"
property=
"orgId"
/>
<result
column=
"DOC_CODE"
jdbcType=
"VARCHAR"
property=
"docCode"
/>
<result
column=
"DOC_NAME"
jdbcType=
"VARCHAR"
property=
"docName"
/>
<result
column=
"MDC_CODE"
jdbcType=
"VARCHAR"
property=
"mdcCode"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"DEPT_NAME"
jdbcType=
"VARCHAR"
property=
"deptName"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete
from dic_disease_doc_rs
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerDiseaseDocRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dic_disease_doc_rs (ORG_ID, DOC_CODE, DOC_NAME,
MDC_CODE, "DATE", DEPT_CODE,
DEPT_NAME)
values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR},
#{mdcCode,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL}, #{deptCode,jdbcType=VARCHAR},
#{deptName,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerDiseaseDocRs"
>
update dic_disease_doc_rs
set ORG_ID = #{orgId,jdbcType=DECIMAL},
DOC_CODE = #{docCode,jdbcType=VARCHAR},
DOC_NAME = #{docName,jdbcType=VARCHAR},
MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
"DATE" = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
DEPT_NAME = #{deptName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID,
ORG_ID,
DOC_CODE,
DOC_NAME,
MDC_CODE,
`DATE`,
DEPT_CODE,
DEPT_NAME
from dic_disease_doc_rs
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
ORG_ID,
DOC_CODE,
DOC_NAME,
MDC_CODE,
`DATE`,
DEPT_CODE,
DEPT_NAME
from dic_disease_doc_rs
</select>
<select
id=
"selectByCode"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from dic_disease_doc_rs
where 1=1
<if
test=
"docCode!=null"
>
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if
test=
"mdcCode!=null"
>
and MDC_CODE = #{mdcCode,jdbcType=VARCHAR}
</if>
<if
test=
"deptCode!=null"
>
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if
test=
"date!=null"
>
and `DATE` = #{date,jdbcType=VARCHAR}
</if>
</select>
<select
id=
"selectByRelation"
resultMap=
"BaseResultMap"
>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from dic_disease_doc_rs
where 1=1
<if
test=
"docCode!=null"
>
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if
test=
"listMdcCode.length > 0"
>
and MDC_CODE in
<foreach
item=
"item"
index=
"index"
collection=
"listMdcCode"
open=
"("
separator=
","
close=
")"
>
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if
test=
"deptCode!=null"
>
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if
test=
"date!=null"
>
and `DATE` = #{date,jdbcType=VARCHAR}
</if>
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
View file @
37832e4b
...
...
@@ -31,7 +31,7 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into
SER_DISEASE
(CREATE_DATE, CREATE_USERID, `STATE`,
insert into
dic_disease
(CREATE_DATE, CREATE_USERID, `STATE`,
MDC_CODE, MDC_NAME, `DATE`,
MDC_NUM, PARENT_ID, `LEVEL`,
ORG_ID, ORG_NAME, PARENT_CODE
...
...
@@ -56,12 +56,12 @@
ORG_ID,
ORG_NAME,
PARENT_CODE
from
SER_DISEASE
from
dic_disease
</select>
<select
id=
"selectByCode"
resultMap=
"BaseResultMap"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE d,SER_DISEASE_DOC_RS
rs
from
dic_disease d,dic_disease_doc_rs
rs
where d.STATE=1
and rs.MDC_CODE=d.MDC_CODE and rs.MDC_CODE = #{code,jdbcType=VARCHAR}
<if
test=
"deptCode!=null"
>
...
...
@@ -71,7 +71,7 @@
<select
id=
"selectByMdcName"
resultMap=
"BaseResultMap"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE d,SER_DISEASE_DOC_RS
rs
from
dic_disease d,dic_disease_doc_rs
rs
where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
...
...
@@ -84,8 +84,8 @@
<select
id=
"selectByLevel"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE
d
join
SER_DISEASE_DOC_RS
rs on rs.MDC_CODE=d.MDC_CODE
from
dic_disease
d
join
dic_disease_doc_rs
rs on rs.MDC_CODE=d.MDC_CODE
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2
...
...
@@ -111,7 +111,7 @@
<select
id=
"selectByLevelNoZBZ"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE d,SER_DISEASE_DOC_RS
rs
from
dic_disease d,dic_disease_doc_rs
rs
where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if
test=
"level!=null"
>
and d.`LEVEL` = #{level,jdbcType=DECIMAL}
...
...
@@ -121,8 +121,8 @@
</if>
<if
test=
"deptCode==null"
>
and EXISTS(select o2.ORG_CODE as DEPT_CODE
from
SYS_USER_ORG_RS
rs2
join
DIC_ORG
o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
from
sys_user_sbj_rs
rs2
join
sys_subject
o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE
...
...
@@ -133,8 +133,8 @@
<select
id=
"selectByParentId"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE
d
join
SER_DISEASE_DOC_RS
rs on rs.MDC_CODE=d.MDC_CODE
from
dic_disease
d
join
dic_disease_doc_rs
rs on rs.MDC_CODE=d.MDC_CODE
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2
...
...
@@ -160,8 +160,8 @@
<select
id=
"selectByParentIdNoZbz"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE
d
join
SER_DISEASE_DOC_RS
rs on rs.MDC_CODE=d.MDC_CODE
from
dic_disease
d
join
dic_disease_doc_rs
rs on rs.MDC_CODE=d.MDC_CODE
<if
test=
"deptCode!=null"
>
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2
...
...
@@ -186,10 +186,10 @@
</select>
<select
id=
"selectParentById"
resultMap=
"DiseaseLevel"
>
select *
from
SER_DISEASE
from
dic_disease
where 1 = 1 and STATE=1
<if
test=
"diseaseId!=null"
>
and id=(select PARENT_ID from
SER_DISEASE
where id = #{diseaseId,jdbcType=DECIMAL} )
and id=(select PARENT_ID from
dic_disease
where id = #{diseaseId,jdbcType=DECIMAL} )
</if>
</select>
<!-- <select id="selectSonById" resultMap="DiseaseLevel">-->
...
...
@@ -208,7 +208,7 @@
<select
id=
"selectSonById"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from
SER_DISEASE
d
from
dic_disease
d
where 1 = 1 and STATE=1 and STATE=1
<if
test=
"diseaseId!=null"
>
and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}
...
...
bsoft-api/src/main/resources/mapper/SerPageBlockRsMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerPageBlockRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageBlockRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"BLOCK_ID"
jdbcType=
"DECIMAL"
property=
"blockId"
/>
<result
column=
"PAGE_ID"
jdbcType=
"DECIMAL"
property=
"pageId"
/>
<result
column=
"WHERE_CLAUSE"
jdbcType=
"VARCHAR"
property=
"whereClause"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SER_PAGE_BLOCK_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageBlockRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_BLOCK_RS (CREATE_DATE, CREATE_USERID, `STATE`,
BLOCK_ID, PAGE_ID, WHERE_CLAUSE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{blockId,jdbcType=DECIMAL}, #{pageId,jdbcType=DECIMAL}, #{whereClause,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageBlockRs"
>
update SER_PAGE_BLOCK_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
BLOCK_ID = #{blockId,jdbcType=DECIMAL},
PAGE_ID = #{pageId,jdbcType=DECIMAL},
WHERE_CLAUSE = #{whereClause,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
</select>
<select
id=
"selectByPageId"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID,WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
where PAGE_ID=#{pageID,jdbcType=DECIMAL}
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageBlockRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"BLOCK_ID"
jdbcType=
"DECIMAL"
property=
"blockId"
/>
<result
column=
"PAGE_ID"
jdbcType=
"DECIMAL"
property=
"pageId"
/>
<result
column=
"WHERE_CLAUSE"
jdbcType=
"VARCHAR"
property=
"whereClause"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from dic_page_block_rs
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageBlockRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dic_page_block_rs (CREATE_DATE, CREATE_USERID, `STATE`,
BLOCK_ID, PAGE_ID, WHERE_CLAUSE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{blockId,jdbcType=DECIMAL}, #{pageId,jdbcType=DECIMAL}, #{whereClause,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageBlockRs"
>
update dic_page_block_rs
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
BLOCK_ID = #{blockId,jdbcType=DECIMAL},
PAGE_ID = #{pageId,jdbcType=DECIMAL},
WHERE_CLAUSE = #{whereClause,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from dic_page_block_rs
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from dic_page_block_rs
</select>
<select
id=
"selectByPageId"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from dic_page_block_rs
where PAGE_ID = #{pageID,jdbcType=DECIMAL}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageFieldMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerPageFieldMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageField"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"FIELD_CODE"
jdbcType=
"VARCHAR"
property=
"fieldCode"
/>
<result
column=
"FIELD_NAME"
jdbcType=
"VARCHAR"
property=
"fieldName"
/>
<result
column=
"REMARK"
jdbcType=
"VARCHAR"
property=
"remark"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageField"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, `STATE`,
FIELD_CODE, FIELD_NAME, REMARK
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{fieldCode,jdbcType=VARCHAR}, #{fieldName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
)
</insert>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageField"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"FIELD_CODE"
jdbcType=
"VARCHAR"
property=
"fieldCode"
/>
<result
column=
"FIELD_NAME"
jdbcType=
"VARCHAR"
property=
"fieldName"
/>
<result
column=
"REMARK"
jdbcType=
"VARCHAR"
property=
"remark"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageField"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, `STATE`,
FIELD_CODE, FIELD_NAME, REMARK
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{fieldCode,jdbcType=VARCHAR}, #{fieldName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
)
</insert>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerPageMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPage"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PAGE_CODE"
jdbcType=
"VARCHAR"
property=
"pageCode"
/>
<result
column=
"PAGE_NAME"
jdbcType=
"VARCHAR"
property=
"pageName"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SER_PAGE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPage"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE (CREATE_DATE, CREATE_USERID, `STATE`,
PAGE_CODE, PAGE_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPage"
>
update SER_PAGE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
PAGE_NAME = #{pageName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
from SER_PAGE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
from SER_PAGE
</select>
<select
id=
"selectByCodeAndDim"
resultMap=
"BaseResultMap"
>
select d.* from SER_PAGE d,
<if
test=
"dimCount != 0"
>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
and c.DIM_FIELD in (${inField})
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if
test=
"dimCount != 0"
>
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
<select
id=
"selectByCodeAndDimList"
resultType=
"com.bsoft.api.model.SerPage"
>
select d.* from SER_PAGE d,
<if
test=
"dimCount != 0"
>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
<if
test=
"inFields.size() > 0"
>
and c.DIM_FIELD in
<foreach
item=
"item"
index=
"index"
collection=
"inFields"
open=
"("
separator=
","
close=
")"
>
#{item,jdbcType=VARCHAR}
</foreach>
</if>
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if
test=
"dimCount != 0"
>
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPage"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PAGE_CODE"
jdbcType=
"VARCHAR"
property=
"pageCode"
/>
<result
column=
"PAGE_NAME"
jdbcType=
"VARCHAR"
property=
"pageName"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from dic_page_info
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPage"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dic_page_info (CREATE_DATE, CREATE_USERID, `STATE`,
PAGE_CODE, PAGE_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPage"
>
update dic_page_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
PAGE_NAME = #{pageName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
from dic_page_info
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
from dic_page_info
</select>
<select
id=
"selectByCodeAndDim"
resultMap=
"BaseResultMap"
>
select d.* from dic_page_info d,
<if
test=
"dimCount != 0"
>
(select a.id,COUNT(b.ID) count
from dic_page_info a
JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
and c.DIM_FIELD in (${inField})
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from dic_page_info a
JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if
test=
"dimCount != 0"
>
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
<select
id=
"selectByCodeAndDimList"
resultType=
"com.bsoft.api.model.SerPage"
>
select d.* from dic_page_info d,
<if
test=
"dimCount != 0"
>
(select a.id,COUNT(b.ID) count
from dic_page_info a
JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
<if
test=
"inFields.size() > 0"
>
and c.DIM_FIELD in
<foreach
item=
"item"
index=
"index"
collection=
"inFields"
open=
"("
separator=
","
close=
")"
>
#{item,jdbcType=VARCHAR}
</foreach>
</if>
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from dic_page_info a
JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if
test=
"dimCount != 0"
>
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageProjMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerPageProjMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProj"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"PROJ_CODE"
jdbcType=
"VARCHAR"
property=
"projCode"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"VARCHAR"
property=
"projType"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProj"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_NAME, PROJ_CODE, PROJ_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projName,jdbcType=VARCHAR}, #{projCode,jdbcType=VARCHAR}, #{projType,jdbcType=VARCHAR}
)
</insert>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProj"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"PROJ_CODE"
jdbcType=
"VARCHAR"
property=
"projCode"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"VARCHAR"
property=
"projType"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProj"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_NAME, PROJ_CODE, PROJ_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projName,jdbcType=VARCHAR}, #{projCode,jdbcType=VARCHAR}, #{projType,jdbcType=VARCHAR}
)
</insert>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageProjValueMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerPageProjValueMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProjValue"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"DATE_FILTER"
jdbcType=
"DECIMAL"
property=
"dateFilter"
/>
<result
column=
"DATA_CATEGORY"
jdbcType=
"VARCHAR"
property=
"dataCategory"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"DECIMAL"
property=
"projType"
/>
<result
column=
"PROJ_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"FIELD_VALUE"
jdbcType=
"VARCHAR"
property=
"fieldValue"
/>
<result
column=
"FIELD_UNIT"
jdbcType=
"VARCHAR"
property=
"fieldUnit"
/>
</resultMap>
<resultMap
id=
"SummaryNew"
type=
"com.bsoft.api.model.respmodel.SummaryNew"
>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
</resultMap>
<resultMap
id=
"SummaryValue"
type=
"com.bsoft.api.model.respmodel.SummaryValue"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"FIELD_NAME"
jdbcType=
"VARCHAR"
property=
"fieldName"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"FIELD_VALUE"
jdbcType=
"VARCHAR"
property=
"fieldValue"
/>
<result
column=
"FIELD_UNIT"
jdbcType=
"VARCHAR"
property=
"fieldUnit"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProjValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`,
DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID,
FIELD_VALUE, FIELD_UNIT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{dateFilter,jdbcType=DECIMAL}, #{dataCategory,jdbcType=VARCHAR},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{fieldValue,jdbcType=VARCHAR}, #{fieldUnit,jdbcType=VARCHAR})
</insert>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID, FIELD_VALUE, FIELD_UNIT
from SER_PAGE_PROJ_VALUE
</select>
<select
id=
"selectDept"
resultMap=
"SummaryNew"
>
select DEPT_CODE
from SER_PAGE_PROJ_VALUE
where STATE = 1 and PROJ_TYPE = #{page,jdbcType = DECIMAL}
and DATE_FILTER = #{date,jdbcType = DECIMAL}
GROUP BY DEPT_CODE
</select>
<select
id=
"selectValue"
resultMap=
"SummaryValue"
>
select v.ID,p.PROJ_NAME,f.FIELD_NAME,v.FIELD_ID,v.FIELD_VALUE,v.FIELD_UNIT
from SER_PAGE_PROJ_VALUE v
join SER_PAGE_PROJ p on p.ID = v.PROJ_ID and p.STATE = 1
join SER_PAGE_FIELD f on f.ID = v.FIELD_ID and f.STATE = 1
join SER_PAGE_PROJ_FIELD_RS rs on rs.PROJ_TYPE = v.PROJ_TYPE and rs.PROJ_ID = v.PROJ_ID and rs.FIELD_ID = v.FIELD_ID
where v.STATE = 1 and v.PROJ_TYPE = #{page,jdbcType = DECIMAL}
and v.DATE_FILTER=#{date,jdbcType = DECIMAL} and v.DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
order by rs.SORT
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProjValue"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"DATE_FILTER"
jdbcType=
"DECIMAL"
property=
"dateFilter"
/>
<result
column=
"DATA_CATEGORY"
jdbcType=
"VARCHAR"
property=
"dataCategory"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"DECIMAL"
property=
"projType"
/>
<result
column=
"PROJ_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"FIELD_VALUE"
jdbcType=
"VARCHAR"
property=
"fieldValue"
/>
<result
column=
"FIELD_UNIT"
jdbcType=
"VARCHAR"
property=
"fieldUnit"
/>
</resultMap>
<resultMap
id=
"SummaryNew"
type=
"com.bsoft.api.model.respmodel.SummaryNew"
>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
</resultMap>
<resultMap
id=
"SummaryValue"
type=
"com.bsoft.api.model.respmodel.SummaryValue"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"FIELD_NAME"
jdbcType=
"VARCHAR"
property=
"fieldName"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"FIELD_VALUE"
jdbcType=
"VARCHAR"
property=
"fieldValue"
/>
<result
column=
"FIELD_UNIT"
jdbcType=
"VARCHAR"
property=
"fieldUnit"
/>
</resultMap>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProjValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`,
DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID,
FIELD_VALUE, FIELD_UNIT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{dateFilter,jdbcType=DECIMAL}, #{dataCategory,jdbcType=VARCHAR},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{fieldValue,jdbcType=VARCHAR}, #{fieldUnit,jdbcType=VARCHAR})
</insert>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
DEPT_CODE,
DATE_FILTER,
DATA_CATEGORY,
PROJ_TYPE,
PROJ_ID,
FIELD_ID,
FIELD_VALUE,
FIELD_UNIT
from SER_PAGE_PROJ_VALUE
</select>
<select
id=
"selectDept"
resultMap=
"SummaryNew"
>
select DEPT_CODE
from SER_PAGE_PROJ_VALUE
where STATE = 1
and PROJ_TYPE = #{page,jdbcType = DECIMAL}
and DATE_FILTER = #{date,jdbcType = DECIMAL}
GROUP BY DEPT_CODE
</select>
<select
id=
"selectValue"
resultMap=
"SummaryValue"
>
select v.ID, p.PROJ_NAME, f.FIELD_NAME, v.FIELD_ID, v.FIELD_VALUE, v.FIELD_UNIT
from SER_PAGE_PROJ_VALUE v
join SER_PAGE_PROJ p on p.ID = v.PROJ_ID and p.STATE = 1
join SER_PAGE_FIELD f on f.ID = v.FIELD_ID and f.STATE = 1
join SER_PAGE_PROJ_FIELD_RS rs
on rs.PROJ_TYPE = v.PROJ_TYPE and rs.PROJ_ID = v.PROJ_ID and rs.FIELD_ID = v.FIELD_ID
where v.STATE = 1
and v.PROJ_TYPE = #{page,jdbcType = DECIMAL}
and v.DATE_FILTER = #{date,jdbcType = DECIMAL}
and v.DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
order by rs.SORT
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageValueConfigMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerPageValueConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageValueConfig"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PAGE"
jdbcType=
"DECIMAL"
property=
"page"
/>
<result
column=
"PAGE_NAME"
jdbcType=
"VARCHAR"
property=
"pageName"
/>
<result
column=
"SQLSTR"
jdbcType=
"VARCHAR"
property=
"sqlstr"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageValueConfig"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_VALUE_CONFIG (CREATE_DATE, CREATE_USERID, `STATE`,
PAGE, PAGE_NAME, SQLSTR
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{page,jdbcType=DECIMAL}, #{pageName,jdbcType=VARCHAR}, #{sqlstr,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageValueConfig"
>
update SER_PAGE_VALUE_CONFIG
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
PAGE = #{page,jdbcType=DECIMAL},
PAGE_NAME = #{pageName,jdbcType=VARCHAR},
SQLSTR = #{sqlstr,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR
from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR
from SER_PAGE_VALUE_CONFIG
</select>
<select
id=
"selectByPage"
resultMap=
"BaseResultMap"
>
select *
from SER_PAGE_VALUE_CONFIG
where STATE = 1 and PAGE = #{page,jdbcType=DECIMAL}
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageValueConfig"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PAGE"
jdbcType=
"DECIMAL"
property=
"page"
/>
<result
column=
"PAGE_NAME"
jdbcType=
"VARCHAR"
property=
"pageName"
/>
<result
column=
"SQLSTR"
jdbcType=
"VARCHAR"
property=
"sqlstr"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete
from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageValueConfig"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_VALUE_CONFIG (CREATE_DATE, CREATE_USERID, `STATE`,
PAGE, PAGE_NAME, SQLSTR
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{page,jdbcType=DECIMAL}, #{pageName,jdbcType=VARCHAR}, #{sqlstr,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageValueConfig"
>
update SER_PAGE_VALUE_CONFIG
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
PAGE = #{page,jdbcType=DECIMAL},
PAGE_NAME = #{pageName,jdbcType=VARCHAR},
SQLSTR = #{sqlstr,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR
from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR
from SER_PAGE_VALUE_CONFIG
</select>
<select
id=
"selectByPage"
resultMap=
"BaseResultMap"
>
select *
from SER_PAGE_VALUE_CONFIG
where STATE = 1
and PAGE = #{page,jdbcType=DECIMAL}
</select>
<select
id=
"selectSqlStr"
resultType=
"java.util.Map"
>
${sqlStr}
</select>
${sqlStr}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
View file @
37832e4b
...
...
@@ -30,7 +30,7 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into
SER_PROJ
(CREATE_DATE, CREATE_USERID, `STATE`,
insert into
dic_bgt_proj
(CREATE_DATE, CREATE_USERID, `STATE`,
`TYPE`, PROJ_TYPE, PROJ_NAME,
IS_BUDGET, TYPE_STATE, SORT
)
...
...
@@ -40,7 +40,7 @@
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerProj"
>
update
SER_PROJ
update
dic_bgt_proj
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
...
...
@@ -63,7 +63,7 @@
IS_BUDGET,
TYPE_STATE,
SORT
from
SER_PROJ
from
dic_bgt_proj
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
...
...
@@ -77,12 +77,12 @@
IS_BUDGET,
TYPE_STATE,
SORT
from
SER_PROJ
from
dic_bgt_proj
</select>
<select
id=
"selectState"
resultMap=
"ProjectInfo"
>
select DISTINCT p.TYPE as EXPONENT_ID,e.EXPONENT_NAME,e.SORT
from ser_proj p
join
DIC_EXPONENT
e on e.EXPONENT_ID=p.`TYPE` and e.STATE = 1
join
dic_bgt_energy
e on e.EXPONENT_ID=p.`TYPE` and e.STATE = 1
where p.`STATE` = 1
<if
test=
"projType!=null"
>
and p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
...
...
@@ -98,8 +98,8 @@
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
where 1=1
and EXISTS(select o2.ORG_CODE as DEPT_CODE
from
SYS_USER_ORG_RS
rs2
join
DIC_ORG
o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
from
sys_user_sbj_rs
rs2
join
sys_subject
o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = v.DEPT_CODE
...
...
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
View file @
37832e4b
...
...
@@ -35,18 +35,18 @@
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete
from
SER_PROJ_VALUE
from
val_proj_value
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerProjValue"
>
insert into
SER_PROJ_VALUE
(CREATE_DATE, CREATE_USERID, `STATE`,
insert into
val_proj_value
(CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_ID, QNZ, WQQS,
LS, MB, CSYSZ, CSYSZ_TB,
YSZ, YSZ_TB, SZ, ZXPL,
`DATE`, DEPT_CODE, SORT,
VERSION, QNZ_UNIT, CSYSZ_UNIT,
YSZ_UNIT, SZ_UNIT, WQQS_ZYPZ_JS,
DEPT_NAME, HOSCODE)
DEPT_NAME, HOS
_
CODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{qnz,jdbcType=DECIMAL}, #{wqqs,jdbcType=DECIMAL},
#{ls,jdbcType=DECIMAL}, #{mb,jdbcType=DECIMAL}, #{csysz,jdbcType=DECIMAL}, #{csyszTb,jdbcType=DECIMAL},
...
...
@@ -57,7 +57,7 @@
#{deptName,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerProjValue"
>
update
SER_PROJ_VALUE
update
val_proj_value
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
...
...
@@ -80,7 +80,7 @@
CSYSZ_UNIT = #{csyszUnit,jdbcType=VARCHAR},
YSZ_UNIT = #{yszUnit,jdbcType=VARCHAR},
SZ_UNIT = #{szUnit,jdbcType=VARCHAR},
HOS
CODE
= #{hosCode,jdbcType=VARCHAR}
HOS
_CODE
= #{hosCode,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
...
...
@@ -107,8 +107,8 @@
CSYSZ_UNIT,
YSZ_UNIT,
SZ_UNIT,
HOSCODE
from
SER_PROJ_VALUE
HOS
_
CODE
from
val_proj_value
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
...
...
@@ -137,16 +137,16 @@
SZ_UNIT,
WQQS_ZYPZ_JS,
DEPT_NAME,
HOSCODE
from
SER_PROJ_VALUE
HOS
_
CODE
from
val_proj_value
</select>
<select
id=
"selectValue"
resultMap=
"SerProjValueResp"
>
SELECT v.*,p.PROJ_NAME,p.IS_BUDGET,p.PARENT,sz.SZ as SZ2,sz.ZXPL as ZXPL2
FROM
SER_PROJ
p
FROM
dic_bgt_proj
p
LEFT JOIN
(
SELECT v.PROJ_ID,MAX(v.VERSION) AS VERSION
FROM
SER_PROJ_VALUE
v
FROM
val_proj_value
v
WHERE v.`STATE` = 1
<if
test=
"dept!=null"
>
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
...
...
@@ -155,11 +155,11 @@
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4)
</if>
<if
test=
"hosCode!=null"
>
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR}
AND v.HOS
_
CODE = #{hosCode,jdbcType=VARCHAR}
</if>
GROUP BY v.PROJ_ID
)m on m.PROJ_ID = p.ID
left JOIN
SER_PROJ_VALUE
v ON v.PROJ_ID = m.PROJ_ID AND v.VERSION = m.VERSION
left JOIN
val_proj_value
v ON v.PROJ_ID = m.PROJ_ID AND v.VERSION = m.VERSION
<if
test=
"dept!=null"
>
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if>
...
...
@@ -167,12 +167,12 @@
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4)
</if>
<if
test=
"hosCode!=null"
>
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR}
AND v.HOS
_
CODE = #{hosCode,jdbcType=VARCHAR}
</if>
left join
ser
_proj_value_sz sz on sz.PROJ_ID = m.PROJ_ID
left join
val
_proj_value_sz sz on sz.PROJ_ID = m.PROJ_ID
AND sz.DEPT_CODE = v.DEPT_CODE
AND sz.`DATE` = #{date,jdbcType=DECIMAL}
AND sz.HOS
CODE = v.HOS
CODE
AND sz.HOS
_CODE = v.HOS_
CODE
WHERE 1 = 1 and p.`STATE` = 1
<if
test=
"projType!=null"
>
AND p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
...
...
@@ -190,24 +190,24 @@
</select>
<delete
id=
"deleteByDeptWithDate"
>
delete v
from
SER_PROJ_VALUE
v
JOIN
SER_PROJ
p ON p.ID = v.PROJ_ID
from
val_proj_value
v
JOIN
dic_bgt_proj
p ON p.ID = v.PROJ_ID
WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET
&
1 > 0
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL}, 4)
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR}
AND v.HOS
_
CODE = #{orgCode,jdbcType=VARCHAR}
</delete>
<insert
id=
"insertToHistory"
>
INSERT into
ser
_proj_value_history
INSERT into
val
_proj_value_history
select v.*
from
SER_PROJ_VALUE
v
JOIN
SER_PROJ
p ON p.ID = v.PROJ_ID
from
val_proj_value
v
JOIN
dic_bgt_proj
p ON p.ID = v.PROJ_ID
WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET
&
1 > 0
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL}, 4)
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR}
AND v.HOS
_
CODE = #{orgCode,jdbcType=VARCHAR}
</insert>
<update
id=
"updateValue"
statementType=
"CALLABLE"
>
{call ESTIMATE_UPDATE_GZD_BL(
...
...
bsoft-api/src/main/resources/mapper/SerProjValueSzMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SerProjValueSzMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerProjValueSz"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PROJ_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"SZ"
jdbcType=
"DECIMAL"
property=
"sz"
/>
<result
column=
"ZXPL"
jdbcType=
"DECIMAL"
property=
"zxpl"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"HOSCODE"
jdbcType=
"VARCHAR"
property=
"hoscode"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerProjValueSz"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_ID, SZ, ZXPL, `DATE`,
DEPT_CODE, HOSCODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerProjValueSz"
>
update SER_PROJ_VALUE_SZ
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
SZ = #{sz,jdbcType=DECIMAL},
ZXPL = #{zxpl,jdbcType=DECIMAL},
`DATE` = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
HOSCODE = #{hoscode,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE,
HOSCODE
from SER_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE,
HOSCODE
from SER_PROJ_VALUE_SZ
</select>
<select
id=
"selectByProj"
resultMap=
"BaseResultMap"
>
select *
from SER_PROJ_VALUE_SZ
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL}
and `DATE` = #{date,jdbcType=DECIMAL}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR}
order by `DATE` desc
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerProjValueSz"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PROJ_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"SZ"
jdbcType=
"DECIMAL"
property=
"sz"
/>
<result
column=
"ZXPL"
jdbcType=
"DECIMAL"
property=
"zxpl"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"HOSCODE"
jdbcType=
"VARCHAR"
property=
"hoscode"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete
from VAL_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerProjValueSz"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into VAL_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_ID, SZ, ZXPL, `DATE`,
DEPT_CODE, HOS_CODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerProjValueSz"
>
update VAL_PROJ_VALUE_SZ
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
SZ = #{sz,jdbcType=DECIMAL},
ZXPL = #{zxpl,jdbcType=DECIMAL},
`DATE` = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
HOS_CODE = #{hoscode,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
PROJ_ID,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
HOS_CODE
from VAL_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
PROJ_ID,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
HOS_CODE
from VAL_PROJ_VALUE_SZ
</select>
<select
id=
"selectByProj"
resultMap=
"BaseResultMap"
>
select *
from VAL_PROJ_VALUE_SZ
where STATE = 1
and PROJ_ID = #{projId,jdbcType=DECIMAL}
and `DATE` = #{date,jdbcType=DECIMAL}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
and HOS_CODE = #{hosCode,jdbcType=VARCHAR}
order by `DATE` desc
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysMenuMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SysMenuMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysMenu"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATA"
jdbcType=
"TIMESTAMP"
property=
"createData"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"MENU_NAME"
jdbcType=
"VARCHAR"
property=
"menuName"
/>
<result
column=
"MENU_URL"
jdbcType=
"VARCHAR"
property=
"menuUrl"
/>
<result
column=
"MENU_IMAGE"
jdbcType=
"VARCHAR"
property=
"menuImage"
/>
<result
column=
"PARENT_ID"
jdbcType=
"DECIMAL"
property=
"parentId"
/>
<result
column=
"PAGE_CODE"
jdbcType=
"VARCHAR"
property=
"pageCode"
/>
<result
column=
"SORT"
jdbcType=
"DECIMAL"
property=
"sort"
/>
</resultMap>
<resultMap
id=
"sysMenuResultMap"
type=
"com.bsoft.api.model.respmodel.SysMenuList"
extends=
"BaseResultMap"
/>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SYS_MENU
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysMenu"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_MENU (CREATE_DATA, CREATE_USERID, `STATE`,
MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
)
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
#{parentId,jdbcType=DECIMAL}, #{pageCode,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysMenu"
>
update SYS_MENU
set CREATE_DATA = #{createData,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
MENU_NAME = #{menuName,jdbcType=VARCHAR},
MENU_URL = #{menuUrl,jdbcType=VARCHAR},
MENU_IMAGE = #{menuImage,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
SORT = #{sort,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATA, CREATE_USERID, `STATE`, MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
from SYS_MENU
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATA, CREATE_USERID, `STATE`, MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
from SYS_MENU
</select>
<select
id=
"selectMenuByUser"
resultMap=
"sysMenuResultMap"
>
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT
from
SYS_ROLE_MENU_RS rmr
LEFT JOIN
SYS_MENU m on rmr.MENU_ID = m.ID
LEFT JOIN
SYS_USER_ROLE_RS urr on rmr.ROLE_ID = urr.Role_ID
where rmr.STATE=1 and m.STATE=1 and urr.STATE=1 and urr.USER_ID = #{userId,jdbcType=DECIMAL}
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysMenu"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATA"
jdbcType=
"TIMESTAMP"
property=
"createData"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"MENU_NAME"
jdbcType=
"VARCHAR"
property=
"menuName"
/>
<result
column=
"MENU_URL"
jdbcType=
"VARCHAR"
property=
"menuUrl"
/>
<result
column=
"MENU_IMAGE"
jdbcType=
"VARCHAR"
property=
"menuImage"
/>
<result
column=
"PARENT_ID"
jdbcType=
"DECIMAL"
property=
"parentId"
/>
<result
column=
"PAGE_CODE"
jdbcType=
"VARCHAR"
property=
"pageCode"
/>
<result
column=
"SORT"
jdbcType=
"DECIMAL"
property=
"sort"
/>
</resultMap>
<resultMap
id=
"sysMenuResultMap"
type=
"com.bsoft.api.model.respmodel.SysMenuList"
extends=
"BaseResultMap"
/>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from sys_menu
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysMenu"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_MENU (CREATE_DATA, CREATE_USERID, `STATE`,
MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
)
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
#{parentId,jdbcType=DECIMAL}, #{pageCode,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysMenu"
>
update SYS_MENU
set CREATE_DATA = #{createData,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
MENU_NAME = #{menuName,jdbcType=VARCHAR},
MENU_URL = #{menuUrl,jdbcType=VARCHAR},
MENU_IMAGE = #{menuImage,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
SORT = #{sort,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATA,
CREATE_USERID,
`STATE`,
MENU_NAME,
MENU_URL,
MENU_IMAGE,
PARENT_ID,
PAGE_CODE,
SORT
from SYS_MENU
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATA,
CREATE_USERID,
`STATE`,
MENU_NAME,
MENU_URL,
MENU_IMAGE,
PARENT_ID,
PAGE_CODE,
SORT
from SYS_MENU
</select>
<select
id=
"selectMenuByUser"
resultMap=
"sysMenuResultMap"
>
select DISTINCT m.ID, m.MENU_NAME, m.MENU_URL, m.MENU_IMAGE, m.PARENT_ID, m.PAGE_CODE, m.SORT
from SYS_ROLE_MENU_RS rmr
LEFT JOIN
SYS_MENU m on rmr.MENU_ID = m.ID
LEFT JOIN
SYS_USER_ROLE_RS urr on rmr.ROLE_ID = urr.Role_ID
where rmr.STATE = 1
and m.STATE = 1
and urr.STATE = 1
and urr.USER_ID = #{userId,jdbcType=DECIMAL}
union
union
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT
from
SYS_USER_MENU_RS umr
LEFT JOIN
SYS_MENU m on umr.MENU_ID = m.ID
where umr.STATE=1 and m.STATE=1 and umr.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
select DISTINCT m.ID, m.MENU_NAME, m.MENU_URL, m.MENU_IMAGE, m.PARENT_ID, m.PAGE_CODE, m.SORT
from SYS_USER_MENU_RS umr
LEFT JOIN
SYS_MENU m on umr.MENU_ID = m.ID
where umr.STATE = 1
and m.STATE = 1
and umr.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysRoleMenuRsMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SysRoleMenuRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysRoleMenuRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"MENU_ID"
jdbcType=
"DECIMAL"
property=
"menuId"
/>
<result
column=
"ROLE_ID"
jdbcType=
"DECIMAL"
property=
"roleId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SYS_ROLE_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysRoleMenuRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_ROLE_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`,
MENU_ID, ROLE_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysRoleMenuRs"
>
update SYS_ROLE_MENU_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
MENU_ID = #{menuId,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID
from SYS_ROLE_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID
from SYS_ROLE_MENU_RS
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysRoleMenuRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"MENU_ID"
jdbcType=
"DECIMAL"
property=
"menuId"
/>
<result
column=
"ROLE_ID"
jdbcType=
"DECIMAL"
property=
"roleId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from SYS_ROLE_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysRoleMenuRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_ROLE_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`,
MENU_ID, ROLE_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysRoleMenuRs"
>
update SYS_ROLE_MENU_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
MENU_ID = #{menuId,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID
from SYS_ROLE_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID
from SYS_ROLE_MENU_RS
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysUserMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SysUserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUser"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_CODE"
jdbcType=
"VARCHAR"
property=
"userCode"
/>
<result
column=
"USER_NAME"
jdbcType=
"VARCHAR"
property=
"userName"
/>
<result
column=
"PASSWORD"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"IDCARD"
jdbcType=
"VARCHAR"
property=
"idcard"
/>
<result
column=
"SEX"
jdbcType=
"VARCHAR"
property=
"sex"
/>
<result
column=
"MOBILE"
jdbcType=
"VARCHAR"
property=
"mobile"
/>
<result
column=
"PAGE_COUNT"
jdbcType=
"DECIMAL"
property=
"pageCount"
/>
<result
column=
"ERROR_COUNT"
jdbcType=
"DECIMAL"
property=
"errorCount"
/>
<result
column=
"ERROR_TIME"
jdbcType=
"TIMESTAMP"
property=
"errorTime"
/>
<result
column=
"LAST_TIME"
jdbcType=
"TIMESTAMP"
property=
"lastTime"
/>
<result
column=
"LAST_IP"
jdbcType=
"VARCHAR"
property=
"lastIp"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SYS_USER
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUser"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER (CREATE_DATE, CREATE_USERID, `STATE`,
USER_CODE, USER_NAME, `PASSWORD`,
IDCARD, SEX, MOBILE,
PAGE_COUNT, ERROR_COUNT, ERROR_TIME,
LAST_TIME, LAST_IP)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{idcard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{pageCount,jdbcType=DECIMAL}, #{errorCount,jdbcType=DECIMAL}, #{errorTime,jdbcType=TIMESTAMP},
#{lastTime,jdbcType=TIMESTAMP}, #{lastIp,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUser"
>
update SYS_USER
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_CODE = #{userCode,jdbcType=VARCHAR},
USER_NAME = #{userName,jdbcType=VARCHAR},
`PASSWORD` = #{password,jdbcType=VARCHAR},
IDCARD = #{idcard,jdbcType=VARCHAR},
SEX = #{sex,jdbcType=VARCHAR},
MOBILE = #{mobile,jdbcType=VARCHAR},
PAGE_COUNT = #{pageCount,jdbcType=DECIMAL},
ERROR_COUNT = #{errorCount,jdbcType=DECIMAL},
ERROR_TIME = #{errorTime,jdbcType=TIMESTAMP},
LAST_TIME = #{lastTime,jdbcType=TIMESTAMP},
LAST_IP = #{lastIp,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`,
IDCARD, SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP
from SYS_USER
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`,
IDCARD, SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP
from SYS_USER
</select>
<select
id=
"selectByCode"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, IDCARD,
SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP
from SYS_USER
where USER_CODE=#{userCode,jdbcType=VARCHAR}
and `STATE` != 0
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUser"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_CODE"
jdbcType=
"VARCHAR"
property=
"userCode"
/>
<result
column=
"USER_NAME"
jdbcType=
"VARCHAR"
property=
"userName"
/>
<result
column=
"PASSWORD"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"IDCARD"
jdbcType=
"VARCHAR"
property=
"idcard"
/>
<result
column=
"SEX"
jdbcType=
"VARCHAR"
property=
"sex"
/>
<result
column=
"MOBILE"
jdbcType=
"VARCHAR"
property=
"mobile"
/>
<result
column=
"PAGE_COUNT"
jdbcType=
"DECIMAL"
property=
"pageCount"
/>
<result
column=
"ERROR_COUNT"
jdbcType=
"DECIMAL"
property=
"errorCount"
/>
<result
column=
"ERROR_TIME"
jdbcType=
"TIMESTAMP"
property=
"errorTime"
/>
<result
column=
"LAST_TIME"
jdbcType=
"TIMESTAMP"
property=
"lastTime"
/>
<result
column=
"LAST_IP"
jdbcType=
"VARCHAR"
property=
"lastIp"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from SYS_USER
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUser"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER (CREATE_DATE, CREATE_USERID, `STATE`,
USER_CODE, USER_NAME, `PASSWORD`,
IDCARD, SEX, MOBILE,
PAGE_COUNT, ERROR_COUNT, ERROR_TIME,
LAST_TIME, LAST_IP)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{idcard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{pageCount,jdbcType=DECIMAL}, #{errorCount,jdbcType=DECIMAL}, #{errorTime,jdbcType=TIMESTAMP},
#{lastTime,jdbcType=TIMESTAMP}, #{lastIp,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUser"
>
update SYS_USER
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_CODE = #{userCode,jdbcType=VARCHAR},
USER_NAME = #{userName,jdbcType=VARCHAR},
`PASSWORD` = #{password,jdbcType=VARCHAR},
IDCARD = #{idcard,jdbcType=VARCHAR},
SEX = #{sex,jdbcType=VARCHAR},
MOBILE = #{mobile,jdbcType=VARCHAR},
PAGE_COUNT = #{pageCount,jdbcType=DECIMAL},
ERROR_COUNT = #{errorCount,jdbcType=DECIMAL},
ERROR_TIME = #{errorTime,jdbcType=TIMESTAMP},
LAST_TIME = #{lastTime,jdbcType=TIMESTAMP},
LAST_IP = #{lastIp,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
USER_CODE,
USER_NAME,
`PASSWORD`,
IDCARD,
SEX,
MOBILE,
PAGE_COUNT,
ERROR_COUNT,
ERROR_TIME,
LAST_TIME,
LAST_IP
from SYS_USER
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
USER_CODE,
USER_NAME,
`PASSWORD`,
IDCARD,
SEX,
MOBILE,
PAGE_COUNT,
ERROR_COUNT,
ERROR_TIME,
LAST_TIME,
LAST_IP
from SYS_USER
</select>
<select
id=
"selectByCode"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
USER_CODE,
USER_NAME,
`PASSWORD`,
IDCARD,
SEX,
MOBILE,
PAGE_COUNT,
ERROR_COUNT,
ERROR_TIME,
LAST_TIME,
LAST_IP
from SYS_USER
where USER_CODE = #{userCode,jdbcType=VARCHAR}
and `STATE` != 0
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysUserMenuRsMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SysUserMenuRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUserMenuRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_ID"
jdbcType=
"DECIMAL"
property=
"userId"
/>
<result
column=
"MENU_ID"
jdbcType=
"DECIMAL"
property=
"menuId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SYS_USER_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUserMenuRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, MENU_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{menuId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUserMenuRs"
>
update SYS_USER_MENU_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL},
MENU_ID = #{menuId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID
from SYS_USER_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID
from SYS_USER_MENU_RS
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUserMenuRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_ID"
jdbcType=
"DECIMAL"
property=
"userId"
/>
<result
column=
"MENU_ID"
jdbcType=
"DECIMAL"
property=
"menuId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from SYS_USER_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUserMenuRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, MENU_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{menuId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUserMenuRs"
>
update SYS_USER_MENU_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL},
MENU_ID = #{menuId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID
from SYS_USER_MENU_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID
from SYS_USER_MENU_RS
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysUserOrgRsMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SysUserOrgRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUserOrgRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_ID"
jdbcType=
"DECIMAL"
property=
"userId"
/>
<result
column=
"ORG_ID"
jdbcType=
"DECIMAL"
property=
"orgId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SYS_USER_ORG_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUserOrgRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER_ORG_RS (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, ORG_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{orgId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUserOrgRs"
>
update SYS_USER_ORG_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
from SYS_USER_ORG_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
from SYS_USER_ORG_RS
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUserOrgRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_ID"
jdbcType=
"DECIMAL"
property=
"userId"
/>
<result
column=
"ORG_ID"
jdbcType=
"DECIMAL"
property=
"orgId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from sys_user_sbj_rs
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUserOrgRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_user_sbj_rs (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, ORG_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{orgId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUserOrgRs"
>
update sys_user_sbj_rs
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
from sys_user_sbj_rs
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
from sys_user_sbj_rs
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysUserRoleRsMapper.xml
View file @
37832e4b
<?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.bsoft.api.mapper.SysUserRoleRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUserRoleRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_ID"
jdbcType=
"DECIMAL"
property=
"userId"
/>
<result
column=
"ROLE_ID"
jdbcType=
"DECIMAL"
property=
"roleId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from SYS_USER_ROLE_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUserRoleRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER_ROLE_RS (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, ROLE_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUserRoleRs"
>
update SYS_USER_ROLE_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID
from SYS_USER_ROLE_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID
from SYS_USER_ROLE_RS
</select>
<select
id=
"selectRoleByUser"
resultMap=
"BaseResultMap"
>
select ID,USER_ID, ROLE_ID
from SYS_USER_ROLE_RS
where USER_ID=#{userId,jdbcType=DECIMAL}
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUserRoleRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"USER_ID"
jdbcType=
"DECIMAL"
property=
"userId"
/>
<result
column=
"ROLE_ID"
jdbcType=
"DECIMAL"
property=
"roleId"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from SYS_USER_ROLE_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUserRoleRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_USER_ROLE_RS (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, ROLE_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUserRoleRs"
>
update SYS_USER_ROLE_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID
from SYS_USER_ROLE_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID
from SYS_USER_ROLE_RS
</select>
<select
id=
"selectRoleByUser"
resultMap=
"BaseResultMap"
>
select ID, USER_ID, ROLE_ID
from SYS_USER_ROLE_RS
where USER_ID = #{userId,jdbcType=DECIMAL}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
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