Fix refactory
This commit is contained in:
parent
c19dc4cd23
commit
e01ca930d2
|
|
@ -15,8 +15,10 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.eevolution.model;
|
package org.eevolution.model;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MOrgInfo;
|
import org.compiere.model.MOrgInfo;
|
||||||
import org.compiere.model.MResource;
|
import org.compiere.model.MResource;
|
||||||
|
|
@ -126,8 +128,8 @@ public class MPPProductPlanning extends X_PP_Product_Planning
|
||||||
* @param M_Product_ID Product ID
|
* @param M_Product_ID Product ID
|
||||||
* @param trxName Transaction Name
|
* @param trxName Transaction Name
|
||||||
* @return MPPProductPlanning Planning Data
|
* @return MPPProductPlanning Planning Data
|
||||||
*
|
**/
|
||||||
public static MPPProductPlanning getFirst(Properties ctx ,int AD_Client_ID, int AD_Org_ID ,int M_Warehouse_ID, int S_Resource_ID, int M_Product_ID, String trxName)
|
public static MPPProductPlanning find(Properties ctx ,int AD_Client_ID, int AD_Org_ID ,int M_Warehouse_ID, int S_Resource_ID, int M_Product_ID, String trxName)
|
||||||
{
|
{
|
||||||
MPPProductPlanning pp = null;
|
MPPProductPlanning pp = null;
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
|
@ -197,7 +199,7 @@ public class MPPProductPlanning extends X_PP_Product_Planning
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* find planning data demand & supply to this warehouse
|
* find planning data demand & supply to this warehouse
|
||||||
|
|
|
||||||
|
|
@ -385,6 +385,10 @@ public class MRP extends SvrProcess
|
||||||
|
|
||||||
//Define m_product_planning
|
//Define m_product_planning
|
||||||
setProduct(AD_Client_ID,AD_Org_ID ,S_Resource_ID , M_Warehouse_ID, product);
|
setProduct(AD_Client_ID,AD_Org_ID ,S_Resource_ID , M_Warehouse_ID, product);
|
||||||
|
|
||||||
|
if (m_product_planning==null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
//first DatePromised.compareTo for ORDER_POLICY_PeriodOrderQuantity
|
//first DatePromised.compareTo for ORDER_POLICY_PeriodOrderQuantity
|
||||||
if (m_product_planning.getOrder_Policy().equals(MPPProductPlanning.ORDER_POLICY_PeriodOrderQuantity))
|
if (m_product_planning.getOrder_Policy().equals(MPPProductPlanning.ORDER_POLICY_PeriodOrderQuantity))
|
||||||
|
|
@ -482,7 +486,7 @@ public class MRP extends SvrProcess
|
||||||
{
|
{
|
||||||
|
|
||||||
//find data product planning demand
|
//find data product planning demand
|
||||||
MPPProductPlanning pp = MPPProductPlanning.get(getCtx(), AD_Client_ID ,AD_Org_ID , M_Warehouse_ID, S_Resource_ID , product.getM_Product_ID(), get_TrxName());
|
MPPProductPlanning pp = MPPProductPlanning.find(getCtx(), AD_Client_ID ,AD_Org_ID , M_Warehouse_ID, S_Resource_ID , product.getM_Product_ID(), get_TrxName());
|
||||||
DatePromisedTo = null;
|
DatePromisedTo = null;
|
||||||
DatePromisedFrom = null;
|
DatePromisedFrom = null;
|
||||||
if (pp != null)
|
if (pp != null)
|
||||||
|
|
@ -526,9 +530,8 @@ public class MRP extends SvrProcess
|
||||||
MMessage MRP=MMessage.get(getCtx(), "MRP-120");
|
MMessage MRP=MMessage.get(getCtx(), "MRP-120");
|
||||||
MNote note = new MNote (getCtx(), MRP.getAD_Message_ID() , 0 , MPPMRP.Table_ID , 0 , product.getValue() + " " + product.getName() , Msg.getMsg(getCtx(), MRP.getValue()),get_TrxName());
|
MNote note = new MNote (getCtx(), MRP.getAD_Message_ID() , 0 , MPPMRP.Table_ID , 0 , product.getValue() + " " + product.getName() , Msg.getMsg(getCtx(), MRP.getValue()),get_TrxName());
|
||||||
note.save();
|
note.save();
|
||||||
log.severe(Msg.getMsg(getCtx(), MRP.getValue()));
|
//log.severe(Msg.getMsg(getCtx(), MRP.getValue()));
|
||||||
m_product_planning.setIsCreatePlan(false);
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue