|
@@ -14,6 +14,7 @@
|
|
<result property="createdBy" column="created_by" jdbcType="INTEGER"/>
|
|
<result property="createdBy" column="created_by" jdbcType="INTEGER"/>
|
|
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
|
|
<result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
|
|
<result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
|
|
<result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
|
|
|
|
+ <result property="planType" column="plan_type" jdbcType="INTEGER"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!--查询单个-->
|
|
<!--查询单个-->
|
|
@@ -27,41 +28,29 @@
|
|
<!--查询指定行数据-->
|
|
<!--查询指定行数据-->
|
|
<select id="queryAllByLimit" resultMap="WPInventoryCountTaskMap">
|
|
<select id="queryAllByLimit" resultMap="WPInventoryCountTaskMap">
|
|
select
|
|
select
|
|
-*
|
|
|
|
- from w_p_inventory_count_task
|
|
|
|
|
|
+ task.*,plan.plan_type
|
|
|
|
+ from w_p_inventory_count_task task left join w_p_inventory_count_plan plan on task.w_p_inventory_count_plan_id=plan.id
|
|
<where>
|
|
<where>
|
|
<if test="id != null">
|
|
<if test="id != null">
|
|
- and id = #{id}
|
|
|
|
|
|
+ and task.id = #{id}
|
|
</if>
|
|
</if>
|
|
<if test="wPInventoryCountPlanId != null and wPInventoryCountPlanId != ''">
|
|
<if test="wPInventoryCountPlanId != null and wPInventoryCountPlanId != ''">
|
|
- and w_p_inventory_count_plan_id = #{wPInventoryCountPlanId}
|
|
|
|
|
|
+ and task.w_p_inventory_count_plan_id = #{wPInventoryCountPlanId}
|
|
</if>
|
|
</if>
|
|
<if test="taskCode != null and taskCode != ''">
|
|
<if test="taskCode != null and taskCode != ''">
|
|
- and task_code = #{taskCode}
|
|
|
|
|
|
+ and task.task_code = #{taskCode}
|
|
</if>
|
|
</if>
|
|
<if test="status != null and status != ''">
|
|
<if test="status != null and status != ''">
|
|
- and status = #{status}
|
|
|
|
|
|
+ and task.status = #{status}
|
|
</if>
|
|
</if>
|
|
<if test="startTime != null">
|
|
<if test="startTime != null">
|
|
- and start_time = #{startTime}
|
|
|
|
|
|
+ and task.start_time = #{startTime}
|
|
</if>
|
|
</if>
|
|
<if test="endTime != null">
|
|
<if test="endTime != null">
|
|
- and end_time = #{endTime}
|
|
|
|
|
|
+ and task.end_time = #{endTime}
|
|
</if>
|
|
</if>
|
|
<if test="planUser != null and planUser != ''">
|
|
<if test="planUser != null and planUser != ''">
|
|
- and plan_user = #{planUser}
|
|
|
|
- </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}
|
|
|
|
|
|
+ and task.plan_user = #{planUser}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -108,10 +97,6 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--新增所有列-->
|
|
<!--新增所有列-->
|
|
- <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
- insert into w_p_inventory_count_task(w_p_inventory_count_plan_id,task_code,status,start_time,end_time,plan_user,created_at,created_by,updated_at,updated_by)
|
|
|
|
- values (#{wPInventoryCountPlanId},#{taskCode},#{status},#{startTime},#{endTime},#{planUser},#{createdAt},#{createdBy},#{updatedAt},#{updatedBy})
|
|
|
|
- </insert>
|
|
|
|
|
|
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
insert into w_p_inventory_count_task(w_p_inventory_count_plan_idtask_codestatusstart_timeend_timeplan_usercreated_atcreated_byupdated_atupdated_by)
|
|
insert into w_p_inventory_count_task(w_p_inventory_count_plan_idtask_codestatusstart_timeend_timeplan_usercreated_atcreated_byupdated_atupdated_by)
|