|
|
@@ -126,7 +126,7 @@
|
|
|
<if test="companyId != null">
|
|
|
and recbalance.companyId = #{companyId}
|
|
|
</if>
|
|
|
- </where> order by rb_id
|
|
|
+ </where> order by rb_date desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectRecbalanceListByCondition" resultMap="BaseResultMap">
|
|
|
@@ -141,7 +141,7 @@
|
|
|
<if test="companyId != null">
|
|
|
and recbalance.companyId = #{companyId}
|
|
|
</if>
|
|
|
- </where> order by rb_id
|
|
|
+ </where> order by rb_date desc
|
|
|
</select>
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
@@ -582,4 +582,257 @@
|
|
|
select count(1) from recbalance where rb_code = #{code} and rb_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="CustomerResultMap" type="com.usoftchina.saas.money.po.Customer">
|
|
|
+ <id column="cu_id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="cu_code" jdbcType="VARCHAR" property="cu_code" />
|
|
|
+ <result column="cu_name" jdbcType="VARCHAR" property="cu_name" />
|
|
|
+ <result column="cu_uu" jdbcType="VARCHAR" property="cu_uu" />
|
|
|
+ <result column="cu_type" jdbcType="VARCHAR" property="cu_type" />
|
|
|
+ <result column="cu_begindate" jdbcType="TIMESTAMP" property="cu_begindate" />
|
|
|
+ <result column="cu_beginaramount" jdbcType="DOUBLE" property="cu_beginaramount" />
|
|
|
+ <result column="cu_beginprerecamount" jdbcType="DOUBLE" property="cu_beginprerecamount" />
|
|
|
+ <result column="cu_promisedays" jdbcType="DOUBLE" property="cu_promisedays" />
|
|
|
+ <result column="cu_taxrate" jdbcType="DOUBLE" property="cu_taxrate" />
|
|
|
+ <result column="cu_sellerid" jdbcType="INTEGER" property="cu_sellerid" />
|
|
|
+ <result column="cu_sellercode" jdbcType="VARCHAR" property="cu_sellercode" />
|
|
|
+ <result column="cu_sellername" jdbcType="VARCHAR" property="cu_sellername" />
|
|
|
+ <result column="cu_credit" jdbcType="DOUBLE" property="cu_credit" />
|
|
|
+ <result column="cu_status" jdbcType="VARCHAR" property="cu_status" />
|
|
|
+ <result column="cu_statuscode" jdbcType="VARCHAR" property="cu_statuscode" />
|
|
|
+ <result column="cu_recordmanid" jdbcType="INTEGER" property="cu_recordmanid" />
|
|
|
+ <result column="cu_recordman" jdbcType="VARCHAR" property="cu_recordman" />
|
|
|
+ <result column="cu_recorddate" jdbcType="TIMESTAMP" property="cu_recorddate" />
|
|
|
+ <result column="companyid" jdbcType="INTEGER" property="companyId" />
|
|
|
+ <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
|
|
|
+ <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="cu_text1" jdbcType="VARCHAR" property="cu_text1" />
|
|
|
+ <result column="cu_text2" jdbcType="VARCHAR" property="cu_text2" />
|
|
|
+ <result column="cu_text3" jdbcType="VARCHAR" property="cu_text3" />
|
|
|
+ <result column="cu_text4" jdbcType="VARCHAR" property="cu_text4" />
|
|
|
+ <result column="cu_text5" jdbcType="VARCHAR" property="cu_text5" />
|
|
|
+ <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
|
|
|
+ <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Customer_Column_List">
|
|
|
+ cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount,
|
|
|
+ cu_promisedays, cu_taxrate, cu_sellerid, cu_sellercode, cu_sellername, cu_credit,
|
|
|
+ cu_status, cu_statuscode, cu_recordmanid, cu_recordman, cu_recorddate, companyid,
|
|
|
+ updaterid, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount,
|
|
|
+ cu_recamount,cu_preamount
|
|
|
+ </sql>
|
|
|
+ <select id="selectCustomerByPrimaryKey" parameterType="java.lang.Long" resultMap="CustomerResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Customer_Column_List" />
|
|
|
+ from customer
|
|
|
+ where cu_id = #{cu_id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateCustomerByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Customer">
|
|
|
+ update customer
|
|
|
+ <set>
|
|
|
+ <if test="cu_code != null">
|
|
|
+ cu_code = #{cu_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_name != null">
|
|
|
+ cu_name = #{cu_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_uu != null">
|
|
|
+ cu_uu = #{cu_uu,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_type != null">
|
|
|
+ cu_type = #{cu_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_begindate != null">
|
|
|
+ cu_begindate = #{cu_begindate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="cu_beginaramount != null">
|
|
|
+ cu_beginaramount = #{cu_beginaramount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_beginprerecamount != null">
|
|
|
+ cu_beginprerecamount = #{cu_beginprerecamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_promisedays != null">
|
|
|
+ cu_promisedays = #{cu_promisedays,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_taxrate != null">
|
|
|
+ cu_taxrate = #{cu_taxrate,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_sellerid != null">
|
|
|
+ cu_sellerid = #{cu_sellerid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="cu_sellercode != null">
|
|
|
+ cu_sellercode = #{cu_sellercode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_sellername != null">
|
|
|
+ cu_sellername = #{cu_sellername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_credit != null">
|
|
|
+ cu_credit = #{cu_credit,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_status != null">
|
|
|
+ cu_status = #{cu_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_statuscode != null">
|
|
|
+ cu_statuscode = #{cu_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_recordmanid != null">
|
|
|
+ cu_recordmanid = #{cu_recordmanid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="cu_recordman != null">
|
|
|
+ cu_recordman = #{cu_recordman,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_recorddate != null">
|
|
|
+ cu_recorddate = #{cu_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ </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="cu_text1 != null">
|
|
|
+ cu_text1 = #{cu_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_text2 != null">
|
|
|
+ cu_text2 = #{cu_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_text3 != null">
|
|
|
+ cu_text3 = #{cu_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_text4 != null">
|
|
|
+ cu_text4 = #{cu_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_text5 != null">
|
|
|
+ cu_text5 = #{cu_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cu_leftamount != null">
|
|
|
+ cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_recamount != null">
|
|
|
+ cu_recamount = #{cu_recamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="cu_preamount != null">
|
|
|
+ cu_preamount = #{cu_preamount,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where cu_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
</mapper>
|