Commit ad9070ec authored by pgole's avatar pgole

Updated EJB for netweight and quantity issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104127 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 254f1195
......@@ -32,6 +32,7 @@ import org.w3c.dom.NodeList;
public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,WoIssPartialPrcRemote
{
String batchQuantityStr="";
MfgCommon mfgCommon = new MfgCommon();
public String process() throws RemoteException,ITMException
{
......@@ -111,10 +112,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
//genericUtility = new GenericUtility();
itmDBAccessEJB = new ITMDBAccessEJB();
connDriver = new ConnDriver();
//Changed by Poonam Gole for changing connection object :Start
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection() ;
//Changed by Poonam Gole for changing connection object :End
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
conn.setAutoCommit(false);
parentNodeList = detailDom.getElementsByTagName("Detail2");
......@@ -796,10 +794,45 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
System.out.println("@@@@@@@@@ before calculation : netWeight["+netWeight+"]grossWeight["+grossWeight+"]noArt["+noArt+"]stkQty["+stkQty+"]propReqQty["+propReqQty+"]");
netWeight = ( netWeight * propReqQty ) / stkQty ;
grossWeight = ( grossWeight * propReqQty ) / stkQty ;
//Added by Poonam for displaying the proper value in case of UNIT_SAME_GRSS_NETWT :Strat[06-12-2016]
boolean ordFlag = false;
String allowSameUnitList = mfgCommon.getEnvMfg("999999", "UNIT_SAME_GRSS_NETWT", conn) ;
if("NULLFOUND".equalsIgnoreCase(allowSameUnitList) )
{
allowSameUnitList = "";
}
System.out.println("allowSameUnitList["+allowSameUnitList+"]");
if(allowSameUnitList != null && allowSameUnitList.trim().length() > 0 )
{
String allowSameUnitListArr[] = allowSameUnitList.split(",");
for(int i = 0; i < allowSameUnitListArr.length;i++)
{
System.out.println("allowSameUnitListArr[i]" + allowSameUnitListArr[i]);
if((allowSameUnitListArr[i].trim()).equalsIgnoreCase(unit.trim()))
{
ordFlag = true;
break;
}
}
}
if(ordFlag == true)
{
System.out.println("Inside true....");
netWeight = propReqQty;
grossWeight = propReqQty;
}
else
{
System.out.println("Inside false....");
netWeight = ( netWeight * propReqQty ) / stkQty ;
grossWeight = ( grossWeight * propReqQty ) / stkQty ;
}
//Added by Poonam for displaying the proper value in case of netWeight AND grossWeight for UNIT_SAME_GRSS_NETWT :End[06-12-2016]
noArt = new Double( Math.ceil( ( noArt * propReqQty ) / stkQty )) ;
System.out.println("@@@@@@@@@ after calculation : netWeight["+netWeight+"]grossWeight["+grossWeight+"]noArt["+noArt+"]");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment