Examples of JDBLocation


Examples of com.commander4j.db.JDBLocation

      e.printStackTrace();
    }
  }

  private void export() {
    JDBLocation location = new JDBLocation(Common.selectedHostID, Common.sessionID);
    JExcel export = new JExcel();
    PreparedStatement temp = buildSQLr();
    export.saveAs("locations.xls", location.getLocationDataResultSet(temp), Common.mainForm);
  }
View Full Code Here

Examples of com.commander4j.db.JDBLocation

  {

    String result = "";
    String sessionID = session.getId();

    JDBLocation locn = new JDBLocation(Common.sd.getData(sessionID, "selectedHost"), sessionID);

    result = locn.getHTMLPullDownCombo(htmlName, defaultLocation);

    return result;
  }
View Full Code Here

Examples of com.commander4j.db.JDBLocation

    try
    {
      if (cache.containsKey(row)==false)
      {
        mResultSet.absolute(row + 1);
        final JDBLocation prow = new JDBLocation(Common.selectedHostID, Common.sessionID);
        prow.getPropertiesfromResultSet(mResultSet);
        cache.put(row, prow);
      }
      switch (col)
      {
      case Location_ID_Col:
View Full Code Here

Examples of com.commander4j.db.JDBLocation

  {

    String result = "";
    String sessionID = session.getId();

    JDBLocation locn = new JDBLocation(Common.sd.getData(sessionID, "selectedHost"), sessionID);

    result = locn.getHTMLPullDownCombo(htmlName, defaultLocation);

    return result;
  }
View Full Code Here

Examples of com.commander4j.db.JDBLocation

  public Boolean processMessage(GenericMessageHeader gmh) {
    Boolean result = true;

    JDBDespatch desp = new JDBDespatch(getHostID(), getSessionID());
    JDBPallet pal = new JDBPallet(getHostID(), getSessionID());
    JDBLocation loc = new JDBLocation(getHostID(), getSessionID());
    JDBInterface inter = new JDBInterface(getHostID(), getSessionID());
    Integer palletCount = 0;

    inter.getInterfaceProperties("Despatch Confirmation", "Input");

    despatchNo = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/despatchNo").trim());
    trailer = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/trailer").trim());
    haulier = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/haulier").trim());
    loadNo = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/loadNo").trim());
    fromLocation = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/fromLocation").trim());
    toLocation = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/toLocation").trim());
    despatchDate = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/despatchDate").trim());
    numberOfPallets = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/despatchConfirmation/numberOfPallets").trim());

    for (int run = 0; run <= 1; run++)
    {

      if (result == true)
      {

        if (desp.getDespatchProperties(despatchNo) == false)
        {

          if (run == validate)
          {
            // Check if Despatch already Exists and fail if it does.
            if (desp.getDespatchProperties(despatchNo) == true)
            {
              result = false;
              setErrorMessage("Despatch " + despatchNo + " already exists error.");
            }
          }
          else
          {
            // Attempt to create Despatch and fail if unsuccessful
            if (desp.create() == false)
            {
              result = false;
              setErrorMessage("Despatch " + despatchNo + " create error. " + desp.getErrorMessage());
            }
          }

          if (result == true)
          {

            if (run == validate)
            {
              // Check if FROM Location is valid
              if (loc.getLocationProperties(fromLocation) == false)
              {
                result = false;
                setErrorMessage("Invalid FROM Location : " + fromLocation);
              }
              // Check if TO Location is valid
              if (loc.getLocationProperties(toLocation) == false)
              {
                result = false;
                setErrorMessage("Invalid TO Location : " + toLocation);
              }
            }
            else
            {
              desp.setTrailer(trailer);
              desp.setHaulier(haulier);
              desp.setLoadNo(loadNo);
              desp.setDespatchDate(JUtility.getTimeStampFromISOString(despatchDate));
              desp.setTotalPallets(Integer.valueOf(numberOfPallets));
              desp.setLocationIDFrom(fromLocation);
              desp.setLocationIDTo(toLocation);

              if (desp.update() == false)
              {
                result = false;
                setErrorMessage("Despatch " + despatchNo + " update error. " + desp.getErrorMessage());
              }
            }

            if (result == true)
            {

              repeat = true;
              seq = 1;

              do
              {
                key = "//message/messageData/despatchConfirmation/contents/pallet[" + String.valueOf(seq) + "]/SSCC";
                sscc = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath(key).trim());

                if (sscc.length() > 0)
                {
                  if (pal.getPalletProperties(sscc) == true)
                  {
                   
                    boolean sourceLocationOK = true;
                    if (pal.getLocationID().equals(fromLocation) == false)
                    {
                      sourceLocationOK = false;
                    }

                    if (sourceLocationOK)
                    {
                      boolean alreadyAssigned = false;
                      if (pal.getDespatchNo().equals("") == false)
                      {
                        JDBDespatch altDesp = new JDBDespatch(getHostID(), getSessionID());
                        altDesp.getDespatchProperties(pal.getDespatchNo());
                        if (altDesp.getStatus().equals("Unconfirmed"))
                        {
                          alreadyAssigned = true;
                        }
                      }
                     
                      if (!alreadyAssigned)
                      {
                        if (pal.isConfirmed())
                        {
                          if (run == validate)
                          {
                            if (loc.isPalletStatusValidforLocation(pal.getStatus()) == false)
                            {
                              result = false;
                              setErrorMessage("SSCC " + pal.getSSCC() + " Pallet status " + pal.getStatus() + " invalid for location " + loc.getLocationID());
                            }

                            if (loc.isBatchStatusValidforLocation(pal.getMaterialBatchStatus()) == false)
                            {
                              result = false;
                              setErrorMessage("SSCC " + pal.getSSCC() + " Batch status " + pal.getMaterialBatchStatus() + " invalid for location " + loc.getLocationID());
                            }
                          }
                          else
                          {
                            if (desp.assignSSCC(sscc) == false)
View Full Code Here

Examples of com.commander4j.db.JDBLocation

          llocation = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Material_Location_Input"));
          if (llocation != null)
          {
            if (llocation.equals("") == false)
            {
              JDBLocation locn = new JDBLocation(Common.selectedHostID, Common.sessionID);
              if (locn.isValidLocation(llocation))
              {
                JDBMaterialLocation matloc = new JDBMaterialLocation(Common.selectedHostID, Common.sessionID);
                if (matloc.isValidMaterialLocation(lmaterial, llocation) == false)
                {
                  JLaunchMenu.runForm("FRM_ADMIN_MATERIAL_LOCATION_EDIT", lmaterial, llocation);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.