Commit 1082f470 authored by ssarkar's avatar ssarkar

update by sumit on 30/03/13 for bug in issue tracker point 99


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92912 ce508802-f39f-4f6c-b175-0d175dae99d5
parent af48ada2
...@@ -83,7 +83,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -83,7 +83,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
String trfStatus = ""; String trfStatus = "";
String supRerplOrder = ""; String supRerplOrder = "";
int supReplLine = 0; int supReplLine = 0;
//String comfirmed = ""; String ptcn = "";
double DeallocQty = 0.0, quantity = 0.0; double DeallocQty = 0.0, quantity = 0.0;
int pickLineNo = 0; int pickLineNo = 0;
int replOrderLine = 0; int replOrderLine = 0;
...@@ -91,7 +91,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -91,7 +91,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
boolean isPickIssueDone = false; boolean isPickIssueDone = false;
boolean isReplDone = false; boolean isReplDone = false;
HashMap replIss = new HashMap(); HashMap replIss = new HashMap();
Set ptcnSET = new HashSet(); //
ITMDBAccessEJB itmdbAccess = new ITMDBAccessEJB(); ITMDBAccessEJB itmdbAccess = new ITMDBAccessEJB();
try try
{ {
...@@ -170,7 +170,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -170,7 +170,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
sql = " SELECT DISTINCT D.CARTON_NO, PD.SALE_ORDER , PD.LINE_NO__SORD, PD.ITEM_CODE, PD.EXP_LEV, PD.LOC_CODE__TO, D.LOT_SL, " + sql = " SELECT DISTINCT D.CARTON_NO, PD.SALE_ORDER , PD.LINE_NO__SORD, PD.ITEM_CODE, PD.EXP_LEV, PD.LOC_CODE__TO, D.LOT_SL, " +
" D.LOC_CODE, PD.LOT_NO, D.QUANTITY, S.CUST_CODE, PH.WAVE_ID, D.PICK_ORDER, D.LINE_NO__PICK, PH.PICK_TYPE " + //Changed by sumit on 30/03/13 added ptcn column
//" D.LOC_CODE, PD.LOT_NO, D.QUANTITY, S.CUST_CODE, PH.WAVE_ID, D.PICK_ORDER, D.LINE_NO__PICK, PH.PICK_TYPE " +
" D.LOC_CODE, PD.LOT_NO, D.QUANTITY, S.CUST_CODE, PH.WAVE_ID, D.PICK_ORDER, D.LINE_NO__PICK, PH.PICK_TYPE, D.PTCN " +
//" FROM PICK_ORD_DET PD, PICK_ORD_HDR PH , DEALLOC_ART_DET D, SORDER S , CARTON_MASTER CM " + //" FROM PICK_ORD_DET PD, PICK_ORD_HDR PH , DEALLOC_ART_DET D, SORDER S , CARTON_MASTER CM " +
" FROM PICK_ORD_DET PD, PICK_ORD_HDR PH , DEALLOC_ART_DET D, SORDER S " + " FROM PICK_ORD_DET PD, PICK_ORD_HDR PH , DEALLOC_ART_DET D, SORDER S " +
" WHERE D.TRAN_ID = ? " + " WHERE D.TRAN_ID = ? " +
...@@ -181,7 +183,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -181,7 +183,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
" AND PH.SALE_ORDER = S.SALE_ORDER "+ " AND PH.SALE_ORDER = S.SALE_ORDER "+
" UNION ALL "+ " UNION ALL "+
" SELECT DISTINCT D.CARTON_NO, RD.SALE_ORDER , RD.LINE_NO__SORD, RD.ITEM_CODE, RD.EXP_LEV, RD.LOC_CODE__TO, D.LOT_SL," + " SELECT DISTINCT D.CARTON_NO, RD.SALE_ORDER , RD.LINE_NO__SORD, RD.ITEM_CODE, RD.EXP_LEV, RD.LOC_CODE__TO, D.LOT_SL," +
" D.LOC_CODE, D.LOT_NO, D.QUANTITY, S.CUST_CODE, D.WAVE_ID, D.PICK_ORDER RDER, D.LINE_NO__PICK, D.PICK_TYPE " + //Changed by sumit on 30/03/13 added ptcn column
//" D.LOC_CODE, D.LOT_NO, D.QUANTITY, S.CUST_CODE, D.WAVE_ID, D.PICK_ORDER RDER, D.LINE_NO__PICK, D.PICK_TYPE " +
" D.LOC_CODE, D.LOT_NO, D.QUANTITY, S.CUST_CODE, D.WAVE_ID, D.PICK_ORDER RDER, D.LINE_NO__PICK, D.PICK_TYPE, D.PTCN " +
" FROM REPL_ORD_DET RD, REPL_ORD_HDR RH , DEALLOC_ART_DET D, SORDER S " + " FROM REPL_ORD_DET RD, REPL_ORD_HDR RH , DEALLOC_ART_DET D, SORDER S " +
" WHERE D.TRAN_ID = ? AND RD.REPL_ORDER = D.PICK_ORDER " + " WHERE D.TRAN_ID = ? AND RD.REPL_ORDER = D.PICK_ORDER " +
" AND RD.LINE_NO = D.LINE_NO__PICK AND RH.REPL_ORDER = RD.REPL_ORDER " + " AND RD.LINE_NO = D.LINE_NO__PICK AND RH.REPL_ORDER = RD.REPL_ORDER " +
...@@ -212,14 +216,17 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -212,14 +216,17 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
pickLineNo = rs.getInt("LINE_NO__PICK"); pickLineNo = rs.getInt("LINE_NO__PICK");
pPickType = rs.getString("PICK_TYPE"); pPickType = rs.getString("PICK_TYPE");
cartonNo = rs.getString("CARTON_NO"); cartonNo = rs.getString("CARTON_NO");
//Changed by sumit on 30/03/13
ptcn = rs.getString("PTCN");
ptcnSET.add(ptcn);
saleOrderLine = " " + saleOrderLine; saleOrderLine = " " + saleOrderLine;
saleOrderLine = saleOrderLine.substring(saleOrderLine.length()-3); saleOrderLine = saleOrderLine.substring(saleOrderLine.length()-3);
System.out.println(" sord line no ["+saleOrderLine+"] locCode ["+locCode+"] locCodeTo["+locCodeTo+"] pickLineNo ["+pickLineNo+"]"); System.out.println(" sord line no ["+saleOrderLine+"] locCode ["+locCode+"] locCodeTo["+locCodeTo+"] pickLineNo ["+pickLineNo+"] ptcn ["+ptcn+"]");
if("S".equalsIgnoreCase(pPickType)) if("S".equalsIgnoreCase(pPickType))
{ {
errString = deallocatedRepl(pickOrder, pickLineNo,pPickType, siteCode, itemCode, lotNo, lotSl, DeallocQty, saleOrder, saleOrderLine, expLev, custCode, xtraParams, waveId,cartonNo, conn); errString = deallocatedRepl(pickOrder, pickLineNo,pPickType, siteCode, itemCode, lotNo, lotSl, DeallocQty, saleOrder, saleOrderLine, expLev, custCode, xtraParams, waveId,cartonNo, conn);
errString = sorderDeAllocate(saleOrder, saleOrderLine, itemCode, DeallocQty, expLev, custCode, lotSl, lotNo, locCode, xtraParams, waveId, ""); errString = sorderDeAllocate(saleOrder, saleOrderLine, itemCode, DeallocQty, expLev, custCode, lotSl, lotNo, locCode, xtraParams, waveId, "",conn);
continue; continue;
} }
...@@ -403,7 +410,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -403,7 +410,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
System.out.println(update+" wave_task_det update syuccessfully"); System.out.println(update+" wave_task_det update syuccessfully");
} }
errString = sorderDeAllocate(saleOrder, saleOrderLine, itemCode, DeallocQty, expLev, custCode, lotSl, lotNo, locCode, xtraParams, waveId, pickOrder); errString = sorderDeAllocate(saleOrder, saleOrderLine, itemCode, DeallocQty, expLev, custCode, lotSl, lotNo, locCode, xtraParams, waveId, pickOrder,conn);
if (errString != null && errString.trim().length() > 0) if (errString != null && errString.trim().length() > 0)
{ {
...@@ -508,8 +515,28 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -508,8 +515,28 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println(" ptcnSET "+ptcnSET);
System.out.println(" errString "+errString);
if(ptcnSET.size() > 0 && errString.trim().length() == 0)
{
String tempPTCN = "";
Iterator it = ptcnSET.iterator();
while( it.hasNext())
{
tempPTCN = it.next().toString();
System.out.println(" tempPTCN --> ["+tempPTCN+"]");
ConsolidatToDoc conToDoc = new ConsolidatToDoc();
errString = conToDoc.process(ptcn, conn,xtraParams);
if ( errString != null && errString.trim().length() > 0 )
{
isError = true;
return errString;
}
}
}
System.out.println("ret string :"+errString);
//End changes by Gulzar on 5/10/2012 //End changes by Gulzar on 5/10/2012
} }
catch(Exception e) catch(Exception e)
...@@ -567,6 +594,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -567,6 +594,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
catch( Exception e) catch( Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
errString = e.getMessage();
throw new ITMException(e); throw new ITMException(e);
} }
} }
...@@ -581,7 +609,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -581,7 +609,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
return input; return input;
} }
private String sorderDeAllocate(String saleOrder, String lineNo, String itemCode, double DeallocQty, String expLev,String custCode,String lotSl,String lotNo,String locCode, String xtraParams, String waveId, String pickOrder ) throws ITMException private String sorderDeAllocate(String saleOrder, String lineNo, String itemCode, double DeallocQty, String expLev,String custCode,String lotSl,String lotNo,String locCode, String xtraParams, String waveId, String pickOrder, Connection conn ) throws ITMException
{ {
System.out.println("updateSOrder calling .............."); System.out.println("updateSOrder calling ..............");
String updateSorditem = null,updateSordAllocDet=null; String updateSorditem = null,updateSordAllocDet=null;
...@@ -600,12 +628,12 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -600,12 +628,12 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
double grossWeightItem = 0d; double grossWeightItem = 0d;
double netWeightItem = 0d; double netWeightItem = 0d;
int noArt = 0, totalNoArt = 0; int noArt = 0, totalNoArt = 0;
Connection conn = null; //Connection conn = null;
PreparedStatement pstmt=null, pstmt1 = null,pstmtStock = null; PreparedStatement pstmt=null, pstmt1 = null,pstmtStock = null;
Statement st = null; Statement st = null;
ResultSet rsQtyAlloc=null, rs = null, rs1 = null; ResultSet rsQtyAlloc=null, rs = null, rs1 = null;
HashMap invallocTraceMap = new HashMap(); HashMap invallocTraceMap = new HashMap();
ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = new ConnDriver();
InvAllocTraceBean invallocTraceBean = new InvAllocTraceBean(); InvAllocTraceBean invallocTraceBean = new InvAllocTraceBean();
try try
{ {
...@@ -614,8 +642,8 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -614,8 +642,8 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId"); chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
System.out.println(" site code :["+siteCode+"] chgUser:["+chgUser+"] chgTerm:["+chgTerm+"] locCode ["+locCode+"]"); System.out.println(" site code :["+siteCode+"] chgUser:["+chgUser+"] chgTerm:["+chgTerm+"] locCode ["+locCode+"]");
conn = connDriver.getConnectDB("DriverITM"); /*conn = connDriver.getConnectDB("DriverITM");
connDriver = null; connDriver = null;*/
st = conn.createStatement(); st = conn.createStatement();
invallocTraceMap.put("ref_ser","DEART"); invallocTraceMap.put("ref_ser","DEART");
invallocTraceMap.put("site_code",siteCode); invallocTraceMap.put("site_code",siteCode);
...@@ -921,21 +949,21 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -921,21 +949,21 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
} }
st.close(); st.close();
invallocTraceMap.clear(); invallocTraceMap.clear();
conn.commit(); //conn.commit();
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :" + e); System.out.println("Exception :" + e);
errString = e.getMessage(); errString = e.getMessage();
e.printStackTrace(); e.printStackTrace();
try /*try
{ {
conn.rollback(); conn.rollback();
} }
catch(Exception e1) catch(Exception e1)
{ {
e = e1; e = e1;
} }*/
return errString ; return errString ;
} }
...@@ -943,8 +971,8 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -943,8 +971,8 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
{ {
try try
{ {
if(conn != null) /*if(conn != null)
{ {*/
if( rs != null) if( rs != null)
{ {
rs.close(); rs = null; rs.close(); rs = null;
...@@ -971,9 +999,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -971,9 +999,9 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
st.close(); st.close();
st = null; st = null;
} }
conn.close(); /*conn.close();
conn = null; conn = null;*/
} //}
} }
catch(Exception e) catch(Exception e)
{ {
......
...@@ -2100,7 +2100,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -2100,7 +2100,7 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
try try
{ {
sql = "SELECT WAVE_ID, SALE_ORDER FROM PICK_ORD_HDR WHERE PICK_ORDER = ? "; sql = "SELECT WAVE_ID, SALE_ORDER FROM WAVE_TASK_DET WHERE REF_ID = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refId); pstmt.setString(1, refId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
......
...@@ -37808,6 +37808,97 @@ INSERT INTO pophelp ( ...@@ -37808,6 +37808,97 @@ INSERT INTO pophelp (
NULL, NULL,
NULL); NULL);
-- Changed by sumit on 30/03/13
INSERT INTO MESSAGES (
msg_no ,
msg_str ,
msg_descr ,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source ,
chg_date ,
chg_user ,
chg_term ,
override_input,
mail_option )
VALUES (
'NULCARTNNO',
'Null Carton number',
'Please insert carton number',
'E',
'E',
NULL,
NULL,
NULL,
TO_DATE('13-02-2008 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE',
'BASE',
NULL,
NULL);
INSERT INTO MESSAGES (
msg_no ,
msg_str ,
msg_descr ,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source ,
chg_date ,
chg_user ,
chg_term ,
override_input,
mail_option )
VALUES (
'INVCTNNO1',
'Invalid Carton number',
'Carton number does not exist in carton master.',
'E',
'E',
NULL,
NULL,
NULL,
TO_DATE('13-02-2008 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE',
'BASE',
NULL,
NULL);
INSERT INTO MESSAGES (
msg_no ,
msg_str ,
msg_descr ,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source ,
chg_date ,
chg_user ,
chg_term ,
override_input,
mail_option )
VALUES (
'INVQUANTIY',
'Invalid Quantity',
'Quantity can not be zero.',
'E',
'E',
NULL,
NULL,
NULL,
TO_DATE('13-02-2008 00:00:00','DD-MM-YYYY HH24:MI:SS'),
'BASE',
'BASE',
NULL,
NULL);
commit; commit;
......
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