| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsGasPipelineCapacityPlanMapper"> |
| | | |
| | | <resultMap type="ApsGasPipelineCapacityPlan" id="ApsGasPipelineCapacityPlanResult"> |
| | | <resultMap type="com.aps.core.domain.ApsGasPipelineCapacityPlan" id="ApsGasPipelineCapacityPlanResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="processName" column="process_name" /> |
| | | <result property="year" column="year" /> |
| | | <result property="month" column="month" /> |
| | | <result property="major" column="major" /> |
| | | <result property="workshop" column="workshop" /> |
| | | <result property="dayProduceType" column="day_produce_type" /> |
| | | <result property="dayProduceNum" column="day_produce_num" /> |
| | | <result property="dayProduceUnit" column="day_produce_unit" /> |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="orgCode" column="org_code" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsGasPipelineCapacityPlanVo"> |
| | | select id, process_name, year, month, major, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time from aps_gas_pipeline_capacity_plan |
| | | select id, process_name, year, month, major, workshop, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time, org_code from aps_gas_pipeline_capacity_plan |
| | | </sql> |
| | | |
| | | <select id="selectApsGasPipelineCapacityPlanList" parameterType="ApsGasPipelineCapacityPlan" resultMap="ApsGasPipelineCapacityPlanResult"> |
| | | <select id="selectApsGasPipelineCapacityPlanList" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan" resultMap="ApsGasPipelineCapacityPlanResult"> |
| | | <include refid="selectApsGasPipelineCapacityPlanVo"/> |
| | | <where> |
| | | <if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if> |
| | | <if test="year != null and year != ''"> and year = #{year}</if> |
| | | <if test="month != null and month != ''"> and month = #{month}</if> |
| | | <if test="major != null and major != ''"> and major = #{major}</if> |
| | | <if test="workshop != null and workshop != ''"> and workshop = #{workshop}</if> |
| | | <if test="dayProduceType != null and dayProduceType != ''"> and day_produce_type = #{dayProduceType}</if> |
| | | <if test="dayProduceNum != null "> and day_produce_num = #{dayProduceNum}</if> |
| | | <if test="dayProduceUnit != null and dayProduceUnit != ''"> and day_produce_unit = #{dayProduceUnit}</if> |
| | |
| | | <if test="dayProduceAllNum != null "> and day_produce_all_num = #{dayProduceAllNum}</if> |
| | | <if test="days != null "> and days = #{days}</if> |
| | | <if test="monthProduceAllNum != null "> and month_produce_all_num = #{monthProduceAllNum}</if> |
| | | <if test="orgCode != null "> and org_code = #{orgCode}</if> |
| | | <!-- <if test="major != null and major != ''">--> |
| | | <!-- and process_name in (select process_name from aps_standard_process where major=#{major})--> |
| | | <!-- </if>--> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsGasPipelineCapacityPlan" parameterType="ApsGasPipelineCapacityPlan"> |
| | | <insert id="insertApsGasPipelineCapacityPlan" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan"> |
| | | insert into aps_gas_pipeline_capacity_plan |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="year != null">year,</if> |
| | | <if test="month != null">month,</if> |
| | | <if test="major != null">major,</if> |
| | | <if test="workshop != null">workshop,</if> |
| | | <if test="dayProduceType != null">day_produce_type,</if> |
| | | <if test="dayProduceNum != null">day_produce_num,</if> |
| | | <if test="dayProduceUnit != null">day_produce_unit,</if> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="orgCode != null">org_code,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="year != null">#{year},</if> |
| | | <if test="month != null">#{month},</if> |
| | | <if test="major != null">#{major},</if> |
| | | <if test="workshop != null">workshop,</if> |
| | | <if test="dayProduceType != null">#{dayProduceType},</if> |
| | | <if test="dayProduceNum != null">#{dayProduceNum},</if> |
| | | <if test="dayProduceUnit != null">#{dayProduceUnit},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="orgCode != null">#{orgCode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsGasPipelineCapacityPlan" parameterType="ApsGasPipelineCapacityPlan"> |
| | | <update id="updateApsGasPipelineCapacityPlan" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan"> |
| | | update aps_gas_pipeline_capacity_plan |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="processName != null">process_name = #{processName},</if> |
| | | <if test="year != null">year = #{year},</if> |
| | | <if test="month != null">month = #{month},</if> |
| | | <if test="major != null">major = #{major},</if> |
| | | <if test="workshop != null">workshop,</if> |
| | | <if test="dayProduceType != null">day_produce_type = #{dayProduceType},</if> |
| | | <if test="dayProduceNum != null">day_produce_num = #{dayProduceNum},</if> |
| | | <if test="dayProduceUnit != null">day_produce_unit = #{dayProduceUnit},</if> |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="orgCode != null">org_code = #{orgCode},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteByDateAndFactory" > |
| | | delete from aps_gas_pipeline_capacity_plan |
| | | where year = #{year} |
| | | and month = #{month} |
| | | and org_code = #{factory} |
| | | and major = #{major} |
| | | </delete> |
| | | |
| | | <!-- 查询设计产能数据 - 专用于接口二功能 --> |
| | | <select id="selectDesignCapacityForInterface2" resultMap="ApsGasPipelineCapacityPlanResult"> |
| | | <include refid="selectApsGasPipelineCapacityPlanVo"/> |
| | | <where> |
| | | <if test="processName != null and processName != ''"> |
| | | and process_name = #{processName} |
| | | </if> |
| | | <if test="year != null and year != ''"> |
| | | and year = #{year} |
| | | </if> |
| | | <if test="month != null and month != ''"> |
| | | and CAST(month AS INTEGER) = CAST(#{month} AS INTEGER) |
| | | </if> |
| | | <if test="major != null and major != ''"> |
| | | and major = #{major} |
| | | </if> |
| | | <if test="orgCode != null and orgCode != ''"> |
| | | and org_code = #{orgCode} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |