Commit 24cdb1fb by huluobin

财务审核状态过滤

parent 5bccf8cf
......@@ -3,89 +3,92 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.blt.other.module.cost.dao.CostCheckSearchDao">
<select id="selectAll" resultType="com.blt.other.module.database.model.CostDomain">
SELECT
*
FROM
cost
WHERE
cost_status > 0
AND FIND_IN_SET(company_value, #{authority})
ORDER BY
id DESC
SELECT *
FROM cost
WHERE cost_status = 1
AND FIND_IN_SET(company_value, #{authority})
ORDER BY id DESC
</select>
<select id="findAuthorityByUserid" resultType="java.lang.String">
select authority from user where userid = #{userid} or useridsso = #{userid}
select authority
from user
where userid = #{userid}
or useridsso = #{userid}
</select>
<select id="selectByKey" resultType="com.blt.other.module.database.model.CostDomain">
SELECT *
FROM cost
WHERE cost_status > 0
AND (
cost_plan_no = #{key}
OR
cost_no LIKE CONCAT('%', #{key}, '%')
OR
create_username LIKE CONCAT('%', #{key}, '%')
OR
type_name LIKE CONCAT('%', #{key}, '%')
OR
kind_name LIKE CONCAT('%', #{key}, '%')
OR
company_name LIKE CONCAT('%', #{key}, '%')
)
and FIND_IN_SET(company_value, #{authority})
ORDER BY id DESC
</select>
<select id="selectByKeys" resultType="com.blt.other.module.database.model.CostDomain">
SELECT
*
FROM
cost
WHERE
cost_status > 0
AND(
cost_plan_no = #{key}
OR
cost_no LIKE CONCAT('%',#{key},'%')
OR
create_username LIKE CONCAT('%',#{key},'%')
OR
type_name LIKE CONCAT('%',#{key},'%')
OR
kind_name LIKE CONCAT('%',#{key},'%')
OR
company_name LIKE CONCAT('%',#{key},'%')
)
and FIND_IN_SET(company_value, #{authority})
ORDER BY
id >= 0
<if test=" params.keys.costForm!=null and params.keys.costForm != ''">and cost_form= #{params.keys.costForm}
</if>
<if test=" params.keys.companyNo!=null and params.keys.companyNo != ''">and
company_no=#{params.keys.companyNo}
</if>
<if test=" params.keys.createUsercode!=null and params.keys.createUsercode != ''">and
create_usercode=#{params.keys.createUsercode}
</if>
<if test=" params.keys.kindNo!=null and params.keys.kindNo != ''">and kind_no=#{params.keys.kindNo}</if>
<if test=" params.keys.costStatus!=null and params.keys.costStatus != ''">and
cost_status=#{params.keys.costStatus}
</if>
<if test=" params.keys.lendStatus!=null and params.keys.lendStatus != ''">and
lend_status=#{params.keys.lendStatus}
</if>
<if test=" params.keys.isTax!=null and params.keys.isTax == 0">and is_tax=0</if>
<if test=" params.keys.isTax!=null and params.keys.isTax == 1">and is_tax=1</if>
<if test=" params.keys.isLend!=null and params.keys.isLend == 1">and is_lend=1</if>
<if test=" params.keys.isLend!=null and params.keys.isLend == 2">and is_lend=2</if>
<if test=" params.keys.beginPayTime != null">and pay_time <![CDATA[>=]]> #{params.keys.beginPayTime}</if>
<if test=" params.keys.endPayTime != null">and pay_time <![CDATA[<=]]>#{params.keys.endPayTime}</if>
<if test=" params.keys.logisticsSupplierId != null">and logistics_supplier_id =
#{params.keys.logisticsSupplierId}
</if>
<if test=" params.keys.subLogisticsSupplierId != null">and sub_logistics_supplier_id =
#{params.keys.subLogisticsSupplierId}
</if>
<if test=" params.keys.linkCost!=null and params.keys.linkCost != ''">and sup_cost_no=#{params.keys.linkCost}
</if>
<if test=" params.keys.authority != null">and FIND_IN_SET(company_value, #{params.keys.authority})</if>
ORDER BY
id DESC
</select>
<select id="selectByKeys" resultType="com.blt.other.module.database.model.CostDomain">
SELECT
*
FROM
cost
WHERE
id >= 0
<if test=" params.keys.costForm!=null and params.keys.costForm != ''">and cost_form= #{params.keys.costForm}</if>
<if test=" params.keys.companyNo!=null and params.keys.companyNo != ''">and company_no=#{params.keys.companyNo}</if>
<if test=" params.keys.createUsercode!=null and params.keys.createUsercode != ''">and create_usercode=#{params.keys.createUsercode}</if>
<if test=" params.keys.kindNo!=null and params.keys.kindNo != ''">and kind_no=#{params.keys.kindNo}</if>
<if test=" params.keys.costStatus!=null and params.keys.costStatus != ''">and cost_status=#{params.keys.costStatus}</if>
<if test=" params.keys.lendStatus!=null and params.keys.lendStatus != ''">and lend_status=#{params.keys.lendStatus}</if>
<if test=" params.keys.isTax!=null and params.keys.isTax == 0">and is_tax=0</if>
<if test=" params.keys.isTax!=null and params.keys.isTax == 1">and is_tax=1</if>
<if test=" params.keys.isLend!=null and params.keys.isLend == 1">and is_lend=1</if>
<if test=" params.keys.isLend!=null and params.keys.isLend == 2">and is_lend=2</if>
<if test=" params.keys.beginPayTime != null">and pay_time <![CDATA[>=]]> #{params.keys.beginPayTime}</if>
<if test=" params.keys.endPayTime != null">and pay_time <![CDATA[<=]]>#{params.keys.endPayTime}</if>
<if test=" params.keys.logisticsSupplierId != null">and logistics_supplier_id = #{params.keys.logisticsSupplierId}</if>
<if test=" params.keys.subLogisticsSupplierId != null">and sub_logistics_supplier_id = #{params.keys.subLogisticsSupplierId}</if>
<if test=" params.keys.linkCost!=null and params.keys.linkCost != ''">and sup_cost_no=#{params.keys.linkCost}</if>
<if test=" params.keys.authority != null">and FIND_IN_SET(company_value, #{params.keys.authority})</if>
ORDER BY
id DESC
</select>
<select id="selectLinkList" resultType="com.blt.other.module.database.model.CostDomain">
SELECT
*
FROM
cost
WHERE
cost_status = 4
AND
cost_form = 3
AND
is_lend = 1
SELECT *
FROM cost
WHERE cost_status = 4
AND cost_form = 3
AND is_lend = 1
-- AND
-- lend_status != 3
-- AND
-- lend_status != 4
ORDER BY
id DESC
ORDER BY id DESC
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment