Synchronize data summary with third party ERP system

Source: Internet
Author: User

Own responsible for the fixed assets, invoicing system, experienced with two of ERP synchronization data work, the current progress smoothly, compared with the previous, used a number of design patterns, development efficiency, readability, maintainability has greatly improved, the program is also very stable


Our system internally processes the data, using the data automatically generated by the ID primary key, so that the encoding of the data with the name of the customer can be modified without being affected. From the data from the ERP, we will ERP data primary key as the code for storage, System processing continue to use the primary key ID for processing.


One, from the third party system to the local

A. basic file data and order data, if it is the underlying file data, then directly stored, when used locally, using ID for processing. If the order data is stored in the local table, stored is the code value, one is taken from the ERP, do not know the local ID is how much; second, it is possible to order data first, file later, Edge sample open interface and operation is not affected; After normal, then synchronize the file data is not late

Ii. from local to third-party systems

When writing back to a third party, the key field uses code, and the other ERP uses our ID


Third, the design

A. Communication layer interface invocation unification uses a method: return string Call (method name, incoming JSON string). such as adding and deleting interface, do not modify the communication layer

B. From third to local, and local to third parties, according to the characteristics of the definition of different interfaces, template design patterns. Add new sync data, just implement the interface

C. Before each synchronization, get the server time, after synchronization, save this time, the next time to sync, query this time new documents, do not use the time of the machine, two server time may be inconsistent


Four, the DAL layer

A. The suggested method is divided into Add,update methods, where add can specify whether to create a new instance or include the functionality of the modified example

B. From the ERP interface, you can only code method, call add can be, if the data import, there may be the first file data, and then import code information Excel, so sometimes ERP synchronization first check the existence of the code, there is skipped, there is no add code, If you are importing by hand Excel, check to see if update,

V. ERP Take Order Items

A. Data cleaning: The use of cleaning two words, ERP data, such as the bar code fields or other properties of the product mistakenly added a space, local access to delete the format, take the Date field uniform format, ERP system evolution, the data may have a variety of formats, take over to deal with, ensure consistency.

B. Take orders from ERP: Warehouse system as the implementation side, ERP generated by the order taken over, it is possible to cancel the ERP, so take orders from the ERP to consider increasing the order status (0 Delete, 1 effective), increase the creation time field, if the document state has changed, update Time field, the next synchronization, you can update the document.

C. Local storage: Taking into account the possibility of changes in the ERP order, local storage, first check whether there is, if not added, to add; When existing, check the status of the document is consistent, inconsistent update local state, or skip



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.