Organize Imports, Parameterizing and Removal of unused stuff - PLEASE REVIEW
This commit is contained in:
parent
e068b2ac08
commit
3b02d14d59
|
@ -16,13 +16,16 @@
|
||||||
//package org.compiere.mfg.model;
|
//package org.compiere.mfg.model;
|
||||||
package org.eevolution.model;
|
package org.eevolution.model;
|
||||||
|
|
||||||
import java.sql.*;
|
import java.sql.PreparedStatement;
|
||||||
import java.util.*;
|
import java.sql.ResultSet;
|
||||||
import java.util.logging.*;
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.model.X_M_Product_Costing;
|
||||||
import org.compiere.util.*;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.model.*;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product Costing Model
|
* Product Costing Model
|
||||||
|
@ -96,7 +99,7 @@ public class MPPProductCosting extends X_M_Product_Costing
|
||||||
public static MPPProductCosting[] getElements (int M_Product_ID, int C_AcctSchema_ID, int PP_Cost_Group_ID , int M_Warehouse_ID, int S_Resource_ID)
|
public static MPPProductCosting[] getElements (int M_Product_ID, int C_AcctSchema_ID, int PP_Cost_Group_ID , int M_Warehouse_ID, int S_Resource_ID)
|
||||||
{
|
{
|
||||||
|
|
||||||
ArrayList list = new ArrayList();
|
ArrayList<MPPProductCosting> list = new ArrayList<MPPProductCosting>();
|
||||||
|
|
||||||
|
|
||||||
String sql = "SELECT * FROM PP_Product_Costing WHERE AD_Client_ID = ? AND M_Product_ID=? AND C_Acctschema_ID = ? AND PP_Cost_Group_ID = ? AND M_Warehouse_ID = ? AND S_Resource_ID = ? ";
|
String sql = "SELECT * FROM PP_Product_Costing WHERE AD_Client_ID = ? AND M_Product_ID=? AND C_Acctschema_ID = ? AND PP_Cost_Group_ID = ? AND M_Warehouse_ID = ? AND S_Resource_ID = ? ";
|
||||||
|
@ -104,7 +107,7 @@ public class MPPProductCosting extends X_M_Product_Costing
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int AD_Client_ID = Integer.parseInt(Env.getContext(Env.getCtx(), "#AD_Client_ID"));
|
int AD_Client_ID = Integer.parseInt(Env.getContext(Env.getCtx(), "#AD_Client_ID"));
|
||||||
pstmt = DB.prepareStatement(sql);
|
pstmt = DB.prepareStatement(sql, null);
|
||||||
pstmt.setInt(1, AD_Client_ID);
|
pstmt.setInt(1, AD_Client_ID);
|
||||||
pstmt.setInt(2, M_Product_ID);
|
pstmt.setInt(2, M_Product_ID);
|
||||||
pstmt.setInt(3, C_AcctSchema_ID);
|
pstmt.setInt(3, C_AcctSchema_ID);
|
||||||
|
@ -152,16 +155,12 @@ public class MPPProductCosting extends X_M_Product_Costing
|
||||||
*/
|
*/
|
||||||
public boolean getElement(int M_Product_ID, int C_AcctSchema_ID, int PP_Cost_Group_ID , int PP_Cost_Element_ID , int M_Warehouse_ID, int S_Resource_ID)
|
public boolean getElement(int M_Product_ID, int C_AcctSchema_ID, int PP_Cost_Group_ID , int PP_Cost_Element_ID , int M_Warehouse_ID, int S_Resource_ID)
|
||||||
{
|
{
|
||||||
//if (m_lines != null && !requery)
|
|
||||||
//return m_lines;
|
|
||||||
//ArrayList list = new ArrayList();
|
|
||||||
MPPProductCosting pc = null;
|
|
||||||
String sql = "SELECT * FROM PP_Product_Costing WHERE AD_Client_ID =? AND M_Product_ID=? AND ( C_Acctschema_ID = ? AND PP_Cost_Group_ID = ? AND PP_Cost_Element_ID = ? AND M_Warehouse_ID = ? AND S_Resource_ID = ?)";
|
String sql = "SELECT * FROM PP_Product_Costing WHERE AD_Client_ID =? AND M_Product_ID=? AND ( C_Acctschema_ID = ? AND PP_Cost_Group_ID = ? AND PP_Cost_Element_ID = ? AND M_Warehouse_ID = ? AND S_Resource_ID = ?)";
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int AD_Client_ID = Integer.parseInt(Env.getContext(Env.getCtx(), "#AD_Client_ID"));
|
int AD_Client_ID = Integer.parseInt(Env.getContext(Env.getCtx(), "#AD_Client_ID"));
|
||||||
pstmt = DB.prepareStatement(sql);
|
pstmt = DB.prepareStatement(sql, null);
|
||||||
pstmt.setInt(1, AD_Client_ID);
|
pstmt.setInt(1, AD_Client_ID);
|
||||||
pstmt.setInt(2, M_Product_ID);
|
pstmt.setInt(2, M_Product_ID);
|
||||||
pstmt.setInt(3, C_AcctSchema_ID);
|
pstmt.setInt(3, C_AcctSchema_ID);
|
||||||
|
|
Loading…
Reference in New Issue