feat: 迁移国内标准法规部分1

This commit is contained in:
super_liu
2021-06-02 21:39:20 +08:00
parent ac33a531ec
commit 4cc558befc
140 changed files with 12514 additions and 58 deletions
@@ -0,0 +1,142 @@
<?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.sarStandAttrDetails.dao.SarStandAttrDetailsDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails" >
<id column="id" property="id" />
<result column="attr_field" property="attrField" />
<result column="attr_name" property="attrName" />
<result column="attr_type" property="attrType" />
<result column="order_num" property="orderNum" />
<result column="is_edit" property="isEdit" />
<result column="creation_user" property="creationUser" />
<result column="valid_flag" property="validFlag" />
<result column="creation_time" property="creationTime" />
<result column="modify_time" property="modifyTime" />
<result column="attr_len" property="attrLen" />
<result column="is_must" property="isMust" />
<result column="is_show_imp" property="isShowImp" />
<result column="show_region_id" property="showRegionId" />
<result column="sel_val" property="selVal" />
<result column="sar_type" property="sarType" />
<result column="is_search" property="isSearch" />
<result column="is_warn" property="isWarn" />
</resultMap>
<!-- SAR_STAND_ATTR_DETAILS table all fields -->
<sql id="Base_Column_List" >
id, attr_field, attr_name, attr_type, order_num, is_edit, creation_user,
valid_flag, creation_time, modify_time,
attr_len,is_must,is_show_imp,show_region_id,sel_val,sar_type,is_search,is_warn
</sql>
<sql id="Base_Column_List_Show" >
SAR_STAND_ATTR_DETAILS.id, attr_field, attr_name, attr_type, SAR_STAND_ATTR_DETAILS.order_num, is_edit, SAR_STAND_ATTR_DETAILS.creation_user,
SAR_STAND_ATTR_DETAILS.valid_flag, SAR_STAND_ATTR_DETAILS.creation_time, SAR_STAND_ATTR_DETAILS.modify_time,
attr_len,is_must,is_show_imp,show_region_id,sel_val,SAR_STAND_ATTR_DETAILS.sar_type,is_search,is_warn
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1 and SAR_STAND_ATTR_DETAILS.valid_flag=0
<trim suffixOverrides="," >
<if test="id != null" >
and SAR_STAND_ATTR_DETAILS.id ${idOperator} #{id}
</if>
<if test="attrField != null" >
and attr_field ${attrFieldOperator} #{attrField}
</if>
<if test="attrName != null" >
and attr_name ${attrNameOperator} #{attrName}
</if>
<if test="attrType != null" >
and attr_type ${attrTypeOperator} #{attrType}
</if>
<if test="orderNum != null" >
and SAR_STAND_ATTR_DETAILS.order_num ${orderNumOperator} #{orderNum}
</if>
<if test="isEdit != null" >
and is_edit ${isEditOperator} #{isEdit}
</if>
<if test="creationUser != null" >
and SAR_STAND_ATTR_DETAILS.creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="validFlag != null" >
and SAR_STAND_ATTR_DETAILS.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="creationTime != null" >
and SAR_STAND_ATTR_DETAILS.creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and SAR_STAND_ATTR_DETAILS.creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and SAR_STAND_ATTR_DETAILS.creation_time &lt;= #{creationTime2}
</if>
<if test="modifyTime != null" >
and SAR_STAND_ATTR_DETAILS.modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
and SAR_STAND_ATTR_DETAILS.modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and SAR_STAND_ATTR_DETAILS.modify_time &lt;= #{modifyTime2}
</if>
<if test="attrLen != null" >
and attr_len ${attrLenOperator} #{attrLen}
</if>
<if test="sarType != null" >
and SAR_STAND_ATTR_DETAILS.sar_type like concat(concat('%',#{sarType}),'%')
</if>
<if test="isSearch != null" >
and is_search = #{isSearch}
</if>
<if test="isWarn != null" >
and is_warn = #{isWarn}
</if>
<if test="notId != null" >
and SAR_STAND_ATTR_DETAILS.ID != #{notId}
</if>
<if test="idList != null" >
and SAR_STAND_ATTR_DETAILS.ID in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</trim>
</sql>
<select id="selectNameByField" resultType="java.lang.String" parameterType="java.lang.String">
SELECT attr_name
from SAR_STAND_ATTR_DETAILS
where attr_field = #{attrField} and valid_flag=0
<if test='sarType != null and sarType == "INLAND_STAND"'>
and (sar_type=#{sarType} or sar_type='STAND')
</if>
<if test='sarType != null and sarType == "FOREIGN_STAND"'>
and (sar_type=#{sarType} or sar_type='STAND')
</if>
<if test='sarType != null and sarType != "FOREIGN_STAND" and sarType != "INLAND_STAND"'>
and sar_type=#{sarType}
</if>
limit 0,1
</select>
<select id="selectFieldByName" resultMap="BaseResultMap" parameterType="java.lang.String">
SELECT <include refid="Base_Column_List" />
from SAR_STAND_ATTR_DETAILS
where attr_name = #{attrName} and valid_flag=0
<if test='sarType != null and sarType == "INLAND_STAND"'>
and (sar_type=#{sarType} or sar_type='STAND')
</if>
<if test='sarType != null and sarType == "FOREIGN_STAND"'>
and (sar_type=#{sarType} or sar_type='STAND')
</if>
<if test='sarType != null and sarType != "FOREIGN_STAND" and sarType != "INLAND_STAND"'>
and sar_type=#{sarType}
</if>
limit 0,1
</select>
</mapper>