|
|
|
@ -659,4 +659,123 @@ |
|
|
|
delete from plm_part_location |
|
|
|
where part_no = #{partNo} and site = #{site} |
|
|
|
</delete> |
|
|
|
|
|
|
|
|
|
|
|
<select id="partAllInfoSearch" parameterType="com.spring.modules.part.vo.PartInformationVo" resultType="com.spring.modules.part.vo.PartInformationVo"> |
|
|
|
SELECT |
|
|
|
site, |
|
|
|
part_no, |
|
|
|
part_desc, |
|
|
|
spec, |
|
|
|
part_type_db, |
|
|
|
part_type, |
|
|
|
family_id, |
|
|
|
dbo.get_family_name(site, family_id) as familyName, |
|
|
|
group_id, |
|
|
|
dbo.get_group_name(site, group_id) as groupName, |
|
|
|
um_id, |
|
|
|
dbo.get_um_name(site, um_id) as umName, |
|
|
|
weight_net, |
|
|
|
uom_for_weight_net, |
|
|
|
volume_net, |
|
|
|
uom_for_volume_net, |
|
|
|
lot_tracking_code, |
|
|
|
active, |
|
|
|
product_group_id1, |
|
|
|
dbo.get_product_group_name(site, product_group_id1, '1') as productGroupName1, |
|
|
|
product_group_id2, |
|
|
|
dbo.get_product_group_name(site, product_group_id2, '2') as productGroupName2, |
|
|
|
product_group_id3, |
|
|
|
dbo.get_product_group_name(site, product_group_id3, '3') as productGroupName3, |
|
|
|
product_group_id4, |
|
|
|
dbo.get_product_group_name(site, product_group_id4, '4') as productGroupName4, |
|
|
|
erp_part_no, |
|
|
|
code_no, |
|
|
|
dbo.get_code_desc(site, code_no, 'IP') as codeDesc, |
|
|
|
manufacturer_id, |
|
|
|
dbo.get_manufacturer_name(site, manufacturer_id) as manufacturerName, |
|
|
|
agent_id, |
|
|
|
dbo.split_agent_id(site, agent_id) as agentName, |
|
|
|
type_designation, |
|
|
|
hazard_code, |
|
|
|
dbo.get_hazard_name(site, hazard_code) as hazardDesc, |
|
|
|
asset_class, |
|
|
|
dbo.get_assetClass_name(site, asset_class) as assetClassDesc, |
|
|
|
dim_quality, |
|
|
|
abc_class, |
|
|
|
dbo.get_abcClass_name(site, abc_class) as abcClassDesc, |
|
|
|
frequency_class, |
|
|
|
lifecycle_stage, |
|
|
|
iso_country, |
|
|
|
dbo.get_iso_country_name(site, iso_country) as isoCountryDesc, |
|
|
|
manufacturing_lead_time, |
|
|
|
expected_lead_time, |
|
|
|
region_of_origin, |
|
|
|
dbo.get_region_of_origin_name(site, region_of_origin) as regionOfOriginDesc, |
|
|
|
customs_star_no, |
|
|
|
dbo.get_customs_star_name(site, customs_star_no) as customsStarDesc, |
|
|
|
durability_day, |
|
|
|
intrastat_conv_factor, |
|
|
|
part_status, |
|
|
|
dbo.get_part_status_name(site, part_status) as partStatusDesc, |
|
|
|
configuration_id, |
|
|
|
estimated_material_cost, |
|
|
|
inventory_valuation_method, |
|
|
|
part_cost_group_id, |
|
|
|
dbo.get_part_cost_group_name(site, part_cost_group_id) as partCostGroupDesc, |
|
|
|
inventory_part_cost_level, |
|
|
|
invoice_consideration, |
|
|
|
zero_cost_flag, |
|
|
|
planning_method, |
|
|
|
dbo.get_planning_method_name(site, planning_method) as planningMethodDesc, |
|
|
|
safety_stock, |
|
|
|
min_order_qty, |
|
|
|
max_order_qty, |
|
|
|
mul_order_qty, |
|
|
|
safety_lead_time, |
|
|
|
shrinkage_fac, |
|
|
|
std_order_qty, |
|
|
|
cum_lead_time, |
|
|
|
back_flush_part, |
|
|
|
by_prod_as_supply_in_mrp_db, |
|
|
|
unprotected_lead_time, |
|
|
|
issue_type, |
|
|
|
mrp_control_flag_db, |
|
|
|
fixed_lead_time_day, |
|
|
|
over_reporting, |
|
|
|
use_theoretical_density_db, |
|
|
|
variable_lead_time_day, |
|
|
|
over_report_tolerance, |
|
|
|
fixed_lead_time_hour, |
|
|
|
density, |
|
|
|
variable_lead_time_hour, |
|
|
|
create_date, |
|
|
|
create_by, |
|
|
|
update_date, |
|
|
|
update_by |
|
|
|
FROM part |
|
|
|
<where> |
|
|
|
site = #{query.site} |
|
|
|
<if test = "query.partNo != null and query.partNo != ''"> |
|
|
|
AND part_no like #{query.partNo} |
|
|
|
</if> |
|
|
|
<if test = "query.erpPartNo != null and query.erpPartNo != ''"> |
|
|
|
AND erp_part_no like #{query.erpPartNo} |
|
|
|
</if> |
|
|
|
<if test = "query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND part_desc like #{query.partDesc} |
|
|
|
</if> |
|
|
|
<if test = "query.spec != null and query.spec != ''"> |
|
|
|
AND spec like #{query.spec} |
|
|
|
</if> |
|
|
|
<if test="query.startDate != null "> |
|
|
|
AND required_completion_date >= #{query.startDate} |
|
|
|
</if> |
|
|
|
<if test="query.endDate != null "> |
|
|
|
AND #{query.endDate} >= required_completion_date |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
</mapper> |