Commit 27791fa6 authored by manohar's avatar manohar

New method for mfg_date and exp_date calculation added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93350 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b2afc2bd
...@@ -230,6 +230,7 @@ public class MfgCommon { ...@@ -230,6 +230,7 @@ public class MfgCommon {
tranType = rs.getString("ORDER_TYPE"); tranType = rs.getString("ORDER_TYPE");
lotNoIssue = rs.getString("LOT_NO__ISSUE"); lotNoIssue = rs.getString("LOT_NO__ISSUE");
relDate = rs.getTimestamp("REL_DATE"); relDate = rs.getTimestamp("REL_DATE");
itemCode = rs.getString("ITEM_CODE"); itemCode = rs.getString("ITEM_CODE");
lotNo = rs.getString("LOT_NO"); lotNo = rs.getString("LOT_NO");
tranDate = rs.getTimestamp("ORD_DATE"); tranDate = rs.getTimestamp("ORD_DATE");
...@@ -240,6 +241,7 @@ public class MfgCommon { ...@@ -240,6 +241,7 @@ public class MfgCommon {
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
tranType = tranType.trim();
if (relDate == null) if (relDate == null)
{ {
relDate = new java.sql.Timestamp(System.currentTimeMillis()) ; relDate = new java.sql.Timestamp(System.currentTimeMillis()) ;
...@@ -305,7 +307,7 @@ public class MfgCommon { ...@@ -305,7 +307,7 @@ public class MfgCommon {
} }
sql= "SELECT COUNT(1) FROM STOCK " sql= "SELECT COUNT(1) FROM STOCK "
+ " WHERE ITEM_CODE = ? " + " WHERE ITEM_CODE = ? "
+ " AND SITE_CODE - ? " + " AND SITE_CODE = ? "
+ " AND LOT_NO = ? "; + " AND LOT_NO = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
...@@ -325,7 +327,7 @@ public class MfgCommon { ...@@ -325,7 +327,7 @@ public class MfgCommon {
{ {
sql= "SELECT MIN(MFG_DATE) AS MFG_DATE, MIN(EXP_DATE) AS EXP_DATE FROM STOCK " sql= "SELECT MIN(MFG_DATE) AS MFG_DATE, MIN(EXP_DATE) AS EXP_DATE FROM STOCK "
+ " WHERE ITEM_CODE = ? " + " WHERE ITEM_CODE = ? "
+ " AND SITE_CODE - ? " + " AND SITE_CODE = ? "
+ " AND LOT_NO = ? "; + " AND LOT_NO = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
...@@ -506,7 +508,13 @@ public class MfgCommon { ...@@ -506,7 +508,13 @@ public class MfgCommon {
} }
} }
} }
System.out.println("Manufacturing before tranType [" + tranType + "] mfgDate [" + mfgDate +"] relDate [" + relDate + "] mfgDateOn [" + mfgDateOn + "] complDate [" + complDate +"] lotNoIssue [" + lotNoIssue + "]");
if ("S".equals(logicParm) && "S".equals(mfgDateOn) && mfgDate == null)
{
mfgDate = relDate;
}
System.out.println("Manufacturing after tranType [" + tranType + "] mfgDate [" + mfgDate +"] relDate [" + relDate + "] mfgDateOn [" + mfgDateOn + "] complDate [" + complDate +"] lotNoIssue [" + lotNoIssue + "]");
logicParm = getEnvMfg("999999", "EXP_DATE_LOGIC", conn); logicParm = getEnvMfg("999999", "EXP_DATE_LOGIC", conn);
if (logicParm == null || "NULLFOUND".equals(logicParm)) if (logicParm == null || "NULLFOUND".equals(logicParm))
......
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