TWarehousebillsCntrMapper.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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.TWarehousebillsCntrMapper">
  6. <resultMap type="TWarehousebillsCntr" id="TWarehousebillsCntrResult">
  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="selectTWarehousebillsCntrVo">
  29. select f_id,
  30. f_pid,
  31. f_goodsid,
  32. f_packageid,
  33. f_cntrid,
  34. f_cntrcount,
  35. f_cntrweight,
  36. f_cntrstatus,
  37. f_soc,
  38. f_temperature,
  39. f_Draught,
  40. f_Humidity,
  41. f_precooling,
  42. f_plantakecntr,
  43. f_IFDANGER,
  44. create_by,
  45. create_time,
  46. update_by,
  47. update_time,
  48. remark
  49. from t_warehousebills_cntr
  50. </sql>
  51. <select id="selectTWarehousebillsCntrList" parameterType="TWarehousebillsCntr"
  52. resultMap="TWarehousebillsCntrResult">
  53. SELECT
  54. tw.f_id,
  55. tw.f_pid,
  56. tw.f_goodsid,
  57. tg.f_name goodsName,
  58. pro.dict_label typeidName,
  59. tw.f_packageid,
  60. sd.dict_label packageName,
  61. tw.f_cntrid,
  62. tc.f_no cntrName,
  63. tw.f_cntrcount,
  64. tw.f_cntrweight,
  65. tw.f_cntrstatus,
  66. tw.f_soc,
  67. tw.f_temperature,
  68. tw.f_Draught,
  69. tw.f_Humidity,
  70. tw.f_precooling,
  71. si.dict_label precoolingName,
  72. tw.f_plantakecntr,
  73. tw.f_IFDANGER,
  74. sc.dict_label ifdangerName,
  75. tw.create_by,
  76. tw.create_time,
  77. tw.update_by,
  78. tw.update_time,
  79. tw.remark
  80. FROM
  81. t_warehousebills_cntr tw
  82. LEFT JOIN t_goods tg ON tg.f_id = tw.f_goodsid
  83. LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_packageid
  84. AND sd.dict_type = 'f_packageid'
  85. LEFT JOIN t_cntr tc ON tc.f_id = tw.f_cntrid
  86. LEFT JOIN sys_dict_data si ON si.dict_value = tw.f_precooling
  87. AND si.dict_type = 'f_precooling'
  88. LEFT JOIN sys_dict_data sc ON sc.dict_value = tw.f_IFDANGER
  89. AND sc.dict_type = 'f_IFDANGER'
  90. LEFT JOIN sys_dict_data pro ON pro.dict_value = tg.f_typeid and pro.dict_type = 'data_goods_category'
  91. <where>
  92. <if test="fPid != null ">and tw.f_pid = #{fPid}</if>
  93. <if test="fGoodsid != null ">and tw.f_goodsid = #{fGoodsid}</if>
  94. <if test="fPackageid != null and fPackageid != ''">and tw.f_packageid = #{fPackageid}</if>
  95. <if test="fCntrid != null ">and tw.f_cntrid = #{fCntrid}</if>
  96. <if test="fCntrcount != null ">and tw.f_cntrcount = #{fCntrcount}</if>
  97. <if test="fCntrweight != null ">and tw.f_cntrweight = #{fCntrweight}</if>
  98. <if test="fCntrstatus != null and fCntrstatus != ''">and tw.f_cntrstatus = #{fCntrstatus}</if>
  99. <if test="fSoc != null and fSoc != ''">and tw.f_soc = #{fSoc}</if>
  100. <if test="fTemperature != null and fTemperature != ''">and tw.f_temperature = #{fTemperature}</if>
  101. <if test="fDraught != null and fDraught != ''">and tw.f_Draught = #{fDraught}</if>
  102. <if test="fHumidity != null and fHumidity != ''">and tw.f_Humidity = #{fHumidity}</if>
  103. <if test="fPrecooling != null and fPrecooling != ''">and tw.f_precooling = #{fPrecooling}</if>
  104. <if test="fPlantakecntr != null ">and tw.f_plantakecntr = #{fPlantakecntr}</if>
  105. <if test="fIfdanger != null and fIfdanger != ''">and tw.f_IFDANGER = #{fIfdanger}</if>
  106. </where>
  107. </select>
  108. <select id="selectTWarehousebillsCntrById" parameterType="Long" resultMap="TWarehousebillsCntrResult">
  109. <include refid="selectTWarehousebillsCntrVo"/>
  110. where f_id = #{fId}
  111. </select>
  112. <insert id="insertTWarehousebillsCntr" parameterType="TWarehousebillsCntr" useGeneratedKeys="true"
  113. keyProperty="fId">
  114. insert into t_warehousebills_cntr
  115. <trim prefix="(" suffix=")" suffixOverrides=",">
  116. <if test="fPid != null">f_pid,</if>
  117. <if test="fGoodsid != null">f_goodsid,</if>
  118. <if test="fPackageid != null and fPackageid != ''">f_packageid,</if>
  119. <if test="fCntrid != null">f_cntrid,</if>
  120. <if test="fCntrcount != null">f_cntrcount,</if>
  121. <if test="fCntrweight != null">f_cntrweight,</if>
  122. <if test="fCntrstatus != null">f_cntrstatus,</if>
  123. <if test="fSoc != null">f_soc,</if>
  124. <if test="fTemperature != null">f_temperature,</if>
  125. <if test="fDraught != null">f_Draught,</if>
  126. <if test="fHumidity != null">f_Humidity,</if>
  127. <if test="fPrecooling != null">f_precooling,</if>
  128. <if test="fPlantakecntr != null">f_plantakecntr,</if>
  129. <if test="fIfdanger != null">f_IFDANGER,</if>
  130. <if test="createBy != null">create_by,</if>
  131. <if test="createTime != null">create_time,</if>
  132. <if test="updateBy != null">update_by,</if>
  133. <if test="updateTime != null">update_time,</if>
  134. <if test="remark != null">remark,</if>
  135. </trim>
  136. <trim prefix="values (" suffix=")" suffixOverrides=",">
  137. <if test="fPid != null">#{fPid},</if>
  138. <if test="fGoodsid != null">#{fGoodsid},</if>
  139. <if test="fPackageid != null and fPackageid != ''">#{fPackageid},</if>
  140. <if test="fCntrid != null">#{fCntrid},</if>
  141. <if test="fCntrcount != null">#{fCntrcount},</if>
  142. <if test="fCntrweight != null">#{fCntrweight},</if>
  143. <if test="fCntrstatus != null">#{fCntrstatus},</if>
  144. <if test="fSoc != null">#{fSoc},</if>
  145. <if test="fTemperature != null">#{fTemperature},</if>
  146. <if test="fDraught != null">#{fDraught},</if>
  147. <if test="fHumidity != null">#{fHumidity},</if>
  148. <if test="fPrecooling != null">#{fPrecooling},</if>
  149. <if test="fPlantakecntr != null">#{fPlantakecntr},</if>
  150. <if test="fIfdanger != null">#{fIfdanger},</if>
  151. <if test="createBy != null">#{createBy},</if>
  152. <if test="createTime != null">#{createTime},</if>
  153. <if test="updateBy != null">#{updateBy},</if>
  154. <if test="updateTime != null">#{updateTime},</if>
  155. <if test="remark != null">#{remark},</if>
  156. </trim>
  157. </insert>
  158. <update id="updateTWarehousebillsCntr" parameterType="TWarehousebillsCntr">
  159. update t_warehousebills_cntr
  160. <trim prefix="SET" suffixOverrides=",">
  161. <if test="fPid != null">f_pid = #{fPid},</if>
  162. <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
  163. <if test="fPackageid != null and fPackageid != ''">f_packageid = #{fPackageid},</if>
  164. <if test="fCntrid != null">f_cntrid = #{fCntrid},</if>
  165. <if test="fCntrcount != null">f_cntrcount = #{fCntrcount},</if>
  166. <if test="fCntrweight != null">f_cntrweight = #{fCntrweight},</if>
  167. <if test="fCntrstatus != null">f_cntrstatus = #{fCntrstatus},</if>
  168. <if test="fSoc != null">f_soc = #{fSoc},</if>
  169. <if test="fTemperature != null">f_temperature = #{fTemperature},</if>
  170. <if test="fDraught != null">f_Draught = #{fDraught},</if>
  171. <if test="fHumidity != null">f_Humidity = #{fHumidity},</if>
  172. <if test="fPrecooling != null">f_precooling = #{fPrecooling},</if>
  173. <if test="fPlantakecntr != null">f_plantakecntr = #{fPlantakecntr},</if>
  174. <if test="fIfdanger != null">f_IFDANGER = #{fIfdanger},</if>
  175. <if test="createBy != null">create_by = #{createBy},</if>
  176. <if test="createTime != null">create_time = #{createTime},</if>
  177. <if test="updateBy != null">update_by = #{updateBy},</if>
  178. <if test="updateTime != null">update_time = #{updateTime},</if>
  179. <if test="remark != null">remark = #{remark},</if>
  180. </trim>
  181. where f_id = #{fId}
  182. </update>
  183. <delete id="deleteTWarehousebillsCntrById" parameterType="Long">
  184. delete
  185. from t_warehousebills_cntr
  186. where f_id = #{fId}
  187. </delete>
  188. <delete id="deleteTWarehousebillsCntrByIds" parameterType="String">
  189. delete from t_warehousebills_cntr where f_id in
  190. <foreach item="fId" collection="array" open="(" separator="," close=")">
  191. #{fId}
  192. </foreach>
  193. </delete>
  194. <delete id="deleteTWarehousebillsCntrfPid" parameterType="Long">
  195. delete
  196. from t_warehousebills_cntr
  197. where f_pid = #{fPid}
  198. </delete>
  199. <delete id="deleteTWarehousebillsCntrfPids" parameterType="String">
  200. delete from t_warehousebills_cntr where f_pid in
  201. <foreach item="fPid" collection="array" open="(" separator="," close=")">
  202. #{fPid}
  203. </foreach>
  204. </delete>
  205. </mapper>