Commit 9583de33 by huluobin

# update

parent 616d13be
......@@ -11,10 +11,10 @@
<select id="selectAll" resultMap="cost">
SELECT
t1.*,
# ifnull(ct.type_no,0) type_no,
# ifnull(ct.type_name,'待补充') type_name,
# ifnull(ast.subject_no,0) accounting_subject_no,
# ifnull(ast.name,'待补充') accounting_subject_name,
# ifnull(ct.type_no,0) type_no,
# ifnull(ct.type_name,'待补充') type_name,
# ifnull(ast.subject_no,0) accounting_subject_no,
# ifnull(ast.name,'待补充') accounting_subject_name,
group_concat(distinct t2.username) as cost_current_reviewer
from cost t1
left join cost_current_reviewer t2 on t1.cost_no = t2.cost_no
......@@ -55,10 +55,10 @@
<select id="selectByKeys" resultType="com.blt.other.module.cost.model.CostDomain">
SELECT
t1.*,
# ifnull(ct.type_no,0) type_no,
# ifnull(ct.type_name,'待补充') type_name,
# ifnull(ast.subject_no,0) accounting_subject_no,
# ifnull(ast.name,'待补充') accounting_subject_name,
# ifnull(ct.type_no,0) type_no,
# ifnull(ct.type_name,'待补充') type_name,
# ifnull(ast.subject_no,0) accounting_subject_no,
# ifnull(ast.name,'待补充') accounting_subject_name,
group_concat(distinct t2.username) as cost_current_reviewer
from cost t1
left join cost_current_reviewer t2 on t1.cost_no = t2.cost_no
......@@ -186,6 +186,7 @@
</select>
<sql id="checkCostListSearch">
<if test="req.costNo !=null and req.costNo !=''">and t1.cost_no like concat('%',#{req.costNo},'%')</if>
<if test="req.companyNo!=null and req.companyNo!='' ">and t1.company_no = #{req.companyNo}</if>
<if test="req.costForm!=null">and t1.cost_form = #{req.costForm}</if>
<if test="req.isLend!=null">and t1.is_lend = #{req.isLend}</if>
......@@ -205,9 +206,6 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
<if test="req.costNo !=null and req.costNo !=''">
and (t1.bank_card_user like concat('%',#{req.bankCardUser},'%') or t1.cost_no like concat('%',#{req.costNo},'%'))
</if>
<include refid="checkCostListSearch"/>
</select>
......@@ -224,9 +222,6 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
<if test="req.costNo !=null and req.costNo !=''">
and (t1.bank_card_user like concat('%',#{req.bankCardUser},'%') or t1.cost_no like concat('%',#{req.costNo},'%'))
</if>
<include refid="checkCostListSearch"/>
</select>
......@@ -238,9 +233,6 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
<if test="req.costNo !=null and req.costNo !=''">
and (t1.bank_card_user like concat('%',#{req.bankCardUser},'%') or t1.cost_no like concat('%',#{req.costNo},'%'))
</if>
<include refid="checkCostListSearch"/>
</select>
......@@ -253,9 +245,6 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
<if test="req.costNo !=null and req.costNo !=''">
and (t1.bank_card_user like concat('%',#{req.bankCardUser},'%') or t1.cost_no like concat('%',#{req.costNo},'%'))
</if>
<include refid="checkCostListSearch"/>
</select>
......@@ -266,9 +255,6 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status in (7,9)
and t3.id is not null
<if test="req.costNo !=null and req.costNo !=''">
and (t1.bank_card_user like concat('%',#{req.bankCardUser},'%') or t1.cost_no like concat('%',#{req.costNo},'%'))
</if>
<include refid="checkCostListSearch"/>
group by t1.id
</select>
......@@ -280,9 +266,6 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 9
and t3.id is not null
<if test="req.costNo !=null and req.costNo !=''">
and (t1.bank_card_user like concat('%',#{req.bankCardUser},'%') or t1.cost_no like concat('%',#{req.costNo},'%'))
</if>
<include refid="checkCostListSearch"/>
</select>
......@@ -296,15 +279,9 @@
<select id="queryPage" resultType="com.blt.other.module.cost.model.CostDomain">
SELECT
t1.*,
# ifnull(ct.type_no,0) type_no,
# ifnull(ct.type_name,'待补充') type_name,
# ifnull(ast.subject_no,0) accounting_subject_no,
# ifnull(ast.name,'待补充') accounting_subject_name,
group_concat(distinct t2.username) as cost_current_reviewer
from cost t1
left join cost_current_reviewer t2 on t1.cost_no = t2.cost_no
# left join cost_type ct on t1.type_id = ct.id
# left join accounting_subject ast on ct.accounting_subject_id = ast.id
WHERE
true
<if test=" req.typeName!=null and req.typeName != ''">and t1.type_name= #{req.typeName}</if>
......
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