|
@@ -0,0 +1,229 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.imcs.admin.business.dao.WInventoryTransactionTaskDao">
|
|
|
+
|
|
|
+ <resultMap type="com.imcs.admin.entity.WInventoryTransactionTask" id="WInventoryTransactionTaskMap">
|
|
|
+ <result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="wInventoryTransactionOrdersId" column="w_inventory_transaction_orders_id" jdbcType="INTEGER"/>
|
|
|
+ <result property="taskCode" column="task_code" jdbcType="VARCHAR"/>
|
|
|
+ <result property="startPosition" column="start_position" jdbcType="VARCHAR"/>
|
|
|
+ <result property="endPosition" column="end_position" jdbcType="VARCHAR"/>
|
|
|
+ <result property="vectorCode" column="vector_code" jdbcType="VARCHAR"/>
|
|
|
+ <result property="errorInfo" column="error_info" jdbcType="VARCHAR"/>
|
|
|
+ <result property="status" column="status" jdbcType="INTEGER"/>
|
|
|
+ <result property="taskType" column="task_type" jdbcType="INTEGER"/>
|
|
|
+ <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
|
|
|
+ <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!--查询单个-->
|
|
|
+ <select id="queryById" resultMap="WInventoryTransactionTaskMap">
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from w_inventory_transaction_task
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--查询指定行数据-->
|
|
|
+ <select id="queryAllByLimit" resultMap="WInventoryTransactionTaskMap">
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from w_inventory_transaction_task
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="wInventoryTransactionOrdersId != null">
|
|
|
+ and w_inventory_transaction_orders_id = #{wInventoryTransactionOrdersId}
|
|
|
+ </if>
|
|
|
+ <if test="taskCode != null and taskCode != ''">
|
|
|
+ and task_code = #{taskCode}
|
|
|
+ </if>
|
|
|
+ <if test="startPosition != null and startPosition != ''">
|
|
|
+ and start_position = #{startPosition}
|
|
|
+ </if>
|
|
|
+ <if test="endPosition != null and endPosition != ''">
|
|
|
+ and end_position = #{endPosition}
|
|
|
+ </if>
|
|
|
+ <if test="vectorCode != null and vectorCode != ''">
|
|
|
+ and vector_code = #{vectorCode}
|
|
|
+ </if>
|
|
|
+ <if test="errorInfo != null and errorInfo != ''">
|
|
|
+ and error_info = #{errorInfo}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="taskType != null">
|
|
|
+ and task_type = #{taskType}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and start_time = #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and end_time = #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ and remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ and created_at = #{createdAt}
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null">
|
|
|
+ and created_by = #{createdBy}
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ and updated_at = #{updatedAt}
|
|
|
+ </if>
|
|
|
+ <if test="updatedBy != null">
|
|
|
+ and updated_by = #{updatedBy}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ limit #{pageable.offset}, #{pageable.pageSize}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--统计总行数-->
|
|
|
+ <select id="count" resultType="java.lang.Long">
|
|
|
+ select count(1)
|
|
|
+ from w_inventory_transaction_task
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="wInventoryTransactionOrdersId != null">
|
|
|
+ and w_inventory_transaction_orders_id = #{wInventoryTransactionOrdersId}
|
|
|
+ </if>
|
|
|
+ <if test="taskCode != null and taskCode != ''">
|
|
|
+ and task_code = #{taskCode}
|
|
|
+ </if>
|
|
|
+ <if test="startPosition != null and startPosition != ''">
|
|
|
+ and start_position = #{startPosition}
|
|
|
+ </if>
|
|
|
+ <if test="endPosition != null and endPosition != ''">
|
|
|
+ and end_position = #{endPosition}
|
|
|
+ </if>
|
|
|
+ <if test="vectorCode != null and vectorCode != ''">
|
|
|
+ and vector_code = #{vectorCode}
|
|
|
+ </if>
|
|
|
+ <if test="errorInfo != null and errorInfo != ''">
|
|
|
+ and error_info = #{errorInfo}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="taskType != null">
|
|
|
+ and task_type = #{taskType}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and start_time = #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and end_time = #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ and remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ and created_at = #{createdAt}
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null">
|
|
|
+ and created_by = #{createdBy}
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ and updated_at = #{updatedAt}
|
|
|
+ </if>
|
|
|
+ <if test="updatedBy != null">
|
|
|
+ and updated_by = #{updatedBy}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增所有列-->
|
|
|
+ <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into w_inventory_transaction_task(w_inventory_transaction_orders_idtask_codestart_positionend_positionvector_codeerror_infostatustask_typestart_timeend_timeremarkscreated_atcreated_byupdated_atupdated_by)
|
|
|
+ values (#{wInventoryTransactionOrdersId}#{taskCode}#{startPosition}#{endPosition}#{vectorCode}#{errorInfo}#{status}#{taskType}#{startTime}#{endTime}#{remarks}#{createdAt}#{createdBy}#{updatedAt}#{updatedBy})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into w_inventory_transaction_task(w_inventory_transaction_orders_idtask_codestart_positionend_positionvector_codeerror_infostatustask_typestart_timeend_timeremarkscreated_atcreated_byupdated_atupdated_by)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.wInventoryTransactionOrdersId}#{entity.taskCode}#{entity.startPosition}#{entity.endPosition}#{entity.vectorCode}#{entity.errorInfo}#{entity.status}#{entity.taskType}#{entity.startTime}#{entity.endTime}#{entity.remarks}#{entity.createdAt}#{entity.createdBy}#{entity.updatedAt}#{entity.updatedBy})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into w_inventory_transaction_task(w_inventory_transaction_orders_idtask_codestart_positionend_positionvector_codeerror_infostatustask_typestart_timeend_timeremarkscreated_atcreated_byupdated_atupdated_by)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.wInventoryTransactionOrdersId}#{entity.taskCode}#{entity.startPosition}#{entity.endPosition}#{entity.vectorCode}#{entity.errorInfo}#{entity.status}#{entity.taskType}#{entity.startTime}#{entity.endTime}#{entity.remarks}#{entity.createdAt}#{entity.createdBy}#{entity.updatedAt}#{entity.updatedBy})
|
|
|
+ </foreach>
|
|
|
+ on duplicate key update
|
|
|
+w_inventory_transaction_orders_id = values(w_inventory_transaction_orders_id)task_code = values(task_code)start_position = values(start_position)end_position = values(end_position)vector_code = values(vector_code)error_info = values(error_info)status = values(status)task_type = values(task_type)start_time = values(start_time)end_time = values(end_time)remarks = values(remarks)created_at = values(created_at)created_by = values(created_by)updated_at = values(updated_at)updated_by = values(updated_by)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!--通过主键修改数据-->
|
|
|
+ <update id="update">
|
|
|
+ update w_inventory_transaction_task
|
|
|
+ <set>
|
|
|
+ <if test="wInventoryTransactionOrdersId != null">
|
|
|
+ w_inventory_transaction_orders_id = #{wInventoryTransactionOrdersId},
|
|
|
+ </if>
|
|
|
+ <if test="taskCode != null and taskCode != ''">
|
|
|
+ task_code = #{taskCode},
|
|
|
+ </if>
|
|
|
+ <if test="startPosition != null and startPosition != ''">
|
|
|
+ start_position = #{startPosition},
|
|
|
+ </if>
|
|
|
+ <if test="endPosition != null and endPosition != ''">
|
|
|
+ end_position = #{endPosition},
|
|
|
+ </if>
|
|
|
+ <if test="vectorCode != null and vectorCode != ''">
|
|
|
+ vector_code = #{vectorCode},
|
|
|
+ </if>
|
|
|
+ <if test="errorInfo != null and errorInfo != ''">
|
|
|
+ error_info = #{errorInfo},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status = #{status},
|
|
|
+ </if>
|
|
|
+ <if test="taskType != null">
|
|
|
+ task_type = #{taskType},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ start_time = #{startTime},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ end_time = #{endTime},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ remarks = #{remarks},
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ created_at = #{createdAt},
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null">
|
|
|
+ created_by = #{createdBy},
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ updated_at = #{updatedAt},
|
|
|
+ </if>
|
|
|
+ <if test="updatedBy != null">
|
|
|
+ updated_by = #{updatedBy},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--通过主键删除-->
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete from w_inventory_transaction_task where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|
|
|
+
|