Commit 4c041e8b by Suvalue

sy2.0版本

parent e40f6ea9
#### \u6D4B\u8BD5\u73AF\u5883 ################################################### #### \u6D4B\u8BD5\u73AF\u5883 ###################################################
spring.datasource.url=jdbc:mysql://192.168.18.176:3306/scml_sy_test1.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_test2.0?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE&serverTimezone=UTC
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Suvalue2016 spring.datasource.password=Suvalue2016
spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.driver-class-name=com.mysql.jdbc.Driver
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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"> <mapper namespace="com.bsoft.api.mapper.BlockValuesMapper">
<select id="selectByWhere" resultType="java.util.Map"> <select id="selectByWhere" resultType="java.util.Map">
select * from ${tableName} select *
${whereSql} from ${tableName} ${whereSql}
</select> </select>
<select id="selectByWhereNew" resultType="java.util.Map"> <select id="selectByWhereNew" resultType="java.util.Map">
select * from ${tableName} select *
${whereSql} from ${tableName} ${whereSql}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.DicDimMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicDim"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.DicDim">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="DIM_NAME" jdbcType="VARCHAR" property="dimName" /> <result column="DIM_NAME" jdbcType="VARCHAR" property="dimName"/>
<result column="DIM_FIELD" jdbcType="VARCHAR" property="dimField" /> <result column="DIM_FIELD" jdbcType="VARCHAR" property="dimField"/>
<result column="DIM_TYPE" jdbcType="DECIMAL" property="dimType" /> <result column="DIM_TYPE" jdbcType="DECIMAL" property="dimType"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from DIC_DIM delete
where ID = #{id,jdbcType=DECIMAL} from dic_dim_info
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.DicDim"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.DicDim">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into DIC_DIM (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
DIM_NAME, DIM_FIELD, DIM_TYPE 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} 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"> </insert>
update DIC_DIM <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicDim">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update dic_dim_info
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
DIM_NAME = #{dimName,jdbcType=VARCHAR}, `STATE` = #{state,jdbcType=DECIMAL},
DIM_FIELD = #{dimField,jdbcType=VARCHAR}, DIM_NAME = #{dimName,jdbcType=VARCHAR},
DIM_TYPE = #{dimType,jdbcType=DECIMAL} DIM_FIELD = #{dimField,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} DIM_TYPE = #{dimType,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from DIC_DIM select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
where ID = #{id,jdbcType=DECIMAL} from dic_dim_info
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE <select id="selectAll" resultMap="BaseResultMap">
from DIC_DIM select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
</select> from dic_dim_info
<select id="selectByPageid" resultMap="BaseResultMap"> </select>
select dd.* from SER_PAGE_DIM_RS spdr,DIC_DIM dd <select id="selectByPageid" resultMap="BaseResultMap">
where spdr.DIM_ID=dd.ID and spdr.PAGE_ID=#{pageID,jdbcType=DECIMAL} select dd.*
</select> from dic_page_dim_rs spdr,
<select id="selectByPageCode" resultMap="BaseResultMap"> DIC_DIM dd
SELECT d.* where spdr.DIM_ID = dd.ID
from DIC_DIM d and spdr.PAGE_ID = #{pageID,jdbcType=DECIMAL}
JOIN( </select>
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 <select id="selectByPageCode" resultMap="BaseResultMap">
on d.ID=d2.DIM_ID SELECT d.*
</select> 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> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.DicIndMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicInd"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.DicInd">
<result column="ID" jdbcType="DECIMAL" property="id" /> <result column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="IND_CODE" jdbcType="VARCHAR" property="indCode" /> <result column="IND_CODE" jdbcType="VARCHAR" property="indCode"/>
<result column="IND_NAME" jdbcType="VARCHAR" property="indName" /> <result column="IND_NAME" jdbcType="VARCHAR" property="indName"/>
<result column="IND_FIELD" jdbcType="VARCHAR" property="indField" /> <result column="IND_FIELD" jdbcType="VARCHAR" property="indField"/>
<result column="COMPUTE_MODE" jdbcType="DECIMAL" property="computeMode" /> <result column="COMPUTE_MODE" jdbcType="DECIMAL" property="computeMode"/>
<result column="COLUMN_TYPE" jdbcType="VARCHAR" property="columnType" /> <result column="COLUMN_TYPE" jdbcType="VARCHAR" property="columnType"/>
<result column="EXEC_SQL" jdbcType="VARCHAR" property="execSql" /> <result column="EXEC_SQL" jdbcType="VARCHAR" property="execSql"/>
<result column="DESCRIBE" jdbcType="VARCHAR" property="describe" /> <result column="DESCRIBE" jdbcType="VARCHAR" property="describe"/>
<result column="CHECK_SQL" jdbcType="VARCHAR" property="checkSql" /> <result column="CHECK_SQL" jdbcType="VARCHAR" property="checkSql"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from DIC_IND delete
where ID = #{id,jdbcType=DECIMAL} from dic_ind_info
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.DicInd"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.DicInd">
select SEQ_DIC_IND_ID.nextval from dual insert into dic_ind_info (CREATE_DATE, CREATE_USERID, `STATE`,
</selectKey> IND_CODE, IND_NAME, COMPUTE_MODE,
insert into DIC_IND (CREATE_DATE, CREATE_USERID, `STATE`, EXEC_SQL, `DESCRIBE`)
IND_CODE, IND_NAME, COMPUTE_MODE, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
EXEC_SQL, `DESCRIBE`) #{indCode,jdbcType=VARCHAR}, #{indName,jdbcType=VARCHAR}, #{computeMode,jdbcType=DECIMAL},
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, #{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR})
#{indCode,jdbcType=VARCHAR}, #{indName,jdbcType=VARCHAR}, #{computeMode,jdbcType=DECIMAL}, </insert>
#{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}) <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicInd">
</insert> update dic_ind_info
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicInd"> set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
update DIC_IND CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, `STATE` = #{state,jdbcType=DECIMAL},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, IND_CODE = #{indCode,jdbcType=VARCHAR},
`STATE` = #{state,jdbcType=DECIMAL}, IND_NAME = #{indName,jdbcType=VARCHAR},
IND_CODE = #{indCode,jdbcType=VARCHAR}, COMPUTE_MODE = #{computeMode,jdbcType=DECIMAL},
IND_NAME = #{indName,jdbcType=VARCHAR}, EXEC_SQL = #{execSql,jdbcType=VARCHAR},
COMPUTE_MODE = #{computeMode,jdbcType=DECIMAL}, `DESCRIBE` = #{describe,jdbcType=VARCHAR}
EXEC_SQL = #{execSql,jdbcType=VARCHAR}, where ID = #{id,jdbcType=DECIMAL}
`DESCRIBE` = #{describe,jdbcType=VARCHAR} </update>
where ID = #{id,jdbcType=DECIMAL} <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
</update> select ID,
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> CREATE_DATE,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL, CREATE_USERID,
`DESCRIBE` `STATE`,
from DIC_IND IND_CODE,
where ID = #{id,jdbcType=DECIMAL} IND_NAME,
</select> COMPUTE_MODE,
<select id="selectAll" resultMap="BaseResultMap"> EXEC_SQL,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL, `DESCRIBE`
`DESCRIBE` from dic_ind_info
from DIC_IND where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAllByFilter" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME,IND_FIELD, COMPUTE_MODE, EXEC_SQL, select ID,
`DESCRIBE` CREATE_DATE,
from dic_ind_info CREATE_USERID,
where INSTR(IND_NAME,#{filter,jdbcType=VARCHAR})>0 `STATE`,
or INSTR(IND_FIELD,#{filter,jdbcType=VARCHAR})>0 IND_CODE,
</select> 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> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.DicOrgMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicOrg"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.DicOrg">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="ORG_CODE" jdbcType="VARCHAR" property="orgCode" /> <result column="ORG_CODE" jdbcType="VARCHAR" property="orgCode"/>
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" /> <result column="ORG_NAME" jdbcType="VARCHAR" property="orgName"/>
<result column="ORG_NO" jdbcType="VARCHAR" property="orgNo" /> <result column="ORG_NO" jdbcType="VARCHAR" property="orgNo"/>
<result column="ORG_SHORT_NAME" jdbcType="VARCHAR" property="orgShortName" /> <result column="ORG_SHORT_NAME" jdbcType="VARCHAR" property="orgShortName"/>
<result column="ORG_GROUP" jdbcType="VARCHAR" property="orgGroup" /> <result column="ORG_GROUP" jdbcType="VARCHAR" property="orgGroup"/>
<result column="ORG_TYPE" jdbcType="VARCHAR" property="orgType" /> <result column="ORG_TYPE" jdbcType="VARCHAR" property="orgType"/>
<result column="ORG_ADDRESS" jdbcType="VARCHAR" property="orgAddress" /> <result column="ORG_ADDRESS" jdbcType="VARCHAR" property="orgAddress"/>
<result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" /> <result column="PARENT_ID" jdbcType="DECIMAL" property="parentId"/>
</resultMap> </resultMap>
<resultMap id="SummaryDept" type="com.bsoft.api.model.SerDepartment"> <resultMap id="SummaryDept" type="com.bsoft.api.model.SerDepartment">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="ORG_ID" jdbcType="VARCHAR" property="orgId" /> <result column="ORG_ID" jdbcType="VARCHAR" property="orgId"/>
<result column="KSBM" jdbcType="VARCHAR" property="ksbm" /> <result column="KSBM" jdbcType="VARCHAR" property="ksbm"/>
<result column="KSMC" jdbcType="VARCHAR" property="ksmc" /> <result column="KSMC" jdbcType="VARCHAR" property="ksmc"/>
<result column="KSJC" jdbcType="VARCHAR" property="ksjc" /> <result column="KSJC" jdbcType="VARCHAR" property="ksjc"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from DIC_ORG delete
where ID = #{id,jdbcType=DECIMAL} from sys_subject
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.DicOrg"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.DicOrg">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into DIC_ORG (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
ORG_CODE, ORG_NAME, ORG_NO, insert into sys_subject (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE, ORG_CODE, ORG_NAME, ORG_NO,
ORG_ADDRESS, PARENT_ID) ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, ORG_ADDRESS, PARENT_ID)
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL}) #{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
</insert> #{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicOrg"> </insert>
update DIC_ORG <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicOrg">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update sys_subject
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
ORG_CODE = #{orgCode,jdbcType=VARCHAR}, `STATE` = #{state,jdbcType=DECIMAL},
ORG_NAME = #{orgName,jdbcType=VARCHAR}, ORG_CODE = #{orgCode,jdbcType=VARCHAR},
ORG_NO = #{orgNo,jdbcType=VARCHAR}, ORG_NAME = #{orgName,jdbcType=VARCHAR},
ORG_SHORT_NAME = #{orgShortName,jdbcType=VARCHAR}, ORG_NO = #{orgNo,jdbcType=VARCHAR},
ORG_GROUP = #{orgGroup,jdbcType=VARCHAR}, ORG_SHORT_NAME = #{orgShortName,jdbcType=VARCHAR},
ORG_TYPE = #{orgType,jdbcType=VARCHAR}, ORG_GROUP = #{orgGroup,jdbcType=VARCHAR},
ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR}, ORG_TYPE = #{orgType,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL} ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} PARENT_ID = #{parentId,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID select ID,
from DIC_ORG CREATE_DATE,
where ID = #{id,jdbcType=DECIMAL} CREATE_USERID,
</select> `STATE`,
<select id="selectAll" resultMap="BaseResultMap"> ORG_CODE,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, ORG_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID ORG_NO,
from DIC_ORG ORG_SHORT_NAME,
</select> ORG_GROUP,
<select id="selectByUser" resultMap="BaseResultMap"> ORG_TYPE,
SELECT o.* ORG_ADDRESS,
FROM SYS_USER_ORG_RS uor,DIC_ORG o PARENT_ID
where uor.ORG_ID=o.ID and uor.USER_ID= #{userId,jdbcType=DECIMAL} from sys_subject
and uor.STATE = 1 and o.STATE = 1 and o.PARENT_ID = 0 where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectDeptByUser" resultMap="SummaryDept"> <select id="selectAll" resultMap="BaseResultMap">
select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC,o.ORG_SHORT_NAME as KSJC select ID,
from SYS_USER_ORG_RS rs CREATE_DATE,
join DIC_ORG o on o.id = rs.ORG_ID and rs.STATE = 1 CREATE_USERID,
where o.STATE = 1 `STATE`,
<if test="orgId!=null"> ORG_CODE,
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL} ORG_NAME,
</if> ORG_NO,
and rs.USER_ID = #{userId,jdbcType=DECIMAL} ORG_SHORT_NAME,
</select> 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> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerBlockMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerBlock"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerBlock">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="BLOCK_CODE" jdbcType="VARCHAR" property="blockCode" /> <result column="BLOCK_CODE" jdbcType="VARCHAR" property="blockCode"/>
<result column="BLOCK_NAME" jdbcType="VARCHAR" property="blockName" /> <result column="BLOCK_NAME" jdbcType="VARCHAR" property="blockName"/>
<result column="RETURN_TYPE" jdbcType="DECIMAL" property="returnType" /> <result column="RETURN_TYPE" jdbcType="DECIMAL" property="returnType"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SER_BLOCK delete
where ID = #{id,jdbcType=DECIMAL} from SER_BLOCK
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerBlock"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SerBlock">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_BLOCK (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
BLOCK_CODE, BLOCK_NAME, RETURN_TYPE 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} 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"> </insert>
update SER_BLOCK <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerBlock">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SER_BLOCK
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
BLOCK_CODE = #{blockCode,jdbcType=VARCHAR}, `STATE` = #{state,jdbcType=DECIMAL},
BLOCK_NAME = #{blockName,jdbcType=VARCHAR}, BLOCK_CODE = #{blockCode,jdbcType=VARCHAR},
RETURN_TYPE = #{returnType,jdbcType=DECIMAL} BLOCK_NAME = #{blockName,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} RETURN_TYPE = #{returnType,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SER_BLOCK select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
where ID = #{id,jdbcType=DECIMAL} from SER_BLOCK
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE <select id="selectAll" resultMap="BaseResultMap">
from SER_BLOCK select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
</select> from SER_BLOCK
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerDimValueMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDimValue"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDimValue">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" /> <result column="ORG_ID" jdbcType="DECIMAL" property="orgId"/>
<result column="ITEM_NAME" jdbcType="VARCHAR" property="itemName" /> <result column="ITEM_NAME" jdbcType="VARCHAR" property="itemName"/>
<result column="ITEM_VALUE" jdbcType="VARCHAR" property="itemValue" /> <result column="ITEM_VALUE" jdbcType="VARCHAR" property="itemValue"/>
<result column="DATE" jdbcType="DECIMAL" property="date" /> <result column="DATE" jdbcType="DECIMAL" property="date"/>
<result column="DIM_ID" jdbcType="DECIMAL" property="dimId" /> <result column="DIM_ID" jdbcType="DECIMAL" property="dimId"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_DIM_VALUE delete
where ID = #{id,jdbcType=DECIMAL} from SER_DIM_VALUE
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerDimValue"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <insert id="insert" parameterType="com.bsoft.api.model.SerDimValue">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_DIM_VALUE (ORG_ID, ITEM_NAME, ITEM_VALUE, </selectKey>
"DATE", DIM_ID) insert into SER_DIM_VALUE (ORG_ID, ITEM_NAME, ITEM_VALUE,
values (#{orgId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{itemValue,jdbcType=VARCHAR}, "DATE", DIM_ID)
#{date,jdbcType=DECIMAL}, #{dimId,jdbcType=DECIMAL}) values (#{orgId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{itemValue,jdbcType=VARCHAR},
</insert> #{date,jdbcType=DECIMAL}, #{dimId,jdbcType=DECIMAL})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDimValue"> </insert>
update SER_DIM_VALUE <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDimValue">
set ORG_ID = #{orgId,jdbcType=DECIMAL}, update SER_DIM_VALUE
ITEM_NAME = #{itemName,jdbcType=VARCHAR}, set ORG_ID = #{orgId,jdbcType=DECIMAL},
ITEM_VALUE = #{itemValue,jdbcType=VARCHAR}, ITEM_NAME = #{itemName,jdbcType=VARCHAR},
"DATE" = #{date,jdbcType=DECIMAL}, ITEM_VALUE = #{itemValue,jdbcType=VARCHAR},
DIM_ID = #{dimId,jdbcType=DECIMAL} "DATE" = #{date,jdbcType=DECIMAL},
where ID = #{id,jdbcType=DECIMAL} DIM_ID = #{dimId,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> </update>
select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
from SER_DIM_VALUE select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID
where ID = #{id,jdbcType=DECIMAL} from SER_DIM_VALUE
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID <select id="selectAll" resultMap="BaseResultMap">
from SER_DIM_VALUE select ID, ORG_ID, ITEM_NAME, ITEM_VALUE, `DATE`, DIM_ID
</select> from SER_DIM_VALUE
<select id="selectByDimId" resultMap="BaseResultMap"> </select>
SELECT dv.* <select id="selectByDimId" resultMap="BaseResultMap">
FROM SER_DIM_VALUE dv SELECT 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 FROM SER_DIM_VALUE dv
ON dv.DIM_ID = d.DIM_ID LEFT JOIN ( SELECT DISTINCT pdr.DIM_ID FROM dic_page_dim_rs pdr LEFT JOIN dic_page_info p ON pdr.PAGE_ID = p.ID
where 1=1 AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
<if test="dimId!=null"> ON dv.DIM_ID = d.DIM_ID
and dv.DIM_ID=#{dimId,jdbcType=DECIMAL} where 1=1
</if> <if test="dimId!=null">
<if test="orgId!=null"> and dv.DIM_ID=#{dimId,jdbcType=DECIMAL}
and dv.ORG_ID=#{orgId,jdbcType=DECIMAL} </if>
</if> <if test="orgId!=null">
<if test="date!=null"> and dv.ORG_ID=#{orgId,jdbcType=DECIMAL}
and dv.`DATE`=#{date,jdbcType=VARCHAR} </if>
</if> <if test="date!=null">
</select> and dv.`DATE`=#{date,jdbcType=VARCHAR}
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerDiseaseDocRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDiseaseDocRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDiseaseDocRs">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" /> <result column="ORG_ID" jdbcType="DECIMAL" property="orgId"/>
<result column="DOC_CODE" jdbcType="VARCHAR" property="docCode" /> <result column="DOC_CODE" jdbcType="VARCHAR" property="docCode"/>
<result column="DOC_NAME" jdbcType="VARCHAR" property="docName" /> <result column="DOC_NAME" jdbcType="VARCHAR" property="docName"/>
<result column="MDC_CODE" jdbcType="VARCHAR" property="mdcCode" /> <result column="MDC_CODE" jdbcType="VARCHAR" property="mdcCode"/>
<result column="DATE" jdbcType="DECIMAL" property="date" /> <result column="DATE" jdbcType="DECIMAL" property="date"/>
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" /> <result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode"/>
<result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName" /> <result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_DISEASE_DOC_RS delete
where ID = #{id,jdbcType=DECIMAL} from dic_disease_doc_rs
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerDiseaseDocRs"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <insert id="insert" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_DISEASE_DOC_RS (ORG_ID, DOC_CODE, DOC_NAME, </selectKey>
MDC_CODE, "DATE", DEPT_CODE, insert into dic_disease_doc_rs (ORG_ID, DOC_CODE, DOC_NAME,
DEPT_NAME) MDC_CODE, "DATE", DEPT_CODE,
values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR}, DEPT_NAME)
#{mdcCode,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL}, #{deptCode,jdbcType=VARCHAR}, values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR},
#{deptName,jdbcType=VARCHAR}) #{mdcCode,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL}, #{deptCode,jdbcType=VARCHAR},
</insert> #{deptName,jdbcType=VARCHAR})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDiseaseDocRs"> </insert>
update SER_DISEASE_DOC_RS <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
set ORG_ID = #{orgId,jdbcType=DECIMAL}, update dic_disease_doc_rs
DOC_CODE = #{docCode,jdbcType=VARCHAR}, set ORG_ID = #{orgId,jdbcType=DECIMAL},
DOC_NAME = #{docName,jdbcType=VARCHAR}, DOC_CODE = #{docCode,jdbcType=VARCHAR},
MDC_CODE = #{mdcCode,jdbcType=VARCHAR}, DOC_NAME = #{docName,jdbcType=VARCHAR},
"DATE" = #{date,jdbcType=DECIMAL}, MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR}, "DATE" = #{date,jdbcType=DECIMAL},
DEPT_NAME = #{deptName,jdbcType=VARCHAR} DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} DEPT_NAME = #{deptName,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> </update>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
from SER_DISEASE_DOC_RS select ID,
where ID = #{id,jdbcType=DECIMAL} ORG_ID,
</select> DOC_CODE,
<select id="selectAll" resultMap="BaseResultMap"> DOC_NAME,
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME MDC_CODE,
from SER_DISEASE_DOC_RS `DATE`,
</select> DEPT_CODE,
<select id="selectByCode" resultMap="BaseResultMap"> DEPT_NAME
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME from dic_disease_doc_rs
from SER_DISEASE_DOC_RS where ID = #{id,jdbcType=DECIMAL}
where 1=1 </select>
<if test="docCode!=null"> <select id="selectAll" resultMap="BaseResultMap">
and DOC_CODE = #{docCode,jdbcType=VARCHAR} select ID,
</if> ORG_ID,
<if test="mdcCode!=null"> DOC_CODE,
and MDC_CODE = #{mdcCode,jdbcType=VARCHAR} DOC_NAME,
</if> MDC_CODE,
<if test="deptCode!=null"> `DATE`,
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} DEPT_CODE,
</if> DEPT_NAME
<if test="date!=null"> from dic_disease_doc_rs
and `DATE` = #{date,jdbcType=VARCHAR} </select>
</if> <select id="selectByCode" resultMap="BaseResultMap">
</select> select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
<select id="selectByRelation" resultMap="BaseResultMap"> from dic_disease_doc_rs
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME where 1=1
from SER_DISEASE_DOC_RS <if test="docCode!=null">
where 1=1 and DOC_CODE = #{docCode,jdbcType=VARCHAR}
<if test="docCode!=null"> </if>
and DOC_CODE = #{docCode,jdbcType=VARCHAR} <if test="mdcCode!=null">
</if> and MDC_CODE = #{mdcCode,jdbcType=VARCHAR}
<if test="listMdcCode.length > 0"> </if>
and MDC_CODE in <if test="deptCode!=null">
<foreach item="item" index="index" collection="listMdcCode" open="(" separator="," close=")"> and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
#{item,jdbcType=VARCHAR} </if>
</foreach> <if test="date!=null">
</if> and `DATE` = #{date,jdbcType=VARCHAR}
<if test="deptCode!=null"> </if>
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} </select>
</if> <select id="selectByRelation" resultMap="BaseResultMap">
<if test="date!=null"> select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
and `DATE` = #{date,jdbcType=VARCHAR} from dic_disease_doc_rs
</if> where 1=1
</select> <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> </mapper>
\ No newline at end of file
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </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_CODE, MDC_NAME, `DATE`,
MDC_NUM, PARENT_ID, `LEVEL`, MDC_NUM, PARENT_ID, `LEVEL`,
ORG_ID, ORG_NAME, PARENT_CODE ORG_ID, ORG_NAME, PARENT_CODE
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
ORG_ID, ORG_ID,
ORG_NAME, ORG_NAME,
PARENT_CODE PARENT_CODE
from SER_DISEASE from dic_disease
</select> </select>
<select id="selectByCode" resultMap="BaseResultMap"> <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, 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 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 where d.STATE=1
and rs.MDC_CODE=d.MDC_CODE and rs.MDC_CODE = #{code,jdbcType=VARCHAR} and rs.MDC_CODE=d.MDC_CODE and rs.MDC_CODE = #{code,jdbcType=VARCHAR}
<if test="deptCode!=null"> <if test="deptCode!=null">
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<select id="selectByMdcName" resultMap="BaseResultMap"> <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, 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 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 where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if test="deptCode!=null"> <if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR} and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
<select id="selectByLevel" resultMap="DiseaseLevel"> <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, 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 d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d from dic_disease d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE join dic_disease_doc_rs rs on rs.MDC_CODE=d.MDC_CODE
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2 from val_block_values_1_5_2
where TIME=#{date} where TIME=#{date}
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
</if> </if>
<if test="deptCode==null"> <if test="deptCode==null">
and EXISTS(select o2.ORG_CODE as DEPT_CODE and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2 from sys_user_sbj_rs rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1 join sys_subject o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1 where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL} and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE and o2.ORG_CODE = rs.DEPT_CODE
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<select id="selectByLevelNoZBZ" resultMap="DiseaseLevel"> <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, 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 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 where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if test="level!=null"> <if test="level!=null">
and d.`LEVEL` = #{level,jdbcType=DECIMAL} and d.`LEVEL` = #{level,jdbcType=DECIMAL}
...@@ -124,8 +124,8 @@ ...@@ -124,8 +124,8 @@
</if> </if>
<if test="deptCode==null"> <if test="deptCode==null">
and EXISTS(select o2.ORG_CODE as DEPT_CODE and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2 from sys_user_sbj_rs rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1 join sys_subject o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1 where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL} and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE and o2.ORG_CODE = rs.DEPT_CODE
...@@ -136,8 +136,8 @@ ...@@ -136,8 +136,8 @@
<select id="selectByParentId" resultMap="DiseaseLevel"> <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, 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 d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d from dic_disease d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE join dic_disease_doc_rs rs on rs.MDC_CODE=d.MDC_CODE
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2 from val_block_values_1_5_2
where TIME=#{date} where TIME=#{date}
...@@ -154,8 +154,8 @@ ...@@ -154,8 +154,8 @@
</if> </if>
<if test="deptCode==null"> <if test="deptCode==null">
and EXISTS(select o2.ORG_CODE as DEPT_CODE and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2 from sys_user_sbj_rs rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1 join sys_subject o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1 where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL} and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE and o2.ORG_CODE = rs.DEPT_CODE
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<select id="selectByParentIdNoZbz" resultMap="DiseaseLevel"> <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, 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 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 where 1 = 1 and STATE=1 and STATE=1
<if test="parentId!=null"> <if test="parentId!=null">
and d.PARENT_ID = #{parentId,jdbcType=DECIMAL} and d.PARENT_ID = #{parentId,jdbcType=DECIMAL}
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
</select> </select>
<select id="selectParentById" resultMap="DiseaseLevel"> <select id="selectParentById" resultMap="DiseaseLevel">
select * select *
from SER_DISEASE from dic_disease
where 1 = 1 and STATE=1 where 1 = 1 and STATE=1
<if test="diseaseId!=null"> <if test="diseaseId!=null">
and id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} ) and id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} )
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
<select id="selectSonById" resultMap="DiseaseLevel"> <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, 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 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 where 1 = 1 and STATE=1 and STATE=1
<if test="diseaseId!=null"> <if test="diseaseId!=null">
and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL} and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerDoctorMapper"> <mapper namespace="com.bsoft.api.mapper.SerDoctorMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDoctor"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDoctor">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="ORG_ID" jdbcType="VARCHAR" property="orgId" /> <result column="ORG_ID" jdbcType="VARCHAR" property="orgId"/>
<result column="YSBM" jdbcType="VARCHAR" property="ysbm" /> <result column="YSBM" jdbcType="VARCHAR" property="ysbm"/>
<result column="YSMC" jdbcType="VARCHAR" property="ysmc" /> <result column="YSMC" jdbcType="VARCHAR" property="ysmc"/>
<result column="YSLX" jdbcType="VARCHAR" property="yslx" /> <result column="YSLX" jdbcType="VARCHAR" property="yslx"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_DOCTOR delete
where ID = #{id,jdbcType=DECIMAL} from SER_DOCTOR
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerDoctor"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <insert id="insert" parameterType="com.bsoft.api.model.SerDoctor">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_DOCTOR (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
ORG_ID, YSBM, YSMC, insert into SER_DOCTOR (CREATE_DATE, CREATE_USERID, `STATE`,
YSLX) ORG_ID, YSBM, YSMC,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, YSLX)
#{orgId,jdbcType=VARCHAR}, #{ysbm,jdbcType=VARCHAR}, #{ysmc,jdbcType=VARCHAR}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{yslx,jdbcType=VARCHAR}) #{orgId,jdbcType=VARCHAR}, #{ysbm,jdbcType=VARCHAR}, #{ysmc,jdbcType=VARCHAR},
</insert> #{yslx,jdbcType=VARCHAR})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDoctor"> </insert>
update SER_DOCTOR <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDoctor">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SER_DOCTOR
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=VARCHAR}, `STATE` = #{state,jdbcType=DECIMAL},
YSBM = #{ysbm,jdbcType=VARCHAR}, ORG_ID = #{orgId,jdbcType=VARCHAR},
YSMC = #{ysmc,jdbcType=VARCHAR}, YSBM = #{ysbm,jdbcType=VARCHAR},
YSLX = #{yslx,jdbcType=VARCHAR} YSMC = #{ysmc,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} YSLX = #{yslx,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, YSBM, YSMC, YSLX <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
from SER_DOCTOR select ID,
where ID = #{id,jdbcType=DECIMAL} CREATE_DATE,
</select> CREATE_USERID,
<select id="selectAll" resultMap="BaseResultMap"> `STATE`,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, YSBM, YSMC, YSLX ORG_ID,
from SER_DOCTOR YSBM,
</select> YSMC,
<select id="selectDoctor" resultMap="BaseResultMap"> YSLX
SELECT DISTINCT d.* from SER_DOCTOR
FROM SER_DEPT_DOC_RS ddr where ID = #{id,jdbcType=DECIMAL}
join SER_DOCTOR d on d.YSBM=ddr.YSBM </select>
where d.`STATE` = 1 and ddr.`STATE` = 1 and ddr.KSBM = #{dept,jdbcType=VARCHAR} <select id="selectAll" resultMap="BaseResultMap">
</select> select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
ORG_ID,
YSBM,
YSMC,
YSLX
from SER_DOCTOR
</select>
<select id="selectDoctor" resultMap="BaseResultMap">
SELECT DISTINCT d.*
FROM SER_DEPT_DOC_RS ddr
join SER_DOCTOR d on d.YSBM = ddr.YSBM
where d.`STATE` = 1
and ddr.`STATE` = 1
and ddr.KSBM = #{dept,jdbcType=VARCHAR}
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerPageBlockRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageBlockRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageBlockRs">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="BLOCK_ID" jdbcType="DECIMAL" property="blockId" /> <result column="BLOCK_ID" jdbcType="DECIMAL" property="blockId"/>
<result column="PAGE_ID" jdbcType="DECIMAL" property="pageId" /> <result column="PAGE_ID" jdbcType="DECIMAL" property="pageId"/>
<result column="WHERE_CLAUSE" jdbcType="VARCHAR" property="whereClause" /> <result column="WHERE_CLAUSE" jdbcType="VARCHAR" property="whereClause"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SER_PAGE_BLOCK_RS delete
where ID = #{id,jdbcType=DECIMAL} from dic_page_block_rs
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerPageBlockRs"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageBlockRs">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_PAGE_BLOCK_RS (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
BLOCK_ID, PAGE_ID, WHERE_CLAUSE 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} 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"> </insert>
update SER_PAGE_BLOCK_RS <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageBlockRs">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update dic_page_block_rs
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
BLOCK_ID = #{blockId,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
PAGE_ID = #{pageId,jdbcType=DECIMAL}, BLOCK_ID = #{blockId,jdbcType=DECIMAL},
WHERE_CLAUSE = #{whereClause,jdbcType=VARCHAR} PAGE_ID = #{pageId,jdbcType=DECIMAL},
where ID = #{id,jdbcType=DECIMAL} WHERE_CLAUSE = #{whereClause,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SER_PAGE_BLOCK_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
where ID = #{id,jdbcType=DECIMAL} from dic_page_block_rs
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE <select id="selectAll" resultMap="BaseResultMap">
from SER_PAGE_BLOCK_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
</select> from dic_page_block_rs
<select id="selectByPageId" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID,WHERE_CLAUSE <select id="selectByPageId" resultMap="BaseResultMap">
from SER_PAGE_BLOCK_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
where PAGE_ID=#{pageID,jdbcType=DECIMAL} from dic_page_block_rs
</select> where PAGE_ID = #{pageID,jdbcType=DECIMAL}
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerPageFieldMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageField"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageField">
<result column="ID" jdbcType="DECIMAL" property="id" /> <result column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="FIELD_CODE" jdbcType="VARCHAR" property="fieldCode" /> <result column="FIELD_CODE" jdbcType="VARCHAR" property="fieldCode"/>
<result column="FIELD_NAME" jdbcType="VARCHAR" property="fieldName" /> <result column="FIELD_NAME" jdbcType="VARCHAR" property="fieldName"/>
<result column="REMARK" jdbcType="VARCHAR" property="remark" /> <result column="REMARK" jdbcType="VARCHAR" property="remark"/>
</resultMap> </resultMap>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageField"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageField">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, `STATE`, insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, `STATE`,
FIELD_CODE, FIELD_NAME, REMARK FIELD_CODE, FIELD_NAME, REMARK
) )
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{fieldCode,jdbcType=VARCHAR}, #{fieldName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR} #{fieldCode,jdbcType=VARCHAR}, #{fieldName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
) )
</insert> </insert>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, FIELD_CODE, FIELD_NAME, REMARK select ID, CREATE_DATE, CREATE_USERID, `STATE`, FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD from SER_PAGE_FIELD
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerPageMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPage"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPage">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode" /> <result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode"/>
<result column="PAGE_NAME" jdbcType="VARCHAR" property="pageName" /> <result column="PAGE_NAME" jdbcType="VARCHAR" property="pageName"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SER_PAGE delete
where ID = #{id,jdbcType=DECIMAL} from dic_page_info
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerPage"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SerPage">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_PAGE (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
PAGE_CODE, PAGE_NAME) insert into dic_page_info (CREATE_DATE, CREATE_USERID, `STATE`,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, PAGE_CODE, PAGE_NAME)
#{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR}) values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
</insert> #{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPage"> </insert>
update SER_PAGE <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPage">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update dic_page_info
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR}, `STATE` = #{state,jdbcType=DECIMAL},
PAGE_NAME = #{pageName,jdbcType=VARCHAR} PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} PAGE_NAME = #{pageName,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SER_PAGE select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
where ID = #{id,jdbcType=DECIMAL} from dic_page_info
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME <select id="selectAll" resultMap="BaseResultMap">
from SER_PAGE select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
</select> from dic_page_info
<select id="selectByCodeAndDim" resultMap="BaseResultMap"> </select>
select d.* from SER_PAGE d, <select id="selectByCodeAndDim" resultMap="BaseResultMap">
<if test="dimCount != 0"> select d.* from dic_page_info d,
(select a.id,COUNT(b.ID) count <if test="dimCount != 0">
from SER_PAGE a (select a.id,COUNT(b.ID) count
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 from dic_page_info a
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} JOIN dic_dim_info c on c.ID = b.DIM_ID
and c.DIM_FIELD in (${inField}) where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) e, and c.DIM_FIELD in (${inField})
</if> GROUP BY a.ID) e,
(select a.id,COUNT(b.ID) count </if>
from SER_PAGE a (select a.id,COUNT(b.ID) count
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 from dic_page_info a
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} JOIN dic_dim_info c on c.ID = b.DIM_ID
GROUP BY a.ID) f where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
where d.id = f.id GROUP BY a.ID) f
<if test="dimCount != 0"> where d.id = f.id
and f.count = e.count <if test="dimCount != 0">
and d.Id = e.id and f.count = e.count
</if> and d.Id = e.id
and f.count =#{dimCount,jdbcType=INTEGER} </if>
</select> and f.count =#{dimCount,jdbcType=INTEGER}
<select id="selectByCodeAndDimList" resultType="com.bsoft.api.model.SerPage"> </select>
select d.* from SER_PAGE d, <select id="selectByCodeAndDimList" resultType="com.bsoft.api.model.SerPage">
<if test="dimCount != 0"> select d.* from dic_page_info d,
(select a.id,COUNT(b.ID) count <if test="dimCount != 0">
from SER_PAGE a (select a.id,COUNT(b.ID) count
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 from dic_page_info a
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} JOIN dic_dim_info c on c.ID = b.DIM_ID
<if test="inFields.size() > 0"> where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
and c.DIM_FIELD in <if test="inFields.size() > 0">
<foreach item="item" index="index" collection="inFields" open="(" separator="," close=")"> and c.DIM_FIELD in
#{item,jdbcType=VARCHAR} <foreach item="item" index="index" collection="inFields" open="(" separator="," close=")">
</foreach> #{item,jdbcType=VARCHAR}
</if> </foreach>
GROUP BY a.ID) e, </if>
</if> GROUP BY a.ID) e,
(select a.id,COUNT(b.ID) count </if>
from SER_PAGE a (select a.id,COUNT(b.ID) count
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 from dic_page_info a
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} JOIN dic_dim_info c on c.ID = b.DIM_ID
GROUP BY a.ID) f where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
where d.id = f.id GROUP BY a.ID) f
<if test="dimCount != 0"> where d.id = f.id
and f.count = e.count <if test="dimCount != 0">
and d.Id = e.id and f.count = e.count
</if> and d.Id = e.id
and f.count =#{dimCount,jdbcType=INTEGER} </if>
</select> and f.count =#{dimCount,jdbcType=INTEGER}
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerPageProjFieldRsMapper"> <mapper namespace="com.bsoft.api.mapper.SerPageProjFieldRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProjFieldRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProjFieldRs">
<result column="ID" jdbcType="DECIMAL" property="id" /> <result column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="PROJ_TYPE" jdbcType="DECIMAL" property="projType" /> <result column="PROJ_TYPE" jdbcType="DECIMAL" property="projType"/>
<result column="PROJ_ID" jdbcType="DECIMAL" property="projId" /> <result column="PROJ_ID" jdbcType="DECIMAL" property="projId"/>
<result column="FIELD_ID" jdbcType="DECIMAL" property="fieldId" /> <result column="FIELD_ID" jdbcType="DECIMAL" property="fieldId"/>
<result column="REMARK" jdbcType="VARCHAR" property="remark" /> <result column="REMARK" jdbcType="VARCHAR" property="remark"/>
<result column="SORT" jdbcType="DECIMAL" property="sort" /> <result column="SORT" jdbcType="DECIMAL" property="sort"/>
</resultMap> </resultMap>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageProjFieldRs"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageProjFieldRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SER_PAGE_PROJ_FIELD_RS (CREATE_DATE, CREATE_USERID, `STATE`, insert into SER_PAGE_PROJ_FIELD_RS (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_TYPE, PROJ_ID, FIELD_ID, PROJ_TYPE, PROJ_ID, FIELD_ID,
REMARK, SORT) REMARK, SORT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL}, #{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{remark,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL}) #{remark,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL})
</insert> </insert>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_TYPE, PROJ_ID, FIELD_ID, REMARK, select ID,
SORT CREATE_DATE,
from SER_PAGE_PROJ_FIELD_RS CREATE_USERID,
</select> `STATE`,
PROJ_TYPE,
PROJ_ID,
FIELD_ID,
REMARK,
SORT
from SER_PAGE_PROJ_FIELD_RS
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerPageProjMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProj"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProj">
<result column="ID" jdbcType="DECIMAL" property="id" /> <result column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="PROJ_NAME" jdbcType="VARCHAR" property="projName" /> <result column="PROJ_NAME" jdbcType="VARCHAR" property="projName"/>
<result column="PROJ_CODE" jdbcType="VARCHAR" property="projCode" /> <result column="PROJ_CODE" jdbcType="VARCHAR" property="projCode"/>
<result column="PROJ_TYPE" jdbcType="VARCHAR" property="projType" /> <result column="PROJ_TYPE" jdbcType="VARCHAR" property="projType"/>
</resultMap> </resultMap>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageProj"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageProj">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, `STATE`, insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_NAME, PROJ_CODE, PROJ_TYPE PROJ_NAME, PROJ_CODE, PROJ_TYPE
) )
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projName,jdbcType=VARCHAR}, #{projCode,jdbcType=VARCHAR}, #{projType,jdbcType=VARCHAR} #{projName,jdbcType=VARCHAR}, #{projCode,jdbcType=VARCHAR}, #{projType,jdbcType=VARCHAR}
) )
</insert> </insert>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_NAME, PROJ_CODE, PROJ_TYPE select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ from SER_PAGE_PROJ
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerPageProjValueMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProjValue"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProjValue">
<result column="ID" jdbcType="DECIMAL" property="id" /> <result column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" /> <result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode"/>
<result column="DATE_FILTER" jdbcType="DECIMAL" property="dateFilter" /> <result column="DATE_FILTER" jdbcType="DECIMAL" property="dateFilter"/>
<result column="DATA_CATEGORY" jdbcType="VARCHAR" property="dataCategory" /> <result column="DATA_CATEGORY" jdbcType="VARCHAR" property="dataCategory"/>
<result column="PROJ_TYPE" jdbcType="DECIMAL" property="projType" /> <result column="PROJ_TYPE" jdbcType="DECIMAL" property="projType"/>
<result column="PROJ_ID" jdbcType="DECIMAL" property="projId" /> <result column="PROJ_ID" jdbcType="DECIMAL" property="projId"/>
<result column="FIELD_ID" jdbcType="DECIMAL" property="fieldId" /> <result column="FIELD_ID" jdbcType="DECIMAL" property="fieldId"/>
<result column="FIELD_VALUE" jdbcType="VARCHAR" property="fieldValue" /> <result column="FIELD_VALUE" jdbcType="VARCHAR" property="fieldValue"/>
<result column="FIELD_UNIT" jdbcType="VARCHAR" property="fieldUnit" /> <result column="FIELD_UNIT" jdbcType="VARCHAR" property="fieldUnit"/>
</resultMap> </resultMap>
<resultMap id="SummaryNew" type="com.bsoft.api.model.respmodel.SummaryNew"> <resultMap id="SummaryNew" type="com.bsoft.api.model.respmodel.SummaryNew">
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" /> <result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode"/>
</resultMap> </resultMap>
<resultMap id="SummaryValue" type="com.bsoft.api.model.respmodel.SummaryValue"> <resultMap id="SummaryValue" type="com.bsoft.api.model.respmodel.SummaryValue">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="PROJ_NAME" jdbcType="VARCHAR" property="projName" /> <result column="PROJ_NAME" jdbcType="VARCHAR" property="projName"/>
<result column="FIELD_NAME" jdbcType="VARCHAR" property="fieldName" /> <result column="FIELD_NAME" jdbcType="VARCHAR" property="fieldName"/>
<result column="FIELD_ID" jdbcType="DECIMAL" property="fieldId" /> <result column="FIELD_ID" jdbcType="DECIMAL" property="fieldId"/>
<result column="FIELD_VALUE" jdbcType="VARCHAR" property="fieldValue" /> <result column="FIELD_VALUE" jdbcType="VARCHAR" property="fieldValue"/>
<result column="FIELD_UNIT" jdbcType="VARCHAR" property="fieldUnit" /> <result column="FIELD_UNIT" jdbcType="VARCHAR" property="fieldUnit"/>
</resultMap> </resultMap>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageProjValue"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageProjValue">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`, insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`,
DEPT_CODE, DATE_FILTER, DATA_CATEGORY, DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID, PROJ_TYPE, PROJ_ID, FIELD_ID,
FIELD_VALUE, FIELD_UNIT) FIELD_VALUE, FIELD_UNIT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{dateFilter,jdbcType=DECIMAL}, #{dataCategory,jdbcType=VARCHAR}, #{deptCode,jdbcType=VARCHAR}, #{dateFilter,jdbcType=DECIMAL}, #{dataCategory,jdbcType=VARCHAR},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL}, #{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{fieldValue,jdbcType=VARCHAR}, #{fieldUnit,jdbcType=VARCHAR}) #{fieldValue,jdbcType=VARCHAR}, #{fieldUnit,jdbcType=VARCHAR})
</insert> </insert>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DEPT_CODE, DATE_FILTER, DATA_CATEGORY, select ID,
PROJ_TYPE, PROJ_ID, FIELD_ID, FIELD_VALUE, FIELD_UNIT CREATE_DATE,
from SER_PAGE_PROJ_VALUE CREATE_USERID,
</select> `STATE`,
<select id="selectDept" resultMap="SummaryNew"> DEPT_CODE,
select DEPT_CODE DATE_FILTER,
from SER_PAGE_PROJ_VALUE DATA_CATEGORY,
where STATE = 1 and PROJ_TYPE = #{page,jdbcType = DECIMAL} PROJ_TYPE,
and DATE_FILTER = #{date,jdbcType = DECIMAL} PROJ_ID,
GROUP BY DEPT_CODE FIELD_ID,
</select> FIELD_VALUE,
<select id="selectValue" resultMap="SummaryValue"> FIELD_UNIT
select v.ID,p.PROJ_NAME,f.FIELD_NAME,v.FIELD_ID,v.FIELD_VALUE,v.FIELD_UNIT from SER_PAGE_PROJ_VALUE
from SER_PAGE_PROJ_VALUE v </select>
join SER_PAGE_PROJ p on p.ID = v.PROJ_ID and p.STATE = 1 <select id="selectDept" resultMap="SummaryNew">
join SER_PAGE_FIELD f on f.ID = v.FIELD_ID and f.STATE = 1 select DEPT_CODE
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 from SER_PAGE_PROJ_VALUE
where v.STATE = 1 and v.PROJ_TYPE = #{page,jdbcType = DECIMAL} where STATE = 1
and v.DATE_FILTER=#{date,jdbcType = DECIMAL} and v.DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and PROJ_TYPE = #{page,jdbcType = DECIMAL}
order by rs.SORT and DATE_FILTER = #{date,jdbcType = DECIMAL}
</select> 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> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerPageValueConfigMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageValueConfig"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageValueConfig">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="PAGE" jdbcType="DECIMAL" property="page" /> <result column="PAGE" jdbcType="DECIMAL" property="page"/>
<result column="PAGE_NAME" jdbcType="VARCHAR" property="pageName" /> <result column="PAGE_NAME" jdbcType="VARCHAR" property="pageName"/>
<result column="SQLSTR" jdbcType="VARCHAR" property="sqlstr" /> <result column="SQLSTR" jdbcType="VARCHAR" property="sqlstr"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PAGE_VALUE_CONFIG delete
where ID = #{id,jdbcType=DECIMAL} from SER_PAGE_VALUE_CONFIG
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerPageValueConfig"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageValueConfig">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_PAGE_VALUE_CONFIG (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
PAGE, PAGE_NAME, SQLSTR 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} 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"> </insert>
update SER_PAGE_VALUE_CONFIG <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageValueConfig">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SER_PAGE_VALUE_CONFIG
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
PAGE = #{page,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
PAGE_NAME = #{pageName,jdbcType=VARCHAR}, PAGE = #{page,jdbcType=DECIMAL},
SQLSTR = #{sqlstr,jdbcType=VARCHAR} PAGE_NAME = #{pageName,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} SQLSTR = #{sqlstr,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
from SER_PAGE_VALUE_CONFIG select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR
where ID = #{id,jdbcType=DECIMAL} from SER_PAGE_VALUE_CONFIG
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR <select id="selectAll" resultMap="BaseResultMap">
from SER_PAGE_VALUE_CONFIG select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE, PAGE_NAME, SQLSTR
</select> from SER_PAGE_VALUE_CONFIG
<select id="selectByPage" resultMap="BaseResultMap"> </select>
select * <select id="selectByPage" resultMap="BaseResultMap">
from SER_PAGE_VALUE_CONFIG select *
where STATE = 1 and PAGE = #{page,jdbcType=DECIMAL} from SER_PAGE_VALUE_CONFIG
</select> where STATE = 1
and PAGE = #{page,jdbcType=DECIMAL}
</select>
<select id="selectSqlStr" resultType="java.util.Map"> <select id="selectSqlStr" resultType="java.util.Map">
${sqlStr} ${sqlStr}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SerProjValueSzMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerProjValueSz"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerProjValueSz">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="PROJ_ID" jdbcType="DECIMAL" property="projId" /> <result column="PROJ_ID" jdbcType="DECIMAL" property="projId"/>
<result column="SZ" jdbcType="DECIMAL" property="sz" /> <result column="SZ" jdbcType="DECIMAL" property="sz"/>
<result column="ZXPL" jdbcType="DECIMAL" property="zxpl" /> <result column="ZXPL" jdbcType="DECIMAL" property="zxpl"/>
<result column="DATE" jdbcType="DECIMAL" property="date" /> <result column="DATE" jdbcType="DECIMAL" property="date"/>
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" /> <result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode"/>
<result column="HOSCODE" jdbcType="VARCHAR" property="hoscode" /> <result column="HOSCODE" jdbcType="VARCHAR" property="hoscode"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PROJ_VALUE_SZ delete
where ID = #{id,jdbcType=DECIMAL} from SER_PROJ_VALUE_SZ
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SerProjValueSz"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal"> <insert id="insert" parameterType="com.bsoft.api.model.SerProjValueSz">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
</selectKey> SELECT LAST_INSERT_ID()
insert into SER_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
PROJ_ID, SZ, ZXPL, `DATE`, insert into SER_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, `STATE`,
DEPT_CODE, HOSCODE) PROJ_ID, SZ, ZXPL, `DATE`,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, DEPT_CODE, HOSCODE)
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR}) #{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
</insert> #{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValueSz"> </insert>
update SER_PROJ_VALUE_SZ <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValueSz">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SER_PROJ_VALUE_SZ
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
SZ = #{sz,jdbcType=DECIMAL}, PROJ_ID = #{projId,jdbcType=DECIMAL},
ZXPL = #{zxpl,jdbcType=DECIMAL}, SZ = #{sz,jdbcType=DECIMAL},
`DATE` = #{date,jdbcType=DECIMAL}, ZXPL = #{zxpl,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR}, `DATE` = #{date,jdbcType=DECIMAL},
HOSCODE = #{hoscode,jdbcType=VARCHAR} DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
where ID = #{id,jdbcType=DECIMAL} HOSCODE = #{hoscode,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE, <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
HOSCODE select ID,
from SER_PROJ_VALUE_SZ CREATE_DATE,
where ID = #{id,jdbcType=DECIMAL} CREATE_USERID,
</select> `STATE`,
<select id="selectAll" resultMap="BaseResultMap"> PROJ_ID,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE, SZ,
HOSCODE ZXPL,
from SER_PROJ_VALUE_SZ `DATE`,
</select> DEPT_CODE,
<select id="selectByProj" resultMap="BaseResultMap"> HOSCODE
select * from SER_PROJ_VALUE_SZ
from SER_PROJ_VALUE_SZ where ID = #{id,jdbcType=DECIMAL}
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL} </select>
and `DATE` = #{date,jdbcType=DECIMAL} <select id="selectAll" resultMap="BaseResultMap">
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR} select ID,
order by `DATE` desc CREATE_DATE,
</select> 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>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SysRoleMenuRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysRoleMenuRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SysRoleMenuRs">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="MENU_ID" jdbcType="DECIMAL" property="menuId" /> <result column="MENU_ID" jdbcType="DECIMAL" property="menuId"/>
<result column="ROLE_ID" jdbcType="DECIMAL" property="roleId" /> <result column="ROLE_ID" jdbcType="DECIMAL" property="roleId"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_ROLE_MENU_RS delete
where ID = #{id,jdbcType=DECIMAL} from SYS_ROLE_MENU_RS
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SysRoleMenuRs"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SysRoleMenuRs">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SYS_ROLE_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
MENU_ID, ROLE_ID) insert into SYS_ROLE_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, MENU_ID, ROLE_ID)
#{menuId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL}) values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
</insert> #{menuId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysRoleMenuRs"> </insert>
update SYS_ROLE_MENU_RS <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysRoleMenuRs">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SYS_ROLE_MENU_RS
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
MENU_ID = #{menuId,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL} MENU_ID = #{menuId,jdbcType=DECIMAL},
where ID = #{id,jdbcType=DECIMAL} ROLE_ID = #{roleId,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SYS_ROLE_MENU_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID
where ID = #{id,jdbcType=DECIMAL} from SYS_ROLE_MENU_RS
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID <select id="selectAll" resultMap="BaseResultMap">
from SYS_ROLE_MENU_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, MENU_ID, ROLE_ID
</select> from SYS_ROLE_MENU_RS
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SysUserMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUser"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUser">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="USER_CODE" jdbcType="VARCHAR" property="userCode" /> <result column="USER_CODE" jdbcType="VARCHAR" property="userCode"/>
<result column="USER_NAME" jdbcType="VARCHAR" property="userName" /> <result column="USER_NAME" jdbcType="VARCHAR" property="userName"/>
<result column="PASSWORD" jdbcType="VARCHAR" property="password" /> <result column="PASSWORD" jdbcType="VARCHAR" property="password"/>
<result column="IDCARD" jdbcType="VARCHAR" property="idcard" /> <result column="IDCARD" jdbcType="VARCHAR" property="idcard"/>
<result column="SEX" jdbcType="VARCHAR" property="sex" /> <result column="SEX" jdbcType="VARCHAR" property="sex"/>
<result column="MOBILE" jdbcType="VARCHAR" property="mobile" /> <result column="MOBILE" jdbcType="VARCHAR" property="mobile"/>
<result column="PAGE_COUNT" jdbcType="DECIMAL" property="pageCount" /> <result column="PAGE_COUNT" jdbcType="DECIMAL" property="pageCount"/>
<result column="ERROR_COUNT" jdbcType="DECIMAL" property="errorCount" /> <result column="ERROR_COUNT" jdbcType="DECIMAL" property="errorCount"/>
<result column="ERROR_TIME" jdbcType="TIMESTAMP" property="errorTime" /> <result column="ERROR_TIME" jdbcType="TIMESTAMP" property="errorTime"/>
<result column="LAST_TIME" jdbcType="TIMESTAMP" property="lastTime" /> <result column="LAST_TIME" jdbcType="TIMESTAMP" property="lastTime"/>
<result column="LAST_IP" jdbcType="VARCHAR" property="lastIp" /> <result column="LAST_IP" jdbcType="VARCHAR" property="lastIp"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_USER delete
where ID = #{id,jdbcType=DECIMAL} from SYS_USER
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SysUser"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SysUser">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SYS_USER (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
USER_CODE, USER_NAME, `PASSWORD`, insert into SYS_USER (CREATE_DATE, CREATE_USERID, `STATE`,
IDCARD, SEX, MOBILE, USER_CODE, USER_NAME, `PASSWORD`,
PAGE_COUNT, ERROR_COUNT, ERROR_TIME, IDCARD, SEX, MOBILE,
LAST_TIME, LAST_IP) PAGE_COUNT, ERROR_COUNT, ERROR_TIME,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, LAST_TIME, LAST_IP)
#{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{idcard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{pageCount,jdbcType=DECIMAL}, #{errorCount,jdbcType=DECIMAL}, #{errorTime,jdbcType=TIMESTAMP}, #{idcard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{lastTime,jdbcType=TIMESTAMP}, #{lastIp,jdbcType=VARCHAR}) #{pageCount,jdbcType=DECIMAL}, #{errorCount,jdbcType=DECIMAL}, #{errorTime,jdbcType=TIMESTAMP},
</insert> #{lastTime,jdbcType=TIMESTAMP}, #{lastIp,jdbcType=VARCHAR})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUser"> </insert>
update SYS_USER <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUser">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SYS_USER
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
USER_CODE = #{userCode,jdbcType=VARCHAR}, `STATE` = #{state,jdbcType=DECIMAL},
USER_NAME = #{userName,jdbcType=VARCHAR}, USER_CODE = #{userCode,jdbcType=VARCHAR},
`PASSWORD` = #{password,jdbcType=VARCHAR}, USER_NAME = #{userName,jdbcType=VARCHAR},
IDCARD = #{idcard,jdbcType=VARCHAR}, `PASSWORD` = #{password,jdbcType=VARCHAR},
SEX = #{sex,jdbcType=VARCHAR}, IDCARD = #{idcard,jdbcType=VARCHAR},
MOBILE = #{mobile,jdbcType=VARCHAR}, SEX = #{sex,jdbcType=VARCHAR},
PAGE_COUNT = #{pageCount,jdbcType=DECIMAL}, MOBILE = #{mobile,jdbcType=VARCHAR},
ERROR_COUNT = #{errorCount,jdbcType=DECIMAL}, PAGE_COUNT = #{pageCount,jdbcType=DECIMAL},
ERROR_TIME = #{errorTime,jdbcType=TIMESTAMP}, ERROR_COUNT = #{errorCount,jdbcType=DECIMAL},
LAST_TIME = #{lastTime,jdbcType=TIMESTAMP}, ERROR_TIME = #{errorTime,jdbcType=TIMESTAMP},
LAST_IP = #{lastIp,jdbcType=VARCHAR} LAST_TIME = #{lastTime,jdbcType=TIMESTAMP},
where ID = #{id,jdbcType=DECIMAL} LAST_IP = #{lastIp,jdbcType=VARCHAR}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
IDCARD, SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP select ID,
from SYS_USER CREATE_DATE,
where ID = #{id,jdbcType=DECIMAL} CREATE_USERID,
</select> `STATE`,
<select id="selectAll" resultMap="BaseResultMap"> USER_CODE,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, USER_NAME,
IDCARD, SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP `PASSWORD`,
from SYS_USER IDCARD,
</select> SEX,
<select id="selectByCode" resultMap="BaseResultMap"> MOBILE,
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, IDCARD, PAGE_COUNT,
SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP ERROR_COUNT,
from SYS_USER ERROR_TIME,
where USER_CODE=#{userCode,jdbcType=VARCHAR} LAST_TIME,
and `STATE` != 0 LAST_IP
</select> 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> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SysUserMenuRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserMenuRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserMenuRs">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="USER_ID" jdbcType="DECIMAL" property="userId" /> <result column="USER_ID" jdbcType="DECIMAL" property="userId"/>
<result column="MENU_ID" jdbcType="DECIMAL" property="menuId" /> <result column="MENU_ID" jdbcType="DECIMAL" property="menuId"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_USER_MENU_RS delete
where ID = #{id,jdbcType=DECIMAL} from SYS_USER_MENU_RS
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SysUserMenuRs"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SysUserMenuRs">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SYS_USER_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
USER_ID, MENU_ID) insert into SYS_USER_MENU_RS (CREATE_DATE, CREATE_USERID, `STATE`,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, USER_ID, MENU_ID)
#{userId,jdbcType=DECIMAL}, #{menuId,jdbcType=DECIMAL}) values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
</insert> #{userId,jdbcType=DECIMAL}, #{menuId,jdbcType=DECIMAL})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserMenuRs"> </insert>
update SYS_USER_MENU_RS <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserMenuRs">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SYS_USER_MENU_RS
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
MENU_ID = #{menuId,jdbcType=DECIMAL} USER_ID = #{userId,jdbcType=DECIMAL},
where ID = #{id,jdbcType=DECIMAL} MENU_ID = #{menuId,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SYS_USER_MENU_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID
where ID = #{id,jdbcType=DECIMAL} from SYS_USER_MENU_RS
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID <select id="selectAll" resultMap="BaseResultMap">
from SYS_USER_MENU_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, MENU_ID
</select> from SYS_USER_MENU_RS
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SysUserOrgRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserOrgRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserOrgRs">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="USER_ID" jdbcType="DECIMAL" property="userId" /> <result column="USER_ID" jdbcType="DECIMAL" property="userId"/>
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" /> <result column="ORG_ID" jdbcType="DECIMAL" property="orgId"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_USER_ORG_RS delete
where ID = #{id,jdbcType=DECIMAL} from sys_user_sbj_rs
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SysUserOrgRs"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SysUserOrgRs">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SYS_USER_ORG_RS (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
USER_ID, ORG_ID) insert into sys_user_sbj_rs (CREATE_DATE, CREATE_USERID, `STATE`,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, USER_ID, ORG_ID)
#{userId,jdbcType=DECIMAL}, #{orgId,jdbcType=DECIMAL}) values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
</insert> #{userId,jdbcType=DECIMAL}, #{orgId,jdbcType=DECIMAL})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserOrgRs"> </insert>
update SYS_USER_ORG_RS <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserOrgRs">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update sys_user_sbj_rs
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=DECIMAL} USER_ID = #{userId,jdbcType=DECIMAL},
where ID = #{id,jdbcType=DECIMAL} ORG_ID = #{orgId,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SYS_USER_ORG_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
where ID = #{id,jdbcType=DECIMAL} from sys_user_sbj_rs
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID <select id="selectAll" resultMap="BaseResultMap">
from SYS_USER_ORG_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
</select> from sys_user_sbj_rs
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.bsoft.api.mapper.SysUserRoleRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserRoleRs"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserRoleRs">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" /> <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state" /> <result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="USER_ID" jdbcType="DECIMAL" property="userId" /> <result column="USER_ID" jdbcType="DECIMAL" property="userId"/>
<result column="ROLE_ID" jdbcType="DECIMAL" property="roleId" /> <result column="ROLE_ID" jdbcType="DECIMAL" property="roleId"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_USER_ROLE_RS delete
where ID = #{id,jdbcType=DECIMAL} from SYS_USER_ROLE_RS
</delete> where ID = #{id,jdbcType=DECIMAL}
<insert id="insert" parameterType="com.bsoft.api.model.SysUserRoleRs"> </delete>
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <insert id="insert" parameterType="com.bsoft.api.model.SysUserRoleRs">
SELECT LAST_INSERT_ID() <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
</selectKey> SELECT LAST_INSERT_ID()
insert into SYS_USER_ROLE_RS (CREATE_DATE, CREATE_USERID, `STATE`, </selectKey>
USER_ID, ROLE_ID) insert into SYS_USER_ROLE_RS (CREATE_DATE, CREATE_USERID, `STATE`,
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, USER_ID, ROLE_ID)
#{userId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL}) values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
</insert> #{userId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserRoleRs"> </insert>
update SYS_USER_ROLE_RS <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserRoleRs">
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, update SYS_USER_ROLE_RS
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
`STATE` = #{state,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
USER_ID = #{userId,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL} USER_ID = #{userId,jdbcType=DECIMAL},
where ID = #{id,jdbcType=DECIMAL} ROLE_ID = #{roleId,jdbcType=DECIMAL}
</update> where ID = #{id,jdbcType=DECIMAL}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </update>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from SYS_USER_ROLE_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID
where ID = #{id,jdbcType=DECIMAL} from SYS_USER_ROLE_RS
</select> where ID = #{id,jdbcType=DECIMAL}
<select id="selectAll" resultMap="BaseResultMap"> </select>
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID <select id="selectAll" resultMap="BaseResultMap">
from SYS_USER_ROLE_RS select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ROLE_ID
</select> from SYS_USER_ROLE_RS
<select id="selectRoleByUser" resultMap="BaseResultMap"> </select>
select ID,USER_ID, ROLE_ID <select id="selectRoleByUser" resultMap="BaseResultMap">
from SYS_USER_ROLE_RS select ID, USER_ID, ROLE_ID
where USER_ID=#{userId,jdbcType=DECIMAL} from SYS_USER_ROLE_RS
</select> where USER_ID = #{userId,jdbcType=DECIMAL}
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment