|
|
@@ -4,6 +4,7 @@
|
|
|
<resultMap id="VendorResultMapper" type="com.usoftchina.saas.document.entities.Vendor">
|
|
|
<id column="ve_id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_shortname" property="ve_shortname" jdbcType="VARCHAR"/>
|
|
|
<result column="ve_uu" property="ve_uu" jdbcType="VARCHAR" />
|
|
|
<result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
|
|
|
<result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
|
|
|
@@ -34,6 +35,7 @@
|
|
|
<resultMap id="VendorDTOResultMapper" type="com.usoftchina.saas.document.dto.VendorDTO">
|
|
|
<id column="ve_id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_shortname" property="ve_shortname" jdbcType="VARCHAR"/>
|
|
|
<result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
|
|
|
<result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
|
|
|
<result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
|
|
|
@@ -57,6 +59,7 @@
|
|
|
<id column="ve_id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
|
|
|
<result column="ve_uu" property="ve_uu" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_shortname" property="ve_shortname" jdbcType="VARCHAR"/>
|
|
|
<result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
|
|
|
<result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
|
|
|
<result column="ve_begindate" property="ve_begindate" jdbcType="TIMESTAMP" />
|
|
|
@@ -75,6 +78,10 @@
|
|
|
<result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
|
|
|
<result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
|
|
|
<result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_buyerid" property="ve_buyerid" jdbcType="INTEGER" />
|
|
|
+ <result column="ve_buyercode" property="ve_buyercode" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_buyername" property="ve_buyername" jdbcType="VARCHAR" />
|
|
|
<result column="vc_veid" property="vc_veid" jdbcType="INTEGER" />
|
|
|
<result column="vc_detno" property="vc_detno" jdbcType="INTEGER" />
|
|
|
<result column="vc_name" property="vc_name" jdbcType="VARCHAR" />
|
|
|
@@ -87,7 +94,6 @@
|
|
|
<result column="vc_text4" property="vc_text4" jdbcType="VARCHAR" />
|
|
|
<result column="vc_text5" property="vc_text5" jdbcType="VARCHAR" />
|
|
|
<result column="vc_default" property="vc_default" jdbcType="VARCHAR" />
|
|
|
- <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getListDataByCondition" resultMap="VendorListResultMapper">
|
|
|
@@ -102,10 +108,11 @@
|
|
|
</select>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
|
- ve_id, ve_code, ve_name, ve_uu, ve_type, ve_begindate, ve_beginapamount, ve_beginprepayamount,
|
|
|
+ ve_id, ve_code, ve_shortname,ve_name, ve_uu, ve_type, ve_begindate, ve_beginapamount, ve_beginprepayamount,
|
|
|
ve_promisedays, ve_taxrate, ve_nsrzh, ve_bankaccount, ve_bankcode, ve_status, ve_statuscode,
|
|
|
companyId, updaterId, updateTime, ve_text1,
|
|
|
- ve_text2, ve_text3, ve_text4, ve_text5, ve_payamount, ve_leftamount, ve_beginym, ve_preamount,ve_remark
|
|
|
+ ve_text2, ve_text3, ve_text4, ve_text5, ve_payamount, ve_leftamount, ve_beginym, ve_preamount,ve_remark,
|
|
|
+ ve_buyerid,ve_buyercode,ve_buyername
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="VendorResultMapper" parameterType="java.lang.Long" >
|
|
|
select
|
|
|
@@ -117,31 +124,6 @@
|
|
|
delete from vendor
|
|
|
where ve_id = #{id}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendor" >
|
|
|
- insert into vendor (ve_code, ve_name,
|
|
|
- ve_uu, ve_type, ve_begindate,
|
|
|
- ve_beginapamount, ve_beginprepayamount,
|
|
|
- ve_promisedays, ve_taxrate, ve_nsrzh,
|
|
|
- ve_bankaccount, ve_bankcode, ve_status,
|
|
|
- ve_statuscode, companyId, updaterId,
|
|
|
- updateTime, ve_text1, ve_text2,
|
|
|
- ve_text3, ve_text4, ve_text5,
|
|
|
- ve_payamount, ve_leftamount, ve_beginym ,ve_preamount,
|
|
|
- creatorId,createTime,creatorName,ve_remark
|
|
|
- )
|
|
|
- values (#{ve_code,jdbcType=VARCHAR}, #{ve_name,jdbcType=VARCHAR},
|
|
|
- #{ve_uu,jdbcType=VARCHAR}, #{ve_type,jdbcType=VARCHAR}, #{ve_begindate,jdbcType=TIMESTAMP},
|
|
|
- #{ve_beginapamount,jdbcType=DOUBLE}, #{ve_beginprepayamount,jdbcType=DOUBLE},
|
|
|
- #{ve_promisedays,jdbcType=DECIMAL}, #{ve_taxrate,jdbcType=DOUBLE}, #{ve_nsrzh,jdbcType=VARCHAR},
|
|
|
- #{ve_bankaccount,jdbcType=VARCHAR}, #{ve_bankcode,jdbcType=VARCHAR}, #{ve_status,jdbcType=VARCHAR},
|
|
|
- #{ve_statuscode,jdbcType=VARCHAR}, #{companyId,jdbcType=DECIMAL}, #{updaterId,jdbcType=DECIMAL},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{ve_text1,jdbcType=VARCHAR}, #{ve_text2,jdbcType=VARCHAR},
|
|
|
- #{ve_text3,jdbcType=VARCHAR}, #{ve_text4,jdbcType=VARCHAR}, #{ve_text5,jdbcType=VARCHAR},
|
|
|
- #{ve_payamount,jdbcType=DOUBLE}, #{ve_leftamount,jdbcType=DOUBLE}, #{ve_beginym,jdbcType=INTEGER},
|
|
|
- #{ve_preamount,jdbcType=DOUBLE},
|
|
|
- #{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{creatorName,jdbcType=VARCHAR},#{ve_remark,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
- </insert>
|
|
|
<insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendor" >
|
|
|
<selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
SELECT LAST_INSERT_ID() AS ID
|
|
|
@@ -151,6 +133,9 @@
|
|
|
<if test="ve_code != null" >
|
|
|
ve_code,
|
|
|
</if>
|
|
|
+ <if test="ve_shortname !=null">
|
|
|
+ ve_shortname,
|
|
|
+ </if>
|
|
|
<if test="ve_name != null" >
|
|
|
ve_name,
|
|
|
</if>
|
|
|
@@ -236,13 +221,25 @@
|
|
|
creatorName,
|
|
|
</if>
|
|
|
<if test="ve_remark!=null">
|
|
|
- ve_remark
|
|
|
+ ve_remark,
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyerid!=null">
|
|
|
+ ve_buyerid,
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyercode!=null">
|
|
|
+ ve_buyercode,
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyername!=null">
|
|
|
+ ve_buyername
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="ve_code != null" >
|
|
|
#{ve_code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="ve_shortname !=null">
|
|
|
+ #{ve_shortname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="ve_name != null" >
|
|
|
#{ve_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -330,6 +327,15 @@
|
|
|
<if test="ve_remark != null">
|
|
|
#{ve_remark,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="ve_buyerid != null">
|
|
|
+ #{ve_buyerid,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyercode != null">
|
|
|
+ #{ve_buyercode,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyername != null">
|
|
|
+ #{ve_buyername,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Vendor" >
|
|
|
@@ -338,6 +344,9 @@
|
|
|
<if test="ve_code != null" >
|
|
|
ve_code = #{ve_code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="ve_shortname !=null">
|
|
|
+ ve_shortname = #{ve_shortname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="ve_name != null" >
|
|
|
ve_name = #{ve_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -416,41 +425,18 @@
|
|
|
<if test="ve_remark != null" >
|
|
|
ve_remark = #{ve_remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="ve_buyerid != null" >
|
|
|
+ ve_buyerid = #{ve_buyerid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyercode != null" >
|
|
|
+ ve_buyercode = #{ve_buyercode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_buyername != null" >
|
|
|
+ ve_buyername = #{ve_buyername,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where ve_id = #{id}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Vendor" >
|
|
|
- update vendor
|
|
|
- set ve_code = #{ve_code,jdbcType=VARCHAR},
|
|
|
- ve_name = #{ve_name,jdbcType=VARCHAR},
|
|
|
- ve_uu = #{ve_uu,jdbcType=VARCHAR},
|
|
|
- ve_type = #{ve_type,jdbcType=VARCHAR},
|
|
|
- ve_begindate = #{ve_begindate,jdbcType=TIMESTAMP},
|
|
|
- ve_beginapamount = #{ve_beginapamount,jdbcType=DOUBLE},
|
|
|
- ve_beginprepayamount = #{ve_beginprepayamount,jdbcType=DOUBLE},
|
|
|
- ve_promisedays = #{ve_promisedays,jdbcType=DECIMAL},
|
|
|
- ve_taxrate = #{ve_taxrate,jdbcType=DOUBLE},
|
|
|
- ve_nsrzh = #{ve_nsrzh,jdbcType=VARCHAR},
|
|
|
- ve_bankaccount = #{ve_bankaccount,jdbcType=VARCHAR},
|
|
|
- ve_bankcode = #{ve_bankcode,jdbcType=VARCHAR},
|
|
|
- ve_status = #{ve_status,jdbcType=VARCHAR},
|
|
|
- ve_statuscode = #{ve_statuscode,jdbcType=VARCHAR},
|
|
|
- companyId = #{companyId,jdbcType=DECIMAL},
|
|
|
- updaterId = #{updaterId,jdbcType=DECIMAL},
|
|
|
- updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- ve_text1 = #{ve_text1,jdbcType=VARCHAR},
|
|
|
- ve_text2 = #{ve_text2,jdbcType=VARCHAR},
|
|
|
- ve_text3 = #{ve_text3,jdbcType=VARCHAR},
|
|
|
- ve_text4 = #{ve_text4,jdbcType=VARCHAR},
|
|
|
- ve_text5 = #{ve_text5,jdbcType=VARCHAR},
|
|
|
- ve_payamount = #{ve_payamount,jdbcType=DOUBLE},
|
|
|
- ve_leftamount = #{ve_leftamount,jdbcType=DOUBLE},
|
|
|
- ve_beginym = #{ve_beginym,jdbcType=INTEGER},
|
|
|
- ve_preamount =#{ve_preamount,jdbcType=DOUBLE},
|
|
|
- ve_remark = #{ve_remark,jdbcType=VARCHAR}
|
|
|
- where ve_id = #{id}
|
|
|
- </update>
|
|
|
-
|
|
|
<select id="validateCodeWhenInsert" resultType="int">
|
|
|
select count(*) from VENDOR where VE_CODE = #{code} and companyId =#{companyId}
|
|
|
</select>
|