update pp.optimize_project as p
set p.state = #{state}
where p.project_no = #{projectNumber}
delete from pp.optimize_project
where project_no = #{projectNumber}
UPDATE pp.flow_card set project_no=#{projectId}
where process_id=#{processId} and technology_number=#{technologyNumber}
insert into pp.optimize_project (project_no, project_name, order_glass_type, order_glass_thickness)
values (#{projectId}, #{projectNmae}, #{glassType}, #{glassThickness})
INSERT INTO pp.optimize_heat_detail (
project_no,
process_id,
width,
height,
x_axis,
y_axis,
rotate_angle,
creater,
create_time,
update_time,
patch_state,
layer,
order_sort,
layout_id,
sort,
glass_id,
pair_width,
pair_height,
intRemark,
strRemark
) VALUES (
#{inputValues.project_no},
#{glass.process_id},
#{glass.width},
#{glass.height},
#{glass.x_coordinate},
#{glass.y_coordinate},
#{glass.angle},
#{userName},
NOW(),
NOW(),
0,
#{glass.layers_number},
#{glass.order_number},
#{glass.tempering_layout_id},
#{glass.tempering_feed_sequence},
null,
#{glass.width},
#{glass.height},
null,
null
);
INSERT INTO pp.optimize_heat_layout (
project_no,
layout_id,
glass_qty,
glass_area,
layout_rate,
creater,
create_time,
intRemark,
strRemark
) VALUES (
#{inputValues.project_no},
#{glass.tempering_layout_id},
#{glass.glass_total},
#{glass.area},
#{glass.ratio},
1,
NOW(),
null,
null
);
UPDATE pp.optimize_project
SET
state = 10,
chaos_pct = #{inputValues.chaos_pct},
max_load_pct = #{inputValues.max_load_pct},
max_area=#{inputValues.max_area},
max_qty=#{inputValues.max_qty},
load_width=#{inputValues.load_width},
load_length=#{inputValues.load_length},
x_space=#{inputValues.x_space},
y_space=#{inputValues.y_space},
load_rate=#{inputValues.load_rate}
WHERE
project_no = #{inputValues.project_no}
update erp_user_info.user as u
set u.optimize_parms = #{jsonString}
update pp.optimize_project_file as u
set u.content = #{jsonString}
where u.project_no=#{processId} and type='优化结果'