|
@@ -1,5 +1,84 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.ReveExpeInfoMapper">
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.ReveExpeInfoMapper">
|
|
|
|
+ <!-- 获得列表总数 -->
|
|
|
|
+ <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(id)
|
|
|
|
+ FROM reve_expe_info
|
|
|
|
+ WHERE
|
|
|
|
+ comp_id = #{compId}
|
|
|
|
+ and delete_flag = '0'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND reex_type_key = '1'
|
|
|
|
+ OR reex_type_key = '3'
|
|
|
|
+ OR reex_type_key = '5'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND reex_type_key = '2'
|
|
|
|
+ OR reex_type_key = '4'
|
|
|
|
+ OR reex_type_key = '6'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null">
|
|
|
|
+ AND (DATE_FORMAT(create_date,"%Y%m%d") >=
|
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate != null">
|
|
|
|
+ AND (DATE_FORMAT(create_date,"%Y%m%d") <=
|
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(expense_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(expense_remarks) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
+ </select>
|
|
|
|
+ <!-- 获得收支明细列表 -->
|
|
|
|
+ <select id="getListByCondition" parameterType="Map"
|
|
|
|
+ resultType="com.yh.saas.plugin.yiliangyiyun.entity.ReveExpeInfo">
|
|
|
|
+ SELECT
|
|
|
|
+ id,
|
|
|
|
+ comp_id as compId,
|
|
|
|
+ reex_type as reexType,
|
|
|
|
+ reex_type_key as reexTypeKey,
|
|
|
|
+ amount_money as amountMoney,
|
|
|
|
+ expense_name as expenseName,
|
|
|
|
+ expense_remarks as expenseRemarks,
|
|
|
|
+ gross_profit as grossProfit,
|
|
|
|
+ create_date as createDate
|
|
|
|
+ FROM reve_expe_info
|
|
|
|
+ WHERE
|
|
|
|
+ comp_id = #{compId}
|
|
|
|
+ and delete_flag = '0'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND reex_type_key = '1'
|
|
|
|
+ OR reex_type_key = '3'
|
|
|
|
+ OR reex_type_key = '5'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND reex_type_key = '2'
|
|
|
|
+ OR reex_type_key = '4'
|
|
|
|
+ OR reex_type_key = '6'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null">
|
|
|
|
+ AND (DATE_FORMAT(create_date,"%Y%m%d") >=
|
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate != null">
|
|
|
|
+ AND (DATE_FORMAT(create_date,"%Y%m%d") <=
|
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(expense_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(expense_remarks) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY create_date DESC
|
|
|
|
+ <if test="currentPage != null and currentPage != ''">
|
|
|
|
+ LIMIT ${startRecord}, ${pageSize}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|