Class AdminSyncAction

java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.plugin.inventoru.sync1c.action.AdminSyncAction

public class AdminSyncAction extends BaseAction
Admin UI for sync1c plugin. Manages 1C instances, engineer-warehouse mappings, import log.
  • Constructor Details

    • AdminSyncAction

      public AdminSyncAction()
  • Method Details

    • unspecified

      public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet) throws Exception
      Description copied from class: BaseAction
      Default action method if no parameter 'action' passed. Overwrite and implement.
      Overrides:
      unspecified in class BaseAction
      Parameters:
      form -
      conSet -
      Returns:
      the action forward
      Throws:
      Exception
    • create

      public org.apache.struts.action.ActionForward create(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • update

      public org.apache.struts.action.ActionForward update(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • delete

      public org.apache.struts.action.ActionForward delete(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • testConnection

      public org.apache.struts.action.ActionForward testConnection(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • mappingList

      public org.apache.struts.action.ActionForward mappingList(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • mappingCreate

      public org.apache.struts.action.ActionForward mappingCreate(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • mappingUpdate

      public org.apache.struts.action.ActionForward mappingUpdate(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • mappingDelete

      public org.apache.struts.action.ActionForward mappingDelete(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • importNow

      public org.apache.struts.action.ActionForward importNow(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • importFileForm

      public org.apache.struts.action.ActionForward importFileForm(DynActionForm form, ConnectionSet conSet) throws Exception
      Opens the CSV upload form. Request parameters:
      • storeId — optional, pre-selects the store when opened from a store's own page or the movement list (0 = let the admin pick from the full list).
      • userTier — optional, set when opened from the user-facing store card (as opposed to the admin store page), so the post-confirm redirect goes to the user-tier "Ожидающие поступления" page instead of the admin one (a scoped "кладовщик" user has no access to the admin sync1c section at all, only to this upload flow).
      Throws:
      Exception
    • importFilePreview

      public org.apache.struts.action.ActionForward importFilePreview(DynActionForm form, ConnectionSet conSet) throws Exception
      Parses the uploaded CSV (read-only, no DB writes) and resolves each row against existing items by ext_id, so the admin can review matches/new-item-creations before confirming.
      Throws:
      Exception
    • importFileConfirm

      public org.apache.struts.action.ActionForward importFileConfirm(DynActionForm form, ConnectionSet conSet) throws Exception
      Applies the reviewed/edited rows: resolves or creates the engineer-warehouse mapping for the picked store, upserts items, writes to import_pending — same confirm queue the store owner always used, just without requiring the mapping to pre-exist.
      Throws:
      Exception
    • odataForm

      public org.apache.struts.action.ActionForward odataForm(DynActionForm form, ConnectionSet conSet) throws Exception
      Opens the OData import form. Request parameter instanceId — optional, pre-selects the connector when opened from the instance list.
      Throws:
      Exception
    • odataPreview

      public org.apache.struts.action.ActionForward odataPreview(DynActionForm form, ConnectionSet conSet) throws Exception
      Fetches balances from 1C OData (read-only, no DB writes) and resolves each row against existing items by ext_id — same review step the CSV preview gives the admin.
      Throws:
      Exception
    • barcodesImportNow

      public org.apache.struts.action.ActionForward barcodesImportNow(DynActionForm form, ConnectionSet conSet) throws Exception
      Manually triggers the barcode register import for an OData connector (the poller does the same on schedule); returns the number of stored bindings.
      Throws:
      Exception
    • importPending

      public org.apache.struts.action.ActionForward importPending(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • importApply

      public org.apache.struts.action.ActionForward importApply(DynActionForm form, ConnectionSet conSet) throws Exception
      Defense-in-depth: this admin action normally implies full "instance:null" access (so getAccessRestriction() returns null/unrestricted for whoever holds it), but importApply/ importApplyAll/importReject/exportQueue* are independently grantable in action.xml sitting in the same "Ожидающие поступления"/"Очередь экспорта" submenus a scoped "кладовщик" permset would otherwise only get the importFile methods and import_pending for — a plausible permset-configuration mistake. Checked the same way UserImportPendingAction checks its own apply/reject.
      Throws:
      Exception
    • importApplyAll

      public org.apache.struts.action.ActionForward importApplyAll(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • importReject

      public org.apache.struts.action.ActionForward importReject(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • importLog

      public org.apache.struts.action.ActionForward importLog(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • exportQueue

      public org.apache.struts.action.ActionForward exportQueue(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • exportLog

      public org.apache.struts.action.ActionForward exportLog(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • exportQueueRetry

      public org.apache.struts.action.ActionForward exportQueueRetry(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • exportQueueDelete

      public org.apache.struts.action.ActionForward exportQueueDelete(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • exportQueueDownload

      public org.apache.struts.action.ActionForward exportQueueDownload(DynActionForm form, ConnectionSet conSet) throws Exception
      Streams a CSV of all pending export queue entries for the instance — one row per write-off item, so the admin/warehouse keeper can enter them into 1C by hand. Writes directly to the HTTP response and returns null, same pattern as WorkAction.callboardGetTabel.
      Throws:
      Exception
    • exportQueueItems

      public org.apache.struts.action.ActionForward exportQueueItems(DynActionForm form, ConnectionSet conSet) throws Exception
      What one queue entry covers, shown right under its row: the same list the CSV carries, only readable — the nomenclature by title, the code 1C knows it by and the quantity. Without it the only way to see the contents of an entry was to download the file every time.
      Throws:
      Exception
    • exportQueueConfirm

      public org.apache.struts.action.ActionForward exportQueueConfirm(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception
    • exportQueueConfirmAll

      public org.apache.struts.action.ActionForward exportQueueConfirmAll(DynActionForm form, ConnectionSet conSet) throws Exception
      Throws:
      Exception