This commit is contained in:
linfso 2024-05-24 16:48:35 +08:00
parent ca09051d1e
commit a36ec5f74a
2 changed files with 45 additions and 9 deletions

View File

@ -32,7 +32,6 @@ public class EmisTransProduct extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* 序号 */
private Long id;
/* 产品代码 */
@ -55,6 +54,8 @@ public class EmisTransProduct extends BaseEntity
private String transType;
/* 时效描述 */
private String agingDesc;
/* 失效标识 */
private String agingFlag;
/* 最小时效 */
private Integer minAging;
/* 最大时效 */

View File

@ -16,6 +16,7 @@
<result property="carryType" column="carry_type" />
<result property="transType" column="trans_type" />
<result property="agingDesc" column="aging_desc" />
<result property="agingFlag" column="aging_flag" />
<result property="minAging" column="min_aging" />
<result property="maxAging" column="max_aging" />
<result property="orderNum" column="order_num" />
@ -45,24 +46,25 @@
</select>
<sql id="selectEmisTransProductVo">
select id, prod_code, prod_name, prod_name_en, status, country, trans_line_code, trans_line, carry_type, trans_type, aging_desc, min_aging, max_aging, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_trans_product
select id, prod_code, prod_name, prod_name_en, status, country, trans_line_code, trans_line, carry_type, trans_type, aging_desc, aging_flag, min_aging, max_aging, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_trans_product
</sql>
<select id="selectEmisTransProductList" parameterType="EmisTransProduct" resultMap="EmisTransProductResult">
<include refid="selectEmisTransProductVo"/>
<where>
del_flag = '0'
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="prodCode != null and prodCode != ''"> and prod_code=#{prodCode}</if>
<if test="prodCode != null and prodCode != ''"> and prod_code like concat('%', #{prodCode}, '%')</if>
<if test="prodName != null and prodName != ''"> and prod_name like concat('%', #{prodName}, '%')</if>
<if test="prodNameEn != null and prodNameEn != ''"> and prod_name_en like concat('%', #{prodNameEn}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="transLineCode != null and transLineCode != ''"> and trans_line_code=#{transLineCode}</if>
<if test="transLineCode != null and transLineCode != ''"> and trans_line_code like concat('%', #{transLineCode}, '%')</if>
<if test="transLine != null and transLine != ''"> and trans_line like concat('%', #{transLine}, '%')</if>
<if test="carryType != null and carryType != ''"> and carry_type=#{carryType}</if>
<if test="transType != null and transType != ''"> and trans_type=#{transType}</if>
<if test="carryType != null and carryType != ''"> and carry_type like concat('%', #{carryType}, '%')</if>
<if test="transType != null and transType != ''"> and trans_type like concat('%', #{transType}, '%')</if>
<if test="agingDesc != null and agingDesc != ''"> and aging_desc like concat('%', #{agingDesc}, '%')</if>
<if test="agingFlag != null and agingFlag != ''"> and aging_flag like concat('%', #{agingFlag}, '%')</if>
<if test="minAging != null "> and min_aging = #{minAging}</if>
<if test="maxAging != null "> and max_aging = #{maxAging}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
@ -79,13 +81,43 @@
order by order_num desc
</select>
<select id="checkUnique" parameterType="EmisTransProduct" resultType="int">
select count(1) from emis_trans_product
where del_flag='0'
and id = #{id}
and prod_code = #{prodCode}
and prod_name = #{prodName}
and prod_name_en = #{prodNameEn}
and status = #{status}
and country = #{country}
and trans_line_code = #{transLineCode}
and trans_line = #{transLine}
and carry_type = #{carryType}
and trans_type = #{transType}
and aging_desc = #{agingDesc}
and aging_flag = #{agingFlag}
and min_aging = #{minAging}
and max_aging = #{maxAging}
and order_num = #{orderNum}
and remark = #{remark}
and tenant_id = #{tenantId}
and del_flag = #{delFlag}
and create_by = #{createBy}
and create_time = #{createTime}
and update_by = #{updateBy}
and update_time = #{updateTime}
and create_site = #{createSite}
and update_site = #{updateSite}
limit 1
</select>
<select id="selectEmisTransProductById" parameterType="Long" resultMap="EmisTransProductResult">
select id, prod_code, prod_name, prod_name_en, status, country, trans_line_code, trans_line, carry_type, trans_type, aging_desc, min_aging, max_aging, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, prod_code, prod_name, prod_name_en, status, country, trans_line_code, trans_line, carry_type, trans_type, aging_desc, aging_flag, min_aging, max_aging, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_trans_product a
where a.id = #{id}
</select>
<insert id="insertEmisTransProduct" parameterType="EmisTransProduct">
<insert id="insertEmisTransProduct" parameterType="EmisTransProduct" useGeneratedKeys="true" keyProperty="id">
insert into emis_trans_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
@ -99,6 +131,7 @@
<if test="carryType != null and carryType != ''">carry_type,</if>
<if test="transType != null and transType != ''">trans_type,</if>
<if test="agingDesc != null and agingDesc != ''">aging_desc,</if>
<if test="agingFlag != null and agingFlag != ''">aging_flag,</if>
<if test="minAging != null">min_aging,</if>
<if test="maxAging != null">max_aging,</if>
<if test="orderNum != null">order_num,</if>
@ -124,6 +157,7 @@
<if test="carryType != null and carryType != ''">#{carryType},</if>
<if test="transType != null and transType != ''">#{transType},</if>
<if test="agingDesc != null and agingDesc != ''">#{agingDesc},</if>
<if test="agingFlag != null and agingFlag != ''">#{agingFlag},</if>
<if test="minAging != null">#{minAging},</if>
<if test="maxAging != null">#{maxAging},</if>
<if test="orderNum != null">#{orderNum},</if>
@ -152,6 +186,7 @@
<if test="carryType != null and carryType != ''">carry_type = #{carryType},</if>
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
<if test="agingDesc != null and agingDesc != ''">aging_desc = #{agingDesc},</if>
<if test="agingFlag != null and agingFlag != ''">aging_flag = #{agingFlag},</if>
<if test="minAging != null">min_aging = #{minAging},</if>
<if test="maxAging != null">max_aging = #{maxAging},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>