TWarehouseWarehousecheckMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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.TWarehouseWarehousecheckMapper">
  6. <resultMap type="TWarehouseWarehousecheck" id="TWarehouseWarehousecheckResult">
  7. <result property="fId" column="f_id" />
  8. <result property="fWarehouseid" column="f_warehouseid" />
  9. <result property="fWarehousename" column="f_warehousename" />
  10. <result property="plannedDate" column="planned_date" />
  11. <result property="inspectionDate" column="inspection_date" />
  12. <result property="inspector" column="inspector" />
  13. <result property="inspectionRemark" column="inspection_remark" />
  14. <result property="createBy" column="create_by" />
  15. <result property="createTime" column="create_time" />
  16. <result property="updateBy" column="update_by" />
  17. <result property="updateTime" column="update_time" />
  18. <result property="delFlag" column="del_flag" />
  19. <result property="remark" column="remark" />
  20. </resultMap>
  21. <sql id="selectTWarehouseWarehousecheckVo">
  22. select f_id, f_warehouseid, f_warehousename, planned_date, inspection_date, inspector, inspection_remark, create_by, create_time, update_by, update_time, del_flag, remark from t_warehouse_warehousecheck
  23. </sql>
  24. <select id="selectTWarehouseWarehousecheckList" parameterType="TWarehouseWarehousecheck" resultMap="TWarehouseWarehousecheckResult">
  25. <include refid="selectTWarehouseWarehousecheckVo"/>
  26. <where>
  27. <if test="fWarehouseid != null and fWarehouseid != ''"> and f_warehouseid = #{fWarehouseid}</if>
  28. <if test="fWarehousename != null and fWarehousename != ''"> and f_warehousename like concat('%', #{fWarehousename}, '%')</if>
  29. <if test="plannedDate != null "> and planned_date = #{plannedDate}</if>
  30. <if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if>
  31. <if test="inspector != null and inspector != ''"> and inspector = #{inspector}</if>
  32. <if test="inspectionRemark != null and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
  33. </where>
  34. </select>
  35. <select id="selectTWarehouseWarehousecheckById" parameterType="Long" resultMap="TWarehouseWarehousecheckResult">
  36. <include refid="selectTWarehouseWarehousecheckVo"/>
  37. where f_id = #{fId}
  38. </select>
  39. <insert id="insertTWarehouseWarehousecheck" parameterType="TWarehouseWarehousecheck" useGeneratedKeys="true" keyProperty="fId">
  40. insert into t_warehouse_warehousecheck
  41. <trim prefix="(" suffix=")" suffixOverrides=",">
  42. <if test="fWarehouseid != null">f_warehouseid,</if>
  43. <if test="fWarehousename != null">f_warehousename,</if>
  44. <if test="plannedDate != null">planned_date,</if>
  45. <if test="inspectionDate != null">inspection_date,</if>
  46. <if test="inspector != null">inspector,</if>
  47. <if test="inspectionRemark != null">inspection_remark,</if>
  48. <if test="createBy != null">create_by,</if>
  49. <if test="createTime != null">create_time,</if>
  50. <if test="updateBy != null">update_by,</if>
  51. <if test="updateTime != null">update_time,</if>
  52. <if test="delFlag != null">del_flag,</if>
  53. <if test="remark != null">remark,</if>
  54. </trim>
  55. <trim prefix="values (" suffix=")" suffixOverrides=",">
  56. <if test="fWarehouseid != null">#{fWarehouseid},</if>
  57. <if test="fWarehousename != null">#{fWarehousename},</if>
  58. <if test="plannedDate != null">#{plannedDate},</if>
  59. <if test="inspectionDate != null">#{inspectionDate},</if>
  60. <if test="inspector != null">#{inspector},</if>
  61. <if test="inspectionRemark != null">#{inspectionRemark},</if>
  62. <if test="createBy != null">#{createBy},</if>
  63. <if test="createTime != null">#{createTime},</if>
  64. <if test="updateBy != null">#{updateBy},</if>
  65. <if test="updateTime != null">#{updateTime},</if>
  66. <if test="delFlag != null">#{delFlag},</if>
  67. <if test="remark != null">#{remark},</if>
  68. </trim>
  69. </insert>
  70. <update id="updateTWarehouseWarehousecheck" parameterType="TWarehouseWarehousecheck">
  71. update t_warehouse_warehousecheck
  72. <trim prefix="SET" suffixOverrides=",">
  73. <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
  74. <if test="fWarehousename != null">f_warehousename = #{fWarehousename},</if>
  75. <if test="plannedDate != null">planned_date = #{plannedDate},</if>
  76. <if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
  77. <if test="inspector != null">inspector = #{inspector},</if>
  78. <if test="inspectionRemark != null">inspection_remark = #{inspectionRemark},</if>
  79. <if test="createBy != null">create_by = #{createBy},</if>
  80. <if test="createTime != null">create_time = #{createTime},</if>
  81. <if test="updateBy != null">update_by = #{updateBy},</if>
  82. <if test="updateTime != null">update_time = #{updateTime},</if>
  83. <if test="delFlag != null">del_flag = #{delFlag},</if>
  84. <if test="remark != null">remark = #{remark},</if>
  85. </trim>
  86. where f_id = #{fId}
  87. </update>
  88. <delete id="deleteTWarehouseWarehousecheckById" parameterType="Long">
  89. delete from t_warehouse_warehousecheck where f_id = #{fId}
  90. </delete>
  91. <delete id="deleteTWarehouseWarehousecheckByIds" parameterType="String">
  92. delete from t_warehouse_warehousecheck where f_id in
  93. <foreach item="fId" collection="array" open="(" separator="," close=")">
  94. #{fId}
  95. </foreach>
  96. </delete>
  97. </mapper>