Commit 5761dd4a authored by cpatil's avatar cpatil

modified @urse


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99121 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2706a4d5
...@@ -210,7 +210,7 @@ public class MRPWizardAllocateQtyBean ...@@ -210,7 +210,7 @@ public class MRPWizardAllocateQtyBean
{ {
Node detail4Node = detail4List.item(cntr); Node detail4Node = detail4List.item(cntr);
//NodeList detail4NodeList = detail4Node.getChildNodes(); //NodeList detail4NodeList = detail4Node.getChildNodes();
System.out.println("@@@@@@@@@node name[" + detail4Node.getNodeName()+"]"); //System.out.println("@@@@@@@@@node name[" + detail4Node.getNodeName()+"]");
// if( detail4Node != null && detail4Node.getNodeValue() != null ) // if( detail4Node != null && detail4Node.getNodeValue() != null )
{ {
......
...@@ -34,7 +34,9 @@ public class MRPWizardXmlDataBean ...@@ -34,7 +34,9 @@ public class MRPWizardXmlDataBean
System.out.println("@@@@@@@ getXmlData === xmlString1::::::["+xmlString1+"]@@@@@@@"); System.out.println("@@@@@@@ getXmlData === xmlString1::::::["+xmlString1+"]@@@@@@@");
if (xmlString1 != null && xmlString1.trim().length() > 0) if (xmlString1 != null && xmlString1.trim().length() > 0)
{ {
dom = GenericUtility.getInstance().parseString(xmlString1); GenericUtility genericUtility= new GenericUtility();
// dom = GenericUtility.getInstance().parseString(xmlString1);
dom = genericUtility.parseString(xmlString1);
xmldata = getXmlData(dom); xmldata = getXmlData(dom);
} }
} }
......
...@@ -356,7 +356,9 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -356,7 +356,9 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
CommonConstants commonConstants = new CommonConstants(); CommonConstants commonConstants = new CommonConstants();
String itemCodeInv=""; double quantityInv=0,issueQtyInv=0; // added by cpatil String itemCodeInv=""; double quantityInv=0,issueQtyInv=0; // added by cpatil
double noArt = 0,netWeight = 0, grossWeight=0, stkQty=0; // added by cpatil on 02/04/15 urse double noArt = 0,netWeight = 0, grossWeight=0, stkQty=0; // added by cpatil on 02/04/15 urse
String lineNoInvAllocDet="";
try try
{ {
...@@ -537,7 +539,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -537,7 +539,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
if(flag == false) if(flag == false)
{ {
//sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL FROM INV_ALLOC_DET WHERE TRAN_ID IN (SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER = ? ) AND ITEM_CODE = ? "; //sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL FROM INV_ALLOC_DET WHERE TRAN_ID IN (SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER = ? ) AND ITEM_CODE = ? ";
sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL,ITEM_CODE,SITE_CODE, quantity , issue_qty " + sql2 = " SELECT LOC_CODE,LOT_NO,LOT_SL,ITEM_CODE,SITE_CODE, quantity , issue_qty, line_no " +
" FROM INV_ALLOC_DET " + " FROM INV_ALLOC_DET " +
" WHERE TRAN_ID IN (SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER = ? ) " + " WHERE TRAN_ID IN (SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER = ? ) " +
" and 'Y' <> case when deallocated is null then 'N' else deallocated end " + " and 'Y' <> case when deallocated is null then 'N' else deallocated end " +
...@@ -557,10 +559,13 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -557,10 +559,13 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
siteCode =rs2.getString("SITE_CODE"); siteCode =rs2.getString("SITE_CODE");
quantityInv =rs2.getDouble("quantity"); quantityInv =rs2.getDouble("quantity");
issueQtyInv =rs2.getDouble("issue_qty"); issueQtyInv =rs2.getDouble("issue_qty");
lineNoInvAllocDet =rs2.getString("LINE_NO"); // added by cpatil for line_no not set in update querry @urse 14/10/15
String propReqQtyStr = df.format(propReqQty); //String propReqQtyStr = df.format(propReqQty);
System.out.println("@@@@lineNoInvAllocDet["+lineNoInvAllocDet+"]quantityInv["+quantityInv+"]");
String propReqQtyStr = df.format(quantityInv);
System.out.println("@@@@propReqQtyStr["+propReqQtyStr+"]");
propReqQty = Double.parseDouble(propReqQtyStr); propReqQty = Double.parseDouble(propReqQtyStr);
System.out.println("propReqQty @@@::["+propReqQty+"]for item["+itemCode + "]quantityInv["+quantityInv+"]issueQtyInv["+issueQtyInv+"]"); System.out.println("propReqQty @@@::["+propReqQty+"]for item["+itemCode + "]quantityInv["+quantityInv+"]issueQtyInv["+issueQtyInv+"]lineNoInvAllocDet["+lineNoInvAllocDet+"]");
/* /*
stockSql ="select a.lot_no, a.loc_code, a.lot_sl, a.rate, a.gross_rate,a.supp_code__mfg " stockSql ="select a.lot_no, a.loc_code, a.lot_sl, a.rate, a.gross_rate,a.supp_code__mfg "
+" ,(a.quantity-a.alloc_qty) as stockBalQty " +" ,(a.quantity-a.alloc_qty) as stockBalQty "
...@@ -823,7 +828,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -823,7 +828,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
+ " dealloc_qty = (CASE WHEN dealloc_qty IS NULL THEN 0 ELSE dealloc_qty END) + ?" + " dealloc_qty = (CASE WHEN dealloc_qty IS NULL THEN 0 ELSE dealloc_qty END) + ?"
+ " where tran_id in (select tran_id from inv_allocate where work_order = ? )" + " where tran_id in (select tran_id from inv_allocate where work_order = ? )"
+ " and item_code = ? and lot_sl= ? and lot_no = ? and site_code= ? and loc_code = ? " + " and item_code = ? and lot_sl= ? and lot_no = ? and site_code= ? and loc_code = ? "
+ " and exp_lev = ? "; + " and exp_lev = ? and line_no = ? ";
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
pstmt1.setDouble(1,propReqQty); pstmt1.setDouble(1,propReqQty);
pstmt1.setDouble(2,propReqQty); pstmt1.setDouble(2,propReqQty);
...@@ -834,6 +839,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -834,6 +839,7 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
pstmt1.setString(7,siteCode); pstmt1.setString(7,siteCode);
pstmt1.setString(8,locCode); pstmt1.setString(8,locCode);
pstmt1.setString(9,expLev); pstmt1.setString(9,expLev);
pstmt1.setString(10,lineNoInvAllocDet); // added by cpatil for line_no not set in update querry @urse 14/10/15
int cnt=pstmt1.executeUpdate(); int cnt=pstmt1.executeUpdate();
System.out.println("Count after PSTM is:- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%["+cnt+"]"); System.out.println("Count after PSTM is:- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%["+cnt+"]");
pstmt1.close();pstmt1=null; pstmt1.close();pstmt1=null;
......
...@@ -1608,7 +1608,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1608,7 +1608,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
actualPropQty=Double.parseDouble(""+hashMap.get("alloc_qty"));//Changed by Manoj dtd 20/08/15 Set value from map instead of dom value actualPropQty=Double.parseDouble(""+hashMap.get("alloc_qty"));//Changed by Manoj dtd 20/08/15 Set value from map instead of dom value
int count = 0,recIn=0 ; int count = 0,recIn=0 ;
sql = " select count(*) from inv_alloc_det where tran_id = ? and item_code = ? and lot_no = ? " sql = " select count(*) from inv_alloc_det where tran_id = ? and item_code = ? and lot_no = ? "
+ "and lot_sl = ? and loc_code = ? and site_code = ? and exp_lev=? and case when deallocated is null then 'N' else deallocated end <> 'Y' "; + "and lot_sl = ? and loc_code = ? and site_code = ? and exp_lev=? " +
" and case when deallocated is null then 'N' else deallocated end <> 'Y' ";
pstmt = connOne.prepareStatement(sql); pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
pstmt.setString(2,itemCode); pstmt.setString(2,itemCode);
......
...@@ -2727,7 +2727,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL ...@@ -2727,7 +2727,7 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
} }
return retVal; return retVal;
} }
@Override
public ArrayList getDetails(String woCode) throws ITMException public ArrayList getDetails(String woCode) throws ITMException
{ {
System.out.println("---getDetails method called12345-------------------"); System.out.println("---getDetails method called12345-------------------");
......
...@@ -479,15 +479,16 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko ...@@ -479,15 +479,16 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko
public String calWorkorderPrc(ArrayList tranList,Connection conn) throws Exception,ITMException public String calWorkorderPrc(ArrayList tranList,Connection conn) throws Exception,ITMException
{ {
String errString="", xtraParams=""; String errString="", xtraParams="";
errString=calWorkorderPrc(tranList,conn,xtraParams); boolean fromMRP= false;
errString=calWorkorderPrc(tranList,conn,xtraParams,fromMRP);
System.out.println("calWorkorderPrc(tranList,conn,xtraParams)@@@errString["+errString+"]"); System.out.println("calWorkorderPrc(tranList,conn,xtraParams)@@@errString["+errString+"]");
return errString; return errString;
} }
public String calWorkorderPrc(ArrayList tranList,Connection conn, String xtraParams) throws Exception,ITMException public String calWorkorderPrc(ArrayList tranList,Connection conn, String xtraParams, boolean fromMRP) throws Exception,ITMException
{ {
System.out.println("@@@@@@@@@@@ calWorkorderPrc()............"); System.out.println("@@@@@@@@@@@ calWorkorderPrc()...........fromMRP["+fromMRP+"]");
ResultSet rs1 = null,rsSql1=null,rsSql2=null; ResultSet rs1 = null,rsSql1=null,rsSql2=null;
PreparedStatement pstmt = null,pstmtInsert=null,pstmtUpdate=null,pstmtSql1=null,pstmtSql2=null; PreparedStatement pstmt = null,pstmtInsert=null,pstmtUpdate=null,pstmtSql1=null,pstmtSql2=null;
...@@ -510,6 +511,7 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko ...@@ -510,6 +511,7 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko
this.chgTerm = blanknull(this.chgTerm).trim(); this.chgTerm = blanknull(this.chgTerm).trim();
} }
System.out.println("[WorkorderPrc][calWorkorderPrc][loginCode]=>["+loginCode+"]this.loginCode["+this.loginCode+"]"); System.out.println("[WorkorderPrc][calWorkorderPrc][loginCode]=>["+loginCode+"]this.loginCode["+this.loginCode+"]");
System.out.println("[WorkorderPrc][calWorkorderPrc][chgTerm]=>["+chgTerm+"]this.chgTerm ["+this.chgTerm +"]"); System.out.println("[WorkorderPrc][calWorkorderPrc][chgTerm]=>["+chgTerm+"]this.chgTerm ["+this.chgTerm +"]");
...@@ -730,7 +732,16 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko ...@@ -730,7 +732,16 @@ public class WorkorderPrc extends ProcessEJB implements WorkorderPrcLocal,Worko
System.out.println("[WorkorderPrc]=>"+java.sql.Timestamp.valueOf(getCurrdateAppFormat().toString())); System.out.println("[WorkorderPrc]=>"+java.sql.Timestamp.valueOf(getCurrdateAppFormat().toString()));
pstmtInsert.setTimestamp(16,java.sql.Timestamp.valueOf(getCurrdateAppFormat().toString()));//for ord_date pstmtInsert.setTimestamp(16,java.sql.Timestamp.valueOf(getCurrdateAppFormat().toString()));//for ord_date
pstmtInsert.setTimestamp(17,java.sql.Timestamp.valueOf(dueDate.trim()));//for due_date pstmtInsert.setTimestamp(17,java.sql.Timestamp.valueOf(dueDate.trim()));//for due_date
pstmtInsert.setString(18,"P");//for status
if( fromMRP ) // added for delete workworder created from mrp. // if true means wo crete from mrp otherwise normal MPS to WO // status M help at the time of delete WO.
{
pstmtInsert.setString(18,"M");//for status
}
else
{
pstmtInsert.setString(18,"P");//for status
}
pstmtInsert.setTimestamp(19,new Timestamp(System.currentTimeMillis()));//for status_date pstmtInsert.setTimestamp(19,new Timestamp(System.currentTimeMillis()));//for status_date
if("Y".equalsIgnoreCase(feedbackReqd)) // added for feedback req 'Y' for supreme on 23/09/15 by cpatil if("Y".equalsIgnoreCase(feedbackReqd)) // added for feedback req 'Y' for supreme on 23/09/15 by cpatil
......
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