Woocom (#50)
* orders * woocommerce support * working with MariaDB + Derby
This commit is contained in:
@@ -7,6 +7,8 @@ package com.unicenta.pos.sales.restaurant;
|
||||
import com.unicenta.data.loader.Session;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import com.unicenta.pos.forms.DataLogicSystem;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -18,7 +20,7 @@ import java.sql.Timestamp;
|
||||
*
|
||||
* @author JDL
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
public class RestaurantDBUtils {
|
||||
private Session s;
|
||||
private Connection con;
|
||||
@@ -304,11 +306,11 @@ public class RestaurantDBUtils {
|
||||
rs = stmt.executeQuery(SQL);
|
||||
|
||||
if (rs.next()){
|
||||
String customer =rs.getString("TICKETID");
|
||||
return(customer);
|
||||
return(rs.getString("TICKETID"));
|
||||
}
|
||||
}catch(SQLException e){
|
||||
}
|
||||
log.error("Error running SQL: {}{}", SQL, e.getMessage());
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -553,6 +555,21 @@ public class RestaurantDBUtils {
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getTableId (String nameOfTable){
|
||||
try{
|
||||
SQL = "SELECT ID FROM places WHERE NAME='"+ nameOfTable + "'";
|
||||
stmt = con.createStatement();
|
||||
rs = stmt.executeQuery(SQL);
|
||||
|
||||
if (rs.next()){
|
||||
return(rs.getString("ID"));
|
||||
}
|
||||
}catch(SQLException e){
|
||||
log.error("Error running SQL: {}{}", SQL, e.getMessage());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tableID
|
||||
|
||||
Reference in New Issue
Block a user