Changeset 4971


Ignore:
Timestamp:
Sep 14, 2018, 11:59:32 AM (5 years ago)
Author:
olle
Message:

Refs #1029. Referral form generator updated for BASE-line forms to add suffices ".b1", ".b2", and ".b3" to referral ID text and bar codes on the three rightmost sticker labels:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated in private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String itemId, String formTemplateName, List<String> formTemplateFileList) to add suffices ".b1", ".b2", and ".b3" to referral ID text and bar codes on the three rightmost sticker labels for BASE-line forms.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.meludi/trunk/src/net/sf/basedb/meludi/servlet/ReferralGeneratorServlet.java

    r4951 r4971  
    17581758    xDiffSpecArr[8] = 0.0f;
    17591759
     1760    int bloodLsbelStartNo = 6;
    17601761    for (int i = 0; i < 9; i++)
    17611762    {
     1763      if (formTemplateName.equals(REF_FORM_TEMPLATE_WHOLE_BLOOD))
     1764      {
     1765        if (i >= bloodLsbelStartNo)
     1766        {
     1767          text = itemId + ".b";
     1768/*
     1769          if (i > bloodLsbelStartNo)
     1770          {
     1771            text = text + (i - bloodLsbelStartNo + 1);
     1772          }
     1773*/
     1774          text = text + (i - bloodLsbelStartNo + 1);
     1775        }
     1776      }
    17621777      float xTextLowerLeft2 = xTextLowerLeft + i*xLowerLeftDiff + xDiffSpecArr[i];
    17631778      pdfUtil.addBoldText(text, textFontSize, align, xTextLowerLeft2, yTextLowerLeft);
     
    17681783
    17691784    // Barcode on labels
     1785    String labelText = itemId;
    17701786    float labelBarcodeWidth = 61.7f;
    17711787    float labelBarcodeHeight = 13.5f;
     
    17761792    for (int i = 0; i < 9; i++)
    17771793    {
     1794      if (formTemplateName.equals(REF_FORM_TEMPLATE_WHOLE_BLOOD))
     1795      {
     1796        if (i >= bloodLsbelStartNo)
     1797        {
     1798          labelText = itemId + ".b";
     1799/*
     1800          if (i > bloodLsbelStartNo)
     1801          {
     1802            labelText = labelText + (i - bloodLsbelStartNo + 1);
     1803          }
     1804*/
     1805          labelText = labelText + (i - bloodLsbelStartNo + 1);
     1806        }
     1807      }
    17781808      float xLabelBarcodeLeft2 = xLabelBarcodeLeft + i*xLowerLeftDiff + xDiffSpecArr[i];
    1779       pdfUtil.addBarcode(itemId, xLabelBarcodeLeft2, yLabelBarcodeLeft, labelBarcodeWidth, labelBarcodeHeight, align, rotationDegrees);
     1809      pdfUtil.addBarcode(labelText, xLabelBarcodeLeft2, yLabelBarcodeLeft, labelBarcodeWidth, labelBarcodeHeight, align, rotationDegrees);
    17801810      // Barcode label text
    1781       String labelText = itemId;
    17821811      float xLabelTextLeft = xLabelBarcodeLeft2 + 22.0f;
    17831812      float yLabelTextLeft = yLabelBarcodeLeft;
Note: See TracChangeset for help on using the changeset viewer.