Commit 8e31fdbe authored by dsawant's avatar dsawant

updated for cnt


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95908 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 580970ab
......@@ -65,7 +65,7 @@ public class WorkOrdRcpDetPostSave extends ValidatorEJB implements WorkOrdRcpDet
int quantity = 0, grossWeight = 0, tareWeight = 0, netWeight = 0, noArt = 0;
int cnt1 = 0;
String lotSl="",locCode="";
int cnt = 0;
PreparedStatement pstmt = null;
ResultSet rs=null;
......@@ -74,14 +74,14 @@ public class WorkOrdRcpDetPostSave extends ValidatorEJB implements WorkOrdRcpDet
sql = "select lot_sl from workorder_rcp_det where tran_id = ?";
sql = "select count(*) from workorder_rcp_det where tran_id = ? and lot_sl is not null";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if(rs.next()){
lotSl = rs.getString(1) == null ? "":rs.getString(1);
cnt = rs.getInt(1);
}
pstmt.close();
......@@ -89,6 +89,12 @@ public class WorkOrdRcpDetPostSave extends ValidatorEJB implements WorkOrdRcpDet
rs.close();
rs = null;
if(cnt > 0)
{
System.out.println("ENTER FOR SETTING >>>");
locCode = " ";
lotSl = " ";
}
sql = "select sum(coalesce(quantity,0)), sum(coalesce(gross_weight,0)), sum(coalesce(tare_weight,0)), " +
" sum(coalesce(net_weight,0)), sum(coalesce(no_art,0)) from workorder_rcp_det where tran_id = ? ";
......@@ -109,12 +115,7 @@ public class WorkOrdRcpDetPostSave extends ValidatorEJB implements WorkOrdRcpDet
rs.close();
rs = null;
if ((lotSl != null && lotSl.trim().length() > 0) || (lotSl == null || lotSl.trim().length() == 0))
{
System.out.println("ENTER FOR SETTING >>>");
locCode = " ";
lotSl = " ";
}
sql = "update workorder_receipt set quantity = ?, gross_weight = ?, tare_weight = ?, net_weight = ?, no_art = ?, lot_sl = ?, loc_code = ? where tran_id = ?";
pstmt = conn.prepareStatement(sql);
......
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