123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <?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"/>
- <result property="orderCode" column="order_code" jdbcType="INTEGER"/>
- <result property="orderName" column="order_name" jdbcType="INTEGER"/>
- <result property="inOutCode" column="in_out_code" jdbcType="INTEGER"/>
- </resultMap>
- <!--查询单个-->
- <select id="queryById" resultMap="WInventoryTransactionTaskMap">
- select
- *
- from w_inventory_transaction_task
- where id = #{id}
- </select>
- <!--查询指定行数据-->
- <select id="queryAllByLimit" resultMap="WInventoryTransactionTaskMap">
- select
- task.*,orders.order_code,orders.order_name,orders.in_out_code
- from w_inventory_transaction_task task
- left join w_inventory_transaction_orders orders on task.w_inventory_transaction_orders_id=orders.id
- <where>
- <if test="id != null">
- and task.id = #{id}
- </if>
- <if test="wInventoryTransactionOrdersId != null">
- and task.w_inventory_transaction_orders_id = #{wInventoryTransactionOrdersId}
- </if>
- <if test="taskCode != null and taskCode != ''">
- and task.task_code = #{taskCode}
- </if>
- <if test="startPosition != null and startPosition != ''">
- and task.start_position = #{startPosition}
- </if>
- <if test="endPosition != null and endPosition != ''">
- and task.end_position = #{endPosition}
- </if>
- <if test="vectorCode != null and vectorCode != ''">
- and task.vector_code = #{vectorCode}
- </if>
- <if test="errorInfo != null and errorInfo != ''">
- and task.error_info = #{errorInfo}
- </if>
- <if test="status != null">
- and task.status = #{status}
- </if>
- <if test="taskType != null and taskType!= ''">
- and task.task_type = #{taskType}
- </if>
- <if test="startTime != null">
- and task.start_time = #{startTime}
- </if>
- <if test="endTime != null">
- and task.end_time = #{endTime}
- </if>
- <if test="remarks != null and remarks != ''">
- and task.remarks = #{remarks}
- </if>
- <if test="createdAt != null">
- and task.created_at = #{createdAt}
- </if>
- <if test="createdBy != null">
- and task.created_by = #{createdBy}
- </if>
- <if test="updatedAt != null">
- and task.updated_at = #{updatedAt}
- </if>
- <if test="updatedBy != null">
- and task.updated_by = #{updatedBy}
- </if>
- <if test="orderCode != null and orderCode!= ''" >
- and orders.order_code = #{orderCode}
- </if>
- <if test="inOutCode != null and inOutCode!= ''" >
- and orders.in_out_code = #{inOutCode}
- </if>
- </where>
- </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>
- <!--新增所有列-->
- <!--通过主键修改数据-->
- <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>
- <select id="selectOne" resultType="com.imcs.admin.entity.WInventoryTransactionTask">
- select * from w_inventory_transaction_task where status in(0,1) order by id asc limit 1
- </select>
- </mapper>
|