Commit 2beb1ed5 by jianglong

修改查询交易和处理入口功能

parent 574246dc
package com.brilliance.isc.mda.dao; package com.brilliance.isc.mda.dao;
import com.brilliance.isc.bo.Fxd; import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.bo.Lid;
import com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
...@@ -31,4 +35,12 @@ public interface FxdMapper { ...@@ -31,4 +35,12 @@ public interface FxdMapper {
List<Fxd> dyncRead(Map<String, Object> dyncMap); List<Fxd> dyncRead(Map<String, Object> dyncMap);
List<FxdWithPtsCbbResponseVo> queryFxd(FxtselQueryVo fxtselQueryVo);
List<FxdWithPtsCbbResponseVo> queryFxdInfo(FxtselQueryVo fxtselQueryVo);
Fxd selectByInr(@Param("inr") String inr);
Fxd selectByOwnref(String ownref);
} }
\ No newline at end of file
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.bo.Fxd;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class FxdWithPtsCbbResponseVo extends Fxd {
/**
* 币种
*/
private String maxcur;
/**
* 折算币种
*/
private String nomcur;
/**
* 开立金额
*/
private BigDecimal maxamt;
/**
* 折算开立金额
*/
private BigDecimal nomamt;
/**
* 客户号
*/
private String aplExtkey;
/**
* 客户名称
*/
private String aplName;
}
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.common.vo.CommonResult;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 进口信用证入口交易查询条件字段
*/
@Data
public class FxtselQueryVo extends CommonResult {
private String seaownref;
private String seanam;
private String opndatfrom;
private String opndatto;
/**
* 币种
*/
private String seacur;
/**
* 金额
*/
private BigDecimal seaamt;
/**
* 金额
*/
private BigDecimal seaamtfr;
/**
* 金额
*/
private BigDecimal seaamtto;
private String ownusr;
private String usr;
private String acc;
private String acc2;
private String searef;
private String ptyextkey;
private String ptynam;
private String seapty;
private String searol;
private String usrextkey;
private String seasta;
private String accmng;
private String fxtyp;
private List<String> fxtypList;
/**
* 是否闭卷
*/
private String isClosed;
/**
* 排序字段
*/
private String column;
/**
* 正序倒序
*/
private String order;
}
...@@ -292,6 +292,94 @@ ...@@ -292,6 +292,94 @@
${sql} ${sql}
</select> </select>
<select id="queryFxd" resultType="com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo">
select
fxd.*,
max1.cur maxcur,max1.amt maxamt,
nom1.cur nomcur,nom1.amt nomamt,
pty.extkey aplExtkey,pty.nam1 aplName
from fxd
left join cbb max1 on max1.OBJINR = fxd.inr and max1.OBJTYP = 'FXD' and max1.cbc = 'MAXSUM' and max1.extid =
'AMT1' and max1.enddat = '2299-12-31'
left join cbb nom1 on nom1.OBJINR = fxd.inr and nom1.OBJTYP = 'FXD' and nom1.cbc = 'NOMSUM' and nom1.extid =
'AMT1' and nom1.enddat = '2299-12-31'
left join pts on pts.OBJINR = fxd.inr and pts.OBJTYP = 'FXD' and pts.rol = 'APL'
left join pty pty on pty.inr = pts.ptyinr
<!--开立状态-->
where 1 = 1
<!--业务品种-->
<if test="fxtypList != null and fxtypList.size() > 0">
and fxd.fxtyp in
<foreach item="item" collection="fxtypList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--业务编号-->
<if test="seaownref != null and seaownref != ''">
AND UPPER(fxd.OWNREF) LIKE concat(concat('%', UPPER(#{seaownref})), '%')
</if>
<!--日期-->
<!--日期-->
<if test="opndatfrom != null and opndatfrom != ''">
AND fxd.opndat &gt;= #{opndatfrom}
</if>
<if test="opndatto != null and opndatto != ''">
AND fxd.opndat &lt;= #{opndatto}
</if>
<!--客户号/名称 -->
<if test="searef != null and searef != ''">
and exists (
select 1 from PTS,PTY
where fxd.INR = PTS.OBJINR
AND PTY.INR = PTS.PTYINR
AND PTS.OBJTYP = 'FXD'
AND PTS.ROL = 'APL'
AND (
PTS.EXTKEY LIKE concat(concat('%', #{searef}), '%')
or replace(PTS.NAM,'\n',' ') LIKE concat(concat('%', #{searef}), '%')
or PTS.CNNAM LIKE concat(concat('%', #{searef}), '%')
or PTS.ENNAM LIKE concat(concat('%', #{searef}), '%')
or PTY.NAM LIKE concat(concat('%', #{searef}), '%')
)
)
</if>
<!--是否闭卷 -->
<if test="isClosed != null and isClosed != ''">
<if test="isClosed == 'Y'.toString()">
and fxd.clsdat is not null
</if>
<if test="isClosed == 'N'.toString()">
and fxd.clsdat is null
</if>
</if>
order by fxd.opndat desc , fxd.ownref desc
</select>
<select id="selectByInr" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from fxd
where inr = #{inr,jdbcType=VARCHAR}
</select>
<select id="selectByOwnref" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from fxd
where ownref = #{ownref}
</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