|
@@ -72,7 +72,8 @@
|
|
|
AND (lower(expense_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(agent) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(warehouse_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
+ OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(cost_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
</if>
|
|
|
<if test="number != null and number != ''">
|
|
|
AND (lower(cost_no) like lower(CONCAT('%',#{number},'%')))
|
|
@@ -84,14 +85,25 @@
|
|
|
AND (lower(contract_no) like lower(CONCAT('%',#{flowTo},'%'))
|
|
|
OR lower(warehouse_name) like lower(CONCAT('%',#{flowTo},'%')))
|
|
|
</if>
|
|
|
+ <if test="flowFlag != null and flowFlag != ''">
|
|
|
+ <if test="flowFlag == 1">
|
|
|
+ AND expenses_purpose = '5'
|
|
|
+ OR expenses_purpose = '7'
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<if test="expenseName != null and expenseName != ''">
|
|
|
AND (lower(expense_name) like lower(CONCAT('%',#{expenseName},'%')))
|
|
|
</if>
|
|
|
<if test="agent != null and agent != ''">
|
|
|
AND (lower(agent) like lower(CONCAT('%',#{agent},'%')))
|
|
|
</if>
|
|
|
- <if test="unallocatedAmount != null">
|
|
|
- AND unallocated_amount= #{unallocatedAmount}
|
|
|
+<!-- <if test="unallocatedAmount != null">-->
|
|
|
+<!-- AND unallocated_amount= #{unallocatedAmount}-->
|
|
|
+<!-- </if>-->
|
|
|
+ <if test="unallocatedAmount != null and unallocatedAmount != ''">
|
|
|
+ <if test="unallocatedAmount == 1">
|
|
|
+ AND unallocated_amount > 0
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="numberList != null and numberList.size > 0">
|
|
|
and(
|
|
@@ -241,7 +253,8 @@
|
|
|
AND (lower(expense_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(agent) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(warehouse_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
- OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
+ OR lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
+ OR lower(cost_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
</if>
|
|
|
<if test="number != null and number != ''">
|
|
|
AND (lower(cost_no) like lower(CONCAT('%',#{number},'%')))
|
|
@@ -253,14 +266,25 @@
|
|
|
AND (lower(contract_no) like lower(CONCAT('%',#{flowTo},'%'))
|
|
|
OR lower(warehouse_name) like lower(CONCAT('%',#{flowTo},'%')))
|
|
|
</if>
|
|
|
+ <if test="flowFlag != null and flowFlag != ''">
|
|
|
+ <if test="flowFlag == 1">
|
|
|
+ AND expenses_purpose = '5'
|
|
|
+ OR expenses_purpose = '7'
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<if test="expenseName != null and expenseName != ''">
|
|
|
AND (lower(expense_name) like lower(CONCAT('%',#{expenseName},'%')))
|
|
|
</if>
|
|
|
<if test="agent != null and agent != ''">
|
|
|
AND (lower(agent) like lower(CONCAT('%',#{agent},'%')))
|
|
|
</if>
|
|
|
- <if test="unallocatedAmount != null">
|
|
|
- AND unallocated_amount= #{unallocatedAmount}
|
|
|
+<!-- <if test="unallocatedAmount != null">-->
|
|
|
+<!-- AND unallocated_amount= #{unallocatedAmount}-->
|
|
|
+<!-- </if>-->
|
|
|
+ <if test="unallocatedAmount != null and unallocatedAmount != ''">
|
|
|
+ <if test="unallocatedAmount == 1">
|
|
|
+ AND unallocated_amount > 0
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="numberList != null and numberList.size > 0">
|
|
|
and(
|
|
@@ -491,6 +515,62 @@
|
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
|
</if>
|
|
|
</select>
|
|
|
+<!-- <!–查询备用金列表总数–>-->
|
|
|
+<!-- <select id="getPettyCashCountByCondition" parameterType="Map" resultType="java.lang.Integer">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- COUNT(ei.id)-->
|
|
|
+<!-- FROM expense_info ei-->
|
|
|
+<!-- cmi.delete_flag='0'-->
|
|
|
+<!-- WHERE-->
|
|
|
+<!-- ei.delete_flag = '0'-->
|
|
|
+<!-- and ei.expenses_purpose='7'-->
|
|
|
+<!-- <if test="searchType != null and searchType != ''">-->
|
|
|
+<!-- <if test="searchType == 1">-->
|
|
|
+<!-- AND ei.expenses_type = '1'-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="searchType == 2">-->
|
|
|
+<!-- AND ei.expenses_type = '2'-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="searchKeyWord != null and searchKeyWord != ''">-->
|
|
|
+<!-- AND (lower(cmi.seller) like lower(CONCAT('%',#{searchKeyWord},'%'))-->
|
|
|
+<!-- OR lower(cmi.seller) like lower(CONCAT('%',#{searchKeyWord},'%')))-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- </select>-->
|
|
|
+<!-- <!–查询备用金列表–>-->
|
|
|
+<!-- <select id="getPettyCashListByCondition" parameterType="Map"-->
|
|
|
+<!-- resultType="com.yh.saas.plugin.yiliangyiyun.entity.ExpenseInfo">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- ei.id,-->
|
|
|
+<!-- ei.expenses_type as expensesType,-->
|
|
|
+<!-- ei.contract_no as contractNo,-->
|
|
|
+<!-- ei.amount_money as amountMoney,-->
|
|
|
+<!-- ei.expense_name as expenseName,-->
|
|
|
+<!-- ei.create_user_id as createUserId,-->
|
|
|
+<!-- ei.address_url as addressUrl,-->
|
|
|
+<!-- ei.create_date as createDate-->
|
|
|
+<!-- FROM expense_info ei-->
|
|
|
+<!-- WHERE-->
|
|
|
+<!-- ei.delete_flag = '0'-->
|
|
|
+<!-- and ei.expenses_purpose='7'-->
|
|
|
+<!-- and ei.status!='待确认'-->
|
|
|
+<!-- <if test="searchType != null and searchType != ''">-->
|
|
|
+<!-- <if test="searchType == 1">-->
|
|
|
+<!-- AND ei.expenses_type = '1'-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="searchType == 2">-->
|
|
|
+<!-- AND ei.expenses_type = '2'-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="searchKeyWord != null and searchKeyWord != ''">-->
|
|
|
+<!-- AND (lower(cmi.seller) like lower(CONCAT('%',#{searchKeyWord},'%'))-->
|
|
|
+<!-- OR lower(cmi.seller) like lower(CONCAT('%',#{searchKeyWord},'%')))-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- ORDER BY ei.update_date DESC-->
|
|
|
+<!-- <if test="currentPage != null and currentPage != ''">-->
|
|
|
+<!-- LIMIT ${startRecord}, ${pageSize}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- </select>-->
|
|
|
|
|
|
<select id="getRequestRecordCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
SELECT
|