Commit 37832e4b by Suvalue

test2.0版本

parent 445c569b
#### \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_info 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,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.SerDepartmentMapper"> <mapper namespace="com.bsoft.api.mapper.SerDepartmentMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDepartment"> <resultMap id="BaseResultMap" 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"/>
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_DEPARTMENT delete
from SER_DEPARTMENT
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDepartment"> <insert id="insert" parameterType="com.bsoft.api.model.SerDepartment">
...@@ -44,7 +45,7 @@ ...@@ -44,7 +45,7 @@
</select> </select>
<select id="selectSummaryDept" resultMap="BaseResultMap"> <select id="selectSummaryDept" resultMap="BaseResultMap">
select DEPT_CODE as KSBM,DEPT_NAME as KSMC select DEPT_CODE as KSBM,DEPT_NAME as KSMC
from SER_PROJ_VALUE from VAL_PROJ_VALUE
where 1=1 where 1=1
<if test="date!=null"> <if test="date!=null">
and `DATE`=#{date} and `DATE`=#{date}
......
...@@ -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 SER_PAGE_DIM_RS pdr LEFT JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND
p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
ON dv.DIM_ID = d.DIM_ID 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
<if test="deptCode!=null"> <if test="deptCode!=null">
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2 from val_block_values_1_2_2
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,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}
...@@ -121,8 +121,8 @@ ...@@ -121,8 +121,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
...@@ -133,8 +133,8 @@ ...@@ -133,8 +133,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
<if test="deptCode!=null"> <if test="deptCode!=null">
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2 from val_block_values_1_2_2
...@@ -160,8 +160,8 @@ ...@@ -160,8 +160,8 @@
<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
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
<if test="deptCode!=null"> <if test="deptCode!=null">
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
...@@ -186,10 +186,10 @@ ...@@ -186,10 +186,10 @@
</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 dic_disease where id = #{diseaseId,jdbcType=DECIMAL} )
</if> </if>
</select> </select>
<!-- <select id="selectSonById" resultMap="DiseaseLevel">--> <!-- <select id="selectSonById" resultMap="DiseaseLevel">-->
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,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,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,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}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,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_PROJ (CREATE_DATE, CREATE_USERID, `STATE`, insert into dic_bgt_proj (CREATE_DATE, CREATE_USERID, `STATE`,
`TYPE`, PROJ_TYPE, PROJ_NAME, `TYPE`, PROJ_TYPE, PROJ_NAME,
IS_BUDGET, TYPE_STATE, SORT IS_BUDGET, TYPE_STATE, SORT
) )
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
) )
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProj"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProj">
update SER_PROJ update dic_bgt_proj
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},
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
IS_BUDGET, IS_BUDGET,
TYPE_STATE, TYPE_STATE,
SORT SORT
from SER_PROJ from dic_bgt_proj
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
...@@ -77,12 +77,12 @@ ...@@ -77,12 +77,12 @@
IS_BUDGET, IS_BUDGET,
TYPE_STATE, TYPE_STATE,
SORT SORT
from SER_PROJ from dic_bgt_proj
</select> </select>
<select id="selectState" resultMap="ProjectInfo"> <select id="selectState" resultMap="ProjectInfo">
select DISTINCT p.TYPE as EXPONENT_ID,e.EXPONENT_NAME,e.SORT select DISTINCT p.TYPE as EXPONENT_ID,e.EXPONENT_NAME,e.SORT
from ser_proj p from ser_proj p
join DIC_EXPONENT e on e.EXPONENT_ID=p.`TYPE` and e.STATE = 1 join dic_bgt_energy e on e.EXPONENT_ID=p.`TYPE` and e.STATE = 1
where p.`STATE` = 1 where p.`STATE` = 1
<if test="projType!=null"> <if test="projType!=null">
and p.PROJ_TYPE = #{projType,jdbcType=DECIMAL} and p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1 join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
where 1=1 where 1=1
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 = v.DEPT_CODE and o2.ORG_CODE = v.DEPT_CODE
......
...@@ -35,18 +35,18 @@ ...@@ -35,18 +35,18 @@
</resultMap> </resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal"> <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete delete
from SER_PROJ_VALUE from val_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">
insert into SER_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`, insert into val_proj_value (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_ID, QNZ, WQQS, PROJ_ID, QNZ, WQQS,
LS, MB, CSYSZ, CSYSZ_TB, LS, MB, CSYSZ, CSYSZ_TB,
YSZ, YSZ_TB, SZ, ZXPL, YSZ, YSZ_TB, SZ, ZXPL,
`DATE`, DEPT_CODE, SORT, `DATE`, DEPT_CODE, SORT,
VERSION, QNZ_UNIT, CSYSZ_UNIT, VERSION, QNZ_UNIT, CSYSZ_UNIT,
YSZ_UNIT, SZ_UNIT, WQQS_ZYPZ_JS, YSZ_UNIT, SZ_UNIT, WQQS_ZYPZ_JS,
DEPT_NAME, HOSCODE) DEPT_NAME, HOS_CODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{qnz,jdbcType=DECIMAL}, #{wqqs,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{qnz,jdbcType=DECIMAL}, #{wqqs,jdbcType=DECIMAL},
#{ls,jdbcType=DECIMAL}, #{mb,jdbcType=DECIMAL}, #{csysz,jdbcType=DECIMAL}, #{csyszTb,jdbcType=DECIMAL}, #{ls,jdbcType=DECIMAL}, #{mb,jdbcType=DECIMAL}, #{csysz,jdbcType=DECIMAL}, #{csyszTb,jdbcType=DECIMAL},
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#{deptName,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR}) #{deptName,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValue"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValue">
update SER_PROJ_VALUE update val_proj_value
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},
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
CSYSZ_UNIT = #{csyszUnit,jdbcType=VARCHAR}, CSYSZ_UNIT = #{csyszUnit,jdbcType=VARCHAR},
YSZ_UNIT = #{yszUnit,jdbcType=VARCHAR}, YSZ_UNIT = #{yszUnit,jdbcType=VARCHAR},
SZ_UNIT = #{szUnit,jdbcType=VARCHAR}, SZ_UNIT = #{szUnit,jdbcType=VARCHAR},
HOSCODE = #{hosCode,jdbcType=VARCHAR} HOS_CODE = #{hosCode,jdbcType=VARCHAR}
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">
...@@ -107,8 +107,8 @@ ...@@ -107,8 +107,8 @@
CSYSZ_UNIT, CSYSZ_UNIT,
YSZ_UNIT, YSZ_UNIT,
SZ_UNIT, SZ_UNIT,
HOSCODE HOS_CODE
from SER_PROJ_VALUE from val_proj_value
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</select> </select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
...@@ -137,16 +137,16 @@ ...@@ -137,16 +137,16 @@
SZ_UNIT, SZ_UNIT,
WQQS_ZYPZ_JS, WQQS_ZYPZ_JS,
DEPT_NAME, DEPT_NAME,
HOSCODE HOS_CODE
from SER_PROJ_VALUE from val_proj_value
</select> </select>
<select id="selectValue" resultMap="SerProjValueResp"> <select id="selectValue" resultMap="SerProjValueResp">
SELECT v.*,p.PROJ_NAME,p.IS_BUDGET,p.PARENT,sz.SZ as SZ2,sz.ZXPL as ZXPL2 SELECT v.*,p.PROJ_NAME,p.IS_BUDGET,p.PARENT,sz.SZ as SZ2,sz.ZXPL as ZXPL2
FROM SER_PROJ p FROM dic_bgt_proj p
LEFT JOIN LEFT JOIN
( (
SELECT v.PROJ_ID,MAX(v.VERSION) AS VERSION SELECT v.PROJ_ID,MAX(v.VERSION) AS VERSION
FROM SER_PROJ_VALUE v FROM val_proj_value v
WHERE v.`STATE` = 1 WHERE v.`STATE` = 1
<if test="dept!=null"> <if test="dept!=null">
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR} AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
...@@ -155,11 +155,11 @@ ...@@ -155,11 +155,11 @@
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4) AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4)
</if> </if>
<if test="hosCode!=null"> <if test="hosCode!=null">
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR} AND v.HOS_CODE = #{hosCode,jdbcType=VARCHAR}
</if> </if>
GROUP BY v.PROJ_ID GROUP BY v.PROJ_ID
)m on m.PROJ_ID = p.ID )m on m.PROJ_ID = p.ID
left JOIN SER_PROJ_VALUE v ON v.PROJ_ID = m.PROJ_ID AND v.VERSION = m.VERSION left JOIN val_proj_value v ON v.PROJ_ID = m.PROJ_ID AND v.VERSION = m.VERSION
<if test="dept!=null"> <if test="dept!=null">
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR} AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if> </if>
...@@ -167,12 +167,12 @@ ...@@ -167,12 +167,12 @@
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4) AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4)
</if> </if>
<if test="hosCode!=null"> <if test="hosCode!=null">
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR} AND v.HOS_CODE = #{hosCode,jdbcType=VARCHAR}
</if> </if>
left join ser_proj_value_sz sz on sz.PROJ_ID = m.PROJ_ID left join val_proj_value_sz sz on sz.PROJ_ID = m.PROJ_ID
AND sz.DEPT_CODE = v.DEPT_CODE AND sz.DEPT_CODE = v.DEPT_CODE
AND sz.`DATE` = #{date,jdbcType=DECIMAL} AND sz.`DATE` = #{date,jdbcType=DECIMAL}
AND sz.HOSCODE = v.HOSCODE AND sz.HOS_CODE = v.HOS_CODE
WHERE 1 = 1 and p.`STATE` = 1 WHERE 1 = 1 and p.`STATE` = 1
<if test="projType!=null"> <if test="projType!=null">
AND p.PROJ_TYPE = #{projType,jdbcType=DECIMAL} AND p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
...@@ -190,24 +190,24 @@ ...@@ -190,24 +190,24 @@
</select> </select>
<delete id="deleteByDeptWithDate"> <delete id="deleteByDeptWithDate">
delete v delete v
from SER_PROJ_VALUE v from val_proj_value v
JOIN SER_PROJ p ON p.ID = v.PROJ_ID JOIN dic_bgt_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.HOS_CODE = #{orgCode,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insertToHistory"> <insert id="insertToHistory">
INSERT into ser_proj_value_history INSERT into val_proj_value_history
select v.* select v.*
from SER_PROJ_VALUE v from val_proj_value v
JOIN SER_PROJ p ON p.ID = v.PROJ_ID JOIN dic_bgt_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.HOS_CODE = #{orgCode,jdbcType=VARCHAR}
</insert> </insert>
<update id="updateValue" statementType="CALLABLE"> <update id="updateValue" statementType="CALLABLE">
{call ESTIMATE_UPDATE_GZD_BL( {call ESTIMATE_UPDATE_GZD_BL(
......
...@@ -2,34 +2,35 @@ ...@@ -2,34 +2,35 @@
<!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 VAL_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">
<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_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, `STATE`, insert into VAL_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_ID, SZ, ZXPL, `DATE`, PROJ_ID, SZ, ZXPL, `DATE`,
DEPT_CODE, HOSCODE) DEPT_CODE, HOS_CODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL}, values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR}) #{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert> </insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValueSz"> <update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValueSz">
update SER_PROJ_VALUE_SZ update VAL_PROJ_VALUE_SZ
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},
...@@ -38,26 +39,44 @@ ...@@ -38,26 +39,44 @@
ZXPL = #{zxpl,jdbcType=DECIMAL}, ZXPL = #{zxpl,jdbcType=DECIMAL},
`DATE` = #{date,jdbcType=DECIMAL}, `DATE` = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR}, DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
HOSCODE = #{hoscode,jdbcType=VARCHAR} HOS_CODE = #{hoscode,jdbcType=VARCHAR}
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,
HOSCODE CREATE_DATE,
from SER_PROJ_VALUE_SZ CREATE_USERID,
`STATE`,
PROJ_ID,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
HOS_CODE
from VAL_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,
HOSCODE CREATE_DATE,
from SER_PROJ_VALUE_SZ CREATE_USERID,
`STATE`,
PROJ_ID,
SZ,
ZXPL,
`DATE`,
DEPT_CODE,
HOS_CODE
from VAL_PROJ_VALUE_SZ
</select> </select>
<select id="selectByProj" resultMap="BaseResultMap"> <select id="selectByProj" resultMap="BaseResultMap">
select * select *
from SER_PROJ_VALUE_SZ from VAL_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 HOS_CODE = #{hosCode,jdbcType=VARCHAR}
order by `DATE` desc order by `DATE` desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,20 +2,21 @@ ...@@ -2,20 +2,21 @@
<!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.SysMenuMapper"> <mapper namespace="com.bsoft.api.mapper.SysMenuMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysMenu"> <resultMap id="BaseResultMap" type="com.bsoft.api.model.SysMenu">
<id column="ID" jdbcType="DECIMAL" property="id" /> <id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATA" jdbcType="TIMESTAMP" property="createData" /> <result column="CREATE_DATA" jdbcType="TIMESTAMP" property="createData"/>
<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_NAME" jdbcType="VARCHAR" property="menuName" /> <result column="MENU_NAME" jdbcType="VARCHAR" property="menuName"/>
<result column="MENU_URL" jdbcType="VARCHAR" property="menuUrl" /> <result column="MENU_URL" jdbcType="VARCHAR" property="menuUrl"/>
<result column="MENU_IMAGE" jdbcType="VARCHAR" property="menuImage" /> <result column="MENU_IMAGE" jdbcType="VARCHAR" property="menuImage"/>
<result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" /> <result column="PARENT_ID" jdbcType="DECIMAL" property="parentId"/>
<result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode" /> <result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode"/>
<result column="SORT" jdbcType="DECIMAL" property="sort" /> <result column="SORT" jdbcType="DECIMAL" property="sort"/>
</resultMap> </resultMap>
<resultMap id="sysMenuResultMap" type="com.bsoft.api.model.respmodel.SysMenuList" extends="BaseResultMap"/> <resultMap id="sysMenuResultMap" type="com.bsoft.api.model.respmodel.SysMenuList" extends="BaseResultMap"/>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_MENU delete
from sys_menu
where ID = #{id,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL}
</delete> </delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysMenu"> <insert id="insert" parameterType="com.bsoft.api.model.SysMenu">
...@@ -45,33 +46,52 @@ ...@@ -45,33 +46,52 @@
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_DATA, CREATE_USERID, `STATE`, MENU_NAME, MENU_URL, MENU_IMAGE, select ID,
PARENT_ID, PAGE_CODE, SORT CREATE_DATA,
CREATE_USERID,
`STATE`,
MENU_NAME,
MENU_URL,
MENU_IMAGE,
PARENT_ID,
PAGE_CODE,
SORT
from SYS_MENU from SYS_MENU
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_DATA, CREATE_USERID, `STATE`, MENU_NAME, MENU_URL, MENU_IMAGE, select ID,
PARENT_ID, PAGE_CODE, SORT CREATE_DATA,
CREATE_USERID,
`STATE`,
MENU_NAME,
MENU_URL,
MENU_IMAGE,
PARENT_ID,
PAGE_CODE,
SORT
from SYS_MENU from SYS_MENU
</select> </select>
<select id="selectMenuByUser" resultMap="sysMenuResultMap"> <select id="selectMenuByUser" resultMap="sysMenuResultMap">
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT select DISTINCT m.ID, m.MENU_NAME, m.MENU_URL, m.MENU_IMAGE, m.PARENT_ID, m.PAGE_CODE, m.SORT
from from SYS_ROLE_MENU_RS rmr
SYS_ROLE_MENU_RS rmr
LEFT JOIN LEFT JOIN
SYS_MENU m on rmr.MENU_ID = m.ID SYS_MENU m on rmr.MENU_ID = m.ID
LEFT JOIN LEFT JOIN
SYS_USER_ROLE_RS urr on rmr.ROLE_ID = urr.Role_ID SYS_USER_ROLE_RS urr on rmr.ROLE_ID = urr.Role_ID
where rmr.STATE=1 and m.STATE=1 and urr.STATE=1 and urr.USER_ID = #{userId,jdbcType=DECIMAL} where rmr.STATE = 1
and m.STATE = 1
and urr.STATE = 1
and urr.USER_ID = #{userId,jdbcType=DECIMAL}
union union
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT select DISTINCT m.ID, m.MENU_NAME, m.MENU_URL, m.MENU_IMAGE, m.PARENT_ID, m.PAGE_CODE, m.SORT
from from SYS_USER_MENU_RS umr
SYS_USER_MENU_RS umr
LEFT JOIN LEFT JOIN
SYS_MENU m on umr.MENU_ID = m.ID SYS_MENU m on umr.MENU_ID = m.ID
where umr.STATE=1 and m.STATE=1 and umr.USER_ID = #{userId,jdbcType=DECIMAL} where umr.STATE = 1
and m.STATE = 1
and umr.USER_ID = #{userId,jdbcType=DECIMAL}
</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