TyHtlytxMapper.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.unis.transaction.server.dao.TyHtlytxDao">
  4. <select id="getAllHt" resultType="com.unis.transaction.server.entity.tradeplan.TyHtlytx">
  5. select cc.apcc as apcc,
  6. cc.wtfmc as ccqymc,
  7. cc.wtfbm as ccqybm,
  8. ht.htbh as hth,
  9. wt.wcsj as jhwcrq,
  10. ht.htbm as htbm
  11. from ty_jyht ht
  12. left join ty_jycc cc on cc.apcc = ht.apcc
  13. left join ty_jycrkwt wt on cc.wtbm = wt.wtbm
  14. </select>
  15. <select id="selectList" resultType="com.unis.transaction.server.entity.tradeplan.TyHtlytx">
  16. select * from ty_htlytx
  17. <where>
  18. <if test="orgCode != null and orgCode != ''">
  19. and orgCode = #{orgCode}
  20. </if>
  21. <if test="ccqymc != null and ccqymc != ''">
  22. and ccqymc like '%'||#{ccqymc}||'%'
  23. </if>
  24. <if test="hth != null and hth != ''">
  25. and hth like '%'||#{hth}||'%'
  26. </if>
  27. <if test="ccqyhf != null and ccqyhf != ''">
  28. and ccqyhf = #{ccqyhf}
  29. </if>
  30. <if test="jhwcsjks != null and jhwcsjks != ''">
  31. and jhwcrq &gt;= to_date(#{jhwcsjks}, 'yyyy-mm-dd')
  32. </if>
  33. <if test="jhwcsjjs != null and jhwcsjjs != ''">
  34. and jhwcrq &lt;= to_date(#{jhwcsjjs}, 'yyyy-mm-dd')
  35. </if>
  36. </where>
  37. </select>
  38. </mapper>