Browse Source

2025-09-24

copyPart Routing关联主表并且加失效日期为null条件
master
fengyuan_yang 9 months ago
parent
commit
fea574131e
  1. 6
      src/main/resources/mapper/part/RecipeManagementMapper.xml
  2. 142
      src/main/resources/mapper/part/RoutingManagementMapper.xml

6
src/main/resources/mapper/part/RecipeManagementMapper.xml

@ -1055,7 +1055,7 @@
a.net_weight,
a.official_flag
FROM plm_recipe_header as a
left join part_revision as b on a.site = b.site and a.part_no = b.part_no and a.eng_chg_level = b.eng_chg_level
left join part_revision as b on a.site = b.site and a.part_no = b.part_no and a.eng_chg_level = b.eng_chg_level
where a.site = #{site} and a.part_no = #{partNo} and b.eff_phase_out_date is null
</select>
@ -1076,7 +1076,7 @@
a.display_volume_uom,
a.reg_unit
FROM plm_recipe_detail as a
left join part_revision as b on a.site = b.site and a.part_no = b.part_no and a.eng_chg_level = b.eng_chg_level
left join part_revision as b on a.site = b.site and a.part_no = b.part_no and a.eng_chg_level = b.eng_chg_level
where a.site = #{site} and a.part_no = #{partNo} and b.eff_phase_out_date is null
</select>
@ -1120,7 +1120,7 @@
a.lot_batch_origin_db,
a.weight_share
FROM plm_recipe_component as a
left join part_revision as b on a.site = b.site and a.part_no = b.part_no and a.eng_chg_level = b.eng_chg_level
left join part_revision as b on a.site = b.site and a.part_no = b.part_no and a.eng_chg_level = b.eng_chg_level
where a.site = #{site} and a.part_no = #{partNo} and b.eff_phase_out_date is null
</select>

142
src/main/resources/mapper/part/RoutingManagementMapper.xml

@ -1735,55 +1735,57 @@
<select id="selectRoutingDetailByPartNo" resultType="com.spring.modules.part.vo.RoutingDetailVo">
SELECT
site,
part_no,
routing_type,
routing_revision,
alternative_no,
alternative_description,
rout_template_id,
plan_date,
fixed_lead_time_day,
fixed_lead_time_hour,
variable_lead_time_day,
variable_lead_time_hour,
for_std_lot_by_day,
for_lot_by_day,
min_lot_qty,
note_text as detailNoteText,
a.site,
a.part_no,
a.routing_type,
a.routing_revision,
a.alternative_no,
a.alternative_description,
a.rout_template_id,
a.plan_date,
a.fixed_lead_time_day,
a.fixed_lead_time_hour,
a.variable_lead_time_day,
a.variable_lead_time_hour,
a.for_std_lot_by_day,
a.for_lot_by_day,
a.min_lot_qty,
a.note_text as detailNoteText,
'Tentative' as status,
official_flag
FROM plm_routing_detail
where site = #{site} and part_no = #{partNo}
a.official_flag
FROM plm_routing_detail as a
inner join plm_routing_header as b on a.site = b.site and a.part_no = b.part_no and a.routing_type = b.routing_type and a.routing_revision = b.routing_revision
where a.site = #{site} and a.part_no = #{partNo} and b.phase_out_date is null
</select>
<select id="selectRoutingComponentByPartNo" resultType="com.spring.modules.part.vo.RoutingComponentVo">
SELECT
site,
part_no,
routing_type,
routing_revision,
alternative_no,
operation_id,
operation_no,
operation_name,
efficiency_factor,
mach_run_factor,
mach_setup_time,
run_time_code,
labor_run_factor,
labor_setup_time,
crew_size,
setup_crew_size,
outside_op_item,
machine_no,
work_center_no,
labor_class_no,
setup_labor_class_no,
overlap,
note_text
FROM plm_routing_component
where site = #{site} and part_no = #{partNo}
a.site,
a.part_no,
a.routing_type,
a.routing_revision,
a.alternative_no,
a.operation_id,
a.operation_no,
a.operation_name,
a.efficiency_factor,
a.mach_run_factor,
a.mach_setup_time,
a.run_time_code,
a.labor_run_factor,
a.labor_setup_time,
a.crew_size,
a.setup_crew_size,
a.outside_op_item,
a.machine_no,
a.work_center_no,
a.labor_class_no,
a.setup_labor_class_no,
a.overlap,
a.note_text
FROM plm_routing_component as a
inner join plm_routing_header as b on a.site = b.site and a.part_no = b.part_no and a.routing_type = b.routing_type and a.routing_revision = b.routing_revision
where a.site = #{site} and a.part_no = #{partNo} and b.phase_out_date is null
</select>
<insert id="saveRoutingHeaderList">
@ -1804,35 +1806,37 @@
<select id="selectRoutingToolByPartNo" resultType="RoutingToolEntity">
SELECT
site,
part_no,
routing_type,
routing_revision,
alternative_no,
operation_id,
tool_id,
tool_qty,
remark
FROM routing_tool
where site = #{site} and part_no = #{partNo}
a.site,
a.part_no,
a.routing_type,
a.routing_revision,
a.alternative_no,
a.operation_id,
a.tool_id,
a.tool_qty,
a.remark
FROM routing_tool as a
inner join plm_routing_header as b on a.site = b.site and a.part_no = b.part_no and a.routing_type = b.routing_type and a.routing_revision = b.routing_revision
where a.site = #{site} and a.part_no = #{partNo} and b.phase_out_date is null
</select>
<select id="selectRoutingGuidelineByPartNo" resultType="WorkGuidelineEntity">
SELECT
site,
part_no,
routing_type,
routing_revision,
alternative_no,
guideline_seq,
guideline_desc,
guideline_text,
guideline_type,
sign_off_required,
inspection_sign_off_required,
operation_id
FROM plm_routing_work_guide
where site = #{site} and part_no = #{partNo}
a.site,
a.part_no,
a.routing_type,
a.routing_revision,
a.alternative_no,
a.guideline_seq,
a.guideline_desc,
a.guideline_text,
a.guideline_type,
a.sign_off_required,
a.inspection_sign_off_required,
a.operation_id
FROM plm_routing_work_guide as a
inner join plm_routing_header as b on a.site = b.site and a.part_no = b.part_no and a.routing_type = b.routing_type and a.routing_revision = b.routing_revision
where a.site = #{site} and a.part_no = #{partNo} and b.phase_out_date is null
</select>
<!-- 查工具列表 -->

Loading…
Cancel
Save