Commit 68141606 authored by vhegde's avatar vhegde

changed by sankara on 26/05/14 updatd MasterPakPos and PickIssIC and messages sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95111 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b4ef1351
......@@ -195,6 +195,7 @@ public class MasterPackPos extends ValidatorEJB implements MasterPackPosRemote,
break;
}
}
outerCarton = genericUtility.getColumnValueFromNode("carton_no", node2.item(cnt));
System.out.println("-------->Carton ["+outerCarton+"] updateFlag ["+updateFlag+"]");
......@@ -316,8 +317,9 @@ public class MasterPackPos extends ValidatorEJB implements MasterPackPosRemote,
updatePrintChangeStatus(ptcn , conn);
}
}
//Changed By Pragyan 23-MAY-14 Master Pack remove the master carton no iff record not present pack_det detail.start
//Changed by sumit on 08/02/13 updating pack_hdr start.
else
/*else
{
int update = 0;
sql = "UPDATE PACK_HDR SET OUTER_CARTON_NO = NULL WHERE TRAN_ID = ? ";
......@@ -330,8 +332,25 @@ public class MasterPackPos extends ValidatorEJB implements MasterPackPosRemote,
}
pstmt.close(); pstmt = null;
}*/
if(tranId != null)
{
int update = 0;
sql = "UPDATE PACK_HDR SET OUTER_CARTON_NO = NULL WHERE TRAN_ID = ? AND (SELECT COUNT(*) FROM PACK_DET WHERE TRAN_ID= ?) = 0 ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
pstmt.setString(2, tranId);
update = pstmt.executeUpdate();
if( update > 0)
{
System.out.println(update+" column of PACK_HDR is update successfuly ");
}
pstmt.close(); pstmt = null;
}
//Changed by sumit on 08/02/13 updating pack_hdr end.
//Changed By Pragyan 23-MAY-14 Master Pack remove the master carton no iff record not present pack_det detail.end
}
catch( Exception e )
......
......@@ -146,7 +146,8 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
String replOrderPick = "";
String lineNoRepl = "";
String sqlPick = "";
java.util.Date tranDate = null;
String prdCode = "";
//Chnaged by Rohan on 29-10-12 to define variable.end
int count = 0, cnt = 0;
int rowCount = 0;
......@@ -180,13 +181,14 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
HashMap itmVolumeMap = new HashMap();
//changed by sankara on 18/11/13 validation for different assign user
String assignTo = "";
try
{
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
connDriver = null;
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getApplDateFormat());
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
if ( objContext != null && objContext.trim().length() > 0 )
......@@ -605,6 +607,34 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
errFields.add( childNodeName.toLowerCase() );
}
//changed by sankara on 18/11/13 validation for different assign user end.
//Changed By Pragyan 23-MAY-14 To put a validation/warning message as pallet no exist.start
String palletNoDom = checkNull(genericUtility.getColumnValue( "pallet_no", currFormDataDom ));;
String palletNoDb = "";
sql = "SELECT P.PALLET_NO FROM PICK_ISS_HDR P WHERE P.PICK_ORDER = ? "
+" AND P.TRAN_ID NOT IN (SELECT TRAN_ID FROM PICK_ISS_DET WHERE PICK_ORDER = ?)"; // commented by cpatil on 11-sept-12
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, pickOrder );
pstmt.setString( 2, pickOrder );
rs = pstmt.executeQuery();
if( rs.next() )
{
palletNoDb = checkNull(rs.getString("PALLET_NO"));
System.out.println("pallet no db ="+palletNoDb);
if ( (palletNoDom.trim().length() > 0 && palletNoDb.length() > 0 && ! palletNoDom.trim().equalsIgnoreCase(palletNoDb)) )
{
System.out.println("Unmatch PALLET NO ");
errList.add( "VTAPLTEXST" );
errFields.add( childNodeName.toLowerCase() );
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Changed By Pragyan 23-MAY-14 To put a validation/warning message as pallet no exist.end
}
else if ( "pallet_no".equalsIgnoreCase( childNodeName ) ) // && ! "master_pick".equalsIgnoreCase(objName) )
{
......@@ -747,6 +777,31 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
//pstmt = null;
//}
/*sql = "SELECT P.PALLET_NO FROM PICK_ISS_HDR P WHERE P.PICK_ORDER = ? "
+" AND P.TRAN_ID NOT IN (SELECT TRAN_ID FROM PICK_ISS_DET WHERE PICK_ORDER = ?)"; // commented by cpatil on 11-sept-12
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, pickOrder );
pstmt.setString( 2, pickOrder );
rs = pstmt.executeQuery();
if( rs.next() )
{
palletNoDb = checkNull(rs.getString("PALLET_NO"));
System.out.println("pallet no db ="+palletNoDb);
if ( (palletNoDom.trim().length() > 0 && palletNoDb.length() > 0 && ! palletNoDom.trim().equalsIgnoreCase(palletNoDb)) )
{
System.out.println("Unmatch PALLET NO ");
errList.add( "VTAPLTEXST" );
errFields.add( childNodeName.toLowerCase() );
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;*/
}
}//palet_no case
......@@ -780,6 +835,12 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
}
}//outer_carton_no case
*/
//Changed By Pragyan 15/MAY/14 to allow only one pallet will allowed at any time for picking but there should be no detail for the pallet.start
//Changed By Pragyan 15/MAY/14 to allow only one pallet will allowed at any time for picking but there should be no detail for the pallet.end
}
} //End of case 1 Validation
break;
......@@ -847,6 +908,60 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
errFields.add( childNodeName.toLowerCase() );
// end 26/10/11 manoharan all the errors should be returned so that warnings can be processed
}
else //added by kunal on 15-feb-14 for period code
{
siteCode = genericUtility.getColumnValue("site_code", currFormDataDom);
System.out.println("364 site code ="+siteCode);
if (genericUtility.getColumnValue("tran_date", currFormDataDom) != null)
{
tranDate = sdf1.parse(genericUtility.getColumnValue("tran_date", currFormDataDom));
sql = "select code from period where ? between fr_date and to_date";
pstmt = conn.prepareStatement(sql);
pstmt.setDate(1, new java.sql.Date(tranDate.getTime()));
rs = pstmt.executeQuery();
if (rs.next())
{
prdCode = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
sql = "select count(*) from period_stat where site_code = ? and prd_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode);
pstmt.setString(2, prdCode);
rs = pstmt.executeQuery();
if (rs.next())
{
count = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (count == 0)
{
errList.add( "VTSITEPD" );
errFields.add( childNodeName.toLowerCase() );
break;
}
// nvo_functions_adv.nf_check_period('SAL',mdate1,msite_code)
errCode = nfCheckPeriod("IC", tranDate, siteCode);
System.out.println("425 Error Code = " + errCode);
if (errCode != null && errCode.trim().length() > 0)
{
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
}
}//end
}//End of site_code validation
else if ( "pick_order".equalsIgnoreCase( childNodeName ) )
{
......
......@@ -45272,4 +45272,33 @@ VALUES (
NULL,
NULL);
commit;
--changed by sankara on 26/05/14 updated messages sql
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 (
'VTAPLTEXST',
'Palllete used for picking',
'You can use old pallet used for this picking task',
'W',
'Y',
NULL,
NULL,
NULL,
fn_sysdate(),
'Base ',
'Base ',
NULL,
NULL);
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