Commit 051e1eec authored by jshinde's avatar jshinde

Updated ScheduleAWMSInOutTasks


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103623 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6330ab23
......@@ -1607,34 +1607,6 @@ public class ScheduleAWMSInOutTasks implements Schedule
System.out.println("ITEM_SER_RG1 found from disparm["+itemSerRgDisparm+"]");
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 = ? AND STATUS != ? ";
pstmt = conn.prepareStatement(sqlQcOrder);
pstmt.setString(1,siteCode);
pstmt.setString(2,itemCode);
pstmt.setString(3,lotNo);
pstmt.setString(4,"C");
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 = ?";
pstmt = conn.prepareStatement(sql);
......@@ -1739,6 +1711,35 @@ public class ScheduleAWMSInOutTasks implements Schedule
itemSerRg = "NA";
}
//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 = ? AND STATUS != ? ";
pstmt = conn.prepareStatement(sqlQcOrder);
pstmt.setString(1,siteCode);
pstmt.setString(2,itemCode);
pstmt.setString(3,lotNo);
pstmt.setString(4,"C");
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]
System.out.println("********Loc Group["+locGroup+"]Item RG1["+itemSerRg+"]QC Status["+QcStatus+"]**********");
if(exempted.equalsIgnoreCase(locGroup) && itemSerRgDisparm.equalsIgnoreCase(itemSerRg) && "U".equalsIgnoreCase(QcStatus))
......@@ -1795,15 +1796,37 @@ public class ScheduleAWMSInOutTasks implements Schedule
rs.close();
rs = null;
}
if("N".equalsIgnoreCase(available))
if("N".equalsIgnoreCase(available) && ("NA".equalsIgnoreCase(locGroup) && "NA".equalsIgnoreCase(itemSerRg)))
{
locCodeToReturn = locCodeTo + "Q";
System.out.println("locCodeToReturn for available 'N':::::::"+locCodeToReturn);
System.out.println("locCodeToReturn Q for available 'N':::::::"+locCodeToReturn);
}
else if("Y".equalsIgnoreCase(available))
else if("N".equalsIgnoreCase(available) && (exempted.equalsIgnoreCase(locGroup) && "NA".equalsIgnoreCase(itemSerRg)))
{
locCodeToReturn = locCodeTo + "M";
System.out.println("locCodeToReturn M for available 'N':::::::"+locCodeToReturn);
}
else if("N".equalsIgnoreCase(available) && ("NA".equalsIgnoreCase(locGroup) && itemSerRgDisparm.equalsIgnoreCase(itemSerRg)))
{
locCodeToReturn = locCodeTo + "S";
System.out.println("locCodeToReturn S for available 'N':::::::"+locCodeToReturn);
}
else if("Y".equalsIgnoreCase(available) && ("NA".equalsIgnoreCase(locGroup) && "NA".equalsIgnoreCase(itemSerRg)))
{
locCodeToReturn = locCodeTo;
System.out.println("locCodeToReturn for available 'Y':::::::"+locCodeToReturn);
System.out.println("locCodeToReturn Normal for available 'Y':::::::"+locCodeToReturn);
}
else if("Y".equalsIgnoreCase(available) && (exempted.equalsIgnoreCase(locGroup) && "NA".equalsIgnoreCase(itemSerRg)))
{
locCodeToReturn = locCodeTo + "X";
System.out.println("locCodeToReturn for X available 'Y':::::::"+locCodeToReturn);
}
else if("Y".equalsIgnoreCase(available) && ("NA".equalsIgnoreCase(locGroup) && itemSerRgDisparm.equalsIgnoreCase(itemSerRg)))
{
locCodeToReturn = locCodeTo + "B";
System.out.println("locCodeToReturn for B 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]
......
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