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
...@@ -2,23 +2,24 @@ ...@@ -2,23 +2,24 @@
<!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
from dic_dim_info
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.DicDim"> <insert id="insert" parameterType="com.bsoft.api.model.DicDim">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into DIC_DIM (CREATE_DATE, CREATE_USERID, `STATE`, insert into dic_dim_info (CREATE_DATE, CREATE_USERID, `STATE`,
DIM_NAME, DIM_FIELD, DIM_TYPE DIM_NAME, DIM_FIELD, DIM_TYPE
) )
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
) )
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicDim"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicDim">
update DIC_DIM update dic_dim_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
...@@ -37,22 +38,27 @@ ...@@ -37,22 +38,27 @@
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
from DIC_DIM from dic_dim_info
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE select ID, CREATE_DATE, CREATE_USERID, `STATE`, DIM_NAME, DIM_FIELD, DIM_TYPE
from DIC_DIM from dic_dim_info
</select> </select>
<select id="selectByPageid" resultMap="BaseResultMap"> <select id="selectByPageid" resultMap="BaseResultMap">
select dd.* from SER_PAGE_DIM_RS spdr,DIC_DIM dd select dd.*
where spdr.DIM_ID=dd.ID and spdr.PAGE_ID=#{pageID,jdbcType=DECIMAL} from dic_page_dim_rs spdr,
DIC_DIM dd
where spdr.DIM_ID = dd.ID
and spdr.PAGE_ID = #{pageID,jdbcType=DECIMAL}
</select> </select>
<select id="selectByPageCode" resultMap="BaseResultMap"> <select id="selectByPageCode" resultMap="BaseResultMap">
SELECT d.* SELECT d.*
from DIC_DIM d from dic_dim_info d
JOIN( JOIN(
SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE =#{pageCode,jdbcType=VARCHAR}) d2 SELECT DISTINCT pdr.DIM_ID
on d.ID=d2.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> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,28 +2,26 @@ ...@@ -2,28 +2,26 @@
<!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
from dic_ind_info
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.DicInd"> <insert id="insert" parameterType="com.bsoft.api.model.DicInd">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> insert into dic_ind_info (CREATE_DATE, CREATE_USERID, `STATE`,
select SEQ_DIC_IND_ID.nextval from dual
</selectKey>
insert into DIC_IND (CREATE_DATE, CREATE_USERID, `STATE`,
IND_CODE, IND_NAME, COMPUTE_MODE, IND_CODE, IND_NAME, COMPUTE_MODE,
EXEC_SQL, `DESCRIBE`) EXEC_SQL, `DESCRIBE`)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
...@@ -31,7 +29,7 @@ ...@@ -31,7 +29,7 @@
#{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}) #{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicInd"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicInd">
update DIC_IND update dic_ind_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
...@@ -43,21 +41,43 @@ ...@@ -43,21 +41,43 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL, select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
COMPUTE_MODE,
EXEC_SQL,
`DESCRIBE` `DESCRIBE`
from DIC_IND from dic_ind_info
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL, select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
COMPUTE_MODE,
EXEC_SQL,
`DESCRIBE` `DESCRIBE`
from DIC_IND from dic_ind_info
</select> </select>
<select id="selectAllByFilter" resultMap="BaseResultMap"> <select id="selectAllByFilter" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, IND_CODE, IND_NAME,IND_FIELD, COMPUTE_MODE, EXEC_SQL, select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
IND_FIELD,
COMPUTE_MODE,
EXEC_SQL,
`DESCRIBE` `DESCRIBE`
from dic_ind_info from dic_ind_info
where INSTR(IND_NAME,#{filter,jdbcType=VARCHAR})>0 where INSTR(IND_NAME, #{filter,jdbcType=VARCHAR}) > 0
or INSTR(IND_FIELD,#{filter,jdbcType=VARCHAR})>0 or INSTR(IND_FIELD, #{filter,jdbcType=VARCHAR}) > 0
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,38 +2,39 @@ ...@@ -2,38 +2,39 @@
<!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
from sys_subject
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.DicOrg"> <insert id="insert" parameterType="com.bsoft.api.model.DicOrg">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into DIC_ORG (CREATE_DATE, CREATE_USERID, `STATE`, insert into sys_subject (CREATE_DATE, CREATE_USERID, `STATE`,
ORG_CODE, ORG_NAME, ORG_NO, ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE, ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID) ORG_ADDRESS, PARENT_ID)
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL}) #{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicOrg"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicOrg">
update DIC_ORG update sys_subject
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
...@@ -58,26 +59,50 @@ ...@@ -58,26 +59,50 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, select ID,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID CREATE_DATE,
from DIC_ORG CREATE_USERID,
`STATE`,
ORG_CODE,
ORG_NAME,
ORG_NO,
ORG_SHORT_NAME,
ORG_GROUP,
ORG_TYPE,
ORG_ADDRESS,
PARENT_ID
from sys_subject
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME, select ID,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID CREATE_DATE,
from DIC_ORG CREATE_USERID,
`STATE`,
ORG_CODE,
ORG_NAME,
ORG_NO,
ORG_SHORT_NAME,
ORG_GROUP,
ORG_TYPE,
ORG_ADDRESS,
PARENT_ID
from sys_subject
</select> </select>
<select id="selectByUser" resultMap="BaseResultMap"> <select id="selectByUser" resultMap="BaseResultMap">
SELECT o.* SELECT o.*
FROM SYS_USER_ORG_RS uor,DIC_ORG o FROM sys_user_sbj_rs uor,
where uor.ORG_ID=o.ID and uor.USER_ID= #{userId,jdbcType=DECIMAL} sys_subject o
and uor.STATE = 1 and o.STATE = 1 and o.PARENT_ID = 0 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>
<select id="selectDeptByUser" resultMap="SummaryDept"> <select id="selectDeptByUser" resultMap="SummaryDept">
select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC,o.ORG_SHORT_NAME as KSJC select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC,o.ORG_SHORT_NAME as KSJC
from SYS_USER_ORG_RS rs from sys_user_sbj_rs rs
join DIC_ORG o on o.id = rs.ORG_ID and rs.STATE = 1 join sys_subject o on o.id = rs.ORG_ID and rs.STATE = 1
where o.STATE = 1 where o.STATE = 1
<if test="orgId!=null"> <if test="orgId!=null">
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL} and o.PARENT_ID = #{orgId,jdbcType=DECIMAL}
......
...@@ -2,16 +2,17 @@ ...@@ -2,16 +2,17 @@
<!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
from SER_BLOCK
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerBlock"> <insert id="insert" parameterType="com.bsoft.api.model.SerBlock">
......
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
<!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
from SER_DIM_VALUE
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDimValue"> <insert id="insert" parameterType="com.bsoft.api.model.SerDimValue">
...@@ -43,7 +44,8 @@ ...@@ -43,7 +44,8 @@
<select id="selectByDimId" resultMap="BaseResultMap"> <select id="selectByDimId" resultMap="BaseResultMap">
SELECT dv.* SELECT dv.*
FROM SER_DIM_VALUE dv FROM SER_DIM_VALUE dv
LEFT JOIN ( SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr LEFT JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d 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
AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
ON dv.DIM_ID = d.DIM_ID ON dv.DIM_ID = d.DIM_ID
where 1=1 where 1=1
<if test="dimId!=null"> <if test="dimId!=null">
......
...@@ -2,24 +2,25 @@ ...@@ -2,24 +2,25 @@
<!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
from dic_disease_doc_rs
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDiseaseDocRs"> <insert id="insert" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
<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_DOC_RS (ORG_ID, DOC_CODE, DOC_NAME, insert into dic_disease_doc_rs (ORG_ID, DOC_CODE, DOC_NAME,
MDC_CODE, "DATE", DEPT_CODE, MDC_CODE, "DATE", DEPT_CODE,
DEPT_NAME) DEPT_NAME)
values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR}, values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR},
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
#{deptName,jdbcType=VARCHAR}) #{deptName,jdbcType=VARCHAR})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDiseaseDocRs"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
update SER_DISEASE_DOC_RS update dic_disease_doc_rs
set ORG_ID = #{orgId,jdbcType=DECIMAL}, set ORG_ID = #{orgId,jdbcType=DECIMAL},
DOC_CODE = #{docCode,jdbcType=VARCHAR}, DOC_CODE = #{docCode,jdbcType=VARCHAR},
DOC_NAME = #{docName,jdbcType=VARCHAR}, DOC_NAME = #{docName,jdbcType=VARCHAR},
...@@ -38,17 +39,31 @@ ...@@ -38,17 +39,31 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME select ID,
from SER_DISEASE_DOC_RS ORG_ID,
DOC_CODE,
DOC_NAME,
MDC_CODE,
`DATE`,
DEPT_CODE,
DEPT_NAME
from dic_disease_doc_rs
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME select ID,
from SER_DISEASE_DOC_RS ORG_ID,
DOC_CODE,
DOC_NAME,
MDC_CODE,
`DATE`,
DEPT_CODE,
DEPT_NAME
from dic_disease_doc_rs
</select> </select>
<select id="selectByCode" resultMap="BaseResultMap"> <select id="selectByCode" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS from dic_disease_doc_rs
where 1=1 where 1=1
<if test="docCode!=null"> <if test="docCode!=null">
and DOC_CODE = #{docCode,jdbcType=VARCHAR} and DOC_CODE = #{docCode,jdbcType=VARCHAR}
...@@ -65,7 +80,7 @@ ...@@ -65,7 +80,7 @@
</select> </select>
<select id="selectByRelation" resultMap="BaseResultMap"> <select id="selectByRelation" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, `DATE`, DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS from dic_disease_doc_rs
where 1=1 where 1=1
<if test="docCode!=null"> <if test="docCode!=null">
and DOC_CODE = #{docCode,jdbcType=VARCHAR} and DOC_CODE = #{docCode,jdbcType=VARCHAR}
......
...@@ -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}
......
...@@ -2,17 +2,18 @@ ...@@ -2,17 +2,18 @@
<!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
from SER_DOCTOR
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDoctor"> <insert id="insert" parameterType="com.bsoft.api.model.SerDoctor">
...@@ -38,18 +39,34 @@ ...@@ -38,18 +39,34 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, YSBM, YSMC, YSLX select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
ORG_ID,
YSBM,
YSMC,
YSLX
from SER_DOCTOR from SER_DOCTOR
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, ORG_ID, YSBM, YSMC, YSLX select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
ORG_ID,
YSBM,
YSMC,
YSLX
from SER_DOCTOR from SER_DOCTOR
</select> </select>
<select id="selectDoctor" resultMap="BaseResultMap"> <select id="selectDoctor" resultMap="BaseResultMap">
SELECT DISTINCT d.* SELECT DISTINCT d.*
FROM SER_DEPT_DOC_RS ddr FROM SER_DEPT_DOC_RS ddr
join SER_DOCTOR d on d.YSBM=ddr.YSBM join SER_DOCTOR d on d.YSBM = ddr.YSBM
where d.`STATE` = 1 and ddr.`STATE` = 1 and ddr.KSBM = #{dept,jdbcType=VARCHAR} where d.`STATE` = 1
and ddr.`STATE` = 1
and ddr.KSBM = #{dept,jdbcType=VARCHAR}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,23 +2,24 @@ ...@@ -2,23 +2,24 @@
<!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
from dic_page_block_rs
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageBlockRs"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageBlockRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SER_PAGE_BLOCK_RS (CREATE_DATE, CREATE_USERID, `STATE`, insert into dic_page_block_rs (CREATE_DATE, CREATE_USERID, `STATE`,
BLOCK_ID, PAGE_ID, WHERE_CLAUSE BLOCK_ID, PAGE_ID, WHERE_CLAUSE
) )
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
) )
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageBlockRs"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageBlockRs">
update SER_PAGE_BLOCK_RS update dic_page_block_rs
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
...@@ -37,16 +38,16 @@ ...@@ -37,16 +38,16 @@
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS from dic_page_block_rs
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS from dic_page_block_rs
</select> </select>
<select id="selectByPageId" resultMap="BaseResultMap"> <select id="selectByPageId" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID,WHERE_CLAUSE select ID, CREATE_DATE, CREATE_USERID, `STATE`, BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS from dic_page_block_rs
where PAGE_ID=#{pageID,jdbcType=DECIMAL} where PAGE_ID = #{pageID,jdbcType=DECIMAL}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<!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">
......
...@@ -2,28 +2,29 @@ ...@@ -2,28 +2,29 @@
<!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
from dic_page_info
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPage"> <insert id="insert" parameterType="com.bsoft.api.model.SerPage">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SER_PAGE (CREATE_DATE, CREATE_USERID, `STATE`, insert into dic_page_info (CREATE_DATE, CREATE_USERID, `STATE`,
PAGE_CODE, PAGE_NAME) PAGE_CODE, PAGE_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR}) #{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPage"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPage">
update SER_PAGE update dic_page_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
...@@ -33,28 +34,28 @@ ...@@ -33,28 +34,28 @@
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
from SER_PAGE from dic_page_info
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME select ID, CREATE_DATE, CREATE_USERID, `STATE`, PAGE_CODE, PAGE_NAME
from SER_PAGE from dic_page_info
</select> </select>
<select id="selectByCodeAndDim" resultMap="BaseResultMap"> <select id="selectByCodeAndDim" resultMap="BaseResultMap">
select d.* from SER_PAGE d, select d.* from dic_page_info d,
<if test="dimCount != 0"> <if test="dimCount != 0">
(select a.id,COUNT(b.ID) count (select a.id,COUNT(b.ID) count
from SER_PAGE a from dic_page_info a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
and c.DIM_FIELD in (${inField}) and c.DIM_FIELD in (${inField})
GROUP BY a.ID) e, GROUP BY a.ID) e,
</if> </if>
(select a.id,COUNT(b.ID) count (select a.id,COUNT(b.ID) count
from SER_PAGE a from dic_page_info a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f GROUP BY a.ID) f
where d.id = f.id where d.id = f.id
...@@ -65,12 +66,12 @@ ...@@ -65,12 +66,12 @@
and f.count =#{dimCount,jdbcType=INTEGER} and f.count =#{dimCount,jdbcType=INTEGER}
</select> </select>
<select id="selectByCodeAndDimList" resultType="com.bsoft.api.model.SerPage"> <select id="selectByCodeAndDimList" resultType="com.bsoft.api.model.SerPage">
select d.* from SER_PAGE d, select d.* from dic_page_info d,
<if test="dimCount != 0"> <if test="dimCount != 0">
(select a.id,COUNT(b.ID) count (select a.id,COUNT(b.ID) count
from SER_PAGE a from dic_page_info a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
<if test="inFields.size() > 0"> <if test="inFields.size() > 0">
and c.DIM_FIELD in and c.DIM_FIELD in
...@@ -81,9 +82,9 @@ ...@@ -81,9 +82,9 @@
GROUP BY a.ID) e, GROUP BY a.ID) e,
</if> </if>
(select a.id,COUNT(b.ID) count (select a.id,COUNT(b.ID) count
from SER_PAGE a from dic_page_info a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1 JOIN dic_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID JOIN dic_dim_info c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR} where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f GROUP BY a.ID) f
where d.id = f.id where d.id = f.id
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<!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">
...@@ -24,7 +24,14 @@ ...@@ -24,7 +24,14 @@
#{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,
CREATE_DATE,
CREATE_USERID,
`STATE`,
PROJ_TYPE,
PROJ_ID,
FIELD_ID,
REMARK,
SORT SORT
from SER_PAGE_PROJ_FIELD_RS from SER_PAGE_PROJ_FIELD_RS
</select> </select>
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<!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">
......
...@@ -2,29 +2,29 @@ ...@@ -2,29 +2,29 @@
<!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">
...@@ -40,25 +40,39 @@ ...@@ -40,25 +40,39 @@
#{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,
CREATE_USERID,
`STATE`,
DEPT_CODE,
DATE_FILTER,
DATA_CATEGORY,
PROJ_TYPE,
PROJ_ID,
FIELD_ID,
FIELD_VALUE,
FIELD_UNIT
from SER_PAGE_PROJ_VALUE from SER_PAGE_PROJ_VALUE
</select> </select>
<select id="selectDept" resultMap="SummaryNew"> <select id="selectDept" resultMap="SummaryNew">
select DEPT_CODE select DEPT_CODE
from SER_PAGE_PROJ_VALUE from SER_PAGE_PROJ_VALUE
where STATE = 1 and PROJ_TYPE = #{page,jdbcType = DECIMAL} where STATE = 1
and PROJ_TYPE = #{page,jdbcType = DECIMAL}
and DATE_FILTER = #{date,jdbcType = DECIMAL} and DATE_FILTER = #{date,jdbcType = DECIMAL}
GROUP BY DEPT_CODE GROUP BY DEPT_CODE
</select> </select>
<select id="selectValue" resultMap="SummaryValue"> <select id="selectValue" resultMap="SummaryValue">
select v.ID,p.PROJ_NAME,f.FIELD_NAME,v.FIELD_ID,v.FIELD_VALUE,v.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 v from SER_PAGE_PROJ_VALUE v
join SER_PAGE_PROJ p on p.ID = v.PROJ_ID and p.STATE = 1 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_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 join SER_PAGE_PROJ_FIELD_RS rs
where v.STATE = 1 and v.PROJ_TYPE = #{page,jdbcType = DECIMAL} on rs.PROJ_TYPE = v.PROJ_TYPE and rs.PROJ_ID = v.PROJ_ID and rs.FIELD_ID = v.FIELD_ID
and v.DATE_FILTER=#{date,jdbcType = DECIMAL} and v.DEPT_CODE = #{deptCode,jdbcType=VARCHAR} 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 order by rs.SORT
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,16 +2,17 @@ ...@@ -2,16 +2,17 @@
<!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
from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageValueConfig"> <insert id="insert" parameterType="com.bsoft.api.model.SerPageValueConfig">
...@@ -47,7 +48,8 @@ ...@@ -47,7 +48,8 @@
<select id="selectByPage" resultMap="BaseResultMap"> <select id="selectByPage" resultMap="BaseResultMap">
select * select *
from SER_PAGE_VALUE_CONFIG from SER_PAGE_VALUE_CONFIG
where STATE = 1 and PAGE = #{page,jdbcType=DECIMAL} where STATE = 1
and PAGE = #{page,jdbcType=DECIMAL}
</select> </select>
<select id="selectSqlStr" resultType="java.util.Map"> <select id="selectSqlStr" resultType="java.util.Map">
${sqlStr} ${sqlStr}
......
...@@ -2,31 +2,31 @@ ...@@ -2,31 +2,31 @@
<!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.SerProjValueMapper"> <mapper namespace="com.bsoft.api.mapper.SerProjValueMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerProjValue"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SerProjValue">
<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="QNZ" jdbcType="DECIMAL" property="qnz" /> <result column="QNZ" jdbcType="DECIMAL" property="qnz"/>
<result column="WQQS" jdbcType="DECIMAL" property="wqqs" /> <result column="WQQS" jdbcType="DECIMAL" property="wqqs"/>
<result column="LS" jdbcType="DECIMAL" property="ls" /> <result column="LS" jdbcType="DECIMAL" property="ls"/>
<result column="MB" jdbcType="DECIMAL" property="mb" /> <result column="MB" jdbcType="DECIMAL" property="mb"/>
<result column="CSYSZ" jdbcType="DECIMAL" property="csysz" /> <result column="CSYSZ" jdbcType="DECIMAL" property="csysz"/>
<result column="CSYSZ_TB" jdbcType="DECIMAL" property="csyszTb" /> <result column="CSYSZ_TB" jdbcType="DECIMAL" property="csyszTb"/>
<result column="YSZ" jdbcType="DECIMAL" property="ysz" /> <result column="YSZ" jdbcType="DECIMAL" property="ysz"/>
<result column="YSZ_TB" jdbcType="DECIMAL" property="yszTb" /> <result column="YSZ_TB" jdbcType="DECIMAL" property="yszTb"/>
<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="SORT" jdbcType="DECIMAL" property="sort" /> <result column="SORT" jdbcType="DECIMAL" property="sort"/>
<result column="VERSION" jdbcType="VARCHAR" property="version" /> <result column="VERSION" jdbcType="VARCHAR" property="version"/>
<result column="QNZ_UNIT" jdbcType="VARCHAR" property="qnzUnit" /> <result column="QNZ_UNIT" jdbcType="VARCHAR" property="qnzUnit"/>
<result column="CSYSZ_UNIT" jdbcType="VARCHAR" property="csyszUnit" /> <result column="CSYSZ_UNIT" jdbcType="VARCHAR" property="csyszUnit"/>
<result column="YSZ_UNIT" jdbcType="VARCHAR" property="yszUnit" /> <result column="YSZ_UNIT" jdbcType="VARCHAR" property="yszUnit"/>
<result column="SZ_UNIT" jdbcType="VARCHAR" property="szUnit" /> <result column="SZ_UNIT" jdbcType="VARCHAR" property="szUnit"/>
<result column="WQQS_ZYPZ_JS" jdbcType="DECIMAL" property="wqqsZypzJs" /> <result column="WQQS_ZYPZ_JS" jdbcType="DECIMAL" property="wqqsZypzJs"/>
<result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName" /> <result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName"/>
<result column="HOSCODE" jdbcType="VARCHAR" property="hoscode" /> <result column="HOSCODE" jdbcType="VARCHAR" property="hoscode"/>
</resultMap> </resultMap>
<resultMap id="SerProjValueResp" extends="BaseResultMap" type="com.bsoft.api.model.respmodel.SerProjValueResp"> <resultMap id="SerProjValueResp" extends="BaseResultMap" type="com.bsoft.api.model.respmodel.SerProjValueResp">
<result column="PROJ_NAME" jdbcType="VARCHAR" property="projName"/> <result column="PROJ_NAME" jdbcType="VARCHAR" property="projName"/>
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
<result column="PARENT" jdbcType="DECIMAL" property="parent"/> <result column="PARENT" jdbcType="DECIMAL" property="parent"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PROJ_VALUE delete
from SER_PROJ_VALUE
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerProjValue"> <insert id="insert" parameterType="com.bsoft.api.model.SerProjValue">
...@@ -83,16 +84,60 @@ ...@@ -83,16 +84,60 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, QNZ, WQQS, LS, MB, CSYSZ, select ID,
CSYSZ_TB, YSZ, YSZ_TB, SZ, ZXPL, `DATE`, DEPT_CODE, SORT, VERSION, QNZ_UNIT, CSYSZ_UNIT, CREATE_DATE,
YSZ_UNIT, SZ_UNIT, HOSCODE CREATE_USERID,
`STATE`,
PROJ_ID,
QNZ,
WQQS,
LS,
MB,
CSYSZ,
CSYSZ_TB,
YSZ,
YSZ_TB,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
SORT,
VERSION,
QNZ_UNIT,
CSYSZ_UNIT,
YSZ_UNIT,
SZ_UNIT,
HOSCODE
from SER_PROJ_VALUE from SER_PROJ_VALUE
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, QNZ, WQQS, LS, MB, CSYSZ, select ID,
CSYSZ_TB, YSZ, YSZ_TB, SZ, ZXPL, `DATE`, DEPT_CODE, SORT, VERSION, QNZ_UNIT, CSYSZ_UNIT, CREATE_DATE,
YSZ_UNIT, SZ_UNIT, WQQS_ZYPZ_JS, DEPT_NAME, HOSCODE CREATE_USERID,
`STATE`,
PROJ_ID,
QNZ,
WQQS,
LS,
MB,
CSYSZ,
CSYSZ_TB,
YSZ,
YSZ_TB,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
SORT,
VERSION,
QNZ_UNIT,
CSYSZ_UNIT,
YSZ_UNIT,
SZ_UNIT,
WQQS_ZYPZ_JS,
DEPT_NAME,
HOSCODE
from SER_PROJ_VALUE from SER_PROJ_VALUE
</select> </select>
<select id="selectValue" resultMap="SerProjValueResp"> <select id="selectValue" resultMap="SerProjValueResp">
...@@ -140,21 +185,23 @@ ...@@ -140,21 +185,23 @@
ORDER BY p.SORT ORDER BY p.SORT
</select> </select>
<delete id="deleteByDeptWithDate"> <delete id="deleteByDeptWithDate">
delete v from SER_PROJ_VALUE v delete v
from SER_PROJ_VALUE v
JOIN SER_PROJ p ON p.ID = v.PROJ_ID JOIN SER_PROJ p ON p.ID = v.PROJ_ID
WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL} WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET&amp;1>0 AND p.IS_BUDGET &amp; 1 > 0
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4) AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL}, 4)
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR} AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR} AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insertToHistory"> <insert id="insertToHistory">
INSERT into ser_proj_value_history INSERT into ser_proj_value_history
select v.* from SER_PROJ_VALUE v select v.*
from SER_PROJ_VALUE v
JOIN SER_PROJ p ON p.ID = v.PROJ_ID JOIN SER_PROJ p ON p.ID = v.PROJ_ID
WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL} WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET&amp;1>0 AND p.IS_BUDGET &amp; 1 > 0
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4) AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL}, 4)
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR} AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR} AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR}
</insert> </insert>
......
...@@ -2,19 +2,20 @@ ...@@ -2,19 +2,20 @@
<!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
from SER_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerProjValueSz"> <insert id="insert" parameterType="com.bsoft.api.model.SerProjValueSz">
...@@ -42,22 +43,40 @@ ...@@ -42,22 +43,40 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE, select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
PROJ_ID,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
HOSCODE HOSCODE
from SER_PROJ_VALUE_SZ from SER_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, PROJ_ID, SZ, ZXPL, `DATE`, DEPT_CODE, select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
PROJ_ID,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
HOSCODE HOSCODE
from SER_PROJ_VALUE_SZ from SER_PROJ_VALUE_SZ
</select> </select>
<select id="selectByProj" resultMap="BaseResultMap"> <select id="selectByProj" resultMap="BaseResultMap">
select * select *
from SER_PROJ_VALUE_SZ from SER_PROJ_VALUE_SZ
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL} where STATE = 1
and PROJ_ID = #{projId,jdbcType=DECIMAL}
and `DATE` = #{date,jdbcType=DECIMAL} and `DATE` = #{date,jdbcType=DECIMAL}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR} and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
and HOSCODE = #{hosCode,jdbcType=VARCHAR}
order by `DATE` desc order by `DATE` desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
<!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
from SYS_ROLE_MENU_RS
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysRoleMenuRs"> <insert id="insert" parameterType="com.bsoft.api.model.SysRoleMenuRs">
......
...@@ -2,24 +2,25 @@ ...@@ -2,24 +2,25 @@
<!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
from SYS_USER
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysUser"> <insert id="insert" parameterType="com.bsoft.api.model.SysUser">
...@@ -56,21 +57,60 @@ ...@@ -56,21 +57,60 @@
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, select ID,
IDCARD, SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP 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 from SYS_USER
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, select ID,
IDCARD, SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP 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 from SYS_USER
</select> </select>
<select id="selectByCode" resultMap="BaseResultMap"> <select id="selectByCode" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_CODE, USER_NAME, `PASSWORD`, IDCARD, select ID,
SEX, MOBILE, PAGE_COUNT, ERROR_COUNT, ERROR_TIME, LAST_TIME, LAST_IP 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 from SYS_USER
where USER_CODE=#{userCode,jdbcType=VARCHAR} where USER_CODE = #{userCode,jdbcType=VARCHAR}
and `STATE` != 0 and `STATE` != 0
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
<!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
from SYS_USER_MENU_RS
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysUserMenuRs"> <insert id="insert" parameterType="com.bsoft.api.model.SysUserMenuRs">
......
...@@ -2,28 +2,29 @@ ...@@ -2,28 +2,29 @@
<!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
from sys_user_sbj_rs
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysUserOrgRs"> <insert id="insert" parameterType="com.bsoft.api.model.SysUserOrgRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into SYS_USER_ORG_RS (CREATE_DATE, CREATE_USERID, `STATE`, insert into sys_user_sbj_rs (CREATE_DATE, CREATE_USERID, `STATE`,
USER_ID, ORG_ID) USER_ID, ORG_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{userId,jdbcType=DECIMAL}, #{orgId,jdbcType=DECIMAL}) #{userId,jdbcType=DECIMAL}, #{orgId,jdbcType=DECIMAL})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserOrgRs"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserOrgRs">
update SYS_USER_ORG_RS update sys_user_sbj_rs
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL}, CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
`STATE` = #{state,jdbcType=DECIMAL}, `STATE` = #{state,jdbcType=DECIMAL},
...@@ -33,11 +34,11 @@ ...@@ -33,11 +34,11 @@
</update> </update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
from SYS_USER_ORG_RS from sys_user_sbj_rs
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID select ID, CREATE_DATE, CREATE_USERID, `STATE`, USER_ID, ORG_ID
from SYS_USER_ORG_RS from sys_user_sbj_rs
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
<!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
from SYS_USER_ROLE_RS
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysUserRoleRs"> <insert id="insert" parameterType="com.bsoft.api.model.SysUserRoleRs">
...@@ -41,8 +42,8 @@ ...@@ -41,8 +42,8 @@
from SYS_USER_ROLE_RS from SYS_USER_ROLE_RS
</select> </select>
<select id="selectRoleByUser" resultMap="BaseResultMap"> <select id="selectRoleByUser" resultMap="BaseResultMap">
select ID,USER_ID, ROLE_ID select ID, USER_ID, ROLE_ID
from SYS_USER_ROLE_RS from SYS_USER_ROLE_RS
where USER_ID=#{userId,jdbcType=DECIMAL} where USER_ID = #{userId,jdbcType=DECIMAL}
</select> </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