This commit is contained in:
linfso 2024-10-24 19:32:09 +08:00
parent e88eeea5d0
commit 8765592a57
2 changed files with 38 additions and 14 deletions

View File

@ -39,6 +39,12 @@ public class EmisCommissionQuote extends BaseEntity
private String quoteCode;
/* 提成方案名称 */
private String quoteName;
/* 起始国 */
private String fromCountry;
/* 目的国家 */
private String country;
/* 提成费用类型 运输费 */
private String feeType;
/* 计算类型 票,重量 emis_commission_type */
private String calcType;
/* 岗位类型:emis_commission_post */
@ -52,10 +58,10 @@ public class EmisCommissionQuote extends BaseEntity
/* 员工名称 */
private String empName;
/* 开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startDate;
/* 结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endDate;
/* 优先级 */
private Integer priorityLevel;

View File

@ -1,13 +1,16 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xdadan.erp.emis.mapper.EmisCommissionQuoteMapper">
<resultMap type="EmisCommissionQuote" id="EmisCommissionQuoteResult">
<result property="quoteId" column="quote_id" />
<result property="quoteCode" column="quote_code" />
<result property="quoteName" column="quote_name" />
<result property="fromCountry" column="from_country" />
<result property="country" column="country" />
<result property="feeType" column="fee_type" />
<result property="calcType" column="calc_type" />
<result property="postType" column="post_type" />
<result property="transType" column="trans_type" />
@ -20,16 +23,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEmisCommissionQuoteVo">
select quote_id, quote_code, quote_name, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote
select quote_id, quote_code, quote_name, from_country, country, fee_type, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote
</sql>
<select id="selectEmisCommissionQuoteList" parameterType="EmisCommissionQuote" resultMap="EmisCommissionQuoteResult">
<include refid="selectEmisCommissionQuoteVo"/>
<where>
del_flag='0'
<where>
del_flag='0'
<if test="quoteId != null "> and quote_id = #{quoteId}</if>
<if test="quoteCode != null and quoteCode != ''"> and quote_code like concat('%', #{quoteCode}, '%')</if>
<if test="quoteName != null and quoteName != ''"> and quote_name like concat('%', #{quoteName}, '%')</if>
<if test="fromCountry != null and fromCountry != ''"> and from_country like concat('%', #{fromCountry}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="feeType != null and feeType != ''"> and fee_type like concat('%', #{feeType}, '%')</if>
<if test="calcType != null and calcType != ''"> and calc_type like concat('%', #{calcType}, '%')</if>
<if test="postType != null and postType != ''"> and post_type like concat('%', #{postType}, '%')</if>
<if test="transType != null and transType != ''"> and trans_type like concat('%', #{transType}, '%')</if>
@ -58,6 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and quote_id = #{quoteId}
and quote_code = #{quoteCode}
and quote_name = #{quoteName}
and from_country = #{fromCountry}
and country = #{country}
and fee_type = #{feeType}
and calc_type = #{calcType}
and post_type = #{postType}
and trans_type = #{transType}
@ -78,19 +87,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and update_site = #{updateSite}
limit 1
</select>
<select id="selectEmisCommissionQuoteByQuoteId" parameterType="Long" resultMap="EmisCommissionQuoteResult">
select quote_id, quote_code, quote_name, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select quote_id, quote_code, quote_name, from_country, country, fee_type, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_commission_quote a
where a.quote_id = #{quoteId}
</select>
<insert id="insertEmisCommissionQuote" parameterType="EmisCommissionQuote" useGeneratedKeys="true" keyProperty="quoteId">
insert into emis_commission_quote
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quoteId != null">quote_id,</if>
<if test="quoteCode != null and quoteCode != ''">quote_code,</if>
<if test="quoteName != null and quoteName != ''">quote_name,</if>
<if test="fromCountry != null and fromCountry != ''">from_country,</if>
<if test="country != null and country != ''">country,</if>
<if test="feeType != null and feeType != ''">fee_type,</if>
<if test="calcType != null and calcType != ''">calc_type,</if>
<if test="postType != null and postType != ''">post_type,</if>
<if test="transType != null and transType != ''">trans_type,</if>
@ -109,11 +121,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quoteId != null">#{quoteId},</if>
<if test="quoteCode != null and quoteCode != ''">#{quoteCode},</if>
<if test="quoteName != null and quoteName != ''">#{quoteName},</if>
<if test="fromCountry != null and fromCountry != ''">#{fromCountry},</if>
<if test="country != null and country != ''">#{country},</if>
<if test="feeType != null and feeType != ''">#{feeType},</if>
<if test="calcType != null and calcType != ''">#{calcType},</if>
<if test="postType != null and postType != ''">#{postType},</if>
<if test="transType != null and transType != ''">#{transType},</if>
@ -132,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</trim>
</insert>
<update id="updateEmisCommissionQuote" parameterType="EmisCommissionQuote">
@ -140,6 +155,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="quoteCode != null and quoteCode != ''">quote_code = #{quoteCode},</if>
<if test="quoteName != null and quoteName != ''">quote_name = #{quoteName},</if>
<if test="fromCountry != null and fromCountry != ''">from_country = #{fromCountry},</if>
<if test="country != null and country != ''">country = #{country},</if>
<if test="feeType != null and feeType != ''">fee_type = #{feeType},</if>
<if test="calcType != null and calcType != ''">calc_type = #{calcType},</if>
<if test="postType != null and postType != ''">post_type = #{postType},</if>
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
@ -167,7 +185,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteEmisCommissionQuoteByQuoteIds" parameterType="String">
delete from emis_commission_quote where quote_id in
delete from emis_commission_quote where quote_id in
<foreach item="quoteId" collection="array" open="(" separator="," close=")">
#{quoteId}
</foreach>