Commit fb35818a authored by huyuchen's avatar huyuchen

优化修改

parent 1fbd0173
......@@ -48,101 +48,106 @@
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSettleStatusBySettleNo" resultMap="BaseResultStatusMap">
select
<include refid="Base_Column_List_Status"></include>
b.detailsId,
if(b.earningStatus = '已结算','0',if(b.earningStatus = '结算中','1',if(b.earningStatus = '无需结算','3','2'))),
if(b.receiptStatus = '已收','0',if(b.receiptStatus = '垫付','2','1')),
if(b.zhichuEarningStatus = '已结算','0',if(b.zhichuEarningStatus = '结算中','1',if(b.zhichuEarningStatus = '无需结算','3','2'))),
if(b.payStatus = '已付','0','1'),
orderType
from
ekp.view_insurance_info
ekp.view_insurance_info b
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
and b.earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
and b.zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取社保视图信息 -->
<select id="selectSocialViewStatusBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus,
orderType
a.detailsId,
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))),
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1')),
if(a.zhichuEarningStatus = '已结算','0',if(a.zhichuEarningStatus = '结算中','1','2')),
if(a.payStatus = '已付','0','1'),
a.orderType
from
ekp.view_social_info
ekp.view_social_info a
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
and a.earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
and a.zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取公积金视图信息 -->
<select id="selectFundViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus
a.detailsId,
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))),
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1')),
if(a.zhichuEarningStatus = '已结算','0',if(a.zhichuEarningStatus = '结算中','1','2')),
if(a.payStatus = '已付','0','1')
from
ekp.view_funds_info
ekp.view_funds_info a
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
and a.earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
and a.zhichuEarningNo = #{settleNo}
</if>
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectFIncomelViewBySettleNo" resultMap="BaseResultStatusMap">
select
detailsId,
earningStatus,
receiptStatus
a.detailsId,
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))),
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1'))
from
ekp.view_riskfund_info
ekp.view_riskfund_info a
where
earningNo = #{settleNo}
a.earningNo = #{settleNo}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectIncomeViewBySettleNo" resultMap="BaseResultStatusMap">
select
detailsId,
earningStatus,
receiptStatus
a.detailsId,
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))),
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1'))
from
ekp.view_management_info
ekp.view_management_info a
where
earningNo = #{settleNo}
a.earningNo = #{settleNo}
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSalarylViewBySettleNo" resultMap="BaseResultSocialStatusMap">
select
detailsId,
earningStatus,
receiptStatus,
zhichuEarningStatus,
payStatus
a.detailsId,
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))),
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1')),
if(a.zhichuEarningStatus = '已结算','0',if(a.zhichuEarningStatus = '结算中','1','2')),
if(a.payStatus = '已付','0','1')
from
ekp.view_salary_info
ekp.view_salary_info a
where
1 = 1
<if test="payFlag != null and payFlag != '' and payFlag == 0">
and earningNo = #{settleNo}
and a.earningNo = #{settleNo}
</if>
<if test="payFlag != null and payFlag != '' and payFlag == 1">
and zhichuEarningNo = #{settleNo}
and a.zhichuEarningNo = #{settleNo}
</if>
</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