Package org.openswing.swing.message.receive.java

Examples of org.openswing.swing.message.receive.java.Response


      ServletContext context) {
    HierarSubjectsVO hsVO = (HierarSubjectsVO)inputPar;
    try {

      Subjects bean = (Subjects)JAIOBeanFactory.getInstance().getBean(Subjects.class);
      Response answer = bean.insertSubjectsLinks(hsVO,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here


      bean.setConn(conn);

      GridInDeliveryNoteRowVO oldVO = null;
      GridInDeliveryNoteRowVO newVO = null;

      Response res = null;
      for(int i=0;i<newRows.size();i++) {
        oldVO = (GridInDeliveryNoteRowVO)oldRows.get(i);
        newVO = (GridInDeliveryNoteRowVO)newRows.get(i);

        Map attribute2dbField = new HashMap();
        attribute2dbField.put("companyCodeSys01DOC09","COMPANY_CODE_SYS01");
        attribute2dbField.put("docTypeDOC09","DOC_TYPE");
        attribute2dbField.put("docYearDOC09","DOC_YEAR");
        attribute2dbField.put("docNumberDOC09","DOC_NUMBER");
        attribute2dbField.put("docTypeDoc06DOC09","DOC_TYPE_DOC06");
        attribute2dbField.put("docYearDoc06DOC09","DOC_YEAR_DOC06");
        attribute2dbField.put("docNumberDoc06DOC09","DOC_NUMBER_DOC06");
        attribute2dbField.put("rowNumberDOC09","ROW_NUMBER");
        attribute2dbField.put("itemCodeItm01DOC09","ITEM_CODE_ITM01");
        attribute2dbField.put("qtyDOC09","QTY");
        attribute2dbField.put("supplierQtyDOC09","SUPPLIER_QTY");
        attribute2dbField.put("progressiveHie02DOC09","PROGRESSIVE_HIE02");
        attribute2dbField.put("progressiveHie01DOC09","PROGRESSIVE_HIE01");
        attribute2dbField.put("invoiceQtyDOC09","INVOICE_QTY");

        attribute2dbField.put("progressiveDOC09","PROGRESSIVE");
        attribute2dbField.put("variantTypeItm06DOC09","VARIANT_TYPE_ITM06");
        attribute2dbField.put("variantCodeItm11DOC09","VARIANT_CODE_ITM11");
        attribute2dbField.put("variantTypeItm07DOC09","VARIANT_TYPE_ITM07");
        attribute2dbField.put("variantCodeItm12DOC09","VARIANT_CODE_ITM12");
        attribute2dbField.put("variantTypeItm08DOC09","VARIANT_TYPE_ITM08");
        attribute2dbField.put("variantCodeItm13DOC09","VARIANT_CODE_ITM13");
        attribute2dbField.put("variantTypeItm09DOC09","VARIANT_TYPE_ITM09");
        attribute2dbField.put("variantCodeItm14DOC09","VARIANT_CODE_ITM14");
        attribute2dbField.put("variantTypeItm10DOC09","VARIANT_TYPE_ITM10");
        attribute2dbField.put("variantCodeItm15DOC09","VARIANT_CODE_ITM15");

        HashSet pkAttributes = new HashSet();
        pkAttributes.add("progressiveDOC09");

        // update DOC09 table...
        res = org.jallinone.commons.server.QueryUtilExtension.updateTable(
            conn,
            new UserSessionParameters(username),
            pkAttributes,
            oldVO,
            newVO,
            "DOC09_IN_DELIVERY_NOTE_ITEMS",
            attribute2dbField,
            "Y",
            "N",
            null,
            true
        );

        if (res.isError()) {
          throw new Exception(res.getErrorMessage());
        }

        // insert serial numbers...
        res = bean.reinsertInSerialNumbers(newVO,serverLanguageId,username);
        if (res.isError()) {
          throw new Exception(res.getErrorMessage());
        }

      }

      return new VOListResponse(newRows,false,newRows.size());
View Full Code Here

      attribute2dbField.put("progressiveReg04DOC08","PROGRESSIVE_REG04");
      attribute2dbField.put("deliveryDateDOC08","DELIVERY_DATE");
      attribute2dbField.put("transportMotiveCodeReg20DOC08","TRANSPORT_MOTIVE_CODE_REG20");

      // insert into DOC08...
      Response res = org.jallinone.commons.server.QueryUtilExtension.insertTable(
          conn,
          new UserSessionParameters(username),
          vo,
          "DOC08_DELIVERY_NOTES",
          attribute2dbField,
          "Y",
          "N",
          null,
          true
      );

      Response answer = res;
      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOResponse)answer;
    }
    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while inserting a new in delivery note",ex);
      try {
        if (this.conn==null && conn!=null)
View Full Code Here

       Connection conn = null;
       try {
         if (this.conn == null) conn = getConn(); else conn = this.conn;
         convBean.setConn(conn);

          Response res = null;
         java.util.List rows = null;
         ArrayList values = new ArrayList();
         boolean itemFound = false;

         GridInDeliveryNoteRowVO vo = new GridInDeliveryNoteRowVO();
         vo.setCompanyCodeSys01DOC09(pk.getCompanyCodeSys01DOC06());
         vo.setDocNumberDoc06DOC09(pk.getDocNumberDOC06());
         vo.setDocNumberDOC09(delivNoteDocNumber);
         vo.setDocTypeDoc06DOC09(pk.getDocTypeDOC06());
         vo.setDocTypeDOC09(ApplicationConsts.IN_DELIVERY_NOTE_DOC_TYPE);
         vo.setDocYearDoc06DOC09(pk.getDocYearDOC06());
         vo.setDocYearDOC09(new BigDecimal(new java.util.Date().getYear() + 1900));
         vo.setSupplierQtyDOC09(new BigDecimal(1));
         vo.setQtyDOC09(new BigDecimal(1));
         vo.setInvoiceQtyDOC09(new BigDecimal(0));
         vo.setSerialNumbers(new ArrayList());
         vo.setWarehouseCodeWar01DOC08(warehouseCode);
         vo.setProgressiveHie01DOC09(progressiveHie01DOC09); // warehouse location
         vo.setDocSequenceDoc06DOC09(docSequenceDOC06);

         if ("B".equals(codeType)) {
           // validate variants barcode...
           String sql =
               "select "+
               "ITM22_VARIANT_BARCODES.COMPANY_CODE_SYS01,ITM22_VARIANT_BARCODES.ITEM_CODE_ITM01,SYS10_COMPANY_TRANSLATIONS.DESCRIPTION,"+
               "ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM06,ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM07,ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM08,ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM09,ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM10,"+
               "ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM11,ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM12,ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM13,ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM14,ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM15,"+
               "ITM22_VARIANT_BARCODES.BAR_CODE,ITM01_ITEMS.SERIAL_NUMBER_REQUIRED,ITM01_ITEMS.PROGRESSIVE_HIE02 "+
               "from ITM22_VARIANT_BARCODES,ITM01_ITEMS,SYS10_COMPANY_TRANSLATIONS,DOC07_PURCHASE_ITEMS "+
               "where "+
               "ITM22_VARIANT_BARCODES.COMPANY_CODE_SYS01=? AND "+
               "ITM22_VARIANT_BARCODES.BAR_CODE=? AND "+
               "ITM22_VARIANT_BARCODES.COMPANY_CODE_SYS01=ITM01_ITEMS.COMPANY_CODE_SYS01 AND "+
               "ITM22_VARIANT_BARCODES.ITEM_CODE_ITM01=ITM01_ITEMS.ITEM_CODE and ITM01_ITEMS.ENABLED='Y' AND "+
               "ITM01_ITEMS.COMPANY_CODE_SYS01=SYS10_COMPANY_TRANSLATIONS.COMPANY_CODE_SYS01 AND "+
               "ITM01_ITEMS.PROGRESSIVE_SYS10=SYS10_COMPANY_TRANSLATIONS.PROGRESSIVE AND "+
               "SYS10_COMPANY_TRANSLATIONS.LANGUAGE_CODE=? AND "+
               "DOC07_PURCHASE_ITEMS.COMPANY_CODE_SYS01=ITM22_VARIANT_BARCODES.COMPANY_CODE_SYS01 AND "+
               "DOC07_PURCHASE_ITEMS.DOC_TYPE=? AND "+
               "DOC07_PURCHASE_ITEMS.DOC_YEAR=? AND "+
               "DOC07_PURCHASE_ITEMS.DOC_NUMBER=? AND "+
               "DOC07_PURCHASE_ITEMS.QTY-DOC07_PURCHASE_ITEMS.IN_QTY>0 AND "+
               "DOC07_PURCHASE_ITEMS.ITEM_CODE_ITM01=ITM22_VARIANT_BARCODES.ITEM_CODE_ITM01 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM06=ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM06 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM07=ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM07 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM08=ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM08 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM09=ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM09 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM10=ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM10 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM11=ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM11 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM12=ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM12 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM13=ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM13 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM14=ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM14 AND "+
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM15=ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM15  ";

           Map attribute2dbField = new HashMap();
           attribute2dbField.put("companyCodeSys01ITM22","ITM22_VARIANT_BARCODES.COMPANY_CODE_SYS01");
           attribute2dbField.put("itemCodeItm01ITM22","ITM22_VARIANT_BARCODES.ITEM_CODE_ITM01");
           attribute2dbField.put("descriptionSYS10","SYS10_TRANSLATIONS.DESCRIPTION");
           attribute2dbField.put("barCodeITM22","ITM22_VARIANT_BARCODES.BAR_CODE");
           attribute2dbField.put("serialNumberRequiredITM01","ITM01_ITEMS.SERIAL_NUMBER_REQUIRED");
           attribute2dbField.put("progressiveHie02ITM01","ITM01_ITEMS.PROGRESSIVE_HIE02");
           attribute2dbField.put("variantTypeItm06ITM22","ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM06");
           attribute2dbField.put("variantCodeItm11ITM22","ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM11");
           attribute2dbField.put("variantTypeItm07ITM22","ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM07");
           attribute2dbField.put("variantCodeItm12ITM22","ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM12");
           attribute2dbField.put("variantTypeItm08ITM22","ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM08");
           attribute2dbField.put("variantCodeItm13ITM22","ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM13");
           attribute2dbField.put("variantTypeItm09ITM22","ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM09");
           attribute2dbField.put("variantCodeItm14ITM22","ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM14");
           attribute2dbField.put("variantTypeItm10ITM22","ITM22_VARIANT_BARCODES.VARIANT_TYPE_ITM10");
           attribute2dbField.put("variantCodeItm15ITM22","ITM22_VARIANT_BARCODES.VARIANT_CODE_ITM15");

           values.clear();
           values.add(pk.getCompanyCodeSys01DOC06());
           values.add(code);
           values.add(serverLanguageId);
           values.add(pk.getDocTypeDOC06());
           values.add(pk.getDocYearDOC06());
           values.add(pk.getDocNumberDOC06());

           // read from ITM01 table...
           res = QueryUtil.getQuery(
               conn,
               new UserSessionParameters(username),
               sql,
               values,
               attribute2dbField,
               VariantBarcodeVO.class,
               "Y",
               "N",
               null,
               new GridParams(),
               true
           );
           if (res.isError())
             throw new Exception(res.getErrorMessage());

           rows = ((VOListResponse)res).getRows();
           if (rows.size() == 1) {
             // found variants barcode: pre-fill code and qty in variants matrix...
             VariantBarcodeVO barcodeVO = (VariantBarcodeVO)rows.get(0);

             //vo.setInQtyDOC07();
             //vo.setDecimalsREG02();
             vo.setItemCodeItm01DOC09(barcodeVO.getItemCodeItm01ITM22());
             vo.setDescriptionSYS10(barcodeVO.getDescriptionSYS10());
             vo.setSerialNumberRequiredITM01(new Boolean("Y".equals(barcodeVO.getSerialNumberRequiredITM01())));
             vo.setProgressiveHie02DOC09(barcodeVO.getProgressiveHie02ITM01()); // item's LOB

             //vo.setQtyDOC07();
             //vo.setSupplierItemCodePur02DOC09();
             //vo.setSupplierQtyDecimalsREG02();
             //vo.setUmCodeREG02();
             //vo.setUmCodeReg02PUR02();
             //vo.setValueREG05();
             vo.setVariantCodeItm11DOC09(barcodeVO.getVariantCodeItm11ITM22());
             vo.setVariantCodeItm12DOC09(barcodeVO.getVariantCodeItm12ITM22());
             vo.setVariantCodeItm13DOC09(barcodeVO.getVariantCodeItm13ITM22());
             vo.setVariantCodeItm14DOC09(barcodeVO.getVariantCodeItm14ITM22());
             vo.setVariantCodeItm15DOC09(barcodeVO.getVariantCodeItm15ITM22());
             vo.setVariantTypeItm06DOC09(barcodeVO.getVariantTypeItm06ITM22());
             vo.setVariantTypeItm07DOC09(barcodeVO.getVariantTypeItm07ITM22());
             vo.setVariantTypeItm08DOC09(barcodeVO.getVariantTypeItm08ITM22());
             vo.setVariantTypeItm09DOC09(barcodeVO.getVariantTypeItm09ITM22());
             vo.setVariantTypeItm10DOC09(barcodeVO.getVariantTypeItm10ITM22());

             itemFound = true;
           }

           if (!itemFound) {
             // no barcode found in ITM22 (barcode for item variants)
             // trying to find a barcode at item level...
             sql =
                 "select "+
                 "ITM01_ITEMS.COMPANY_CODE_SYS01,ITM01_ITEMS.ITEM_CODE,SYS10_COMPANY_TRANSLATIONS.DESCRIPTION,"+
                 "ITM01_ITEMS.SERIAL_NUMBER_REQUIRED,ITM01_ITEMS.PROGRESSIVE_HIE02 "+
                 "from ITM01_ITEMS,SYS10_COMPANY_TRANSLATIONS,DOC07_PURCHASE_ITEMS where "+
                 "ITM01_ITEMS.COMPANY_CODE_SYS01=? AND "+
                 "ITM01_ITEMS.BAR_CODE=? AND "+
                 "ITM01_ITEMS.ENABLED='Y' AND "+
                 "ITM01_ITEMS.COMPANY_CODE_SYS01=SYS10_COMPANY_TRANSLATIONS.COMPANY_CODE_SYS01 AND "+
                 "ITM01_ITEMS.PROGRESSIVE_SYS10=SYS10_COMPANY_TRANSLATIONS.PROGRESSIVE AND "+
                 "SYS10_COMPANY_TRANSLATIONS.LANGUAGE_CODE=? AND "+
                 "DOC07_PURCHASE_ITEMS.COMPANY_CODE_SYS01=ITM01_ITEMS.COMPANY_CODE_SYS01 AND " +
                 "DOC07_PURCHASE_ITEMS.DOC_TYPE=? AND " +
                 "DOC07_PURCHASE_ITEMS.DOC_YEAR=? AND " +
                 "DOC07_PURCHASE_ITEMS.DOC_NUMBER=? AND " +
                 "DOC07_PURCHASE_ITEMS.QTY-DOC07_PURCHASE_ITEMS.IN_QTY>0 AND "+
                 "DOC07_PURCHASE_ITEMS.ITEM_CODE_ITM01=ITM01_ITEMS.ITEM_CODE AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM06='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM07='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM08='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM09='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM10='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM11='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM12='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM13='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM14='*' AND " +
                 "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM15='*' ";

             attribute2dbField.clear();
             attribute2dbField.put("companyCodeSys01ITM01","ITM01_ITEMS.COMPANY_CODE_SYS01");
             attribute2dbField.put("itemCodeITM01","ITM01_ITEMS.ITEM_CODE");
             attribute2dbField.put("descriptionSYS10","SYS10_COMPANY_TRANSLATIONS.DESCRIPTION");
             attribute2dbField.put("barCodeITM01","ITM01_ITEMS.BAR_CODE");
             attribute2dbField.put("serialNumberRequiredITM01","ITM01_ITEMS.SERIAL_NUMBER_REQUIRED");
             attribute2dbField.put("progressiveHie02ITM01","ITM01_ITEMS.PROGRESSIVE_HIE02");

             values.clear();
             values.add(pk.getCompanyCodeSys01DOC06());
             values.add(code);
             values.add(serverLanguageId);
             values.add(pk.getDocTypeDOC06());
             values.add(pk.getDocYearDOC06());
             values.add(pk.getDocNumberDOC06());

             // read from ITM01 table...
             res = QueryUtil.getQuery(
                 conn,
                 new UserSessionParameters(username),
                 sql,
                 values,
                 attribute2dbField,
                 GridItemVO.class,
                 "Y",
                 "N",
                 null,
                 new GridParams(),
                 true
             );

             if (res.isError())
               throw new Exception(res.getErrorMessage());

             rows = ( (VOListResponse) res).getRows();
             if (rows.size() == 1) {
               // found variants barcode: pre-fill code and qty in variants matrix...
               GridItemVO itemVO = (GridItemVO)rows.get(0);

               //vo.setInQtyDOC07();
               //vo.setDecimalsREG02();
               vo.setItemCodeItm01DOC09(itemVO.getItemCodeITM01());
               vo.setDescriptionSYS10(itemVO.getDescriptionSYS10());
               vo.setSerialNumberRequiredITM01(new Boolean("Y".equals(itemVO.getSerialNumberRequiredITM01())));
               vo.setProgressiveHie02DOC09(itemVO.getProgressiveHie02ITM01()); // item's LOB

               //vo.setQtyDOC07();
               //vo.setSupplierItemCodePur02DOC09();
               //vo.setSupplierQtyDecimalsREG02();
               //vo.setUmCodeREG02();
               //vo.setUmCodeReg02PUR02();
               //vo.setValueREG05();
               vo.setVariantCodeItm11DOC09(ApplicationConsts.JOLLY);
               vo.setVariantCodeItm12DOC09(ApplicationConsts.JOLLY);
               vo.setVariantCodeItm13DOC09(ApplicationConsts.JOLLY);
               vo.setVariantCodeItm14DOC09(ApplicationConsts.JOLLY);
               vo.setVariantCodeItm15DOC09(ApplicationConsts.JOLLY);
               vo.setVariantTypeItm06DOC09(ApplicationConsts.JOLLY);
               vo.setVariantTypeItm07DOC09(ApplicationConsts.JOLLY);
               vo.setVariantTypeItm08DOC09(ApplicationConsts.JOLLY);
               vo.setVariantTypeItm09DOC09(ApplicationConsts.JOLLY);
               vo.setVariantTypeItm10DOC09(ApplicationConsts.JOLLY);

               itemFound = true;
             }
           }

           if (!itemFound) {
             // no barcode found!
             return null;
           }
         }
         else {
           // check for item code WITHOUT VARIANTS in buying order...
           String sql =
               "select DOC07_PURCHASE_ITEMS.COMPANY_CODE_SYS01,DOC07_PURCHASE_ITEMS.ITEM_CODE_ITM01,"+
               "SYS10_COMPANY_TRANSLATIONS.DESCRIPTION,"+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM06,DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM11,"+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM07,DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM12,"+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM08,DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM13,"+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM09,DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM14,"+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM10,DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM15, "+
               "ITM01_ITEMS.SERIAL_NUMBER_REQUIRED,DOC07_PURCHASE_ITEMS.PROGRESSIVE_HIE02 "+
               "from DOC07_PURCHASE_ITEMS,ITM01_ITEMS,SYS10_COMPANY_TRANSLATIONS where "+
               "DOC07_PURCHASE_ITEMS.ITEM_CODE_ITM01=ITM01_ITEMS.ITEM_CODE and "+
               "DOC07_PURCHASE_ITEMS.COMPANY_CODE_SYS01=ITM01_ITEMS.COMPANY_CODE_SYS01 and "+
               "ITM01_ITEMS.COMPANY_CODE_SYS01=SYS10_COMPANY_TRANSLATIONS.COMPANY_CODE_SYS01 and "+
               "ITM01_ITEMS.PROGRESSIVE_SYS10=SYS10_COMPANY_TRANSLATIONS.PROGRESSIVE and "+
               "SYS10_COMPANY_TRANSLATIONS.LANGUAGE_CODE=? and "+
               "DOC07_PURCHASE_ITEMS.COMPANY_CODE_SYS01=? and "+
               "DOC07_PURCHASE_ITEMS.DOC_TYPE=? and "+
               "DOC07_PURCHASE_ITEMS.DOC_YEAR=? and "+
               "DOC07_PURCHASE_ITEMS.DOC_NUMBER=? and "+
               "DOC07_PURCHASE_ITEMS.ITEM_CODE_ITM01=? and "+
               "DOC07_PURCHASE_ITEMS.QTY-DOC07_PURCHASE_ITEMS.IN_QTY>0 and "+
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM06='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM07='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM08='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM09='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM10='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM11='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM12='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM13='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM14='*' AND " +
               "DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM15='*' ";

           Map attribute2dbField = new HashMap();
           attribute2dbField.put("companyCodeSys01DOC07","DOC07_PURCHASE_ITEMS.COMPANY_CODE_SYS01");
           attribute2dbField.put("itemCodeItm01DOC07","DOC07_PURCHASE_ITEMS.ITEM_CODE_ITM01");
           attribute2dbField.put("descriptionSYS10","SYS10_COMPANY_TRANSLATIONS.DESCRIPTION");
           attribute2dbField.put("serialNumberRequiredITM01","ITM01_ITEMS.SERIAL_NUMBER_REQUIRED");
           attribute2dbField.put("progressiveHie02DOC07","DOC07_PURCHASE_ITEMS.PROGRESSIVE_HIE02");

           attribute2dbField.put("variantTypeItm06DOC07","DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM06");
           attribute2dbField.put("variantCodeItm11DOC07","DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM11");
           attribute2dbField.put("variantTypeItm07DOC07","DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM07");
           attribute2dbField.put("variantCodeItm12DOC07","DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM12");
           attribute2dbField.put("variantTypeItm08DOC07","DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM08");
           attribute2dbField.put("variantCodeItm13DOC07","DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM13");
           attribute2dbField.put("variantTypeItm09DOC07","DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM09");
           attribute2dbField.put("variantCodeItm14DOC07","DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM14");
           attribute2dbField.put("variantTypeItm10DOC07","DOC07_PURCHASE_ITEMS.VARIANT_TYPE_ITM10");
           attribute2dbField.put("variantCodeItm15DOC07","DOC07_PURCHASE_ITEMS.VARIANT_CODE_ITM15");

           values.clear();
           values.add(serverLanguageId);
           values.add(pk.getCompanyCodeSys01DOC06());
           values.add(pk.getDocTypeDOC06());
           values.add(pk.getDocYearDOC06());
           values.add(pk.getDocNumberDOC06());
           values.add(code);

           // read from DOC07 table...
           res = QueryUtil.getQuery(
               conn,
               new UserSessionParameters(username),
               sql,
               values,
               attribute2dbField,
               GridPurchaseDocRowVO.class,
               "Y",
               "N",
               null,
               new GridParams(),
               true
           );

           if (res.isError())
             throw new Exception(res.getErrorMessage());

           rows = ( (VOListResponse) res).getRows();
           if (rows.size() == 1) {
              GridPurchaseDocRowVO itemVO = (GridPurchaseDocRowVO)rows.get(0);

View Full Code Here

      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(new BigDecimal(222));

      String defCompanyCodeSys01SYS03 = ((JAIOUserSessionParameters)userSessionPars).getDefCompanyCodeSys01SYS03();
      Payments bean = (Payments)JAIOBeanFactory.getInstance().getBean(Payments.class);
      Response answer = bean.insertPaymentTypes(list,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),defCompanyCodeSys01SYS03,customizedFields);

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here

      vo.setVariantTypeItm08DOC09(ApplicationConsts.JOLLY);
      vo.setVariantTypeItm09DOC09(ApplicationConsts.JOLLY);
      vo.setVariantTypeItm10DOC09(ApplicationConsts.JOLLY);
*/
      // insert into DOC09...
      Response res = org.jallinone.commons.server.QueryUtilExtension.insertTable(
          conn,
          new UserSessionParameters(username),
          vo,
          "DOC09_IN_DELIVERY_NOTE_ITEMS",
          attribute2dbField,
          "Y",
          "N",
          null,
          true
      );

      if (res.isError()) {
        throw new Exception(res.getErrorMessage());
      }

      // update delivery note state...
      pstmt = conn.prepareStatement(
         "update DOC08_DELIVERY_NOTES set DOC_STATE=?,LAST_UPDATE_USER=?,LAST_UPDATE_DATE=? "+
         "where COMPANY_CODE_SYS01=? and DOC_TYPE=? and DOC_YEAR=? and DOC_NUMBER=?");
      pstmt.setString(1,ApplicationConsts.HEADER_BLOCKED);
      pstmt.setString(2,username);
      pstmt.setTimestamp(3,new java.sql.Timestamp(System.currentTimeMillis()));
      pstmt.setString(4,vo.getCompanyCodeSys01DOC09());
      pstmt.setString(5,vo.getDocTypeDOC09());
      pstmt.setBigDecimal(6,vo.getDocYearDOC09());
      pstmt.setBigDecimal(7,vo.getDocNumberDOC09());
      pstmt.execute();

      // insert serial numbers...
      if (vo.getSerialNumbers().size()>0) {
        res = bean.reinsertInSerialNumbers(vo,serverLanguageId,username);
        if (res.isError()) {
          throw new Exception(res.getErrorMessage());
        }
      }

      Response answer = res;
      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOResponse)answer;

    }
    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while inserting a new in delivery note row",ex);
      try {
View Full Code Here

    ArrayList oldVOs = ((ArrayList[])inputPar)[0];
    ArrayList newVOs = ((ArrayList[])inputPar)[1];
    try {

      Subjects bean = (Subjects)JAIOBeanFactory.getInstance().getBean(Subjects.class);
      Response answer = bean.updateReferences(((ArrayList[])inputPar)[0],((ArrayList[])inputPar)[1],((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here

      values.add(pk.getDocYearDOC08());
      values.add(pk.getDocNumberDOC08());
      values.add(serverLanguageId);

      // read from DOC08 table...
      Response res = QueryUtil.getQuery(
          conn,
          new UserSessionParameters(username),
          baseSQL,
          values,
          attribute2dbField,
          DetailDeliveryNoteVO.class,
          "Y",
          "N",
          null,
          true
      );

      Response answer = res;
      if (answer.isError()) throw new Exception(answer.getErrorMessage()); else return (VOResponse)answer;
    }
    catch (Throwable ex) {
      Logger.error(username,this.getClass().getName(),"executeCommand","Error while fetching an existing in delivery note",ex);
      try {
        if (this.conn==null && conn!=null)
View Full Code Here

      pstmt2 = conn.prepareStatement(
       "delete from DOC11_IN_SERIAL_NUMBERS where PROGRESSIVE_DOC09=? "
      );

      Response res = null;
      for(int i=0;i<list.size();i++) {
        rowPK = (InDeliveryNoteRowPK)list.get(i);

        // delete previous serial numbers from DOC11...
        pstmt2.setBigDecimal(1,rowPK.getProgressiveDOC09());
View Full Code Here

    GridParams gridParams = (GridParams)inputPar;
    try {
      String functionId = (String)gridParams.getOtherGridParams().get(ApplicationConsts.FUCTION_CODE);
      ArrayList companiesList = ((JAIOUserSessionParameters)userSessionPars).getCompanyBa().getCompaniesList(functionId);
      Subjects bean = (Subjects)JAIOBeanFactory.getInstance().getBean(Subjects.class);
      Response answer = bean.loadSubjectHierarchies(gridParams,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),companiesList);

      return answer;
    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while processing request",ex);
View Full Code Here

TOP

Related Classes of org.openswing.swing.message.receive.java.Response

Copyright © 2018 www.massapicom. 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.