Commit bf1f053d by huluobin

update

parent 3b5a86d4
...@@ -4,63 +4,67 @@ ...@@ -4,63 +4,67 @@
<mapper namespace="com.blt.other.module.cost.dao.CostListSearchDao"> <mapper namespace="com.blt.other.module.cost.dao.CostListSearchDao">
<select id="selectByKey" resultType="com.blt.other.module.cost.model.CostDomain"> <select id="selectByKey" resultType="com.blt.other.module.cost.model.CostDomain">
SELECT SELECT
* t1.*,
group_concat(distinct t2.username) as cost_current_reviewer
FROM FROM
cost cost t1
left join cost_current_reviewer t2 on t1.cost_no = t2.cost_no
WHERE false WHERE false
<foreach collection="keys" item="key" index="index"> <foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' "> <if test="key != null and key != '' ">
or cost_plan_no = #{key} or t1.cost_plan_no = #{key}
</if> </if>
</foreach> </foreach>
<foreach collection="keys" item="key" index="index"> <foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' "> <if test="key != null and key != '' ">
or cost_no LIKE CONCAT('%',#{key},'%') or t1.cost_no LIKE CONCAT('%',#{key},'%')
</if> </if>
</foreach> </foreach>
<foreach collection="keys" item="key" index="index"> <foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' "> <if test="key != null and key != '' ">
or type_name LIKE CONCAT('%',#{key},'%') or t1.type_name LIKE CONCAT('%',#{key},'%')
</if> </if>
</foreach> </foreach>
<foreach collection="keys" item="key" index="index"> <foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' "> <if test="key != null and key != '' ">
or company_name LIKE CONCAT('%',#{key},'%') or t1.company_name LIKE CONCAT('%',#{key},'%')
</if> </if>
</foreach> </foreach>
<foreach collection="keys" item="key" index="index"> <foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' "> <if test="key != null and key != '' ">
or bank_card_user LIKE CONCAT('%',#{key},'%') or t1.bank_card_user LIKE CONCAT('%',#{key},'%')
</if> </if>
</foreach> </foreach>
</select> </select>
<select id="selectByKeys" resultType="com.blt.other.module.cost.model.CostDomain"> <select id="selectByKeys" resultType="com.blt.other.module.cost.model.CostDomain">
SELECT SELECT
* t1.*,
group_concat(distinct t2.username) as cost_current_reviewer
FROM FROM
cost cost t1
left join cost_current_reviewer t2 on t1.cost_no = t2.cost_no
WHERE WHERE
id >= 0 t1.id >= 0
<if test=" params.keys.costForm!=null and params.keys.costForm != ''">and cost_form= #{params.keys.costForm}</if> <if test=" params.keys.costForm!=null and params.keys.costForm != ''">and t1.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.companyNo!=null and params.keys.companyNo != ''">and t1.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.createUsercode!=null and params.keys.createUsercode != ''">and t1.create_usercode=#{params.keys.createUsercode}</if>
<if test=" params.keys.costStatus!=null and params.keys.costStatus != '' and params.keys.costStatus != 10">and cost_status=#{params.keys.costStatus}</if> <if test=" params.keys.costStatus!=null and params.keys.costStatus != '' and params.keys.costStatus != 10">and t1.cost_status=#{params.keys.costStatus}</if>
<if test=" params.keys.costStatus!=null and params.keys.costStatus != '' and params.keys.costStatus == 10">and cost_status=0</if> <if test=" params.keys.costStatus!=null and params.keys.costStatus != '' and params.keys.costStatus == 10">and t1.cost_status=0</if>
<if test=" params.keys.lendStatus!=null and params.keys.lendStatus != ''">and lend_status=#{params.keys.lendStatus}</if> <if test=" params.keys.lendStatus!=null and params.keys.lendStatus != ''">and t1.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 == 0">and t1.is_tax=0</if>
<if test=" params.keys.isTax!=null and params.keys.isTax == 1">and is_tax=1</if> <if test=" params.keys.isTax!=null and params.keys.isTax == 1">and t1.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 == 1">and t1.is_lend=1</if>
<if test=" params.keys.isLend!=null and params.keys.isLend == 2">and is_lend=2</if> <if test=" params.keys.isLend!=null and params.keys.isLend == 2">and t1.is_lend=2</if>
<if test=" params.keys.beginTime != null">AND create_time <![CDATA[>=]]> #{params.keys.beginTime}</if> <if test=" params.keys.beginTime != null">AND t1.create_time <![CDATA[>=]]> #{params.keys.beginTime}</if>
<if test=" params.keys.endTime != null">AND create_time <![CDATA[<=]]>#{params.keys.endTime}</if> <if test=" params.keys.endTime != null">AND t1.create_time <![CDATA[<=]]>#{params.keys.endTime}</if>
<if test=" params.keys.beginPayTime != null">AND pay_time <![CDATA[>=]]> #{params.keys.beginPayTime}</if> <if test=" params.keys.beginPayTime != null">AND t1.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.endPayTime != null">AND t1.pay_time <![CDATA[<=]]>#{params.keys.endPayTime}</if>
<if test=" params.keys.linkCost!=null and params.keys.linkCost != ''">and sup_cost_no=#{params.keys.linkCost}</if> <if test=" params.keys.linkCost!=null and params.keys.linkCost != ''">and t1.sup_cost_no=#{params.keys.linkCost}</if>
<if test=" params.keys.projectTypes!=null and params.keys.projectTypes != ''">and project_type=#{params.keys.projectTypes}</if> <if test=" params.keys.projectTypes!=null and params.keys.projectTypes != ''">and t1.project_type=#{params.keys.projectTypes}</if>
ORDER BY ORDER BY
id DESC t1.id DESC
</select> </select>
<select id="selectLinkList" resultType="com.blt.other.module.cost.model.CostDomain"> <select id="selectLinkList" resultType="com.blt.other.module.cost.model.CostDomain">
......
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