| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsGasPipingRouteStatMapper"> |
| | | |
| | | <resultMap type="ApsGasPipingRouteStat" id="ApsGasPipingRouteStatResult"> |
| | | <resultMap type="com.aps.core.domain.ApsGasPipingRouteStat" id="ApsGasPipingRouteStatResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="workOrderNo" column="work_order_no" /> |
| | | <result property="roadProcessNumber" column="road_process_number" /> |
| | |
| | | process_plan_start_day, design_times, del_flag, create_by, |
| | | process_name, create_time, item_number, standard_dosage, |
| | | process_total_dosage, design_capacity, major, plan_start_year, |
| | | plan_start_month, plan_start_day , warning |
| | | plan_start_month, plan_start_day , warning, plant |
| | | from aps_gas_piping_route_stat |
| | | </sql> |
| | | |
| | | <select id="selectApsGasPipingRouteStatList" parameterType="ApsGasPipingRouteStat" resultMap="ApsGasPipingRouteStatResult"> |
| | | <select id="selectApsGasPipingRouteStatList" parameterType="com.aps.core.domain.ApsGasPipingRouteStat" resultMap="ApsGasPipingRouteStatResult"> |
| | | <include refid="selectApsGasPipingRouteStatVo"/> |
| | | <where> |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
| | |
| | | and process_name in (select process_name from aps_standard_process where major='气柜') |
| | | </if> |
| | | </if> |
| | | <if test="plant != null and plant != ''"> and plant = #{plant} </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsGasPipingRouteStat" parameterType="ApsGasPipingRouteStat"> |
| | | <insert id="insertApsGasPipingRouteStat" parameterType="com.aps.core.domain.ApsGasPipingRouteStat"> |
| | | insert into aps_gas_piping_route_stat |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsGasPipingRouteStat" parameterType="ApsGasPipingRouteStat"> |
| | | <update id="updateApsGasPipingRouteStat" parameterType="com.aps.core.domain.ApsGasPipingRouteStat"> |
| | | update aps_gas_piping_route_stat |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if> |
| | |
| | | id,work_order_no, road_process_number, current_process_number, production_quantity, standard_time, |
| | | process_total_time, process_plan_start_day, design_times, del_flag, create_by, process_name, |
| | | create_time, item_number, standard_dosage, process_total_dosage, design_capacity, major, |
| | | plan_start_year, plan_start_month, plan_start_day,batch_number,process_plan_end_day,warning,order_plan_end_day |
| | | plan_start_year, plan_start_month, plan_start_day,batch_number,process_plan_end_day,warning,order_plan_end_day,plant |
| | | ) |
| | | VALUES |
| | | <foreach collection="apsGasPipingRouteStatList" item="stat" separator=","> |
| | |
| | | #{stat.standardTime}, #{stat.processTotalTime}, #{stat.processPlanStartDay}, #{stat.designTimes}, #{stat.delFlag}, |
| | | #{stat.createBy}, #{stat.processName}, #{stat.createTime}, #{stat.itemNumber}, #{stat.standardDosage}, |
| | | #{stat.processTotalDosage}, #{stat.designCapacity}, #{stat.major}, #{stat.planStartYear}, |
| | | #{stat.planStartMonth}, #{stat.planStartDay}, #{stat.batchNumber}, #{stat.processPlanEndDay},#{stat.warning},#{stat.orderPlanEndDay} |
| | | #{stat.planStartMonth}, #{stat.planStartDay}, #{stat.batchNumber}, #{stat.processPlanEndDay},#{stat.warning},#{stat.orderPlanEndDay},#{stat.plant} |
| | | ) |
| | | </foreach> |
| | | |
| | |
| | | |
| | | <select id="queryTempStat" resultMap="ApsGasPipingRouteStatResult" > |
| | | select row_number() over (partition by rt.work_order_no order by rt.process_number desc ) as num, |
| | | rt.work_order_no, |
| | | rt.work_order_no, |
| | | rt.process_name, |
| | | cast(rt.process_number as numeric(18, 2)) as road_process_number, |
| | | cast(rt.process_number as numeric(18, 2)) as route_process_number, |
| | |
| | | rt.process_plan_start_day, |
| | | rt.process_plan_end_day, |
| | | pl.plan_end_day as order_plan_end_day, |
| | | rt.item_no as item_number, |
| | | pl.plan_type as major, |
| | | false as warning |
| | | rt.item_no as item_number, |
| | | pl.plan_type as major, |
| | | false as warning, |
| | | pl.plant |
| | | from aps_gas_piping_plan as pl |
| | | left join aps_process_route as rt on pl.document_number = rt.work_order_no |
| | | where pl.document_number is not null and rt.work_order_no is not null |
| | | where pl.document_number is not null and rt.work_order_no is not null and pl.plan_end_day is not null |
| | | order by rt.work_order_no asc, rt.process_number desc |
| | | </select> |
| | | |