Acquisition method and acquisition system for organizational structure of application program
By obtaining node identification and organization name from the main table of the organizational structure, generating hierarchical relationships and saving them to the sub-table, and sub-application call interface to obtain JSON format information, the problem of low efficiency in organizational structure configuration of subsidiaries in the group enterprise is solved. Achieve automated configuration and efficiency improvement.
Patent Information
- Application Number
- CN202411061148.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-05
AI Technical Summary
In group enterprises, the organizational structure in the office system of the subsidiary needs to be manually configured, resulting in inefficiency and time-consuming and labor-intensive configuration of the group's existing organizational structure.
By obtaining node identification and organization name from the main table of the organization structure, generating hierarchical relationships, and saving node data to the organization structure subtable, the sub-application calls the interface to obtain target node information in JSON format, realizing organizational structure automation of the sub-application Configuration.
It realizes the organizational structure of sub-applications, and can quickly complete the organizational structure configuration of different sub-applications, improving work efficiency.
Smart Images

Figure CN119065704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for acquiring the organizational structure of an application. Background Art
[0002] In the environment where the modern economy tends to develop in an intensive manner, groups and large-scale enterprises combine relatively independent business entities through advanced management and control, optimize resource allocation, complement each other's advantages, form scale operations, and enhance competitive advantages through intensiveness, so as to resist market risks and greatly enhance profitability. For companies that develop in a group, the organizational structure includes both departments and subsidiaries. Each subsidiary has its own relatively independent management methods and characteristics, and is also subject to the unified management and monitoring management of the head office. Each subsidiary can have its own office system, but the organizational structure in each office system needs to be expanded based on the unified organizational structure of the group. Generally, the organizational structure in the office system of each subsidiary needs to be manually configured, and the existing organizational structure of the group also needs to be manually configured, which is time-consuming and labor-intensive, and has low work efficiency. Summary of the invention
[0003] In order to solve the above problems existing in the prior art, the present invention provides a method and system for obtaining the organizational structure of an application. The technical problem to be solved by the present invention is achieved through the following technical solutions: A first aspect of an embodiment of the present invention provides a method for obtaining an organizational structure of an application, comprising the following steps: In response to the configuration instruction of the target node of the sub-application generated in the first organizational structure configuration area, the node identifier and the organization name of the target node are obtained from the organizational structure main table, and the organization name and the hierarchical relationship of the target node are displayed in the second organizational structure configuration area; wherein the fields in the organizational structure main table include: node identifier and organization name; the hierarchical relationship is generated according to the node identifier; In response to the save operation instruction generated by the second organizational structure configuration area, node data is generated and saved into the organizational structure sub-table; wherein the node data includes: the current node identifier of the target node and the identifier of the sub-application in the configuration instruction; In response to a call instruction of an organizational structure call interface sent by a sub-application according to an interface address indicating an identifier of the sub-application, obtaining information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application; Convert the target node information into JSON format; The target node information in JSON format is sent to the sub-application.
[0004] In one embodiment of the present invention, the generating node data in response to the save operation instruction generated by the second organizational structure configuration area and saving the node data to the organizational structure subtable includes: In response to the save operation instruction generated by the second organizational structure configuration area, generate node data; Convert the node data into JSON format node JSON data; Pass the node JSON data into the service module in the form of an object; The service module obtains the character string of the identification of the sub-application of the object and the node current identification array set of the target node; The service module processes the character string of the sub-application's identifier and the node current identifier array set of the target node into two-dimensional structure data matching the organizational structure sub-table by means of a for loop; The service module transfers the two-dimensional structure data to the organizational structure subtable for storage through the saveBatch method.
[0005] In one embodiment of the present invention, in response to a call instruction of an organizational structure call interface sent by a sub-application according to an interface address indicating an identifier of the sub-application, obtaining information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application includes: In response to a call instruction of an organizational structure call interface sent by a sub-application indicated by the identifier of the sub-application, obtaining a node current identifier of the target node from the organizational structure sub-table according to the identifier of the sub-application; The information of the corresponding target node is obtained from the organizational structure main table according to the current node identifier of the target node.
[0006] In one embodiment of the present invention, the method further comprises: In response to an information modification instruction of the organizational structure master table, acquiring node information of a modification node indicated by the information modification instruction from the organizational structure master table; Determine the identifier of the corresponding modification sub-application from the organizational structure sub-table according to the node identifier in the node information of the modification node; Convert the node information of the modified node into JSON format; The node information of the modification node in JSON format is sent to the modification sub-application according to the identifier of the modification sub-application.
[0007] A second aspect of an embodiment of the present invention provides a system for obtaining an organizational structure of an application, including: An acquisition and display module is used to respond to the configuration instruction of the target node of the sub-application generated in the first organizational structure configuration area, acquire the node identifier and organization name of the target node from the organizational structure main table, and display the organization name and hierarchical relationship of the target node in the second organizational structure configuration area; wherein the fields in the organizational structure main table include: node identifier and organization name; the hierarchical relationship is generated according to the node identifier; A saving module, configured to generate node data in response to a saving operation instruction generated by the second organizational structure configuration area, and save the node data to the organizational structure subtable; wherein the node data includes: a current node identifier of the target node and an identifier of the sub-application in the configuration instruction; an acquisition module, configured to respond to a call instruction of an organizational structure call interface sent by a sub-application according to an interface address indicating an identifier of the sub-application, and acquire information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application; A data conversion module, used to convert the information of the target node into JSON format; The sending module is used to send the target node information in JSON format to the sub-application.
[0008] In one embodiment of the present invention, the storage module includes a generation module and a service module; The generating module is used to generate node data in response to the save operation instruction generated by the second organizational structure configuration area; convert the node data into node JSON data in JSON format; and pass the node JSON data into the service module in the form of an object; The service module is used to obtain the string of the identification of the sub-application of the object and the array set of the current node identification of the target node; process the string of the identification of the sub-application and the array set of the current node identification of the target node into two-dimensional structure data matching the organizational structure subtable through a for loop; and pass the two-dimensional structure data to the organizational structure subtable for storage through the saveBatch method.
[0009] In one embodiment of the present invention, the acquisition module is also used to respond to a call instruction of the organizational structure call interface sent by a sub-application indicated by the identifier of the sub-application, and obtain the node current identifier of the target node from the organizational structure sub-table according to the identifier of the sub-application; and obtain the corresponding target node information from the organizational structure main table according to the node current identifier of the target node.
[0010] In one embodiment of the present invention, it also includes: an update module, which is used to respond to the information modification instruction of the organizational structure main table, obtain the node information of the modification node indicated by the information modification instruction from the organizational structure main table; determine the corresponding modification sub-application identifier from the organizational structure sub-table according to the node identifier in the node information of the modification node; convert the node information of the modification node into JSON format; and send the node information of the modification node in JSON format to the modification sub-application according to the identifier of the modification sub-application.
[0011] A third aspect of an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for obtaining the organizational structure of an application provided by the first aspect of an embodiment of the present invention is implemented.
[0012] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for obtaining the organizational structure of an application provided by the first aspect of the embodiment of the present invention is implemented.
[0013] Beneficial effects of the present invention: The present invention obtains the node identification of the organizational structure of the sub-application from the organizational structure main table with complete organizational structure information, and saves the node identification and the identification of the sub-application into the organizational structure sub-table. When the sub-application needs to configure its own organizational structure, the sub-application calls the interface to obtain the information of the target node in JSON format. After that, the sub-application parses the JSON data to obtain the corresponding node information and hierarchical relationship of the organizational structure, and completes the configuration of the organizational structure of the sub-application. The present invention realizes the automatic configuration of the organizational structure of the sub-application, can automatically and quickly complete the different organizational structure configurations of different sub-applications, and improves work efficiency.
[0014] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0015] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of a method for obtaining an organizational structure of an application provided by an embodiment of the present invention; Figure 2 A schematic diagram of a first organizational structure configuration area and a second organizational structure configuration area provided in an embodiment of the present invention; Figure 3 A block diagram of a system for acquiring the organizational structure of an application provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0018] like Figure 1 As shown, a first aspect of an embodiment of the present invention provides a method for obtaining an organizational structure of an application, comprising the following steps: Step 11, in response to the configuration instruction of the target node of the sub-application generated in the first organizational structure configuration area, obtain the node identifier and organization name of the target node from the organizational structure main table, and display the organization name and hierarchical relationship of the target node in the second organizational structure configuration area.
[0019] The fields in the organizational structure master table include: node ID and organization name. The hierarchical relationship is generated based on the node ID.
[0020] Step 12: In response to the save operation instruction generated by the second organizational structure configuration area, save the node data into the organizational structure subtable.
[0021] The node data includes: the current node identifier of the target node and the identifier of the sub-application in the configuration instruction.
[0022] Step 13, in response to the calling instruction of the organizational structure calling interface sent by the sub-application according to the interface address indicating the identification of the sub-application, the information of the target node is obtained from the organizational structure sub-table and the organizational structure main table according to the identification of the sub-application.
[0023] Step 14: Convert the target node information into JSON format.
[0024] Step 15: Send the target node information in JSON format to the sub-application.
[0025] In this embodiment, by obtaining the node identifier of the organizational structure of the sub-application from the organizational structure main table with complete organizational structure information, and saving the node identifier and the identifier of the sub-application in the organizational structure sub-table, when the sub-application needs to configure its own organizational structure, the sub-application calls the interface to obtain the information of the target node in JSON format, and then the sub-application parses the JSON data to obtain the corresponding node information and hierarchical relationship of the organizational structure, and completes the configuration of the organizational structure of the sub-application. The present invention realizes the automatic configuration of the organizational structure of the sub-application, can automatically and quickly complete the different organizational structure configurations of different sub-applications, and improves work efficiency.
[0026] A second aspect of an embodiment of the present invention provides a method for obtaining an organizational structure of an application, comprising the following steps: Step 21: When a user performs a configuration operation on the first organizational structure configuration area of the main system, the first organizational structure configuration area generates a configuration instruction.
[0027] In this embodiment, the main system may be the main management system of the group, the first organizational structure configuration area and the second organizational structure configuration area are in the main system, and the configuration of the organizational structure of various systems or applications (that is, sub-applications) used by the subsidiaries of the group is performed in the main system. The sub-applications may be various management software of the subsidiaries, such as OA management system, attendance management system, financial management system, etc.
[0028] Specifically, the first organizational structure configuration area is an editing interface, in which the organization names and levels of the entire organizational structure of the group are displayed. The detailed information of the organizational structure is managed in a table format, and the superior-subordinate relationship is managed through the parent node identifier and the current node identifier to form a tree structure. For example, the organizational structure main table shown in Table 1, the first organizational structure configuration area is associated with the organizational structure main table.
[0029] Table 1 The user can perform sub-application selection and node selection configuration operations in the first organizational structure configuration area. If the organizational structure of a sub-application needs to be configured, select the corresponding sub-application, then select the target node and drag it to the second organizational structure configuration area for display. The organizational structure main table can also include other auxiliary information fields, such as the corresponding organization number, organization type, etc.
[0030] Step 22, the main system responds to the configuration instructions of the target node of the sub-application generated in the first organizational structure configuration area, obtains the node identifier of the target node from the organizational structure main table, and displays the organization name and hierarchical relationship of the target node in the second organizational structure configuration area, and the hierarchical relationship is generated based on the node identifier.
[0031] The fields in the organizational structure master table include: node identification and organization name. The node identification includes the node identification and its corresponding parent node identification, as shown in Table 1. The configuration instruction includes the identification of the sub-application.
[0032] Step 23: the main system generates node data in response to the save operation instruction generated by the second organizational structure configuration area, and saves the node data into the organizational structure subtable.
[0033] The node data includes: the current node identifier of the target node and the identifier of the sub-application in the configuration instruction.
[0034] The user can select a node (a certain level unit in the organizational structure) from the first organizational structure configuration area and expand it to the second organizational structure configuration area. The user can also adjust the hierarchical relationship between nodes in the second organizational structure configuration area by dragging and dropping nodes, such as Figure 2 As shown. The current node identifier of the target node is generated according to the current hierarchical relationship of the second organizational structure configuration area. The identifier of the current node will not change, but the identifier of the parent node corresponding to the current node will change if the hierarchical relationship is adjusted. The second organizational structure configuration area is associated with the organizational structure subtable.
[0035] Specifically, step 23 includes steps 231 to 236: Step 231: The main system generates node data in response to the save operation instruction generated by the second organizational structure configuration area.
[0036] Before generating the save operation instruction, the hierarchical relationship of the nodes displayed in the second organizational structure configuration area can be adjusted or not. If adjusted, the parent node identifier of the target node is updated. When saving, the current node identifier data and the identifier of the sub-application in the configuration instruction are used as node data.
[0037] Step 232: The main system converts the node data into node JSON data in JSON format.
[0038] Step 233: The main system transfers the node JSON data into the service module of the main system in the form of an object.
[0039] Step 234: The service module obtains the string of the identification of the sub-application of the object and the array set of the current node identification of the target node.
[0040] Step 235 : The service module processes the sub-application identifier string and the target node's node current identifier array set into two-dimensional structure data matching the organizational structure sub-table by means of a for loop.
[0041] Step 236: The service module transfers the two-dimensional structure data to the organizational structure subtable for storage through the saveBatch method.
[0042] In this embodiment, the node data is saved in the organizational structure sub-table. The fields of the organizational structure sub-table include the identifier of the sub-application (sub-application ID) and the current identifier of the node. The current identifier of the node includes the current node identifier (current node ID) and the current parent node identifier (current parent node ID). An example of the organizational structure sub-table is shown in Table 2.
[0043] For example, the code of the service module of step 323 to step 236 is as follows: / **Save data* Parameter params is the JSON object of node data* / @SyncAnnotation(action =ActionType. allSync ,algorithmName = "appOrgMsgAlgorithm")@RequestMapping(" / saveEdit") / **saveEdit is the node data* / @ResponseBodypublic ResultMgt saveEdit(@RequestBody JSONObject params){ResultMgt mgt=new ResultMgt("200","Save successfully");try{List <apporg>appOrgs=new ArrayList<>();String appid=params.getString("appid"); / **appid is the identifier of the sub-application* / JSONArray array=params.getJSONArray("orgs"); / **orgs is the current node identifier of the target node* / for(int i=0;i <array.size();i++){JSONObject row=array.getJSONObject(i);AppOrg appOrg=new AppOrg();appOrg.setId(String. valueOf (UUIDLong. longUUID ()));appOrg.setApp(new App(appid)); / **Sub-application ID* / appOrg.setOrganization(new Organization(row.getString("sid"))); / **This node ID* / appOrg.setPid(row.getString("pid")); / ** Current parent node ID* / appOrg.setSeq(i); / **Sequence number* / / **Data sequence number* / appOrgs.add(appOrg);}appOrgService.saveBatch(appid,appOrgs); / **Batch save* / }catch(Exception ex){mgt=new ResultMgt("201","Save failed");}finally {return mgt;}} In this embodiment, the data in the organizational structure subtable only includes the identifier of the sub-application and the current identifier of the target node. The table can quickly integrate the data of the organizational structure of each sub-application for subsequent processing. The organizational structure subtable can more concisely and clearly obtain the main core data of the organizational structure that needs to be configured for the sub-application, and can also quickly obtain the main core data of the organizational structure that needs to be configured for the sub-application during subsequent processing.
[0044] Step 24: The sub-application sends a call instruction for the organizational structure to call the interface to the main application according to the interface address. The interface address indicates the identifier of the sub-application.
[0045] Step 25, the main system responds to the calling instruction of the organizational structure calling interface sent by the sub-application, and obtains the information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application.
[0046] The specific steps of step 25 include: step 251-step 252: Step 251, in response to the calling instruction of the organizational structure calling interface sent by the sub-application indicated by the identification of the sub-application, the current node identification of the target node is obtained from the organizational structure sub-table according to the identification of the sub-application. The main organizational structure information of the sub-application can be quickly obtained from the organizational structure sub-table.
[0047] Step 252, obtain the corresponding target node information from the organizational structure main table according to the node current identifier of the target node, obtain the corresponding node current identifier that the sub-application needs to configure from the organizational structure sub-table, and then obtain other corresponding information of the identifier in the organizational structure main table according to the identifier.
[0048] Step 25, convert the target node information into JSON format.
[0049] For example, the parameters of the target node information in JSON format are shown in Table 3: Table 3 When the organizational structure main table also includes other auxiliary information of the organization, the parameters of the target node information in JSON format may also include the example shown in Table 4: Table 4 Step 26: Send the target node information in JSON format to the sub-application.
[0050] In a feasible implementation, the sub-application may send an access request to the interface of the main system, and the main system may send information of the target node in JSON format to the sub-application after identity and authority authentication.
[0051] In this embodiment, the main system searches for node data about the sub-application from the organizational structure sub-table, and then searches for complete information of the node information in the complete organizational structure main table based on the node data, converts the information found in the two tables into JSON strings, packages them, and sends them to the sub-application.
[0052] Step 27, the sub-application receives the target node information in JSON format, parses it accordingly, obtains the node information and hierarchical relationship, and completes the configuration organizational structure locally.
[0053] The above steps in this embodiment are applicable to the initial configuration process of the organizational structure of the sub-application.
[0054] The following is a code example of how the sub-application parses data and configures the organizational structure: / **Load the application organization tree of an application* / @RequestMapping(" / loadAppOrgTree / {appid}") @ResponseBody public List <jsonobject>loadAppOrgTree(@PathVariable(name="appid")String appid){ List <jsonobject>result=new ArrayList<>(); try{ List <apporg>appOrgs=appOrgService.findAppOrgs(appid); if(appOrgs!=null&&appOrgs.size()>0){ for(AppOrg appOrg:appOrgs){ JSONObject row=new JSONObject(); row.put("id",appOrg.getOrganization().getId()); row.put("pId",appOrg.getPid()==null?"0":appOrg.getPid()); row.put("name",appOrg.getOrganization().getName()+("0".equals(appOrg.getOrganization().getStatus())?"":"(disabled)")); result.add(row); } } }catch(Exception ex){ LOGGER.info("loadAppOrgTree error in loading tree structure: "+ex.getMessage()); }finally { return result; } } The present invention obtains the node identifier of the organizational structure of the sub-application from the organizational structure main table with complete organizational structure information, and saves the node identifier and the identifier of the sub-application into the organizational structure sub-table. When the sub-application needs to configure its own organizational structure, the sub-application calls the interface to obtain the information of the target node in JSON format. After that, the sub-application parses the JSON data to obtain the corresponding node information and hierarchical relationship of the organizational structure, and completes the configuration of the organizational structure of the sub-application. The present invention realizes the automatic configuration of the organizational structure of the sub-application in the main system, can automatically and quickly complete the different organizational structure configurations of different sub-applications, and improves work efficiency.
[0055] In one embodiment, when the information of the organizational structure of the main system is updated, for example, some information of the organizational structure, such as the organization name or hierarchical relationship, is modified, the node identifier is generally not allowed to be modified. After the modification, the process of the main system and the sub-application updating the information of the organizational structure includes the following steps: Step 31 : In response to the information modification instruction of the organizational structure main table, the main system obtains the node information of the modification node indicated by the information modification instruction from the organizational structure main table.
[0056] In this step, when the organization name and hierarchical relationship of the organizational structure in the main system need to be modified, the user performs the modification operation in the modification page of the organizational structure main table. After the modification, an information modification instruction is generated, and the main system obtains the current node identifier and / or the current parent node identifier of the modification node indicated by the information modification instruction from the organizational structure main table (when the hierarchical relationship is modified, the current parent node identifier needs to be obtained, and when the hierarchical relationship is not modified, the current parent node identifier does not need to be obtained).
[0057] Step 32, the main system determines the corresponding modified sub-application identifier from the organizational structure sub-table according to the node identifier in the node information of the modified node. Specifically, according to the node identifier, the identifier of the sub-application corresponding to the modified node is searched in the organizational structure sub-table. The modified node may correspond to one or more sub-application identifiers. By searching in the organizational structure sub-table, it is possible to quickly determine which sub-applications of the organizational structure node that needs to be modified are.
[0058] Step 33, the main system converts the node information of the modified node into JSON format.
[0059] Step 34: the main system sends the node information of the modified node in JSON format to the modified sub-application according to the identifier of the modified sub-application.
[0060] Step 35, the sub-application receives the node information of the modified node in JSON format, and performs corresponding parsing to obtain the node information and hierarchical relationship, and completes the information modification of the organizational structure locally.
[0061] In this embodiment, when the information of the organizational structure needs to be modified, it is not necessary to modify the sub-applications with the modified node one by one, and the modification in the main system can be sent to the corresponding sub-applications.
[0062] like Figure 3 As shown, a third aspect of an embodiment of the present invention provides a system for obtaining an organizational structure of an application, including: The acquisition and display module 41 is used to respond to the configuration instruction of the target node of the sub-application generated in the first organizational structure configuration area, obtain the node identifier and organization name of the target node from the organizational structure main table, and display the organization name and hierarchical relationship of the target node in the second organizational structure configuration area; wherein the fields in the organizational structure main table include: node identifier and organization name; the hierarchical relationship is generated according to the node identifier; The saving module 42 is used to generate node data in response to the saving operation instruction generated by the second organizational structure configuration area, and save the node data to the organizational structure sub-table; wherein the node data includes: the current node identifier of the target node and the identifier of the sub-application in the configuration instruction; The acquisition module 43 is used to respond to the calling instruction of the organizational structure calling interface sent by the sub-application according to the interface address indicating the identification of the sub-application, and acquire the information of the target node from the organizational structure sub-table and the organizational structure main table according to the identification of the sub-application; A data conversion module 44 is used to convert the information of the target node into a JSON format; The sending module 45 is used to send the target node information in JSON format to the sub-application.
[0063] In one embodiment of the present invention, the storage module includes a generation module and a service module; A generation module, configured to generate node data in response to a save operation instruction generated by the second organizational structure configuration area; convert the node data into node JSON data in JSON format; and pass the node JSON data into the service module in the form of an object; The service module is used to obtain the string of the identification of the sub-application of the object and the array set of the current node identification of the target node; process the string of the identification of the sub-application and the array set of the current node identification of the target node into two-dimensional structure data matching the organizational structure sub-table through a for loop; and pass the two-dimensional structure data to the organizational structure sub-table for storage through the saveBatch method.
[0064] In one embodiment of the present invention, the acquisition module is also used to respond to a call instruction of the organizational structure call interface sent by a sub-application indicated by the identifier of the sub-application, and obtain the node current identifier of the target node from the organizational structure sub-table according to the identifier of the sub-application; and obtain the corresponding target node information from the organizational structure main table according to the node current identifier of the target node.
[0065] In one embodiment of the present invention, a system for acquiring the organizational structure of an application also includes: an update module, which is used to respond to the information modification instruction of the organizational structure main table, and obtain the node information of the modified node indicated by the information modification instruction from the organizational structure main table; determine the corresponding modified sub-application identifier from the organizational structure sub-table according to the node identifier in the node information of the modified node; convert the node information of the modified node into JSON format; and send the node information of the modified node in JSON format to the modified sub-application according to the identifier of the modified sub-application.
[0066] A fourth aspect of an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for obtaining the organizational structure of an application provided in the above embodiment of the present invention is implemented.
[0067] A fifth aspect of an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of a method for obtaining the organizational structure of an application provided in the above embodiment of the present invention are implemented.
[0068] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0069] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware systems.
[0070] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.
[0071] As for the device / electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0072] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0075] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.< / apporg> < / jsonobject> < / jsonobject> < / apporg>
Claims
1. A method for obtaining an organizational structure of an application, characterized in that: The following steps are involved: In response to the configuration instruction of the target node of the sub-application generated in the first organizational structure configuration area, the node identifier and the organization name of the target node are obtained from the organizational structure main table, and the organization name and the hierarchical relationship of the target node are displayed in the second organizational structure configuration area; wherein the fields in the organizational structure main table include: node identifier and organization name; the hierarchical relationship is generated according to the node identifier; In response to the save operation instruction generated by the second organizational structure configuration area, node data is generated and saved into the organizational structure sub-table; wherein the node data includes: the current node identifier of the target node and the identifier of the sub-application in the configuration instruction; In response to a call instruction of an organizational structure call interface sent by a sub-application according to an interface address indicating an identifier of the sub-application, obtaining information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application; Convert the target node information into JSON format; The target node information in JSON format is sent to the sub-application.
2. The method according to claim 1, characterized in that The generating node data in response to the save operation instruction generated by the second organizational structure configuration area and saving the node data to the organizational structure sub-table includes: In response to the save operation instruction generated by the second organizational structure configuration area, generate node data; Convert the node data into JSON format node JSON data; Pass the node JSON data into the service module in the form of an object; The service module obtains the character string of the identification of the sub-application of the object and the node current identification array set of the target node; The service module processes the character string of the sub-application's identifier and the node current identifier array set of the target node into two-dimensional structure data matching the organizational structure sub-table by means of a for loop; The service module transfers the two-dimensional structure data to the organizational structure subtable for storage through the saveBatch method.
3. The method according to claim 1, characterized in that The step of responding to a call instruction of an organizational structure call interface sent by a sub-application according to an interface address indicating an identifier of the sub-application, acquiring information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application includes: In response to a call instruction of an organizational structure call interface sent by a sub-application indicated by the identifier of the sub-application, obtaining a node current identifier of the target node from the organizational structure sub-table according to the identifier of the sub-application; The information of the corresponding target node is obtained from the organizational structure main table according to the current node identifier of the target node.
4. The method according to claim 1, characterized in that The method further comprises: In response to an information modification instruction of the organizational structure master table, acquiring node information of a modification node indicated by the information modification instruction from the organizational structure master table; Determine the identifier of the corresponding modification sub-application from the organizational structure sub-table according to the node identifier in the node information of the modification node; Convert the node information of the modified node into JSON format; The node information of the modification node in JSON format is sent to the modification sub-application according to the identifier of the modification sub-application.
5. A system for obtaining the organizational structure of an application, characterized in that: include: An acquisition and display module is used to respond to the configuration instruction of the target node of the sub-application generated in the first organizational structure configuration area, acquire the node identifier and organization name of the target node from the organizational structure main table, and display the organization name and hierarchical relationship of the target node in the second organizational structure configuration area; wherein the fields in the organizational structure main table include: node identifier and organization name; the hierarchical relationship is generated according to the node identifier; A saving module, configured to generate node data in response to a saving operation instruction generated by the second organizational structure configuration area, and save the node data to the organizational structure subtable; wherein the node data includes: a current node identifier of the target node and an identifier of the sub-application in the configuration instruction; an acquisition module, configured to respond to a call instruction of an organizational structure call interface sent by a sub-application according to an interface address indicating an identifier of the sub-application, and acquire information of the target node from the organizational structure sub-table and the organizational structure main table according to the identifier of the sub-application; A data conversion module, used to convert the information of the target node into JSON format; The sending module is used to send the target node information in JSON format to the sub-application.
6. The system according to claim 5, characterized in that The storage module includes a generation module and a service module; The generating module is used to generate node data in response to the save operation instruction generated by the second organizational structure configuration area; Convert the node data into JSON format node JSON data; Pass the node JSON data into the service module in the form of an object; The service module is used to obtain the string of the identification of the sub-application of the object and the node current identification array set of the target node; The identification string of the sub-application and the node current identification array set of the target node are processed into two-dimensional structure data matching the organizational structure subtable through a for loop; the two-dimensional structure data is transferred to the organizational structure subtable for storage through the saveBatch method.
7. The system according to claim 5, characterized in that The acquisition module is also used to respond to a call instruction of the organizational structure call interface sent by a sub-application indicated by the identifier of the sub-application, and obtain the node current identifier of the target node from the organizational structure sub-table according to the identifier of the sub-application; and obtain the corresponding target node information from the organizational structure main table according to the node current identifier of the target node.
8. The system according to claim 5, characterized in that Also includes: An updating module, configured to respond to an information modification instruction of the organizational structure master table and obtain node information of a modification node indicated by the information modification instruction from the organizational structure master table; Determine the corresponding modification sub-application identifier from the organizational structure sub-table according to the node identifier in the node information of the modification node; convert the node information of the modification node into JSON format; and send the node information of the modification node in JSON format to the modification sub-application according to the identifier of the modification sub-application.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for obtaining the organizational structure of the application program as described in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for acquiring the organizational structure of the application program according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Display method of organizational structure information, storage medium and server
CN109344302A
Organizational structure data processing method and device, computer equipment and storage medium
CN109656921A
Configuration updating method and device for organizational structure information, equipment and storage medium
CN112764719A
Data processing method and device, electronic equipment and storage medium
CN114077428A
