| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsGasPipingPlanMapper"> |
| | | |
| | | <resultMap type="ApsGasPipingPlan" id="ApsGasPipingPlanResult"> |
| | | <resultMap type="com.aps.core.domain.ApsGasPipingPlan" id="ApsGasPipingPlanResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="masterPlanner" column="master_planner" /> |
| | | <result property="weekDay" column="week_day" /> |
| | |
| | | <!-- </collection>--> |
| | | </resultMap> |
| | | |
| | | <resultMap type="ApsGasPipingPlan" id="ApsGasPipingPlanResultWithProcess"> |
| | | <resultMap type="com.aps.core.domain.ApsGasPipingPlan" id="ApsGasPipingPlanResultWithProcess"> |
| | | <result property="documentNumber" column="document_number" /> |
| | | <result property="itemNumber" column="item_number" /> |
| | | <result property="productionQuantity" column="production_quantity" /> |
| | |
| | | from aps_gas_piping_plan |
| | | </sql> |
| | | |
| | | <select id="selectApsGasPipingPlanList" parameterType="ApsGasPipingPlan" resultMap="ApsGasPipingPlanResult"> |
| | | <select id="selectApsGasPipingPlanList" parameterType="com.aps.core.domain.ApsGasPipingPlan" resultMap="ApsGasPipingPlanResult"> |
| | | <include refid="selectApsGasPipingPlanVo"/> |
| | | <where> |
| | | <if test="masterPlanner != null and masterPlanner != ''"> and master_planner like concat('%', #{masterPlanner}, '%')</if> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsGasPipingPlan" parameterType="ApsGasPipingPlan"> |
| | | <insert id="insertApsGasPipingPlan" parameterType="com.aps.core.domain.ApsGasPipingPlan"> |
| | | insert into aps_gas_piping_plan |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id != ''">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsGasPipingPlan" parameterType="ApsGasPipingPlan"> |
| | | <update id="updateApsGasPipingPlan" parameterType="com.aps.core.domain.ApsGasPipingPlan"> |
| | | update aps_gas_piping_plan |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="masterPlanner != null">master_planner = #{masterPlanner},</if> |
| | |
| | | update aps_gas_piping_plan set del_flag='1' where del_flag ='0' |
| | | </update> |
| | | |
| | | <select id="selectApsGasPipingPlanWithProcess" parameterType="ApsGasPipingPlan" resultMap="ApsGasPipingPlanResultWithProcess"> |
| | | <select id="selectApsGasPipingPlanWithProcess" parameterType="com.aps.core.domain.ApsGasPipingPlan" resultMap="ApsGasPipingPlanResultWithProcess"> |
| | | select c.* from (select a.document_number,a.item_number,a.process_number,a.production_quantity,a.plan_type,a.plan_end_day,a.std_op,b.process_name,b.process_number as process_number_sub,b.standard_time,b.process_plan_start_day,b.process_plan_end_day from aps_gas_piping_plan a |
| | | left join aps_process_route b on a.document_number = b.work_order_no |
| | | where a.document_status in ('0','1','2','4') and a.op_status!='完工' and b.process_plan_start_day is not null and b.process_name in(select process_name from aps_standard_process where major='气柜' or major='管路') ORDER BY a.document_number,b.process_number) c GROUP BY c.document_number,c.item_number,c.process_number,c.production_quantity,c.process_name,c.process_number_sub,c.standard_time,c.process_plan_start_day,c.plan_type,c.process_plan_end_day,c.plan_end_day,c.std_op |