TWarehousebillsCntritemsMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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.shipping.mapper.TWarehousebillsCntritemsMapper">
  6. <resultMap type="TWarehousebillsCntritems" id="TWarehousebillsCntritemsResult">
  7. <result property="fId" column="f_id" />
  8. <result property="fPid" column="f_pid" />
  9. <result property="fCntrno" column="f_cntrno" />
  10. <result property="fSealno" column="f_sealno" />
  11. <result property="fGoodsid" column="f_goodsid" />
  12. <result property="fPackageid" column="f_packageid" />
  13. <result property="fCntrid" column="f_cntrid" />
  14. <result property="fCntrcount" column="f_cntrcount" />
  15. <result property="fCntrweight" column="f_cntrweight" />
  16. <result property="fCntrstatus" column="f_cntrstatus" />
  17. <result property="fSoc" column="f_soc" />
  18. <result property="fTemperature" column="f_temperature" />
  19. <result property="fDraught" column="f_Draught" />
  20. <result property="fHumidity" column="f_Humidity" />
  21. <result property="fPrecooling" column="f_precooling" />
  22. <result property="fPlantakecntr" column="f_plantakecntr" />
  23. <result property="fIfdanger" column="f_IFDANGER" />
  24. <result property="fManual" column="f_manual" />
  25. <result property="createBy" column="create_by" />
  26. <result property="createTime" column="create_time" />
  27. <result property="updateBy" column="update_by" />
  28. <result property="updateTime" column="update_time" />
  29. <result property="remark" column="remark" />
  30. </resultMap>
  31. <sql id="selectTWarehousebillsCntritemsVo">
  32. select f_id, f_pid, f_cntrno, f_sealno, 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,f_manual, create_by, create_time, update_by, update_time, remark from t_warehousebills_cntritems
  33. </sql>
  34. <select id="selectTWarehousebillsCntritemsList" parameterType="TWarehousebillsCntritems" resultMap="TWarehousebillsCntritemsResult">
  35. SELECT
  36. tw.f_id,
  37. tw.f_pid,
  38. tw.f_cntrno,
  39. tw.f_sealno,
  40. tw.f_goodsid,
  41. tg.f_name goodsName,
  42. tw.f_packageid,
  43. sd.dict_label packageName,
  44. tw.f_cntrid,
  45. tc.f_no cntrName,
  46. tw.f_cntrcount,
  47. tw.f_cntrweight,
  48. tw.f_cntrstatus,
  49. tw.f_soc,
  50. tw.f_temperature,
  51. tw.f_Draught,
  52. tw.f_Humidity,
  53. tw.f_precooling,
  54. si.dict_label precoolingName,
  55. tw.f_plantakecntr,
  56. tw.f_IFDANGER,
  57. sc.dict_label ifdangerName,
  58. tw.create_by,
  59. tw.create_time,
  60. tw.update_by,
  61. tw.update_time,
  62. tw.remark,
  63. tw.f_manual
  64. FROM
  65. t_warehousebills_cntritems tw
  66. LEFT JOIN t_goods tg ON tg.f_id = tw.f_goodsid
  67. LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_packageid AND sd.dict_type = 'f_packageid'
  68. LEFT JOIN t_cntr tc ON tc.f_id = tw.f_cntrid
  69. LEFT JOIN sys_dict_data si ON si.dict_value = tw.f_precooling AND si.dict_type = 'f_precooling'
  70. LEFT JOIN sys_dict_data sc ON sc.dict_value = tw.f_IFDANGER AND sc.dict_type = 'f_IFDANGER'
  71. <where>
  72. <if test="fPid != null "> and tw.f_pid = #{fPid}</if>
  73. <if test="fCntrno != null and fCntrno != ''"> and tw.f_cntrno = #{fCntrno}</if>
  74. <if test="fSealno != null and fSealno != ''"> and tw.f_sealno = #{fSealno}</if>
  75. <if test="fGoodsid != null "> and tw.f_goodsid = #{fGoodsid}</if>
  76. <if test="fPackageid != null and fPackageid != ''"> and tw.f_packageid = #{fPackageid}</if>
  77. <if test="fCntrid != null "> and tw.f_cntrid = #{fCntrid}</if>
  78. <if test="fCntrcount != null "> and tw.f_cntrcount = #{fCntrcount}</if>
  79. <if test="fCntrweight != null "> and tw.f_cntrweight = #{fCntrweight}</if>
  80. <if test="fCntrstatus != null and fCntrstatus != ''"> and tw.f_cntrstatus = #{fCntrstatus}</if>
  81. <if test="fSoc != null and fSoc != ''"> and tw.f_soc = #{fSoc}</if>
  82. <if test="fTemperature != null and fTemperature != ''"> and tw.f_temperature = #{fTemperature}</if>
  83. <if test="fDraught != null and fDraught != ''"> and tw.f_Draught = #{fDraught}</if>
  84. <if test="fHumidity != null and fHumidity != ''"> and tw.f_Humidity = #{fHumidity}</if>
  85. <if test="fPrecooling != null and fPrecooling != ''"> and tw.f_precooling = #{fPrecooling}</if>
  86. <if test="fPlantakecntr != null "> and tw.f_plantakecntr = #{fPlantakecntr}</if>
  87. <if test="fIfdanger != null and fIfdanger != ''"> and tw.f_IFDANGER = #{fIfdanger}</if>
  88. </where>
  89. </select>
  90. <select id="selectTWarehousebillsCntritemsById" parameterType="Long" resultMap="TWarehousebillsCntritemsResult">
  91. <include refid="selectTWarehousebillsCntritemsVo"/>
  92. where f_id = #{fId}
  93. </select>
  94. <insert id="insertTWarehousebillsCntritems" parameterType="TWarehousebillsCntritems" useGeneratedKeys="true" keyProperty="fId">
  95. insert into t_warehousebills_cntritems
  96. <trim prefix="(" suffix=")" suffixOverrides=",">
  97. <if test="fPid != null">f_pid,</if>
  98. <if test="fCntrno != null and fCntrno != ''">f_cntrno,</if>
  99. <if test="fSealno != null and fSealno != ''">f_sealno,</if>
  100. <if test="fGoodsid != null">f_goodsid,</if>
  101. <if test="fPackageid != null and fPackageid != ''">f_packageid,</if>
  102. <if test="fCntrid != null">f_cntrid,</if>
  103. <if test="fCntrcount != null">f_cntrcount,</if>
  104. <if test="fCntrweight != null">f_cntrweight,</if>
  105. <if test="fCntrstatus != null">f_cntrstatus,</if>
  106. <if test="fSoc != null">f_soc,</if>
  107. <if test="fTemperature != null">f_temperature,</if>
  108. <if test="fDraught != null">f_Draught,</if>
  109. <if test="fHumidity != null">f_Humidity,</if>
  110. <if test="fPrecooling != null">f_precooling,</if>
  111. <if test="fPlantakecntr != null">f_plantakecntr,</if>
  112. <if test="fIfdanger != null">f_IFDANGER,</if>
  113. <if test="fManual != null">f_manual,</if>
  114. <if test="createBy != null">create_by,</if>
  115. <if test="createTime != null">create_time,</if>
  116. <if test="updateBy != null">update_by,</if>
  117. <if test="updateTime != null">update_time,</if>
  118. <if test="remark != null">remark,</if>
  119. </trim>
  120. <trim prefix="values (" suffix=")" suffixOverrides=",">
  121. <if test="fPid != null">#{fPid},</if>
  122. <if test="fCntrno != null and fCntrno != ''">#{fCntrno},</if>
  123. <if test="fSealno != null and fSealno != ''">#{fSealno},</if>
  124. <if test="fGoodsid != null">#{fGoodsid},</if>
  125. <if test="fPackageid != null and fPackageid != ''">#{fPackageid},</if>
  126. <if test="fCntrid != null">#{fCntrid},</if>
  127. <if test="fCntrcount != null">#{fCntrcount},</if>
  128. <if test="fCntrweight != null">#{fCntrweight},</if>
  129. <if test="fCntrstatus != null">#{fCntrstatus},</if>
  130. <if test="fSoc != null">#{fSoc},</if>
  131. <if test="fTemperature != null">#{fTemperature},</if>
  132. <if test="fDraught != null">#{fDraught},</if>
  133. <if test="fHumidity != null">#{fHumidity},</if>
  134. <if test="fPrecooling != null">#{fPrecooling},</if>
  135. <if test="fPlantakecntr != null">#{fPlantakecntr},</if>
  136. <if test="fIfdanger != null">#{fIfdanger},</if>
  137. <if test="fManual != null">#{fManual},</if>
  138. <if test="createBy != null">#{createBy},</if>
  139. <if test="createTime != null">#{createTime},</if>
  140. <if test="updateBy != null">#{updateBy},</if>
  141. <if test="updateTime != null">#{updateTime},</if>
  142. <if test="remark != null">#{remark},</if>
  143. </trim>
  144. </insert>
  145. <update id="updateTWarehousebillsCntritems" parameterType="TWarehousebillsCntritems">
  146. update t_warehousebills_cntritems
  147. <trim prefix="SET" suffixOverrides=",">
  148. <if test="fPid != null">f_pid = #{fPid},</if>
  149. <if test="fCntrno != null and fCntrno != ''">f_cntrno = #{fCntrno},</if>
  150. <if test="fSealno != null and fSealno != ''">f_sealno = #{fSealno},</if>
  151. <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
  152. <if test="fPackageid != null and fPackageid != ''">f_packageid = #{fPackageid},</if>
  153. <if test="fCntrid != null">f_cntrid = #{fCntrid},</if>
  154. <if test="fCntrcount != null">f_cntrcount = #{fCntrcount},</if>
  155. <if test="fCntrweight != null">f_cntrweight = #{fCntrweight},</if>
  156. <if test="fCntrstatus != null">f_cntrstatus = #{fCntrstatus},</if>
  157. <if test="fSoc != null">f_soc = #{fSoc},</if>
  158. <if test="fTemperature != null">f_temperature = #{fTemperature},</if>
  159. <if test="fDraught != null">f_Draught = #{fDraught},</if>
  160. <if test="fHumidity != null">f_Humidity = #{fHumidity},</if>
  161. <if test="fPrecooling != null">f_precooling = #{fPrecooling},</if>
  162. <if test="fPlantakecntr != null">f_plantakecntr = #{fPlantakecntr},</if>
  163. <if test="fIfdanger != null">f_IFDANGER = #{fIfdanger},</if>
  164. <if test="fManual != null">f_manual = #{fManual},</if>
  165. <if test="createBy != null">create_by = #{createBy},</if>
  166. <if test="createTime != null">create_time = #{createTime},</if>
  167. <if test="updateBy != null">update_by = #{updateBy},</if>
  168. <if test="updateTime != null">update_time = #{updateTime},</if>
  169. <if test="remark != null">remark = #{remark},</if>
  170. </trim>
  171. where f_id = #{fId}
  172. </update>
  173. <delete id="deleteTWarehousebillsCntritemsById" parameterType="Long">
  174. delete from t_warehousebills_cntritems where f_id = #{fId}
  175. </delete>
  176. <delete id="deleteTWarehousebillsCntritemsByIds" parameterType="String">
  177. delete from t_warehousebills_cntritems where f_id in
  178. <foreach item="fId" collection="array" open="(" separator="," close=")">
  179. #{fId}
  180. </foreach>
  181. </delete>
  182. <delete id="deleteTWarehousebillsCntritemsfPid" parameterType="Long">
  183. delete from t_warehousebills_cntritems where f_pid = #{fPid}
  184. </delete>
  185. <delete id="deleteTWarehousebillsCntritemsfPids" parameterType="String">
  186. delete from t_warehousebills_cntritems where f_pid in
  187. <foreach item="fPid" collection="array" open="(" separator="," close=")">
  188. #{fPid}
  189. </foreach>
  190. </delete>
  191. </mapper>