陈鹏

修复缺失数据

......@@ -128,23 +128,39 @@
</update>
<select id="queryForApplyNo" parameterType="String" resultType="map">
select a.return_type RETURNTYPE, b.otc_name OTCNAME, b.otc_code OTCCODE,b.CLIENT_NAME CLIENTNAME,
A.APPLY_NO APPLYNO,a.return_no RETURNNO,innercirculat_no INNERCIRCULATNO,a.id ID,
case
when a.return_type = '0' then
b.back_amount
when a.return_type = '1' then
b.approval_count
when a.return_type = '2' then
b.back_amount + b.approval_count
else
0
end ALLCOUNT
from hs_asset.trustapply_return_relation a,
hs_asset.trustapply b
where a.apply_no = b.apply_no(+)
and
a.return_no=#{value}
SELECT A.RETURN_TYPE RETURNTYPE, B.OTC_NAME OTCNAME, B.OTC_CODE OTCCODE,B.CLIENT_NAME CLIENTNAME,B.FUND_ACCOUNT CLIENT_ID,
A.APPLY_NO APPLYNO,A.RETURN_NO RETURNNO,INNERCIRCULAT_NO INNERCIRCULATNO,A.ID ID,
CASE
WHEN A.RETURN_TYPE = '0' THEN
B.BACK_AMOUNT
WHEN A.RETURN_TYPE = '1' THEN
B.APPROVAL_COUNT
WHEN A.RETURN_TYPE = '2' THEN
B.BACK_AMOUNT + B.APPROVAL_COUNT
ELSE
0
END ALLCOUNT
FROM HS_ASSET.TRUSTAPPLY_RETURN_RELATION A,
HS_ASSET.TRUSTAPPLY_20180817_2 B
WHERE A.APPLY_NO = B.APPLY_NO(+) AND B.OTC_CODE IS NOT NULL
AND A.RETURN_NO = #{value}
UNION
SELECT A.RETURN_TYPE RETURNTYPE, B.OTC_NAME OTCNAME, B.OTC_CODE OTCCODE,B.CLIENT_NAME CLIENTNAME,B.FUND_ACCOUNT CLIENT_ID,
A.APPLY_NO APPLYNO,A.RETURN_NO RETURNNO,INNERCIRCULAT_NO INNERCIRCULATNO,A.ID ID,
CASE
WHEN A.RETURN_TYPE = '0' THEN
B.BACK_AMOUNT
WHEN A.RETURN_TYPE = '1' THEN
B.APPROVAL_COUNT
WHEN A.RETURN_TYPE = '2' THEN
B.BACK_AMOUNT + B.APPROVAL_COUNT
ELSE
0
END ALLCOUNT
FROM HS_ASSET.TRUSTAPPLY_RETURN_RELATION A,
HS_ASSET.TRUSTAPPLY B
WHERE A.APPLY_NO = B.APPLY_NO(+) AND B.OTC_CODE IS NOT NULL
AND A.RETURN_NO = #{value}
</select>
<update id="updateRelation" parameterType="map" >
......