Commit 24cdb1fb by huluobin

财务审核状态过滤

parent 5bccf8cf
...@@ -3,89 +3,92 @@ ...@@ -3,89 +3,92 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" > "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.blt.other.module.cost.dao.CostCheckSearchDao"> <mapper namespace="com.blt.other.module.cost.dao.CostCheckSearchDao">
<select id="selectAll" resultType="com.blt.other.module.database.model.CostDomain"> <select id="selectAll" resultType="com.blt.other.module.database.model.CostDomain">
SELECT SELECT *
* FROM cost
FROM WHERE cost_status = 1
cost AND FIND_IN_SET(company_value, #{authority})
WHERE ORDER BY id DESC
cost_status > 0
AND FIND_IN_SET(company_value, #{authority})
ORDER BY
id DESC
</select> </select>
<select id="findAuthorityByUserid" resultType="java.lang.String"> <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>
<select id="selectByKey" resultType="com.blt.other.module.database.model.CostDomain"> <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 SELECT
* *
FROM FROM
cost cost
WHERE WHERE
cost_status > 0 id >= 0
AND( <if test=" params.keys.costForm!=null and params.keys.costForm != ''">and cost_form= #{params.keys.costForm}
cost_plan_no = #{key} </if>
OR <if test=" params.keys.companyNo!=null and params.keys.companyNo != ''">and
cost_no LIKE CONCAT('%',#{key},'%') company_no=#{params.keys.companyNo}
OR </if>
create_username LIKE CONCAT('%',#{key},'%') <if test=" params.keys.createUsercode!=null and params.keys.createUsercode != ''">and
OR create_usercode=#{params.keys.createUsercode}
type_name LIKE CONCAT('%',#{key},'%') </if>
OR <if test=" params.keys.kindNo!=null and params.keys.kindNo != ''">and kind_no=#{params.keys.kindNo}</if>
kind_name LIKE CONCAT('%',#{key},'%') <if test=" params.keys.costStatus!=null and params.keys.costStatus != ''">and
OR cost_status=#{params.keys.costStatus}
company_name LIKE CONCAT('%',#{key},'%') </if>
) <if test=" params.keys.lendStatus!=null and params.keys.lendStatus != ''">and
and FIND_IN_SET(company_value, #{authority}) lend_status=#{params.keys.lendStatus}
ORDER BY </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 id DESC
</select> </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 id="selectLinkList" resultType="com.blt.other.module.database.model.CostDomain">
SELECT SELECT *
* FROM cost
FROM WHERE cost_status = 4
cost AND cost_form = 3
WHERE AND is_lend = 1
cost_status = 4
AND
cost_form = 3
AND
is_lend = 1
-- AND -- AND
-- lend_status != 3 -- lend_status != 3
-- AND -- AND
-- lend_status != 4 -- lend_status != 4
ORDER BY ORDER BY id DESC
id DESC
</select> </select>
</mapper> </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