|
|
@@ -774,7 +774,9 @@ struct ErpTotalShippingPlan { |
|
|
|
#[serde(deserialize_with = "deserialize_option_date")] |
|
|
|
berthing_time: Option<NaiveDate>, |
|
|
|
supplier_id: Option<i32>, |
|
|
|
material_id: Option<i32> |
|
|
|
material_id: Option<i32>, |
|
|
|
#[serde(deserialize_with = "deserialize_string_to_bool")] |
|
|
|
delete_flag: bool, |
|
|
|
} |
|
|
|
|
|
|
|
#[derive(Debug, Deserialize)] |
|
|
@@ -1517,8 +1519,9 @@ async fn insert_erp_total_shipping_plan(client: &tokio_postgres::Client, info: & |
|
|
|
material_name = $11, shipping_station_code = $12, |
|
|
|
shipping_station_name = $13, departure_port = $14, |
|
|
|
departure_time = $15, port_destination = $16, berthing_time = $17, |
|
|
|
supplier_id = $18, material_id = $19,order_number = $20 |
|
|
|
WHERE id = $21", |
|
|
|
supplier_id = $18, material_id = $19,order_number = $20, |
|
|
|
delete_flag = $21 |
|
|
|
WHERE id = $22", |
|
|
|
&[ |
|
|
|
&info.start_time, &info.end_time, &info.finish, &info.ship_name, |
|
|
|
&info.voyage, &info.total_quantity, &info.deviation_quantity, |
|
|
@@ -1526,7 +1529,7 @@ async fn insert_erp_total_shipping_plan(client: &tokio_postgres::Client, info: & |
|
|
|
&info.material_name, &info.shipping_station_code, |
|
|
|
&info.shipping_station_name, &info.departure_port, |
|
|
|
&info.departure_time, &info.port_destination, &info.berthing_time, |
|
|
|
&info.supplier_id, &info.material_id, &info.order_number, |
|
|
|
&info.supplier_id, &info.material_id, &info.order_number,&info.delete_flag, |
|
|
|
&info.id |
|
|
|
], |
|
|
|
).await?; |
|
|
@@ -1539,9 +1542,9 @@ async fn insert_erp_total_shipping_plan(client: &tokio_postgres::Client, info: & |
|
|
|
supplier_name, material_code, material_name, |
|
|
|
shipping_station_code, shipping_station_name, departure_port, |
|
|
|
departure_time, port_destination, berthing_time, |
|
|
|
supplier_id, material_id |
|
|
|
supplier_id, material_id,delete_flag |
|
|
|
) OVERRIDING SYSTEM VALUE VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, |
|
|
|
$13, $14, $15, $16, $17, $18, $19, $20, $21)", |
|
|
|
$13, $14, $15, $16, $17, $18, $19, $20, $21,$22)", |
|
|
|
&[ |
|
|
|
&info.id, |
|
|
|
&info.order_number, &info.start_time, &info.end_time, &info.finish, |
|
|
@@ -1550,7 +1553,7 @@ async fn insert_erp_total_shipping_plan(client: &tokio_postgres::Client, info: & |
|
|
|
&info.material_code, &info.material_name, &info.shipping_station_code, |
|
|
|
&info.shipping_station_name, &info.departure_port, &info.departure_time, |
|
|
|
&info.port_destination, &info.berthing_time, &info.supplier_id, |
|
|
|
&info.material_id |
|
|
|
&info.material_id, &info.delete_flag |
|
|
|
], |
|
|
|
).await?; |
|
|
|
} |
|
|
|