TWarehousebillsCntrLoggerMapper.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.ruoyi.warehouseBusiness.mapper.TWarehousebillsCntrLoggerMapper">
  6. <resultMap type="TWarehousebillsCntrLogger" id="TWarehousebillsCntrLoggerResult">
  7. <result property="fId" column="f_id" />
  8. <result property="fPid" column="f_pid" />
  9. <result property="fGoodsid" column="f_goodsid" />
  10. <result property="fPackageid" column="f_packageid" />
  11. <result property="fCntrid" column="f_cntrid" />
  12. <result property="fCntrcount" column="f_cntrcount" />
  13. <result property="fCntrweight" column="f_cntrweight" />
  14. <result property="fCntrstatus" column="f_cntrstatus" />
  15. <result property="fSoc" column="f_soc" />
  16. <result property="fTemperature" column="f_temperature" />
  17. <result property="fDraught" column="f_Draught" />
  18. <result property="fHumidity" column="f_Humidity" />
  19. <result property="fPrecooling" column="f_precooling" />
  20. <result property="fPlantakecntr" column="f_plantakecntr" />
  21. <result property="fIfdanger" column="f_IFDANGER" />
  22. <result property="createBy" column="create_by" />
  23. <result property="createTime" column="create_time" />
  24. <result property="updateBy" column="update_by" />
  25. <result property="updateTime" column="update_time" />
  26. <result property="remark" column="remark" />
  27. </resultMap>
  28. <sql id="selectTWarehousebillsCntrLoggerVo">
  29. select f_id, f_pid, f_goodsid, f_packageid, f_cntrid, f_cntrcount, f_cntrweight, f_cntrstatus, f_soc, f_temperature, f_Draught, f_Humidity, f_precooling, f_plantakecntr, f_IFDANGER, create_by, create_time, update_by, update_time, remark from t_warehousebills_cntr_logger
  30. </sql>
  31. <select id="selectTWarehousebillsCntrLoggerList" parameterType="TWarehousebillsCntrLogger" resultMap="TWarehousebillsCntrLoggerResult">
  32. <include refid="selectTWarehousebillsCntrLoggerVo"/>
  33. <where>
  34. <if test="fPid != null "> and f_pid = #{fPid}</if>
  35. <if test="fGoodsid != null "> and f_goodsid = #{fGoodsid}</if>
  36. <if test="fPackageid != null and fPackageid != ''"> and f_packageid = #{fPackageid}</if>
  37. <if test="fCntrid != null "> and f_cntrid = #{fCntrid}</if>
  38. <if test="fCntrcount != null "> and f_cntrcount = #{fCntrcount}</if>
  39. <if test="fCntrweight != null "> and f_cntrweight = #{fCntrweight}</if>
  40. <if test="fCntrstatus != null and fCntrstatus != ''"> and f_cntrstatus = #{fCntrstatus}</if>
  41. <if test="fSoc != null and fSoc != ''"> and f_soc = #{fSoc}</if>
  42. <if test="fTemperature != null and fTemperature != ''"> and f_temperature = #{fTemperature}</if>
  43. <if test="fDraught != null and fDraught != ''"> and f_Draught = #{fDraught}</if>
  44. <if test="fHumidity != null and fHumidity != ''"> and f_Humidity = #{fHumidity}</if>
  45. <if test="fPrecooling != null and fPrecooling != ''"> and f_precooling = #{fPrecooling}</if>
  46. <if test="fPlantakecntr != null "> and f_plantakecntr = #{fPlantakecntr}</if>
  47. <if test="fIfdanger != null and fIfdanger != ''"> and f_IFDANGER = #{fIfdanger}</if>
  48. </where>
  49. </select>
  50. <select id="selectTWarehousebillsCntrLoggerById" parameterType="Long" resultMap="TWarehousebillsCntrLoggerResult">
  51. <include refid="selectTWarehousebillsCntrLoggerVo"/>
  52. where f_id = #{fId}
  53. </select>
  54. <insert id="insertTWarehousebillsCntrLogger" parameterType="TWarehousebillsCntrLogger" useGeneratedKeys="true" keyProperty="fId">
  55. insert into t_warehousebills_cntr_logger
  56. <trim prefix="(" suffix=")" suffixOverrides=",">
  57. <if test="fPid != null">f_pid,</if>
  58. <if test="fGoodsid != null">f_goodsid,</if>
  59. <if test="fPackageid != null and fPackageid != ''">f_packageid,</if>
  60. <if test="fCntrid != null">f_cntrid,</if>
  61. <if test="fCntrcount != null">f_cntrcount,</if>
  62. <if test="fCntrweight != null">f_cntrweight,</if>
  63. <if test="fCntrstatus != null">f_cntrstatus,</if>
  64. <if test="fSoc != null">f_soc,</if>
  65. <if test="fTemperature != null">f_temperature,</if>
  66. <if test="fDraught != null">f_Draught,</if>
  67. <if test="fHumidity != null">f_Humidity,</if>
  68. <if test="fPrecooling != null">f_precooling,</if>
  69. <if test="fPlantakecntr != null">f_plantakecntr,</if>
  70. <if test="fIfdanger != null">f_IFDANGER,</if>
  71. <if test="createBy != null">create_by,</if>
  72. <if test="createTime != null">create_time,</if>
  73. <if test="updateBy != null">update_by,</if>
  74. <if test="updateTime != null">update_time,</if>
  75. <if test="remark != null">remark,</if>
  76. </trim>
  77. <trim prefix="values (" suffix=")" suffixOverrides=",">
  78. <if test="fPid != null">#{fPid},</if>
  79. <if test="fGoodsid != null">#{fGoodsid},</if>
  80. <if test="fPackageid != null and fPackageid != ''">#{fPackageid},</if>
  81. <if test="fCntrid != null">#{fCntrid},</if>
  82. <if test="fCntrcount != null">#{fCntrcount},</if>
  83. <if test="fCntrweight != null">#{fCntrweight},</if>
  84. <if test="fCntrstatus != null">#{fCntrstatus},</if>
  85. <if test="fSoc != null">#{fSoc},</if>
  86. <if test="fTemperature != null">#{fTemperature},</if>
  87. <if test="fDraught != null">#{fDraught},</if>
  88. <if test="fHumidity != null">#{fHumidity},</if>
  89. <if test="fPrecooling != null">#{fPrecooling},</if>
  90. <if test="fPlantakecntr != null">#{fPlantakecntr},</if>
  91. <if test="fIfdanger != null">#{fIfdanger},</if>
  92. <if test="createBy != null">#{createBy},</if>
  93. <if test="createTime != null">#{createTime},</if>
  94. <if test="updateBy != null">#{updateBy},</if>
  95. <if test="updateTime != null">#{updateTime},</if>
  96. <if test="remark != null">#{remark},</if>
  97. </trim>
  98. </insert>
  99. <update id="updateTWarehousebillsCntrLogger" parameterType="TWarehousebillsCntrLogger">
  100. update t_warehousebills_cntr_logger
  101. <trim prefix="SET" suffixOverrides=",">
  102. <if test="fPid != null">f_pid = #{fPid},</if>
  103. <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
  104. <if test="fPackageid != null and fPackageid != ''">f_packageid = #{fPackageid},</if>
  105. <if test="fCntrid != null">f_cntrid = #{fCntrid},</if>
  106. <if test="fCntrcount != null">f_cntrcount = #{fCntrcount},</if>
  107. <if test="fCntrweight != null">f_cntrweight = #{fCntrweight},</if>
  108. <if test="fCntrstatus != null">f_cntrstatus = #{fCntrstatus},</if>
  109. <if test="fSoc != null">f_soc = #{fSoc},</if>
  110. <if test="fTemperature != null">f_temperature = #{fTemperature},</if>
  111. <if test="fDraught != null">f_Draught = #{fDraught},</if>
  112. <if test="fHumidity != null">f_Humidity = #{fHumidity},</if>
  113. <if test="fPrecooling != null">f_precooling = #{fPrecooling},</if>
  114. <if test="fPlantakecntr != null">f_plantakecntr = #{fPlantakecntr},</if>
  115. <if test="fIfdanger != null">f_IFDANGER = #{fIfdanger},</if>
  116. <if test="createBy != null">create_by = #{createBy},</if>
  117. <if test="createTime != null">create_time = #{createTime},</if>
  118. <if test="updateBy != null">update_by = #{updateBy},</if>
  119. <if test="updateTime != null">update_time = #{updateTime},</if>
  120. <if test="remark != null">remark = #{remark},</if>
  121. </trim>
  122. where f_id = #{fId}
  123. </update>
  124. <delete id="deleteTWarehousebillsCntrLoggerById" parameterType="Long">
  125. delete from t_warehousebills_cntr_logger where f_id = #{fId}
  126. </delete>
  127. <delete id="deleteTWarehousebillsCntrLoggerByIds" parameterType="String">
  128. delete from t_warehousebills_cntr_logger where f_id in
  129. <foreach item="fId" collection="array" open="(" separator="," close=")">
  130. #{fId}
  131. </foreach>
  132. </delete>
  133. <insert id="copyTwarehousebillsCntr" parameterType="Long">
  134. insert into t_warehousebills_cntr_logger
  135. SELECT
  136. tc.f_id,
  137. tc.f_pid,
  138. tc.f_goodsid,
  139. tc.f_packageid,
  140. tc.f_cntrid,
  141. tc.f_cntrcount,
  142. tc.f_cntrweight,
  143. tc.f_cntrstatus,
  144. tc.f_soc,
  145. tc.f_temperature,
  146. tc.f_Draught,
  147. tc.f_Humidity,
  148. tc.f_precooling,
  149. tc.f_plantakecntr,
  150. tc.f_IFDANGER,
  151. tc.create_by,
  152. tc.create_time,
  153. tc.update_by,
  154. tc.update_time,
  155. tc.remark
  156. FROM
  157. t_warehousebills_cntr tc
  158. WHERE tc.f_pid = #{fId}
  159. </insert>
  160. </mapper>