PSAMKYS_Mapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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="PSAMKYS">
  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,
  11. PSAMBH, JGLX, BGDH, CJR, CJSJ, ZHXGR, ZHXGSJ, ZTID)
  12. values(sys_guid(),#{SLLSH},#{PSAMBH},#{JGLX},#{BGDH},
  13. #{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='3',
  57. <if test='ZHXGR != null'>ZHXGR =#{ZHXGR} ,</if>
  58. ZHXGSJ = to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')
  59. </set>
  60. WHERE PSAMBH=#{PSAMBH}
  61. </update>
  62. <insert id="RSPSAMLOG_I" parameterType="hashmap">
  63. insert into rs_psam_log(RS_PSAM_LOG_LSH, RS_PSAM_RKXXB_LSH, CZLX, CZYY, YKZT, KZT, CJR, CJSJ)
  64. values(sys_guid(),(select RS_PSAM_RKXXB_LSH from rs_psam_rkxxb where PSAMBH = #{PSAMBH} and rownum='1'),
  65. '1','遗失','1','3',#{CJR},to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'))
  66. </insert>
  67. </mapper>