TWarehouseWarehousecheckitemsMapper.xml 6.7 KB

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