ReceiveDao.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.zcxk.dao.sqlserver.ReceiveDao">
  6. <update id="getMeterInfor" parameterType="map" statementType="CALLABLE">
  7. { call DBi_GetMeterInfor_Batch(
  8. #{regionId,mode=IN,jdbcType=VARCHAR},
  9. #{returnCode,mode=OUT,jdbcType=INTEGER},
  10. #{returnMsg,mode=OUT,jdbcType=VARCHAR}
  11. )
  12. }
  13. </update>
  14. <update id="getMeterChangeRecord" parameterType="map" statementType="CALLABLE">
  15. { call DBi_GetMeterInfor_Batch(
  16. #{regionId,mode=IN,jdbcType=VARCHAR},
  17. #{changeField,mode=IN,jdbcType=VARCHAR},
  18. #{id,mode=IN,jdbcType=INTEGER},
  19. #{returnCode,mode=OUT,jdbcType=INTEGER},
  20. #{returnMsg,mode=OUT,jdbcType=VARCHAR}
  21. )
  22. }
  23. </update>
  24. <update id="getUploadPlan" parameterType="map" statementType="CALLABLE">
  25. { call DBi_GetMeterInfor_Batch(
  26. #{returnCode,mode=OUT,jdbcType=INTEGER},
  27. #{returnMsg,mode=OUT,jdbcType=VARCHAR}
  28. )
  29. }
  30. </update>
  31. <update id="creatUploadTask" parameterType="map" statementType="CALLABLE">
  32. { call DBi_GetMeterInfor_Batch(
  33. #{regionId,mode=IN,jdbcType=VARCHAR},
  34. #{taskId,mode=OUT,jdbcType=VARCHAR},
  35. #{returnCode,mode=OUT,jdbcType=INTEGER},
  36. #{returnMsg,mode=OUT,jdbcType=VARCHAR}
  37. )
  38. }
  39. </update>
  40. <update id="meterDataInsert" parameterType="map" statementType="CALLABLE">
  41. { call DBi_GetMeterInfor_Batch(
  42. #{taskId,mode=IN,jdbcType=VARCHAR},
  43. #{meterData,mode=IN,jdbcType=VARCHAR},
  44. #{returnCode,mode=OUT,jdbcType=INTEGER},
  45. #{returnMsg,mode=OUT,jdbcType=VARCHAR}
  46. )
  47. }
  48. </update>
  49. <update id="dropMeterDataTable">
  50. drop table huaxu_meter_data
  51. </update>
  52. <update id="createMeterDataTable">
  53. CREATE table huaxu_meter_data (
  54. releationId nvarchar(20) Not NULL,
  55. currentReading decimal(18, 2) NULL,
  56. currentReadDate char (19) NOT NULL)
  57. </update>
  58. <insert id="insertIntoMeterDataTemp">
  59. INSERT INTO huaxu_meter_data
  60. (releationId, currentReading, currentReadDate)
  61. VALUES
  62. <foreach collection ="list" item="water" separator =",">
  63. (#{water.releationId}, #{water.currentReading}, #{water.currentReadDate})
  64. </foreach >
  65. </insert>
  66. <insert id="insertIntoMeterData">
  67. insert into @meterData (releationId,currentReading,currentReadDate) select *from huaxu_meter_data
  68. </insert>
  69. </mapper>