| | |
| | | <result property="isStockComplete" column="is_stock_complete" /> |
| | | <result property="hasTurnback" column="has_turnback" /> |
| | | <result property="hasRisk" column="has_risk" /> |
| | | <result property="planType" column="plan_type" /> |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="nextOpName" column="next_op_name" /> |
| | | <!-- <collection property="apsProcessRoutes" javaType="java.util.ArrayList" ofType="com.aps.core.domain.ApsProcessRoute">--> |
| | | <!-- <result property="id" column="id" />--> |
| | | <!-- <result property="itemNo" column="item_no" />--> |
| | | <!-- <result property="workOrderNo" column="work_order_no" />--> |
| | | <!-- <result property="processNumber" column="process_number_sub" />--> |
| | | <!-- <result property="processName" column="process_name" />--> |
| | | <!-- <result property="processPlanStartDay" column="process_plan_start_day" />--> |
| | | <!-- <result property="processPlanEndDay" column="process_plan_end_day" />--> |
| | | <!-- <result property="notStartWorkCount" column="not_start_work_count" />--> |
| | | <!-- <result property="completedCount" column="completed_count" />--> |
| | | <!-- <result property="discardCount" column="discard_count" />--> |
| | | <!-- <result property="integrationDay" column="integration_day" />--> |
| | | <!-- <result property="plant" column="plant" />--> |
| | | <!-- <result property="delFlag" column="del_flag" />--> |
| | | <!-- <result property="createBy" column="create_by" />--> |
| | | <!-- <result property="createTime" column="create_time" />--> |
| | | <!-- <result property="updateBy" column="update_by" />--> |
| | | <!-- <result property="updateTime" column="update_time" />--> |
| | | <!-- <result property="standardTime" column="standard_time" />--> |
| | | <!-- <result property="processOrder" column="process_order" />--> |
| | | <!-- <result property="workCenter" column="work_center" />--> |
| | | <!-- <result property="processQty" column="process_qty" />--> |
| | | <!-- <result property="opStatus" column="op_status" />--> |
| | | <!-- <result property="opStatus" column="op_status" />--> |
| | | <!-- <result property="orgCode" column="org_code" />--> |
| | | <!-- </collection>--> |
| | | </resultMap> |
| | | |
| | | <resultMap type="ApsGasPipingPlan" id="ApsGasPipingPlanResultWithProcess"> |
| | | <result property="documentNumber" column="document_number" /> |
| | | <result property="itemNumber" column="item_number" /> |
| | | <result property="productionQuantity" column="production_quantity" /> |
| | | <result property="processNumber" column="process_number" /> |
| | | <result property="planType" column="plan_type" /> |
| | | <result property="planEndDay" column="plan_end_day" /> |
| | | <result property="stdOp" column="std_op" /> |
| | | <collection property="apsProcessRoutes" javaType="java.util.ArrayList" ofType="com.aps.core.domain.ApsProcessRoute"> |
| | | <result property="processNumber" column="process_number_sub" /> |
| | | <result property="processName" column="process_name" /> |
| | | <result property="processPlanStartDay" column="process_plan_start_day" /> |
| | | <result property="processPlanEndDay" column="process_plan_end_day" /> |
| | | <result property="standardTime" column="standard_time" /> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsGasPipingPlanVo"> |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk from aps_gas_piping_plan |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, |
| | | business_type, document_number, requirement_type, document_status, item_number, drawing_no, |
| | | version_number, production_quantity, good_products_quantity, process_number, work_center, |
| | | department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, |
| | | next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, |
| | | advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, |
| | | has_turnback, has_risk ,plan_type, op_status, next_op_name |
| | | from aps_gas_piping_plan |
| | | </sql> |
| | | |
| | | <select id="selectApsGasPipingPlanList" parameterType="ApsGasPipingPlan" resultMap="ApsGasPipingPlanResult"> |
| | | <include refid="selectApsGasPipingPlanVo"/> |
| | | <where> |
| | | <if test="masterPlanner != null and masterPlanner != ''"> and master_planner like concat('%', #{masterPlanner}, '%')</if> |
| | | <if test="customer != null and customer != ''"> and customer like concat('%', #{customer}, '%')</if> |
| | | <if test="customer != null and customer != ''"> and customer like '%' || #{customer} || '%' </if> |
| | | <if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if> |
| | | <if test="documentNumber != null and documentNumber != ''"> and document_number = #{documentNumber}</if> |
| | | <if test="documentNumber != null and documentNumber != ''"> and document_number like '%' || #{documentNumber} || '%'</if> |
| | | <if test="requirementType != null and requirementType != ''"> and requirement_type = #{requirementType}</if> |
| | | <if test="documentStatus != null and documentStatus != ''"> and document_status = #{documentStatus}</if> |
| | | <if test="itemNumber != null and itemNumber != ''"> and item_number = #{itemNumber}</if> |
| | |
| | | <if test="isStockComplete != null "> and is_stock_complete = #{isStockComplete}</if> |
| | | <if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if> |
| | | <if test="hasRisk != null "> and has_risk = #{hasRisk}</if> |
| | | <if test="planType != null "> and plan_type = #{planType}</if> |
| | | <if test="opStatus != null "> and op_status = #{opStatus}</if> |
| | | <if test="nextOpName != null "> and next_op_name = #{nextOpName}</if> |
| | | and del_flag ='0' |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="isStockComplete != null">is_stock_complete,</if> |
| | | <if test="hasTurnback != null">has_turnback,</if> |
| | | <if test="hasRisk != null">has_risk,</if> |
| | | <if test="planType != null">plan_type,</if> |
| | | <if test="opStatus != null">op_status,</if> |
| | | <if test="nextOpName != null">next_op_name,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id != ''">#{id},</if> |
| | |
| | | <if test="isStockComplete != null">#{isStockComplete},</if> |
| | | <if test="hasTurnback != null">#{hasTurnback},</if> |
| | | <if test="hasRisk != null">#{hasRisk},</if> |
| | | <if test="planType != null">#{planType},</if> |
| | | <if test="opStatus != null">#{opStatus},</if> |
| | | <if test="nextOpName != null">#{nextOpName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="isStockComplete != null">is_stock_complete = #{isStockComplete},</if> |
| | | <if test="hasTurnback != null">has_turnback = #{hasTurnback},</if> |
| | | <if test="hasRisk != null">has_risk = #{hasRisk},</if> |
| | | <if test="planType != null">plan_type = #{planType},</if> |
| | | <if test="opStatus != null">op_status = #{opStatus},</if> |
| | | <if test="nextOpName != null">next_op_name = #{nextOpName},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="removeAllPlans" > |
| | | update aps_gas_piping_plan set del_flag='1' where del_flag ='0' |
| | | </update> |
| | | |
| | | <select id="selectApsGasPipingPlanWithProcess" parameterType="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 |
| | | </select> |
| | | |
| | | </mapper> |