提交本地工具-标准比对的相关接口

This commit is contained in:
duanwenbin
2021-07-08 15:50:05 +08:00
parent 4f7d1648db
commit 4bfbd48dc6
25 changed files with 3715 additions and 0 deletions
@@ -0,0 +1,269 @@
<?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.standardSplit.dao.SarItemsCompareHisEODao" >
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
<id column="id" property="id" />
<result column="old_items_id" property="oldItemsId" />
<result column="old_items_name" property="oldItemsName" />
<result column="old_items_text" property="oldItemsText" />
<result column="new_items_id" property="newItemsId" />
<result column="new_items_name" property="newItemsName" />
<result column="new_items_text" property="newItemsText" />
<result column="create_user" property="createUser" />
<result column="create_time" property="createTime" />
<result column="modify_user" property="modifyUser" />
<result column="modify_time" property="modifyTime" />
<result column="stand_his_id" property="standHisId" />
<result column="similarity_degree" property="similarityDegree" />
<result column="old_items_num" property="oldItemsNum" />
<result column="new_items_num" property="newItemsNum" />
<result column="old_remark" property="oldRemark" />
<result column="new_remark" property="newRemark" />
</resultMap>
<!-- SAR_ITEMS_COMPARE_HIS table all fields -->
<sql id="Base_Column_List" >
id, old_items_id, old_items_name, old_items_text, new_items_id, new_items_name, new_items_text,
create_user, create_time, modify_user, modify_time, stand_his_id, similarity_degree,
old_items_num, new_items_num,old_remark,new_remark
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="id != null" >
and id ${idOperator} #{id}
</if>
<if test="oldItemsId != null" >
and old_items_id ${oldItemsIdOperator} #{oldItemsId}
</if>
<if test="oldItemsName != null" >
and old_items_name ${oldItemsNameOperator} #{oldItemsName}
</if>
<if test="oldItemsText != null" >
and old_items_text ${oldItemsTextOperator} #{oldItemsText}
</if>
<if test="newItemsId != null" >
and new_items_id ${newItemsIdOperator} #{newItemsId}
</if>
<if test="newItemsName != null" >
and new_items_name ${newItemsNameOperator} #{newItemsName}
</if>
<if test="newItemsText != null" >
and new_items_text ${newItemsTextOperator} #{newItemsText}
</if>
<if test="createUser != null" >
and create_user ${createUserOperator} #{createUser}
</if>
<if test="createTime != null" >
and create_time ${createTimeOperator} #{createTime}
</if>
<if test="createTime1 != null" >
and create_time &gt;= #{createTime1}
</if>
<if test="createTime2 != null" >
and create_time &lt;= #{createTime2}
</if>
<if test="modifyUser != null" >
and modify_user ${modifyUserOperator} #{modifyUser}
</if>
<if test="modifyTime != null" >
and modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
and modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and modify_time &lt;= #{modifyTime2}
</if>
<if test="standHisId != null" >
and stand_his_id ${standHisIdOperator} #{standHisId}
</if>
<if test="similarityDegree != null" >
and similarity_degree ${similarityDegreeOperator} #{similarityDegree}
</if>
<if test="oldItemsNum != null" >
and old_items_num ${oldItemsNumOperator} #{oldItemsNum}
</if>
<if test="newItemsNum != null" >
and new_items_num ${newItemsNumOperator} #{newItemsNum}
</if>
</trim>
</sql>
<!-- 插入记录 -->
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_ITEMS_COMPARE_HIS.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_ITEMS_COMPARE_HIS(<include refid="Base_Column_List" />)
values (#{id, jdbcType=VARCHAR}, #{oldItemsId, jdbcType=VARCHAR}, #{oldItemsName, jdbcType=VARCHAR}, #{oldItemsText, jdbcType=CLOB}, #{newItemsId, jdbcType=VARCHAR}, #{newItemsName, jdbcType=VARCHAR}, #{newItemsText, jdbcType=CLOB}, #{createUser, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{standHisId, jdbcType=VARCHAR}, #{similarityDegree, jdbcType=VARCHAR}, #{oldItemsNum, jdbcType=VARCHAR}, #{newItemsNum, jdbcType=VARCHAR})
</insert>
<!-- 动态插入记录 主键是序列 -->
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_ITEMS_COMPARE_HIS.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_ITEMS_COMPARE_HIS
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >id,</if>
<if test="oldItemsId != null" >old_items_id,</if>
<if test="oldItemsName != null" >old_items_name,</if>
<if test="oldItemsText != null" >old_items_text,</if>
<if test="newItemsId != null" >new_items_id,</if>
<if test="newItemsName != null" >new_items_name,</if>
<if test="newItemsText != null" >new_items_text,</if>
<if test="createUser != null" >create_user,</if>
<if test="createTime != null" >create_time,</if>
<if test="modifyUser != null" >modify_user,</if>
<if test="modifyTime != null" >modify_time,</if>
<if test="standHisId != null" >stand_his_id,</if>
<if test="similarityDegree != null" >similarity_degree,</if>
<if test="oldItemsNum != null" >old_items_num,</if>
<if test="newItemsNum != null" >new_items_num,</if>
<if test="oldRemark != null" >old_remark,</if>
<if test="newRemark != null" >new_remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
<if test="oldItemsId != null" >#{oldItemsId, jdbcType=VARCHAR},</if>
<if test="oldItemsName != null" >#{oldItemsName, jdbcType=VARCHAR},</if>
<if test="oldItemsText != null" >#{oldItemsText, jdbcType=CLOB},</if>
<if test="newItemsId != null" >#{newItemsId, jdbcType=VARCHAR},</if>
<if test="newItemsName != null" >#{newItemsName, jdbcType=VARCHAR},</if>
<if test="newItemsText != null" >#{newItemsText, jdbcType=CLOB},</if>
<if test="createUser != null" >#{createUser, jdbcType=VARCHAR},</if>
<if test="createTime != null" >#{createTime, jdbcType=TIMESTAMP},</if>
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
<if test="standHisId != null" >#{standHisId, jdbcType=VARCHAR},</if>
<if test="similarityDegree != null" >#{similarityDegree, jdbcType=VARCHAR},</if>
<if test="oldItemsNum != null" >#{oldItemsNum, jdbcType=VARCHAR},</if>
<if test="newItemsNum != null" >#{newItemsNum, jdbcType=VARCHAR},</if>
<if test="oldRemark != null" >#{oldRemark, jdbcType=VARCHAR},</if>
<if test="newRemark != null" >#{newRemark, jdbcType=VARCHAR},</if>
</trim>
</insert>
<!-- 根据pk,修改记录-->
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
update SAR_ITEMS_COMPARE_HIS
set old_items_id = #{oldItemsId},
old_items_name = #{oldItemsName},
old_items_text = #{oldItemsText},
new_items_id = #{newItemsId},
new_items_name = #{newItemsName},
new_items_text = #{newItemsText},
create_user = #{createUser},
create_time = #{createTime},
modify_user = #{modifyUser},
modify_time = #{modifyTime},
stand_his_id = #{standHisId},
similarity_degree = #{similarityDegree},
old_items_num = #{oldItemsNum},
new_items_num = #{newItemsNum}
where id = #{id}
</update>
<!-- 修改记录,只修改只不为空的字段 -->
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarItemsCompareHisEO" >
update SAR_ITEMS_COMPARE_HIS
<set >
<if test="oldItemsId != null" >
old_items_id = #{oldItemsId},
</if>
<if test="oldItemsName != null" >
old_items_name = #{oldItemsName},
</if>
<if test="oldItemsText != null" >
old_items_text = #{oldItemsText},
</if>
<if test="newItemsId != null" >
new_items_id = #{newItemsId},
</if>
<if test="newItemsName != null" >
new_items_name = #{newItemsName},
</if>
<if test="newItemsText != null" >
new_items_text = #{newItemsText},
</if>
<if test="createUser != null" >
create_user = #{createUser},
</if>
<if test="createTime != null" >
create_time = #{createTime},
</if>
<if test="modifyUser != null" >
modify_user = #{modifyUser},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime},
</if>
<if test="standHisId != null" >
stand_his_id = #{standHisId},
</if>
<if test="similarityDegree != null" >
similarity_degree = #{similarityDegree},
</if>
<if test="oldItemsNum != null" >
old_items_num = #{oldItemsNum},
</if>
<if test="newItemsNum != null" >
new_items_num = #{newItemsNum},
</if>
<if test="oldRemark != null" >
old_remark = #{oldRemark},
</if>
<if test="newRemark != null" >
new_remark = #{newRemark},
</if>
</set>
where id = #{id}
</update>
<!-- 根据id查询 SAR_ITEMS_COMPARE_HIS -->
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select <include refid="Base_Column_List" />
from SAR_ITEMS_COMPARE_HIS
where id = #{value}
</select>
<!-- 删除记录 -->
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from SAR_ITEMS_COMPARE_HIS
where id = #{value}
</delete>
<!-- SAR_ITEMS_COMPARE_HIS 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
select count(1) from SAR_ITEMS_COMPARE_HIS
<include refid="Base_Where_Clause"/>
</select>
<!-- 查询SAR_ITEMS_COMPARE_HIS列表 -->
<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_ITEMS_COMPARE_HIS
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
ORDER BY CREATE_TIME DESC
) 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_ITEMS_COMPARE_HIS
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
</mapper>