Commit 4cba8b8e authored by cpatil's avatar cpatil

add equal ignore


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93831 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4db9c6cf
...@@ -150,7 +150,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -150,7 +150,7 @@ QCTransferConfLocal, QCTransferConfRemote
{ {
PreparedStatement pstmt = null, pstmtSql = null; PreparedStatement pstmt = null, pstmtSql = null;
ResultSet rs = null, rs1 = null,rs3 = null; ResultSet rs = null;
int cnt = 0,updCnt=0; int cnt = 0,updCnt=0;
String retString = "", sql = "", errCode = ""; String retString = "", sql = "", errCode = "";
Timestamp sysDate = null, tranDate = null; Timestamp sysDate = null, tranDate = null;
...@@ -190,7 +190,6 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -190,7 +190,6 @@ QCTransferConfLocal, QCTransferConfRemote
porcpNo= rs.getString("porcp_no"); porcpNo= rs.getString("porcp_no");
fromLoc= rs.getString("loc_code"); fromLoc= rs.getString("loc_code");
itemCode= rs.getString("item_code"); itemCode= rs.getString("item_code");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -278,9 +277,9 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -278,9 +277,9 @@ QCTransferConfLocal, QCTransferConfRemote
stockUpd.put("pack_code", rs.getString("pack_code")); stockUpd.put("pack_code", rs.getString("pack_code"));
stockUpd.put("inv_stat", rs.getString("inv_stat")); stockUpd.put("inv_stat", rs.getString("inv_stat"));
stockUpd.put("unit", rs.getString("unit")); stockUpd.put("unit", rs.getString("unit"));
stkGrossWt = rs.getDouble("gross_weight"); //pending stkGrossWt = rs.getDouble("gross_weight");
stkTareWt = rs.getDouble("tare_weight"); //pending stkTareWt = rs.getDouble("tare_weight");
stkNetWt = rs.getDouble("net_weight"); //pending stkNetWt = rs.getDouble("net_weight");
stockUpd.put("pack_instr", rs.getString("pack_instr")); stockUpd.put("pack_instr", rs.getString("pack_instr"));
stockUpd.put("dimension", rs.getString("dimension")); stockUpd.put("dimension", rs.getString("dimension"));
stockUpd.put("rate", rs.getString("rate")); stockUpd.put("rate", rs.getString("rate"));
...@@ -296,12 +295,10 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -296,12 +295,10 @@ QCTransferConfLocal, QCTransferConfRemote
stockUpd.put("unit__alt", rs.getString("unit__alt")); stockUpd.put("unit__alt", rs.getString("unit__alt"));
stockUpd.put("batch_no", rs.getString("batch_no")); stockUpd.put("batch_no", rs.getString("batch_no"));
stockUpd.put("no_art", rs.getString("no_art")); stockUpd.put("no_art", rs.getString("no_art"));
qtyPerArt = rs.getDouble("qty_per_art"); //pending qtyPerArt = rs.getDouble("qty_per_art");
grossWtPerArt = rs.getDouble("gross_wt_per_art"); //pending grossWtPerArt = rs.getDouble("gross_wt_per_art");
tareWtPerArt = rs.getDouble("tare_wt_per_art"); //pending tareWtPerArt = rs.getDouble("tare_wt_per_art");
stockQty = rs.getDouble("quantity"); stockQty = rs.getDouble("quantity");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -420,7 +417,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -420,7 +417,7 @@ QCTransferConfLocal, QCTransferConfRemote
if (errCode == null || errCode.trim().length() == 0 ) if (errCode == null || errCode.trim().length() == 0 )
{ //if gs_run_mode = 'I' then { //if gs_run_mode = 'I' then
if ( qcQty > qty ) if ( qcQty > qty )
{ {
sql = " Update qc_order set quantity = (quantity - ? ) where qorder_no = ? "; sql = " Update qc_order set quantity = (quantity - ? ) where qorder_no = ? ";
...@@ -523,7 +520,8 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -523,7 +520,8 @@ QCTransferConfLocal, QCTransferConfRemote
sql = "select edi_option from transetup where tran_window = 'w_qc_transfer' "; sql = "select edi_option from transetup where tran_window = 'w_qc_transfer' ";
pstmtSql = conn.prepareStatement(sql); pstmtSql = conn.prepareStatement(sql);
rs = pstmtSql.executeQuery(); rs = pstmtSql.executeQuery();
if (rs.next()) { if (rs.next())
{
ediOption = rs.getString("EDI_OPTION"); ediOption = rs.getString("EDI_OPTION");
} }
rs.close(); rs.close();
...@@ -539,20 +537,18 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -539,20 +537,18 @@ QCTransferConfLocal, QCTransferConfRemote
Document ediDataDom = genericUtility.parseString(dataStr); Document ediDataDom = genericUtility.parseString(dataStr);
E12CreateBatchLoadEjb e12CreateBatchLoad = new E12CreateBatchLoadEjb(); E12CreateBatchLoadEjb e12CreateBatchLoad = new E12CreateBatchLoadEjb();
retString = e12CreateBatchLoad.createBatchLoad(ediDataDom, retString = e12CreateBatchLoad.createBatchLoad(ediDataDom,"w_qc_transfer", "2", xtraParams, conn);
"w_qc_transfer", "2", xtraParams, conn);
createRCPXML = null; createRCPXML = null;
e12CreateBatchLoad = null; e12CreateBatchLoad = null;
if (retString != null && "SUCCESS".equals(retString)) if (retString != null && "SUCCESS".equalsIgnoreCase(retString))
{ {
System.out.println("retString from batchload = [" System.out.println("retString from batchload = [" + retString + "]");
+ retString + "]");
} }
} }
else { else
{
CreateRCPXML createRCPXML = new CreateRCPXML("w_qc_transfer","tran_id"); CreateRCPXML createRCPXML = new CreateRCPXML("w_qc_transfer","tran_id");
dataStr = createRCPXML.getTranXML(tranId, conn); dataStr = createRCPXML.getTranXML(tranId, conn);
System.out.println("dataStr =[ " + dataStr + "]"); System.out.println("dataStr =[ " + dataStr + "]");
...@@ -563,7 +559,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -563,7 +559,7 @@ QCTransferConfLocal, QCTransferConfRemote
createRCPXML = null; createRCPXML = null;
e12CreateBatchLoad = null; e12CreateBatchLoad = null;
if (retString != null && "SUCCESS".equals(retString)) if (retString != null && "SUCCESS".equalsIgnoreCase(retString))
{ {
System.out.println("retString from batchload = ["+ retString + "]"); System.out.println("retString from batchload = ["+ retString + "]");
} }
......
...@@ -234,6 +234,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -234,6 +234,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("@@@@@@@@9 cnt["+cnt+"]:::tranId["+tranId+"]"); System.out.println("@@@@@@@@9 cnt["+cnt+"]:::tranId["+tranId+"]");
if( cnt > 0 ) if( cnt > 0 )
{ {
...@@ -249,7 +250,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -249,7 +250,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
} }
sql = " Select count(1) from qc_transfer " + sql = " Select count(1) from qc_transfer " +
" Where qorder_no = ? and confirmed = 'N' and tran_id <> ? "; " Where qorder_no = ? and confirmed = 'N' and tran_id <> ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,qorderNo); pstmt.setString(1,qorderNo);
pstmt.setString(2,tranId); pstmt.setString(2,tranId);
...@@ -291,6 +292,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -291,6 +292,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if ( cnt == 0 ) if ( cnt == 0 )
{ {
// ls_errcode = 'QCTRFORD~t' + 'QC order is not found'; // ls_errcode = 'QCTRFORD~t' + 'QC order is not found';
...@@ -340,12 +342,12 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -340,12 +342,12 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
if( errCode.length() == 0 ) if(errCode == null || errCode.trim().length() == 0 )
{ {
sql = " Select Quantity from stock" + sql = " Select Quantity from stock" +
" Where item_code = ? and site_code = ? " + " Where item_code = ? and site_code = ? " +
" and loc_code = ? and lot_no = ? " + " and loc_code = ? and lot_no = ? " +
" and lot_sl = ? "; " and lot_sl = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode); pstmt.setString(1,itemCode);
pstmt.setString(2,siteCode); pstmt.setString(2,siteCode);
...@@ -403,6 +405,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -403,6 +405,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if ( cnt == 0) if ( cnt == 0)
{ {
errCode = "VTQTY51"; errCode = "VTQTY51";
...@@ -446,6 +449,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -446,6 +449,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(!("N".equalsIgnoreCase(available))) if(!("N".equalsIgnoreCase(available)))
{ {
...@@ -799,7 +803,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT ...@@ -799,7 +803,7 @@ public class QCTransferIC extends ValidatorEJB implements QCTransferICLocal, QCT
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom)); itemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
sql = " select loc_code from stock " + sql = " select loc_code from stock " +
" where item_code = ? and lot_no = ? and lot_sl = ? and site_code = ? and quantity > 0 "; " where item_code = ? and lot_no = ? and lot_sl = ? and site_code = ? and quantity > 0 ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
pstmt.setString(2, lotNo); pstmt.setString(2, lotNo);
......
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