feat: 流程入库 及 杂七杂八
This commit is contained in:
+344
@@ -0,0 +1,344 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.SarCompResAssess.dao.SarCompResAssessDao">
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess" >
|
||||
<id column="id" property="id" />
|
||||
<result column="res_type" property="resType" />
|
||||
<result column="res_id" property="resId" />
|
||||
<result column="assess_result" property="assessResult" />
|
||||
<result column="assess_color" property="assessColor" />
|
||||
<result column="assess_time" property="assessTime" />
|
||||
<result column="process_num" property="processNum" />
|
||||
<result column="process_state" property="processState" />
|
||||
<result column="created_time" property="createdTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="standCode" property="standCode"/>
|
||||
<result column="standName" property="standName" />
|
||||
<result column="res_type" property="standType" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_COMP_RES_ASSESS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, res_type, res_id, assess_result, assess_color, assess_time, process_num, process_state, created_time, modify_time
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_Stand" >
|
||||
id, res_type, res_id, assess_result, assess_color, assess_time, process_num, process_state, created_time, modify_time,standCode,standName
|
||||
</sql>
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="resType != null" >
|
||||
and res_type ${resTypeOperator} #{resType}
|
||||
</if>
|
||||
<if test="resId != null" >
|
||||
and res_id ${resIdOperator} #{resId}
|
||||
</if>
|
||||
<if test="assessResult != null" >
|
||||
and assess_result ${assessResultOperator} #{assessResult}
|
||||
</if>
|
||||
<if test="assessColor != null" >
|
||||
and assess_color ${assessColorOperator} #{assessColor}
|
||||
</if>
|
||||
<if test="assessTime != null" >
|
||||
and assess_time ${assessTimeOperator} #{assessTime}
|
||||
</if>
|
||||
<if test="assessTime1 != null" >
|
||||
and assess_time >= #{assessTime1}
|
||||
</if>
|
||||
<if test="assessTime2 != null" >
|
||||
and assess_time <= #{assessTime2}
|
||||
</if>
|
||||
<if test="processNum != null" >
|
||||
and process_num ${processNumOperator} #{processNum}
|
||||
</if>
|
||||
<if test="processState != null" >
|
||||
and process_state ${processStateOperator} #{processState}
|
||||
</if>
|
||||
<if test="createdTime != null" >
|
||||
and created_time ${createdTimeOperator} #{createdTime}
|
||||
</if>
|
||||
<if test="createdTime1 != null" >
|
||||
and created_time >= #{createdTime1}
|
||||
</if>
|
||||
<if test="createdTime2 != null" >
|
||||
and created_time <= #{createdTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="standCode != null">
|
||||
AND standCode Like concat(concat('%',#{standCode}),'%')
|
||||
</if>
|
||||
<if test="standName != null">
|
||||
AND standName Like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standType != null" >
|
||||
and res_type = #{standType}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_COMP_RES_ASSESS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_COMP_RES_ASSESS(<include refid="Base_Column_List" />)
|
||||
values (#{id}, #{resType}, #{resId}, #{assessResult}, #{assessColor}, #{assessTime}, #{processNum}, #{processState}, #{createdTime}, #{modifyTime})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_COMP_RES_ASSESS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_COMP_RES_ASSESS
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="resType != null" >res_type,</if>
|
||||
<if test="resId != null" >res_id,</if>
|
||||
<if test="assessResult != null" >assess_result,</if>
|
||||
<if test="assessColor != null" >assess_color,</if>
|
||||
<if test="assessTime != null" >assess_time,</if>
|
||||
<if test="processNum != null" >process_num,</if>
|
||||
<if test="processState != null" >process_state,</if>
|
||||
<if test="createdTime != null" >created_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id},</if>
|
||||
<if test="resType != null" >#{resType},</if>
|
||||
<if test="resId != null" >#{resId},</if>
|
||||
<if test="assessResult != null" >#{assessResult},</if>
|
||||
<if test="assessColor != null" >#{assessColor},</if>
|
||||
<if test="assessTime != null" >#{assessTime},</if>
|
||||
<if test="processNum != null" >#{processNum},</if>
|
||||
<if test="processState != null" >#{processState},</if>
|
||||
<if test="createdTime != null" >#{createdTime},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess" >
|
||||
update SAR_COMP_RES_ASSESS
|
||||
set res_type = #{resType},
|
||||
res_id = #{resId},
|
||||
assess_result = #{assessResult},
|
||||
assess_color = #{assessColor},
|
||||
assess_time = #{assessTime},
|
||||
process_num = #{processNum},
|
||||
process_state = #{processState},
|
||||
created_time = #{createdTime},
|
||||
modify_time = #{modifyTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.SarCompResAssess.entity.SarCompResAssess" >
|
||||
update SAR_COMP_RES_ASSESS
|
||||
<set >
|
||||
<if test="resType != null" >
|
||||
res_type = #{resType},
|
||||
</if>
|
||||
<if test="resId != null" >
|
||||
res_id = #{resId},
|
||||
</if>
|
||||
<if test="assessResult != null" >
|
||||
assess_result = #{assessResult},
|
||||
</if>
|
||||
<if test="assessColor != null" >
|
||||
assess_color = #{assessColor},
|
||||
</if>
|
||||
<if test="assessTime != null" >
|
||||
assess_time = #{assessTime},
|
||||
</if>
|
||||
<if test="processNum != null" >
|
||||
process_num = #{processNum},
|
||||
</if>
|
||||
<if test="processState != null" >
|
||||
process_state = #{processState},
|
||||
</if>
|
||||
<if test="createdTime != null" >
|
||||
created_time = #{createdTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_COMP_RES_ASSESS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_COMP_RES_ASSESS
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_COMP_RES_ASSESS
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_COMP_RES_ASSESS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_COMP_RES_ASSESS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_COMP_RES_ASSESS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from SAR_COMP_RES_ASSESS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
limit ${pager.pageOffset},${pager.pageSize}
|
||||
</select>
|
||||
|
||||
<!-- SAR_COMP_RES_ASSESS 列表总数-->
|
||||
<select id="queryResDataByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
SELECT COUNT(1) FROM (
|
||||
SELECT
|
||||
SAR_COMP_RES_ASSESS.*,
|
||||
(
|
||||
CASE
|
||||
SAR_COMP_RES_ASSESS.RES_TYPE
|
||||
WHEN 'INLAND_STAND' THEN
|
||||
IF
|
||||
(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR = '',
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number ),
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number, '-', SAR_STANDARDS_INFO.stand_year )
|
||||
)
|
||||
WHEN 'FOREIGN_STAND' THEN
|
||||
IF
|
||||
(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR = '',
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number ),
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number, '-', SAR_STANDARDS_INFO.stand_year )
|
||||
)
|
||||
WHEN 'FOREIGN_LAWS' THEN
|
||||
SAR_LAWS_INFO.laws_number ELSE ''
|
||||
END
|
||||
) AS standCode,
|
||||
(
|
||||
CASE
|
||||
SAR_COMP_RES_ASSESS.RES_TYPE
|
||||
WHEN 'INLAND_STAND' THEN
|
||||
SAR_STANDARDS_INFO.STAND_NAME
|
||||
WHEN 'FOREIGN_STAND' THEN
|
||||
SAR_STANDARDS_INFO.STAND_NAME
|
||||
WHEN 'FOREIGN_LAWS' THEN
|
||||
SAR_LAWS_INFO.LAWS_NAME ELSE ''
|
||||
END
|
||||
) AS standName
|
||||
FROM
|
||||
SAR_COMP_RES_ASSESS
|
||||
LEFT JOIN SAR_STANDARDS_INFO ON SAR_COMP_RES_ASSESS.RES_ID = SAR_STANDARDS_INFO.ID
|
||||
LEFT JOIN SAR_LAWS_INFO ON SAR_COMP_RES_ASSESS.RES_ID = SAR_LAWS_INFO.ID
|
||||
WHERE
|
||||
1 = 1
|
||||
AND ( SAR_STANDARDS_INFO.VALID_FLAG = 0 OR SAR_STANDARDS_INFO.VALID_FLAG IS NULL )
|
||||
AND (
|
||||
SAR_LAWS_INFO.VALID_FLAG - 0
|
||||
OR SAR_LAWS_INFO.VALID_FLAG IS NULL)
|
||||
) AS RESULT
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_COMP_RES_ASSESS列表 -->
|
||||
<select id="queryResDataByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
SELECT <include refid="Base_Column_List_Stand" /> FROM (
|
||||
SELECT
|
||||
SAR_COMP_RES_ASSESS.*,
|
||||
(
|
||||
CASE
|
||||
SAR_COMP_RES_ASSESS.RES_TYPE
|
||||
WHEN 'INLAND_STAND' THEN
|
||||
IF
|
||||
(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR = '',
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number ),
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number, '-', SAR_STANDARDS_INFO.stand_year )
|
||||
)
|
||||
WHEN 'FOREIGN_STAND' THEN
|
||||
IF
|
||||
(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR = '',
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number ),
|
||||
CONCAT( SAR_STANDARDS_INFO.stand_sort, ' ', SAR_STANDARDS_INFO.stand_number, '-', SAR_STANDARDS_INFO.stand_year )
|
||||
)
|
||||
WHEN 'FOREIGN_LAWS' THEN
|
||||
SAR_LAWS_INFO.laws_number ELSE ''
|
||||
END
|
||||
) AS standCode,
|
||||
(
|
||||
CASE
|
||||
SAR_COMP_RES_ASSESS.RES_TYPE
|
||||
WHEN 'INLAND_STAND' THEN
|
||||
SAR_STANDARDS_INFO.STAND_NAME
|
||||
WHEN 'FOREIGN_STAND' THEN
|
||||
SAR_STANDARDS_INFO.STAND_NAME
|
||||
WHEN 'FOREIGN_LAWS' THEN
|
||||
SAR_LAWS_INFO.LAWS_NAME ELSE ''
|
||||
END
|
||||
) AS standName
|
||||
FROM
|
||||
SAR_COMP_RES_ASSESS
|
||||
LEFT JOIN SAR_STANDARDS_INFO ON SAR_COMP_RES_ASSESS.RES_ID = SAR_STANDARDS_INFO.ID
|
||||
LEFT JOIN SAR_LAWS_INFO ON SAR_COMP_RES_ASSESS.RES_ID = SAR_LAWS_INFO.ID
|
||||
WHERE
|
||||
1 = 1
|
||||
AND ( SAR_STANDARDS_INFO.VALID_FLAG = 0 OR SAR_STANDARDS_INFO.VALID_FLAG IS NULL or SAR_STANDARDS_INFO.VALID_FLAG = 1)
|
||||
AND (
|
||||
SAR_LAWS_INFO.VALID_FLAG - 0 or SAR_LAWS_INFO.VALID_FLAG = 1
|
||||
OR SAR_LAWS_INFO.VALID_FLAG IS NULL)
|
||||
) AS RESULT
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
limit ${pager.pageOffset},${pager.pageSize}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_COMP_RES_ASSESS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getResAssessDataByResId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_COMP_RES_ASSESS
|
||||
where res_id = #{value}
|
||||
</select>
|
||||
|
||||
<update id="updateStatus" parameterType="java.lang.String" >
|
||||
update SAR_COMP_RES_ASSESS
|
||||
<set >
|
||||
PROCESS_STATE = '1',
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.SarCompStatusInfo.dao.SarCompStatusInfoDao">
|
||||
|
||||
</mapper>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.SarFileSplitItems.dao.SarFileSplitItemsDao">
|
||||
|
||||
</mapper>
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.SarStandItemVal.dao.SarStandItemValDao">
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.SarStandItemVal.entity.SarStandItemVal" >
|
||||
<id column="id" property="id" />
|
||||
<result column="property_type" property="propertyType" />
|
||||
<result column="item_id" property="itemId" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="property_val" property="propertyVal" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_ITEM_VAL table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
property_type, item_id, id, modify_time, creation_time, valid_flag, property_val
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="propertyType != null" >
|
||||
and property_type ${propertyTypeOperator} #{propertyType}
|
||||
</if>
|
||||
<if test="itemId != null" >
|
||||
and item_id ${itemIdOperator} #{itemId}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="propertyVal != null" >
|
||||
and property_val ${propertyValOperator} #{propertyVal}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.SarStandItemVal.entity.SarStandItemVal" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_ITEM_VAL.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_ITEM_VAL(<include refid="Base_Column_List" />)
|
||||
values (#{propertyType, jdbcType=VARCHAR}, #{itemId, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER}, #{propertyVal, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.SarStandItemVal.entity.SarStandItemVal" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_ITEM_VAL.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_ITEM_VAL
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="propertyType != null" >property_type,</if>
|
||||
<if test="itemId != null" >item_id,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="propertyVal != null" >property_val,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="propertyType != null" >#{propertyType, jdbcType=VARCHAR},</if>
|
||||
<if test="itemId != null" >#{itemId, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="propertyVal != null" >#{propertyVal, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.SarStandItemVal.entity.SarStandItemVal" >
|
||||
update SAR_STAND_ITEM_VAL
|
||||
set property_type = #{propertyType},
|
||||
item_id = #{itemId},
|
||||
modify_time = #{modifyTime},
|
||||
creation_time = #{creationTime},
|
||||
valid_flag = #{validFlag},
|
||||
property_val = #{propertyVal}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.SarStandItemVal.entity.SarStandItemVal" >
|
||||
update SAR_STAND_ITEM_VAL
|
||||
<set >
|
||||
<if test="propertyType != null" >
|
||||
property_type = #{propertyType},
|
||||
</if>
|
||||
<if test="itemId != null" >
|
||||
item_id = #{itemId},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="propertyVal != null" >
|
||||
property_val = #{propertyVal},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_STAND_ITEM_VAL -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_ITEM_VAL
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_ITEM_VAL
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STAND_ITEM_VAL 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STAND_ITEM_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_ITEM_VAL列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_STAND_ITEM_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STAND_ITEM_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据条目ID删除条目关联 -->
|
||||
<delete id="deleteSarStandItemValByItemid" parameterType="java.lang.String" >
|
||||
delete from SAR_STAND_ITEM_VAL
|
||||
where ITEM_ID = #{itemid}
|
||||
</delete>
|
||||
|
||||
<update id="updateSarStandItemValByItemid" parameterType="java.lang.String" >
|
||||
UPDATE SAR_STAND_ITEM_VAL SET VALID_FLAG = 1
|
||||
where ITEM_ID = #{itemid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByItemsIds" parameterType="com.adc.da.slrs.SarStandItemVal.entity.SarStandItemVal">
|
||||
delete from SAR_STAND_ITEM_VAL
|
||||
where item_id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertForeach" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
insert into SAR_STAND_ITEM_VAL
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="item.propertyType != null" >property_type,</if>
|
||||
<if test="item.itemId != null" >item_id,</if>
|
||||
<if test="item.id != null" >id,</if>
|
||||
<if test="item.modifyTime != null" >modify_time,</if>
|
||||
<if test="item.creationTime != null" >creation_time,</if>
|
||||
<if test="item.validFlag != null" >valid_flag,</if>
|
||||
<if test="item.propertyVal != null" >property_val,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="item.propertyType != null" >#{item.propertyType, jdbcType=VARCHAR},</if>
|
||||
<if test="item.itemId != null" >#{item.itemId, jdbcType=VARCHAR},</if>
|
||||
<if test="item.id != null" >#{item.id, jdbcType=VARCHAR},</if>
|
||||
<if test="item.modifyTime != null" >#{item.modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="item.creationTime != null" >#{item.creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="item.validFlag != null" >#{item.validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="item.propertyVal != null" >#{item.propertyVal, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user