Method and device for creating business object

文档序号:1465986 发布日期:2020-02-21 浏览:2次 中文

阅读说明:本技术 业务对象的创建方法及设备 (Method and device for creating business object ) 是由 郑海波 于 2019-10-31 设计创作,主要内容包括:本公开实施例提供一种业务对象的创建方法及设备,该方法包括:接收第一业务对象的创建请求,根据所述创建请求,获取所述第一业务对象的至少一个字段的对象映射规则,根据所述对象映射规则,创建所述第一业务对象,本公开实施例能够根据对象映射规则反映业务对象之间的业务关联,并在业务关联发生变化时,更新对象映射规则即可,无需进行代码的修改,节省了工作量提高了工作效率,增强了创建业务对象的灵活性。(The embodiment of the disclosure provides a method and a device for creating a business object, wherein the method comprises the following steps: the method comprises the steps of receiving a creating request of a first business object, obtaining an object mapping rule of at least one field of the first business object according to the creating request, and creating the first business object according to the object mapping rule.)

1. A method for creating a business object, comprising:

receiving a creating request of a first business object; the creation request comprises field information of the first business object;

acquiring an object mapping rule of at least one field of the first service object according to the creation request;

and creating the first business object according to the object mapping rule.

2. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a first field of the first business object and a second field of a second business object; the creating the first business object according to the object mapping rule includes:

and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.

3. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating the first business object according to the object mapping rule includes:

obtaining a numerical value of the at least one field;

and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.

4. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a fourth field of the first business object and a system variable; the creating the first business object according to the object mapping rule includes:

and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.

5. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a fifth field of the first business object and a constant; the creating the first business object according to the object mapping rule includes:

and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.

6. The method according to any one of claims 1 to 5, wherein before obtaining the object mapping rule of each field of the first business object according to the creation request, the method further comprises:

establishing an object mapping rule table; the object mapping rule table comprises an object mapping rule between at least one field in the first business object and at least one field of a second business object;

the obtaining, according to the creation request, an object mapping rule of at least one field of the first business object includes:

and according to the creation request, searching an object mapping rule of at least one field of the first business object from the object mapping rule table.

7. The method according to any one of claims 1-5, wherein each object mapping rule is subject to a single tenant in a multi-tenant system.

8. A business object creation apparatus, comprising:

the receiving module is used for receiving a creating request of a first business object; the creation request comprises field information of the first business object;

an obtaining module, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;

and the creating module is used for creating the first business object according to the object mapping rule.

9. An electronic device, comprising: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of creating a business object of any of claims 1 to 7.

10. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which when executed by a processor, implement the method for creating a business object according to any one of claims 1 to 7.

Technical Field

The embodiment of the disclosure relates to the technical field of data processing, in particular to a method and equipment for creating a business object.

Background

In a real service scene, there are dependencies and associations between services, and after a service is finished, the service will continue to the next service scene, for example, after a contract is made, an order is placed, and then payment is made for the order, and then delivery is performed.

Disclosure of Invention

The embodiment of the disclosure provides a method and a device for creating a business object, so as to overcome the problems of large workload and high error probability in creating the business object in the prior art, thereby improving the working efficiency and reducing the error rate.

In a first aspect, an embodiment of the present disclosure provides a method for creating a business object, including:

receiving a creating request of a first business object; the creation request comprises field information of the first business object;

acquiring an object mapping rule of at least one field of the first service object according to the creation request;

and creating the first business object according to the object mapping rule.

In a second aspect, an embodiment of the present disclosure provides a device for creating a business object, including:

the receiving module is used for receiving a creating request of a first business object; the creation request comprises field information of the first business object;

an obtaining module, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;

and the creating module is used for creating the first business object according to the object mapping rule.

In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the method of creating a business object as set forth in the first aspect and various possible designs of the first aspect above.

In a fourth aspect, the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method for creating a business object according to the first aspect and various possible designs of the first aspect is implemented.

The method for creating the business object and the device thereof provided by the embodiment of the disclosure include that a creating request of a first business object is received, an object mapping rule of at least one field of the first business object is obtained according to the creating request, and the first business object is created according to the object mapping rule.

Drawings

In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.

Fig. 1 is an application scenario provided by an embodiment of the present disclosure;

fig. 2 is a first flowchart illustrating a method for creating a business object according to an embodiment of the present disclosure;

fig. 3 is a schematic flow chart of a method for creating a business object according to an embodiment of the present disclosure;

fig. 4 is a block diagram of a service object creating device according to an embodiment of the present disclosure;

fig. 5 is a schematic hardware structure diagram of a business object creating device according to an embodiment of the present disclosure.

Detailed Description

To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.

Referring to fig. 1, fig. 1 is an application scenario provided in the embodiment of the present disclosure. In a real-life business scenario, there are dependencies and associations between businesses. As shown in fig. 1, there is an association between the two services of ordering and shipping. Some or all of the fields of the invoice 102 may be generated from the data of the order 101. Specifically, after the user completes the order, the shipment service is performed, that is, the order service and the shipment service are related to the upstream and downstream services. The order form 101 generated in the order service and the shipment form 102 generated in the shipment service may have the same fields. For example, the order form 101 and the invoice 102 may each include fields for unit price of the item, name of the item, supplier, etc.

When generating a data table (e.g., the invoice 102) of a downstream service (e.g., a downstream service of which the shipment service is an order service) based on the correlation between different services, in the prior art, an operation of copying and pasting data of the data table of the upstream service may be adopted. And filling the content in the upstream service data table into the corresponding field in the downstream service data table. For example, fields such as unit price of the item, item name, and supplier in the order form 101 are copied and pasted to corresponding fields in the out-manifest 102. Specifically, the code may use a get statement to read data from a certain field in the order form 101, and use a set statement to write the read data into a corresponding field in the invoice 102. However, the copy and paste method is heavy in workload, low in efficiency and easy to make mistakes; by adopting a hard coding mode, when the service is changed or more fields are added during system upgrading, the mapping relation between the fields of the associated service is changed, the code needs to be modified, and the fields are relocated and then on-line, so that the workload is large and the efficiency is low. Based on this, the embodiments of the present disclosure provide a method for creating a business object, which can reduce workload and improve work efficiency and accuracy.

Referring to fig. 2, fig. 2 is a first flowchart illustrating a method for creating a business object according to an embodiment of the present disclosure. The method of the embodiment of the disclosure can be applied to terminal equipment or a server, and the method for creating the service object comprises the following steps:

201. receiving a creating request of a first business object; the create request includes field information for the first business object.

In an embodiment of the present disclosure, the request for creating the first business object includes field identifications of fields of the first business object. The field identifier may be a sequence number or a field name. The present disclosure is not intended to be limiting in any way.

For example, the shipment list includes fields of unit price of the product, product name and supplier, and the field identifications of the three fields may be 0001, 0002 and 0003, respectively, and also may be unit price of the product, product name and supplier, respectively.

202. And acquiring an object mapping rule of at least one field of the first service object according to the creation request.

In the embodiment of the present disclosure, the object mapping rule refers to a mapping relationship between different fields. The different fields may be between one field and another field, or between one field and another plurality of fields. The sources of the different fields may be from different business objects respectively, or from the same business object. The present disclosure is not limited in any way.

Optionally, the object mapping rule may be stored in an object mapping rule table, and the object mapping rule table may record mapping relationships between fields among all services having an association relationship according to user requirements.

For example, taking the first business object as the shipment order as an example, as shown in table 1, the shipment order includes a shipment unit price field, as shown in table 2, the order includes a unit price field, and it can be understood that the shipment unit price is the same as the unit price of the product. That is, there is a mapping relationship between the shipment unit price field of the shipment order and the unit price field of the goods in the order form. The object mapping rule of the shipment unit price field of the shipment order may be recorded such that the value of the shipment unit price field of the shipment order is equal to the value of the item unit price field of the order. I.e. the invoice after the data filling shown in table 3.

TABLE 1 delivery order

Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1
2
3

TABLE 2 order form

Serial number Name of commodity Price per unit of goods Number of commodities
1 First commodity 10 2
2 Second commodity 20 3
3 Third merchandise item 30 2

TABLE 3 delivery order

Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1 10
2 20
3 30

203. And creating the first business object according to the object mapping rule.

In the embodiments of the present disclosure, the object mapping rule may include various forms of mapping relationships.

In a possible implementation manner, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating the first business object according to the object mapping rule includes:

and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.

Specifically, the following are illustrated in table 1 and table 2. Assume that the first business object is the shipment order shown in table 1, the first field is the shipment quantity field of the shipment order, the second business object is the order shown in table 2, and the second field is the commodity quantity field of the order. It is understood that the shipment quantity of the shipment order is the same as the commodity quantity of the order, i.e. the mapping relationship between the first field and the second field is an equal relationship. For example, the mapping relationship between the commodity quantity and the shipment quantity may be expressed as: order form, quantity of goods → delivery form, quantity of delivery. Thus, the numerical value of the shipment quantity of the shipment order can be directly read and written into the numerical value of the top quantity of the order. As shown in the table 4 below, the following examples,

TABLE 4 delivery order

Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1 2
2 3
3 2

In another possible implementation manner, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating the first business object according to the object mapping rule includes:

obtaining a numerical value of the at least one field;

and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.

Specifically, there is a case where a relational expression exists between a third field of the first service object and a field of the second service object, for example, the value of the third four segments is a result of an operation performed on the field of the second service object and a constant. The operation may be different operations such as addition, subtraction, multiplication, division, and exponentiation.

For example, the shipment unit price of the shipment order and the commodity cost price of the shipment order are 1.8 times in relation to each other. That is, the shipment unit price of the shipment order is the product cost price of the shipment order multiplied by 1.8.

In another case, there is a relation between the third field of the first business object and the two fields of the second business object, that is, the value of the third field is the result of the operations of addition, subtraction, multiplication, division and the like performed on the two fields of the second business object. For example, the following are illustrated in table 1 and table 2. It is assumed that the first business object is a shipment order shown in table 1, the third field is a shipment amount field of the shipment order, the second business object is an order shown in table 2, and at least one field of the second business object is two fields of a unit price of goods and a quantity of goods. It is understood that the shipping amount of the shipping manifest is the product of the unit price of the goods and the number of the goods in the order form. For example, the mapping relationship between the shipping amount field of the shipping order and the quantity of goods and shipping amount field of the order may be expressed as: order sheet, number of products, order sheet, unit price of product → delivery sheet, number of products delivered. Therefore, the shipment quantity of the shipment order may be a value obtained by multiplying the product of the number of commodities and the unit price of the commodity read from the order in accordance with the object mapping rule. As shown in the table 5 below, the following examples,

TABLE 5 delivery order

Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1 20
2 60
3 60

Of course, if the shipping unit price and the shipping quantity field exist in the shipping bill at the same time, the value of the shipping amount can also be obtained by multiplying the shipping unit price and the shipping quantity.

It will be appreciated that there is also a case where there is a relationship between the third field of the first business object and three or more fields of the second business object. And will not be described in detail herein.

In another possible implementation manner, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating the first business object according to the object mapping rule includes:

and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.

In practice, there are fields associated with system variables in the business object, for example, the order time field of the order form may be assigned a current time of the system time. That is, the object mapping rule of the order time is obtained before the order time of the order is written, and the object mapping rule indicates that the current time of the system time is assigned to the order time field of the order.

In another possible implementation manner, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating the first business object according to the object mapping rule includes:

and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.

In practice, there are some fields associated with the constants in the business object, for example, the operator of the order is a fixed worker, and then the operator field of the order can be fixed as the name of the worker. For another example, the generation types of the order are distinguished, wherein 1 represents that the order is automatically generated by the system, and 0 represents that the order is manually filled and generated. That is, the generation type of the order sheet is given 1 or 0 according to the actual situation.

The object mapping rules in various forms can completely replace a hard-coded implementation mode, automatically created logic codes for new business objects in common business order generation services are abstracted into the object mapping rules, the codes are not required to be modified, and the matching of new business logic can be completed only by modifying the mapping rules on line.

As can be seen from the above description, in the embodiment of the present disclosure, a creation request of a first business object is received, an object mapping rule of at least one field of the first business object is obtained according to the creation request, and the first business object is created according to the object mapping rule. The business association between the business objects can be reflected according to the object mapping rule, and when the business association changes, the object mapping rule is updated without modifying codes, so that the workload is saved, the working efficiency is improved, and the flexibility of creating the business objects is enhanced.

In an embodiment of the present disclosure, on the basis of the embodiment of fig. 2, in order to flexibly implement different business logics of multiple tenants, in the embodiment of the present disclosure, a solution is provided for a multi-tenant system, and a set of object mapping rule sets is established for each tenant, specifically, the method specifically includes:

in a multi-tenant system, each object mapping rule is subordinate to a single tenant.

Alternatively, in a multi-tenant system, one object mapping rule table may be established for each tenant.

In practical applications, the Software system in the cloud Service may include a plurality of tenants for use, such as a Software-as-a-Service (SaaS) system. All tenants in the system are supplied with a set of hard codes. For newly added tenants, the hard code needs to be modified to meet the requirements of the newly added tenants, so the maintenance of the code generates a large workload, and frequent modification of the code is highly prone to errors. Based on this, the method for creating a service object provided by the embodiment of the present disclosure provides a set of object mapping rules for each tenant, that is, each tenant maintains a set of object mapping rules, and when a service logic changes, only the object mapping rules need to be modified, and operations of modifying, redeploying, and online of hard codes are not required. Isolation among the tenants is achieved, workload is reduced, and accuracy is improved.

In a multi-tenant SaaS system, a set of codes serves all tenants, code modification can affect all the tenants, bug easily occurs, an object mapping rule configured by an administrator is subordinate to the tenant, no influence is caused on other tenants, and the mode of the mapping rule is more reliable.

As can be seen from the above description, the service object creation method and the hard code provided in the embodiment of the present disclosure are different, a specific object mapping rule is subordinate to a certain tenant, in a multi-tenant SaaS system, different tenants can freely configure their own object mapping rules without affecting other tenants, the same set of codes is provided for all tenants in the SaaS system, and modifying the codes affects all tenants. Thus, the approach by employing object mapping rules is far more flexible than hard coding.

Referring to fig. 3, fig. 3 is a schematic flowchart of a second method for creating a business object according to an embodiment of the present disclosure. The establishment of the object mapping rule is explained in detail in the embodiment of the disclosure, and the method for creating the service object comprises the following steps:

301. establishing an object mapping rule table; the object mapping rule table includes an object mapping rule between at least one field in the first business object and at least one field of a second business object.

In the embodiment of the present disclosure, the object mapping rule table may include a relational expression representing a mapping relationship between fields, that is, a value is assigned to a field of a service object to be created through a formula. Optionally, the language for writing the formula may be a scripting language such as JavaScript, Groovy, Python, Ruby, and the like, and the program is internally provided with a script parsing service to calculate the formula.

The logic of automatically creating a new object through the business association relation is abstracted into a configurable rule, the problem that codes are frequently modified due to a traditional hard coding mode is solved, the mode of mapping the rule is more flexible, the new business is matched through the configuration rule, the new business takes effect in time after configuration, the traditional hard coding mode needs links of development, testing, online and verification, the process is long and uncontrollable, and the mode of mapping the rule is more timely.

302. Receiving a creating request of a first business object; the create request includes field information for the first business object.

303. And acquiring an object mapping rule of at least one field of the first service object according to the creation request.

304. And creating the first business object according to the object mapping rule.

Steps 302 to 304 in the present disclosure embodiment are similar to steps 201 to 203 in the above disclosure embodiment, and are not described again here.

As can be seen from the above description, the method for creating a business object provided in this embodiment of the disclosure, by pre-establishing an object mapping rule table indicating mapping relationships between different fields, when creating a business object, can obtain appropriate data from a related business object according to a field of the business object to be created and assign a value to the field, and when a business relationship changes, can be implemented conveniently by modifying a corresponding object mapping rule in the object mapping rule table without modifying a code.

Corresponding to the method for creating a business object in the foregoing embodiment, fig. 4 is a block diagram of a business object creating device provided in the embodiment of the present disclosure. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 4, the apparatus 40 includes: a receiving module 401, an obtaining module 402 and a creating module 403.

The receiving module 401 is configured to receive a request for creating a first business object; the creation request comprises field information of the first business object;

an obtaining module 402, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;

a creating module 403, configured to create the first business object according to the object mapping rule.

In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating module 403 is specifically configured to:

and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.

In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating module 403 is specifically configured to:

obtaining a numerical value of the at least one field;

and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.

In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating module 403 is specifically configured to:

and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.

In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating module 403 is specifically configured to:

and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.

In one embodiment of the present disclosure, the apparatus further comprises: an establishing module 404, configured to establish an object mapping rule table before the object mapping rule of each field of the first service object is obtained according to the creating request; the object mapping rule table includes an object mapping rule between at least one field in the first business object and at least one field of a second business object.

Correspondingly, the obtaining module 402 is specifically configured to search, according to the creation request, an object mapping rule of at least one field of the first service object from the object mapping rule table.

In one embodiment of the present disclosure, in a multi-tenant system, each object mapping rule is subject to a single tenant.

The device provided by the embodiment of the present disclosure may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again in the embodiment of the present disclosure.

Referring to fig. 5, a schematic structural diagram of an electronic device 500 suitable for implementing the embodiment of the present disclosure is shown, where the electronic device 500 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.

As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.

Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.

In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.

It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.

The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".

The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

In a first aspect, according to one or more embodiments of the present disclosure, a method for creating a business object is provided, including:

receiving a creating request of a first business object; the creation request comprises field information of the first business object;

acquiring an object mapping rule of at least one field of the first service object according to the creation request;

and creating the first business object according to the object mapping rule.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating the first business object according to the object mapping rule includes: and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating the first business object according to the object mapping rule includes: obtaining a numerical value of the at least one field; and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating the first business object according to the object mapping rule includes: and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating the first business object according to the object mapping rule includes: and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.

According to one or more embodiments of the present disclosure, before the obtaining, according to the creation request, the object mapping rule of each field of the first service object, the method further includes:

establishing an object mapping rule table; the object mapping rule table comprises an object mapping rule between at least one field in the first business object and at least one field of a second business object;

correspondingly, the obtaining an object mapping rule of at least one field of the first service object according to the creation request includes:

and according to the creation request, searching an object mapping rule of at least one field of the first business object from the object mapping rule table.

According to one or more embodiments of the present disclosure, in a multi-tenant system, each object mapping rule is subordinate to a single tenant.

In a second aspect, according to one or more embodiments of the present disclosure, there is provided a business object creating apparatus, including:

a receiving module 401, configured to receive a request for creating a first business object; the creation request comprises field information of the first business object;

an obtaining module 402, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;

a creating module 403, configured to create the first business object according to the object mapping rule.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating module 403 is specifically configured to: and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating module 403 is specifically configured to:

obtaining a numerical value of the at least one field;

and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating module 403 is specifically configured to:

and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.

According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating module 403 is specifically configured to:

and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.

According to one or more embodiments of the present disclosure, the apparatus further comprises: an establishing module 404, configured to establish an object mapping rule table before the object mapping rule of each field of the first service object is obtained according to the creating request; the object mapping rule table includes an object mapping rule between at least one field in the first business object and at least one field of a second business object.

Correspondingly, the obtaining module 402 is specifically configured to search, according to the creation request, an object mapping rule of at least one field of the first service object from the object mapping rule table.

According to one or more embodiments of the present disclosure, in a multi-tenant system, each object mapping rule is subordinate to a single tenant.

In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the method of creating a business object as set forth in the first aspect and various possible designs of the first aspect above.

In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the method for creating a business object according to the first aspect and various possible designs of the first aspect is implemented.

The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:财务报表生成方法、装置、计算机设备和可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!