|
|
@@ -424,7 +424,7 @@
|
|
|
<if test="companyId != null">
|
|
|
and paybalance.companyId = #{companyId}
|
|
|
</if>
|
|
|
- </where> order by pb_date desc
|
|
|
+ </where> order by pb_id
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPaybalanceListByCondition" resultMap="BaseResultMap">
|
|
|
@@ -439,7 +439,7 @@
|
|
|
<if test="companyId != null">
|
|
|
and paybalance.companyId = #{companyId}
|
|
|
</if>
|
|
|
- </where> order by pb_date desc
|
|
|
+ </where> order by pb_id
|
|
|
</select>
|
|
|
|
|
|
<select id="validateCodeWhenInsert" resultType="int">
|
|
|
@@ -449,4 +449,258 @@
|
|
|
select count(1) from paybalance where pb_code = #{code} and pb_id != #{id} and companyId =#{companyId}
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <!-- 银行账户-->
|
|
|
+ <sql id="Bank_Column_List" >
|
|
|
+ bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount,
|
|
|
+ bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid,
|
|
|
+ updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List" >
|
|
|
+ bk_remark
|
|
|
+ </sql>
|
|
|
+ <select id="selectBankInformationByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Bank_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from bankinformation
|
|
|
+ where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.money.po.Bankinformation" extends="BankInformationResultMap" >
|
|
|
+ <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap id="BankInformationResultMap" type="com.usoftchina.saas.money.po.Bankinformation" >
|
|
|
+ <id column="bk_id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="bk_bankcode" property="bk_bankcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_bankname" property="bk_bankname" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_date" property="bk_date" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="bk_type" property="bk_type" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_beginamount" property="bk_beginamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="bk_thisamount" property="bk_thisamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="bk_status" property="bk_status" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_statuscode" property="bk_statuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_recorderid" property="bk_recorderid" jdbcType="INTEGER" />
|
|
|
+ <result column="bk_recorder" property="bk_recorder" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_recorddate" property="bk_recorddate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="bk_ym" property="bk_ym" jdbcType="INTEGER" />
|
|
|
+ <result column="companyid" property="companyId" jdbcType="INTEGER" />
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="bk_text1" property="bk_text1" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text2" property="bk_text2" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
|
|
|
+ <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+ <update id="updateBankByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Bankinformation" >
|
|
|
+ update bankinformation
|
|
|
+ <set >
|
|
|
+ <if test="bk_bankcode != null" >
|
|
|
+ bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_bankname != null" >
|
|
|
+ bk_bankname = #{bk_bankname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_date != null" >
|
|
|
+ bk_date = #{bk_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_type != null" >
|
|
|
+ bk_type = #{bk_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_beginamount != null" >
|
|
|
+ bk_beginamount = #{bk_beginamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_thisamount != null" >
|
|
|
+ bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="bk_status != null" >
|
|
|
+ bk_status = #{bk_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_statuscode != null" >
|
|
|
+ bk_statuscode = #{bk_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorderid != null" >
|
|
|
+ bk_recorderid = #{bk_recorderid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorder != null" >
|
|
|
+ bk_recorder = #{bk_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_recorddate != null" >
|
|
|
+ bk_recorddate = #{bk_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_ym != null" >
|
|
|
+ bk_ym = #{bk_ym,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ companyid = #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text1 != null" >
|
|
|
+ bk_text1 = #{bk_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text2 != null" >
|
|
|
+ bk_text2 = #{bk_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text3 != null" >
|
|
|
+ bk_text3 = #{bk_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text4 != null" >
|
|
|
+ bk_text4 = #{bk_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_text5 != null" >
|
|
|
+ bk_text5 = #{bk_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bk_remark != null" >
|
|
|
+ bk_remark = #{bk_remark,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where bk_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+<!-- 供应商-->
|
|
|
+ <resultMap id="VendorResultMapper" type="com.usoftchina.saas.money.po.Vendor">
|
|
|
+ <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_name" property="ve_name" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_begindate" property="ve_begindate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="ve_beginapamount" property="ve_beginapamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="ve_beginprepayamount" property="ve_beginprepayamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="ve_promisedays" property="ve_promisedays" jdbcType="INTEGER" />
|
|
|
+ <result column="ve_taxrate" property="ve_taxrate" jdbcType="DOUBLE" />
|
|
|
+ <result column="ve_nsrzh" property="ve_nsrzh" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_bankaccount" property="ve_bankaccount" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_bankcode" property="ve_bankcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_statuscode" property="ve_statuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_recordid" property="ve_recordid" jdbcType="INTEGER" />
|
|
|
+ <result column="ve_recordname" property="ve_recordname" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_initdate" property="ve_initdate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
|
|
|
+ <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
|
|
|
+ <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_payamount" property="ve_payamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="ve_leftamount" property="ve_leftamount" jdbcType="DOUBLE" />
|
|
|
+ <result column="ve_beginym" property="ve_beginym" jdbcType="INTEGER" />
|
|
|
+ <result column="ve_preamount" property="ve_preamount" jdbcType="DOUBLE" />
|
|
|
+ </resultMap>
|
|
|
+ <select id="selectVendorByPrimaryKey" resultMap="VendorResultMapper" parameterType="java.lang.Long" >
|
|
|
+ select
|
|
|
+ <include refid="Vendor_Column_List" />
|
|
|
+ from vendor
|
|
|
+ where ve_id = #{id}
|
|
|
+ </select>
|
|
|
+ <sql id="Vendor_Column_List" >
|
|
|
+ ve_id, 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,
|
|
|
+ ve_recordid, ve_recordname, ve_initdate, companyId, updaterId, updateTime, ve_text1,
|
|
|
+ ve_text2, ve_text3, ve_text4, ve_text5, ve_payamount, ve_leftamount, ve_beginym, ve_preamount
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <update id="updateVendorByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Vendor" >
|
|
|
+ update vendor
|
|
|
+ <set >
|
|
|
+ <if test="ve_code != null" >
|
|
|
+ ve_code = #{ve_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_name != null" >
|
|
|
+ ve_name = #{ve_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_uu != null" >
|
|
|
+ ve_uu = #{ve_uu,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_type != null" >
|
|
|
+ ve_type = #{ve_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_begindate != null" >
|
|
|
+ ve_begindate = #{ve_begindate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="ve_beginapamount != null" >
|
|
|
+ ve_beginapamount = #{ve_beginapamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="ve_beginprepayamount != null" >
|
|
|
+ ve_beginprepayamount = #{ve_beginprepayamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="ve_promisedays != null" >
|
|
|
+ ve_promisedays = #{ve_promisedays,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="ve_taxrate != null" >
|
|
|
+ ve_taxrate = #{ve_taxrate,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="ve_nsrzh != null" >
|
|
|
+ ve_nsrzh = #{ve_nsrzh,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_bankaccount != null" >
|
|
|
+ ve_bankaccount = #{ve_bankaccount,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_bankcode != null" >
|
|
|
+ ve_bankcode = #{ve_bankcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_status != null" >
|
|
|
+ ve_status = #{ve_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_statuscode != null" >
|
|
|
+ ve_statuscode = #{ve_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_recordid != null" >
|
|
|
+ ve_recordid = #{ve_recordid,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="ve_recordname != null" >
|
|
|
+ ve_recordname = #{ve_recordname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_initdate != null" >
|
|
|
+ ve_initdate = #{ve_initdate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ companyId = #{companyId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId = #{updaterId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="ve_text1 != null" >
|
|
|
+ ve_text1 = #{ve_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_text2 != null" >
|
|
|
+ ve_text2 = #{ve_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_text3 != null" >
|
|
|
+ ve_text3 = #{ve_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_text4 != null" >
|
|
|
+ ve_text4 = #{ve_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_text5 != null" >
|
|
|
+ ve_text5 = #{ve_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ve_payamount != null" >
|
|
|
+ ve_payamount = #{ve_payamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="ve_leftamount != null" >
|
|
|
+ ve_leftamount = #{ve_leftamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="ve_beginym != null" >
|
|
|
+ ve_beginym = #{ve_beginym,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ve_preamount !=null" >
|
|
|
+ #{ve_preamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where ve_id = #{id}
|
|
|
+ </update>
|
|
|
</mapper>
|