|
|
@ -141,90 +141,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
where plan_id = #{planId} |
|
|
|
where plan_id = #{planId} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertRollingPlan" parameterType="RollingPlan" useGeneratedKeys="true" keyProperty="planId"> |
|
|
|
<insert id="batchInsertRollingPlan" parameterType="java.util.List"> |
|
|
|
insert into rolling_plan |
|
|
|
insert into rolling_plan ( |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
plan_number, machine_code, plan_year, version_week, production_mode, |
|
|
|
<if test="planNumber != null">plan_number,</if> |
|
|
|
status, sales_area_code, country_code, sales_coordinator, customer_name, |
|
|
|
<if test="machineCode != null">machine_code,</if> |
|
|
|
production_version, brand_code, sales_model, production_base, |
|
|
|
<if test="planYear != null">plan_year,</if> |
|
|
|
is_zero_execution, schedule_time, adjust_time, last_week_qty, |
|
|
|
<if test="versionWeek != null">version_week,</if> |
|
|
|
current_week_qty, qty_difference, order_stage, order_type, |
|
|
|
<if test="productionMode != null">production_mode,</if> |
|
|
|
packing_method, plan_sequence, is_first_order, is_direct_delivery, |
|
|
|
<if test="status != null">status,</if> |
|
|
|
product_category, product_size, lock_week, audit_status, |
|
|
|
<if test="salesAreaCode != null">sales_area_code,</if> |
|
|
|
screen_requirement, panel_manufacturer, panel_requirement, core_requirement, |
|
|
|
<if test="countryCode != null">country_code,</if> |
|
|
|
create_by, create_time, remark |
|
|
|
<if test="salesCoordinator != null">sales_coordinator,</if> |
|
|
|
) values |
|
|
|
<if test="customerName != null">customer_name,</if> |
|
|
|
<foreach collection="list" item="item" separator=","> |
|
|
|
<if test="productionVersion != null">production_version,</if> |
|
|
|
( |
|
|
|
<if test="brandCode != null">brand_code,</if> |
|
|
|
#{item.planNumber}, #{item.machineCode}, #{item.planYear}, |
|
|
|
<if test="salesModel != null">sales_model,</if> |
|
|
|
#{item.versionWeek}, #{item.productionMode}, #{item.status}, |
|
|
|
<if test="productionBase != null">production_base,</if> |
|
|
|
#{item.salesAreaCode}, #{item.countryCode}, #{item.salesCoordinator}, |
|
|
|
<if test="isZeroExecution != null">is_zero_execution,</if> |
|
|
|
#{item.customerName}, #{item.productionVersion}, #{item.brandCode}, |
|
|
|
<if test="scheduleTime != null">schedule_time,</if> |
|
|
|
#{item.salesModel}, #{item.productionBase}, #{item.isZeroExecution}, |
|
|
|
<if test="lastAdjustTime != null">last_adjust_time,</if> |
|
|
|
#{item.scheduleTime}, #{item.adjustTime}, #{item.lastWeekQty}, |
|
|
|
<if test="adjustTime != null">adjust_time,</if> |
|
|
|
#{item.currentWeekQty}, #{item.qtyDifference}, #{item.orderStage}, |
|
|
|
<if test="lastWeekQty != null">last_week_qty,</if> |
|
|
|
#{item.orderType}, #{item.packingMethod}, #{item.planSequence}, |
|
|
|
<if test="currentWeekQty != null">current_week_qty,</if> |
|
|
|
#{item.isFirstOrder}, #{item.isDirectDelivery}, #{item.productCategory}, |
|
|
|
<if test="qtyDifference != null">qty_difference,</if> |
|
|
|
#{item.productSize}, #{item.lockWeek}, #{item.auditStatus}, |
|
|
|
<if test="orderStage != null">order_stage,</if> |
|
|
|
#{item.screenRequirement}, #{item.panelManufacturer}, #{item.panelRequirement}, #{item.coreRequirement}, |
|
|
|
<if test="orderType != null">order_type,</if> |
|
|
|
#{item.createBy}, sysdate(), #{item.remark} |
|
|
|
<if test="packingMethod != null">packing_method,</if> |
|
|
|
) |
|
|
|
<if test="planSequence != null">plan_sequence,</if> |
|
|
|
</foreach> |
|
|
|
<if test="isFirstOrder != null">is_first_order,</if> |
|
|
|
|
|
|
|
<if test="isDirectDelivery != null">is_direct_delivery,</if> |
|
|
|
|
|
|
|
<if test="screenRequirement != null">screen_requirement,</if> |
|
|
|
|
|
|
|
<if test="panelManufacturer != null">panel_manufacturer,</if> |
|
|
|
|
|
|
|
<if test="panelRequirement != null">panel_requirement,</if> |
|
|
|
|
|
|
|
<if test="coreRequirement != null">core_requirement,</if> |
|
|
|
|
|
|
|
<if test="productCategory != null">product_category,</if> |
|
|
|
|
|
|
|
<if test="productSize != null">product_size,</if> |
|
|
|
|
|
|
|
<if test="remark != null">remark,</if> |
|
|
|
|
|
|
|
<if test="lockWeek != null">lock_week,</if> |
|
|
|
|
|
|
|
<if test="createBy != null">create_by,</if> |
|
|
|
|
|
|
|
<if test="createTime != null">create_time,</if> |
|
|
|
|
|
|
|
<if test="updateBy != null">update_by,</if> |
|
|
|
|
|
|
|
<if test="updateTime != null">update_time,</if> |
|
|
|
|
|
|
|
</trim> |
|
|
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
|
|
|
|
<if test="planNumber != null">#{planNumber},</if> |
|
|
|
|
|
|
|
<if test="machineCode != null">#{machineCode},</if> |
|
|
|
|
|
|
|
<if test="planYear != null">#{planYear},</if> |
|
|
|
|
|
|
|
<if test="versionWeek != null">#{versionWeek},</if> |
|
|
|
|
|
|
|
<if test="productionMode != null">#{productionMode},</if> |
|
|
|
|
|
|
|
<if test="status != null">#{status},</if> |
|
|
|
|
|
|
|
<if test="salesAreaCode != null">#{salesAreaCode},</if> |
|
|
|
|
|
|
|
<if test="countryCode != null">#{countryCode},</if> |
|
|
|
|
|
|
|
<if test="salesCoordinator != null">#{salesCoordinator},</if> |
|
|
|
|
|
|
|
<if test="customerName != null">#{customerName},</if> |
|
|
|
|
|
|
|
<if test="productionVersion != null">#{productionVersion},</if> |
|
|
|
|
|
|
|
<if test="brandCode != null">#{brandCode},</if> |
|
|
|
|
|
|
|
<if test="salesModel != null">#{salesModel},</if> |
|
|
|
|
|
|
|
<if test="productionBase != null">#{productionBase},</if> |
|
|
|
|
|
|
|
<if test="isZeroExecution != null">#{isZeroExecution},</if> |
|
|
|
|
|
|
|
<if test="scheduleTime != null">#{scheduleTime},</if> |
|
|
|
|
|
|
|
<if test="lastAdjustTime != null">#{lastAdjustTime},</if> |
|
|
|
|
|
|
|
<if test="adjustTime != null">#{adjustTime},</if> |
|
|
|
|
|
|
|
<if test="lastWeekQty != null">#{lastWeekQty},</if> |
|
|
|
|
|
|
|
<if test="currentWeekQty != null">#{currentWeekQty},</if> |
|
|
|
|
|
|
|
<if test="qtyDifference != null">#{qtyDifference},</if> |
|
|
|
|
|
|
|
<if test="orderStage != null">#{orderStage},</if> |
|
|
|
|
|
|
|
<if test="orderType != null">#{orderType},</if> |
|
|
|
|
|
|
|
<if test="packingMethod != null">#{packingMethod},</if> |
|
|
|
|
|
|
|
<if test="planSequence != null">#{planSequence},</if> |
|
|
|
|
|
|
|
<if test="isFirstOrder != null">#{isFirstOrder},</if> |
|
|
|
|
|
|
|
<if test="isDirectDelivery != null">#{isDirectDelivery},</if> |
|
|
|
|
|
|
|
<if test="screenRequirement != null">#{screenRequirement},</if> |
|
|
|
|
|
|
|
<if test="panelManufacturer != null">#{panelManufacturer},</if> |
|
|
|
|
|
|
|
<if test="panelRequirement != null">#{panelRequirement},</if> |
|
|
|
|
|
|
|
<if test="coreRequirement != null">#{coreRequirement},</if> |
|
|
|
|
|
|
|
<if test="productCategory != null">#{productCategory},</if> |
|
|
|
|
|
|
|
<if test="productSize != null">#{productSize},</if> |
|
|
|
|
|
|
|
<if test="remark != null">#{remark},</if> |
|
|
|
|
|
|
|
<if test="lockWeek != null">#{lockWeek},</if> |
|
|
|
|
|
|
|
<if test="createBy != null">#{createBy},</if> |
|
|
|
|
|
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if> |
|
|
|
|
|
|
|
</trim> |
|
|
|
|
|
|
|
</insert> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
<update id="updateRollingPlan" parameterType="RollingPlan"> |
|
|
|
<update id="updateRollingPlan" parameterType="RollingPlan"> |
|
|
@ -263,7 +207,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="coreRequirement != null">core_requirement = #{coreRequirement},</if> |
|
|
|
<if test="coreRequirement != null">core_requirement = #{coreRequirement},</if> |
|
|
|
<if test="productCategory != null">product_category = #{productCategory},</if> |
|
|
|
<if test="productCategory != null">product_category = #{productCategory},</if> |
|
|
|
<if test="productSize != null">product_size = #{productSize},</if> |
|
|
|
<if test="productSize != null">product_size = #{productSize},</if> |
|
|
|
<if test="remark != null">remark = #{remark},</if> |
|
|
|
|
|
|
|
<if test="lockWeek != null">lock_week = #{lockWeek},</if> |
|
|
|
<if test="lockWeek != null">lock_week = #{lockWeek},</if> |
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
|
|