PSAMKSL_Mapper.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
  4. "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
  5. <mapper namespace="PSAMKSL">
  6. <select id="RSPSAMYWXXSQB_CNT" resultType="long" parameterType="hashmap">
  7. SELECT COUNT(1) CNT FROM rs_psam_ywxx_sqb WHERE SLLSH=#{SLLSH}
  8. </select>
  9. <insert id="RSPSAMYWXXSQB_I" parameterType="hashmap">
  10. insert into rs_psam_ywxx_sqb(RS_PSAM_YWXX_SQB_LSH, SLLSH, RS_PSAM_AZJGXX_LSH,
  11. PSAMBH, JGLX, SHLX, BGDH, SQYT, SQSL, SHBH, CJR, CJSJ, ZHXGR, ZHXGSJ, ZTID)
  12. values(sys_guid(),#{SLLSH},#{RS_PSAM_AZJGXX_LSH},#{PSAMBH},#{JGLX},#{SHLX},#{BGDH},#{SQYT},
  13. #{SQSL},#{SHBH},#{CJR},to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),
  14. #{ZHXGR},to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),#{ZTID})
  15. </insert>
  16. <update id="RSPSAMYWXXSQB_U" parameterType="hashmap">
  17. UPDATE rs_psam_ywxx_sqb
  18. <set>
  19. <if test='SSJG != null'>SSJG =#{SSJG} ,</if>
  20. <if test='RS_PSAM_AZJGXX_LSH != null'>RS_PSAM_AZJGXX_LSH =#{RS_PSAM_AZJGXX_LSH} ,</if>
  21. <if test='PSAMBH != null'>PSAMBH =#{PSAMBH} ,</if>
  22. <if test='JGLX != null'>JGLX =#{JGLX} ,</if>
  23. <if test='SHLX != null'>SHLX =#{SHLX} ,</if>
  24. <if test='BGDH != null'>BGDH =#{BGDH} ,</if>
  25. <if test='SQYT != null'>SQYT =#{SQYT} ,</if>
  26. <if test='SQSL != null'>SQSL =#{SQSL} ,</if>
  27. <if test='SHBH != null'>SHBH =#{SHBH} ,</if>
  28. <if test='ZHXGR != null'>ZHXGR =#{ZHXGR} ,</if>
  29. ZHXGSJ = to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),
  30. <if test='ZTID != null'>ZTID =#{ZTID} ,</if>
  31. <if test='BJSJ != null'>BJSJ =#{BJSJ} ,</if>
  32. </set>
  33. WHERE SLLSH=#{SLLSH}
  34. </update>
  35. <select id="PSAMKZT_S" resultType="hashmap" parameterType="String">
  36. select KZT from rs_psam_rkxxb where PSAMBH=#{PSAMBH}
  37. </select>
  38. <select id="PSAMBH_S" resultType="hashmap" parameterType="String">
  39. select PSAMBH,SQSL from rs_psam_ywxx_sqb where sllsh=#{SLLSH}
  40. </select>
  41. <select id="PSAMBHBYYWLSH_S" resultType="hashmap" parameterType="String">
  42. select RS_PSAM_YWXX_SQB_LSH,PSAMBH,SLLSH from rs_psam_ywxx_sqb where sllsh in(select sllsh from v_appcomm_slxx where ywlsh=#{YWLSH})
  43. </select>
  44. <update id="RSPSAMYWXXSQB_U2" parameterType="hashmap">
  45. UPDATE rs_psam_ywxx_sqb
  46. <set>
  47. <if test='ZHXGR != null'>ZHXGR =#{ZHXGR} ,</if>
  48. ZHXGSJ = to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),
  49. BJSJ =to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')
  50. </set>
  51. WHERE SLLSH=#{SLLSH}
  52. </update>
  53. <update id="RSPSAMRKXXB_U" parameterType="hashmap">
  54. UPDATE rs_psam_rkxxb
  55. <set>
  56. KZT='1',
  57. <if test='ZHXGR != null'>ZHXGR =#{ZHXGR} ,</if>
  58. ZHXGSJ = to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),
  59. <if test='RS_PSAM_YWXX_SQB_LSH != null'>RS_PSAM_YWXX_SQB_LSH =#{RS_PSAM_YWXX_SQB_LSH} ,</if>
  60. </set>
  61. WHERE PSAMBH=#{PSAMBH}
  62. </update>
  63. <insert id="RSPSAMAZFKXXB_I" parameterType="hashmap">
  64. insert into rs_psam_azfkxxb(RS_PSAM_AZFKXXB_LSH, RS_PSAM_YWXX_SQB_LSH, RS_PSAM_RKXXB_LSH, SFTJ, CJR, CJSJ, ZHXGR, ZHXGSJ)
  65. values(sys_guid(),#{RS_PSAM_YWXX_SQB_LSH},(select RS_PSAM_RKXXB_LSH from rs_psam_rkxxb where PSAMBH = #{PSAMBH} and rownum='1'),
  66. '0',#{CJR},to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),#{ZHXGR},to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'))
  67. </insert>
  68. <insert id="RSPSAMLOG_I" parameterType="hashmap">
  69. insert into rs_psam_log(RS_PSAM_LOG_LSH, RS_PSAM_RKXXB_LSH, CZLX, CZYY, YKZT, KZT, CJR, CJSJ)
  70. values(sys_guid(),(select RS_PSAM_RKXXB_LSH from rs_psam_rkxxb where PSAMBH = #{PSAMBH} and rownum='1'),
  71. '5','发放','4','1',#{CJR},to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'))
  72. </insert>
  73. <select id="GETPRINTDATA_S" resultType="hashmap" parameterType="hashmap">
  74. SELECT A.SLLSH,
  75. F_AA10_GET_AAA103('RS_PSAM_YWXX_JGLX', A.JGLX) JGLX,
  76. C.AAB004 DWMC,
  77. C.AAE006 DWDZ,
  78. B.SBRXM,
  79. B.SBRSJ,
  80. F_AA10_GET_AAA103('RS_PSAM_YWXX_SQYT', A.SQYT) SQYT,
  81. A.SQSL
  82. FROM RS_PSAM_YWXX_SQB A, V_APPCOMM_SLXX B, AB01 C
  83. WHERE A.SLLSH = B.SLLSH
  84. AND A.ZTID = C.ZTID
  85. AND A.SLLSH =#{SLLSH}
  86. </select>
  87. <select id="GETRSPSAMYWXXSQBLSH_S" resultType="String" parameterType="String">
  88. SELECT RS_PSAM_YWXX_SQB_LSH LSH FROM rs_psam_ywxx_sqb WHERE SLLSH=#{SLLSH}
  89. </select>
  90. </mapper>