Commit 177e8bc4 authored by ppatro's avatar ppatro

data logger no and seal no updation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97063 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c2070d7b
......@@ -137,6 +137,8 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
String status = "";
String phone = "";
String itemDescr = "";
//Changed By Pragyan 29/DEC/14 To store seal no and data logger no
String sealNo = "",dataLoggerNo = "";
int pkg = 0;
int noOfPkgs = 0;
......@@ -215,7 +217,9 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
}
//changed by sankara on 22/09/14 for site transporter end.
sql = "SELECT SHIPMENT.CONFIRMED, SHIPMENT.NO_PALLET FROM SHIPMENT WHERE SHIPMENT.SHIPMENT_ID = ? ";
//Changed By Pragyan 29/DEC/14 To get seal no and data logger no
//sql = "SELECT SHIPMENT.CONFIRMED, SHIPMENT.NO_PALLET FROM SHIPMENT WHERE SHIPMENT.SHIPMENT_ID = ? ";
sql = "SELECT SHIPMENT.CONFIRMED, SHIPMENT.NO_PALLET,SHIPMENT.SEAL_NO,SHIPMENT.DATA_LOGGER_NO FROM SHIPMENT WHERE SHIPMENT.SHIPMENT_ID = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
......@@ -223,6 +227,9 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
{
confirmed = rs.getString("CONFIRMED");
noOfPallet = rs.getInt("NO_PALLET");
//Changed By Pragyan 29/DEC/14 To get seal no and data logger no
sealNo = checkNull(rs.getString("SEAL_NO"));
dataLoggerNo = checkNull(rs.getString("DATA_LOGGER_NO"));
}
......@@ -489,7 +496,9 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
errString = confirmShipment( objName, refId.trim(), xtraParam, forcedFlag, conn);
System.out.println(" errString ---------------- > ["+errString);
updateShipDocs(refId,refSerNew, findError(errString));
//Changed By Pragyan seal no and data logger no
//updateShipDocs(refId,refSerNew, findError(errString));
updateShipDocs(refId,refSerNew,sealNo,dataLoggerNo, findError(errString));
}
}
......@@ -3238,10 +3247,13 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
//Changed by sumit on 05/10/12 update desp_confirmed in ship_docs ship detail start.
//Chnaged by Rohan on 14-08-13 for passing argument
//private String updateShipDocs ( String refId, HashMap error) throws ITMException
private String updateShipDocs ( String refId,String refSer, HashMap error) throws ITMException
//private String updateShipDocs ( String refId,String refSer, HashMap error) throws ITMException
private String updateShipDocs ( String refId,String refSer,String sealNo ,String dataLoggerNo, HashMap error) throws ITMException
{
String sql = "";
PreparedStatement pstmt1 = null, pstmt = null;
String sql = "",sSQL = "";
//Changed By Pragyan
//PreparedStatement pstmt1 = null, pstmt = null;
PreparedStatement pstmt1 = null, pstmt = null,pstmtLog = null;
Connection conn = null;
ConnDriver connDriver = null;
try
......@@ -3284,6 +3296,26 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pstmt1.setString(3, refId);
//Changed by shankra on 16/08/13
pstmt1.executeUpdate();
sSQL = "UPDATE DESPATCH SET SEAL_NO = ?, DATA_LOGGER_NO = ? WHERE DESP_ID = ? ";
pstmtLog = conn.prepareStatement(sSQL);
pstmtLog.setString(1, sealNo);
pstmtLog.setString(2, dataLoggerNo);
pstmtLog.setString(3, refId);
if(pstmtLog.executeUpdate() > 0 )
{
System.out.println(" update Despatch with seal and ogger no");
}
if( pstmtLog != null)
{
pstmtLog.close();
pstmtLog = null;
}
}
//changed by sankara on 24/06/14 for update ship_docs in manual ship case start.
else
......@@ -3292,6 +3324,26 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pstmt1.setString(2, "");
pstmt1.setString(3, refId);
pstmt1.executeUpdate();
if("D-ISS".equalsIgnoreCase(refSer.trim()))
{
sSQL = "UPDATE DISTORD_ISS SET SEAL_NO = ?, DATA_LOGGER_NO = ? WHERE TRAN_ID = ? ";
pstmtLog = conn.prepareStatement(sSQL);
pstmtLog.setString(1, sealNo);
pstmtLog.setString(2, dataLoggerNo);
pstmtLog.setString(3, refId);
if(pstmtLog.executeUpdate() > 0 )
{
System.out.println(" update Consume Issue with seal and logger no");
}
if( pstmtLog != null)
{
pstmtLog.close();
pstmtLog = null;
}
}
}
//changed by sankara on 24/06/14 for update ship_docs in manual ship case end.
}
......
......@@ -50368,8 +50368,8 @@ VALUES ('VTINVQTYIN', 'Invalid Quantity!', 'Quantity Inputs required in multipl
INSERT INTO ddwms.MESSAGES (msg_no , msg_str , msg_descr , msg_type , msg_opt , chg_date , chg_user , chg_term )
VALUES ('VTINVPRTIN', 'Invalid Part Quantity!', 'Partial quantity should not be more then shipper size', 'E', 'Y', SYSDATE, 'BASE ', 'BASE ');
----- 31/12/14 creating unique index for pack header
CREATE UNIQUE INDEX UNQ_INDX_PACK ON PACK_HDR (OUTER_CARTON_NO);
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