Commit 84707f5d authored by jshinde's avatar jshinde

Updated ScheduleAWMSInOutTasks


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103589 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cacd2b07
...@@ -1598,7 +1598,8 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -1598,7 +1598,8 @@ public class ScheduleAWMSInOutTasks implements Schedule
String itemSerRg = "",locGroup = "",QcStatus = "",exempted = "",locCodeToReturn = "",itemSerRgDisparm = ""; String itemSerRg = "",locGroup = "",QcStatus = "",exempted = "",locCodeToReturn = "",itemSerRgDisparm = "";
PreparedStatement pstmt=null; PreparedStatement pstmt=null;
ResultSet rs = null; ResultSet rs = null;
String sql = ""; String sql = "",sqlQcOrder= "",sqlOtherSite ="",available ="";//Changed by Jagruti Shinde Request Id:[W16FSUN009]
int countQcOrder = 0;
try try
{ {
exempted = checkNullAndTrim(distComm.getDisparams("999999", "EXTEMP_LOC_PARM" , conn)); exempted = checkNullAndTrim(distComm.getDisparams("999999", "EXTEMP_LOC_PARM" , conn));
...@@ -1606,7 +1607,34 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -1606,7 +1607,34 @@ public class ScheduleAWMSInOutTasks implements Schedule
System.out.println("ITEM_SER_RG1 found from disparm["+itemSerRgDisparm+"]"); System.out.println("ITEM_SER_RG1 found from disparm["+itemSerRgDisparm+"]");
System.out.println("Exempted found from disparm["+exempted+"]"); System.out.println("Exempted found from disparm["+exempted+"]");
//Changed by Jagruti Shinde for palletization stock transfer location should be check whether it is quarantine or approved if qc_order is created at one site and palletization is done on another side Request Id:[W16FSUN009].[Start]
//sqlQcOrder="SELECT COUNT(*) FROM QC_ORDER WHERE SITE_CODE = ? AND ITEM_CODE = ? AND LOT_NO = ? AND STATUS = ? ";
sqlQcOrder="SELECT COUNT(*) FROM QC_ORDER WHERE SITE_CODE = ? AND ITEM_CODE = ? AND LOT_NO = ? ";
pstmt = conn.prepareStatement(sqlQcOrder);
pstmt.setString(1,siteCode);
pstmt.setString(2,itemCode);
pstmt.setString(3,lotNo);
// pstmt.setString(4,"U");
rs = pstmt.executeQuery();
if(rs.next())
{
countQcOrder = rs.getInt(1);
}
if(pstmt!=null)
{
pstmt.close();
pstmt = null;
}
if(rs!=null)
{
rs.close();
rs = null;
}
if(countQcOrder > 0)
{
System.out.println("countQcOrder is greter than 0:::"+countQcOrder);
//Changed by Jagruti Shinde for palletization stock transfer location should be check whether it is quarantine or approved if qc_order is created at one site and palletization is done on another side Request Id:[W16FSUN009].[End]
//sql = "SELECT LOC_GROUP FROM LOCATION WHERE LOC_CODE = ? AND SITE_CODE = ?";//Changed by wasim on 19-02-2016 as site code not required //sql = "SELECT LOC_GROUP FROM LOCATION WHERE LOC_CODE = ? AND SITE_CODE = ?";//Changed by wasim on 19-02-2016 as site code not required
sql = "SELECT LOC_GROUP FROM LOCATION WHERE LOC_CODE = ?"; sql = "SELECT LOC_GROUP FROM LOCATION WHERE LOC_CODE = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1745,6 +1773,40 @@ public class ScheduleAWMSInOutTasks implements Schedule ...@@ -1745,6 +1773,40 @@ public class ScheduleAWMSInOutTasks implements Schedule
{ {
locCodeToReturn = locCodeTo; locCodeToReturn = locCodeTo;
} }
//Changed by Jagruti Shinde for palletization stock transfer location should be check whether it is quarantine or approved if qc_order is created at one site and palletization is done on another side Request Id:[W16FSUN009].[Start]
}
else
{
sqlOtherSite="SELECT AVAILABLE FROM INVSTAT WHERE INV_STAT IN (SELECT INV_STAT FROM LOCATION WHERE LOC_CODE = ?)";
pstmt = conn.prepareStatement(sqlOtherSite);
pstmt.setString(1, locCodeFrom);
rs = pstmt.executeQuery();
if(rs.next())
{
available = checkNullAndTrim(rs.getString("AVAILABLE"));
}
if(pstmt!=null)
{
pstmt.close();
pstmt = null;
}
if(rs!=null)
{
rs.close();
rs = null;
}
if("N".equalsIgnoreCase(available))
{
locCodeToReturn = locCodeTo + "Q";
System.out.println("locCodeToReturn for available 'N':::::::"+locCodeToReturn);
}
else if("Y".equalsIgnoreCase(available))
{
locCodeToReturn = locCodeTo;
System.out.println("locCodeToReturn for available 'Y':::::::"+locCodeToReturn);
}
}
//Changed by Jagruti Shinde for palletization stock transfer location should be check whether it is quarantine or approved if qc_order is created at one site and palletization is done on another side Request Id:[W16FSUN009].[End]
} }
catch(Exception e) catch(Exception e)
{ {
......
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