Commit a16f7261 authored by wansari's avatar wansari

D15AKAT002 worked on setting quantity in barcode as shippersize for Metis screen


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99453 ce508802-f39f-4f6c-b175-0d175dae99d5
parent aed021f3
...@@ -75,7 +75,7 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P ...@@ -75,7 +75,7 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P
String retString = ""; String retString = "";
String loginEmpCode = "",userId = "",loginSite = "",chgTerm = ""; String loginEmpCode = "",userId = "",loginSite = "",chgTerm = "";
String errString = ""; String errString = "";
String purcOrder = "",itemCode = "",caseLable = "",quantity = "",oldQuantity = "",barCode = "",confirmed = ""; String purcOrder = "",itemCode = "",caseLable = "",quantity = "",oldQuantity = "",barCode = "",confirmed = "",shipperSize = "";
String labelNo = "", descr = "",refSer = "",currDate = ""; String labelNo = "", descr = "",refSer = "",currDate = "";
int count = 0,caseCount = 0; int count = 0,caseCount = 0;
Timestamp today = new Timestamp(System.currentTimeMillis()); Timestamp today = new Timestamp(System.currentTimeMillis());
...@@ -167,7 +167,11 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P ...@@ -167,7 +167,11 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = "SELECT DESCR,UDF__STR2 FROM ITEM WHERE ITEM_CODE = ? "; //Changed by wasim on 17-12-2015 to set quantity as shippersize [START]
//sql = "SELECT DESCR,UDF__STR2 FROM ITEM WHERE ITEM_CODE = ? ";
sql = " SELECT I.DESCR,I.UDF__STR2,L.SHIPPER_SIZE FROM ITEM I,ITEM_LOT_PACKSIZE L"
+" WHERE I.ITEM_CODE = ? AND I.ITEM_CODE = L.ITEM_CODE";
//Changed by wasim on 17-12-2015 to set quantity as shippersize [END]
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -175,13 +179,15 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P ...@@ -175,13 +179,15 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P
{ {
descr = checkNullAndTrim(rs.getString("DESCR")); descr = checkNullAndTrim(rs.getString("DESCR"));
barCode = checkNullAndTrim(rs.getString("UDF__STR2")); barCode = checkNullAndTrim(rs.getString("UDF__STR2"));
shipperSize = checkNullAndTrim(rs.getString("SHIPPER_SIZE"));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Quantity Length="+quantity.length()); //Changed by wasim on 17-12-2015 to set quantity as shippersize [START]
/*System.out.println("Quantity Length="+quantity.length());
if(quantity.length() == 1) if(quantity.length() == 1)
{ {
...@@ -199,7 +205,27 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P ...@@ -199,7 +205,27 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P
System.out.println("New Quantity="+quantity); System.out.println("New Quantity="+quantity);
labelNo = purcOrder + quantity + barCode; labelNo = purcOrder + quantity + barCode;
System.out.println("Label Number is="+labelNo);*/
System.out.println("Shipper Size Length="+shipperSize.length());
if(shipperSize.length() == 1)
{
shipperSize = "000"+shipperSize;
}
else if(shipperSize.length() == 2)
{
shipperSize = "00"+shipperSize;
}
else if(shipperSize.length() == 3)
{
shipperSize = "0"+shipperSize;
}
System.out.println("New Quantity="+shipperSize);
labelNo = purcOrder + shipperSize + barCode;
System.out.println("Label Number is="+labelNo); System.out.println("Label Number is="+labelNo);
//Changed by wasim on 17-12-2015 to set quantity as shippersize [END]
sql = "Insert into CASE_LABEL (ITEM_CODE,LOT_NO,ORDER_NO,REF_SER,QUANTITY,LABEL_NO," sql = "Insert into CASE_LABEL (ITEM_CODE,LOT_NO,ORDER_NO,REF_SER,QUANTITY,LABEL_NO,"
+ "CHG_USER,CHG_DATE,CHG_TERM ) " + "CHG_USER,CHG_DATE,CHG_TERM ) "
...@@ -209,7 +235,8 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P ...@@ -209,7 +235,8 @@ public class POCaseLabelPrc extends ProcessEJB implements POCaseLabelPrcLocal, P
pstmt.setString(2, " "); pstmt.setString(2, " ");
pstmt.setString(3, purcOrder); pstmt.setString(3, purcOrder);
pstmt.setString(4, refSer); pstmt.setString(4, refSer);
pstmt.setString(5, oldQuantity); //pstmt.setString(5, oldQuantity);
pstmt.setString(5, shipperSize);
pstmt.setString(6, labelNo); pstmt.setString(6, labelNo);
pstmt.setString(7, loginEmpCode); pstmt.setString(7, loginEmpCode);
pstmt.setTimestamp(8, today); pstmt.setTimestamp(8, today);
......
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