Commit 35581498 authored by caluka's avatar caluka

Transfer full quantity time lot no and location update logic change


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97109 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4115d2d1
...@@ -3076,7 +3076,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3076,7 +3076,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
PreparedStatement pstmt=null, pstmtUpd=null,pstmtInsert = null,pstmtQC=null; PreparedStatement pstmt=null, pstmtUpd=null,pstmtInsert = null,pstmtQC=null;
String lotNo="",itemCode="",siteCode="",locationCode="",lotSl="",qorderNo="",locationCodeFrom=""; String lotNo="",itemCode="",siteCode="",locationCode="",lotSl="",qorderNo="",locationCodeFrom="";
String unit="",aprv="",rej="",qcLotLocCode=""; String unit="",aprv="",rej="",qcLotLocCode="";
int cnt=0,cnt1=0,updCnt=0,updCnt1=0; int cnt=0,cnt1=0,updCnt=0,updCnt1=0,cnt22=0;
double quantity=0,qtySample=0,qcOrdQty=0; double quantity=0,qtySample=0,qcOrdQty=0;
double noArt=0 , netWeight=0 , rate=0 , batchSize=0; double noArt=0 , netWeight=0 , rate=0 , batchSize=0;
int lineNo=0,qcCount=0,qcLotCount=0; int lineNo=0,qcCount=0,qcLotCount=0;
...@@ -3192,25 +3192,30 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3192,25 +3192,30 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
if (rs.next()) if (rs.next())
{ {
//cnt22 = rs.getInt("cnt"); //cnt22 = rs.getInt("cnt");
cnt22 = Integer.parseInt(rs.getString("cnt") == null ? "0" : rs.getString("cnt"));
qcOrdQty = Double.parseDouble(rs.getString("quantity") == null ? "0" : rs.getString("quantity")); qcOrdQty = Double.parseDouble(rs.getString("quantity") == null ? "0" : rs.getString("quantity"));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(qcOrdQty == 0) if(cnt22 > 0)
{ {
sql = " delete from qc_order_lots where item_code = ? and lot_no = ? " + if (qcOrdQty == 0)
"and loc_code__issue = ? and lot_sl=? "; {
pstmt = conn.prepareStatement(sql); sql = " delete from qc_order_lots where item_code = ? and lot_no = ? "
pstmt.setString(1, itemCode); + "and loc_code__issue = ? and lot_sl=? ";
pstmt.setString(2, lotNo); pstmt = conn.prepareStatement(sql);
pstmt.setString(3, locationCodeFrom); pstmt.setString(1, itemCode);
pstmt.setString(4, lotSl); pstmt.setString(2, lotNo);
pstmt.executeUpdate(); pstmt.setString(3, locationCodeFrom);
pstmt.close(); pstmt.setString(4, lotSl);
pstmt = null; pstmt.executeUpdate();
pstmt.close();
pstmt = null;
}
} }
} }
else else
......
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