A method and system for generating a PLM business form through data modeling
By generating PLM business forms through data modeling, the problems of long time consumption, high cost and poor adaptability in existing technologies are solved. It enables fast and low-cost development of PLM business forms, which are highly adaptable and can handle complex logic and various business needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for generating PLM business forms suffer from problems such as long processing time, high cost, and poor adaptability. Furthermore, low-code generation methods cannot handle complex forms and logic.
PLM business forms are generated through data modeling, including obtaining business design schemes, building data models, generating multiple PLM business form configuration items and their navigation menu configuration items, and generating tree, table, form and tab-style controls in different areas.
It shortens the development cycle, reduces costs, improves adaptability, can handle complex forms and logic, adapts to different business needs, and has a wide range of applications.
Smart Images

Figure CN120950064B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of design and development of product lifecycle management (PLM) system, and more particularly, relates to a method and system for generating a PLM business form through data modeling. BACKGROUND
[0002] A PLM system (Product Lifecycle Management) is an information management software for managing the whole life cycle of a product from concept design, research and development, manufacturing, sales to withdrawal from the market. The PLM system is widely used in the fields of automobile manufacturing, complete equipment, shipbuilding and ocean, high-tech electronics, etc. A PLM business form carries the application scenarios of the PLM system in different fields, realizes data input and management, information integration and sharing, research and development and generation collaboration, etc., and is the core module of the PLM system.
[0003] There are two methods for generating a PLM business form: the first method is a deep customization method, which designs the appearance style, business function and data structure of the back-end of the PLM business form according to the unique business needs, data structure or industry specifications (such as financial risk control, complete equipment, shipbuilding and ocean) of a specific PLM customer, and generates a customized PLM business form for the customer; the second method is a low-code generation method, which relies on a low-code development platform to design the interface layout by dragging field components on a graphical interface, and generates a PLM business form.
[0004] However, the above two generation methods have some defects that cannot be ignored:
[0005] Firstly, the deep customization method needs to develop a set of PLM business forms for each customer according to their business needs, which has the disadvantages of long time consumption, high cost and poor adaptability. When the business needs of the user change, a new set of PLM business forms needs to be developed for the new business needs.
[0006] Secondly, the low-code generation method can be flexibly adjusted and quickly iterated according to changes in business needs, but it cannot handle complex forms and logic. SUMMARY
[0007] In view of the above defects or improvement needs of the prior art, the present application provides a method and system for generating a PLM business form through data modeling, which aims to solve the technical problems of long time consumption, high cost and poor adaptability of the existing deep customization method, and the technical problem that a new set of PLM business forms needs to be developed for new business needs when the business needs of the user change, and the technical problem that the existing low-code generation method cannot handle complex forms and logic.
[0008] To achieve the above object, according to one aspect of the present application, a method for generating a PLM business form by data modeling is provided, comprising the following steps:
[0009] (1) obtaining a business design scheme of a PLM system, and obtaining table structure, table relationship, form appearance design requirement, and form function requirement in the business design scheme;
[0010] (2) generating a data model of the PLM system according to the business design scheme of the PLM system obtained in step (1);
[0011] (3) generating a plurality of PLM business form configuration items and corresponding navigation menu configuration items according to the business design scheme of the PLM system obtained in step (1);
[0012] (4) starting and loading the PLM system, and generating a PLM business form according to the plurality of PLM business form configuration items and corresponding navigation menu configuration items generated in step (3);
[0013] (5) generating a tree-shaped control in a left area of the business form of the PLM system obtained in step (4);
[0014] (6) obtaining a tree node input by a user from the tree-shaped control obtained in step (5);
[0015] (7) parsing the PLM business form obtained in step (4), obtaining a corresponding form template, and judging whether the form template is form_mode_a or form_mode_b, if the form template is form_mode_a, turning to step (8), if the form template is form_mode_b, turning to step (9);
[0016] (8) generating a table-shaped control in an upper right area of the PLM business form obtained in step (4) according to the tree node obtained in step (6);
[0017] (9) generating a form-shaped control in the upper right area of the PLM business form obtained in step (4) according to the PLM business form obtained in step (4) and the tree node obtained in step (6);
[0018] (10) generating a tab-shaped control in a lower right area of the PLM business form obtained in step (4).
[0019] Preferably, step (2) comprises the following sub-steps:
[0020] (2-1) Constructing a first array object set business according to the business design scheme obtained in step (1), converting the table structure in the business design scheme obtained in step (1) into a first object using a PowerDesigner tool, the first object including object coding, a table name of the table structure corresponding to the object, fields of the table, and the like, and adding the first object to the first array object set business to obtain an updated first array object set;
[0021] (2-2) Constructing a second array object set viewGroup according to the business design scheme obtained in step (1), converting the table relationship in the business design scheme obtained in step (1) into a second object using a PowerDesigner tool, the second object including relationship object coding, a table name of the relationship table corresponding to the relationship object, object coding of a parent table corresponding to the table relationship, and object coding of a child table corresponding to the table relationship, and adding the second object to the second array object set viewGroup to obtain an updated second array object set;
[0022] (2-3) Establishing a business object table t_business using a PLM system visual table building tool, the table having a plurality of attributes including business object coding and a table name of the table structure;
[0023] (2-4) Establishing a business attribute table t_property using a PLM system visual table building tool, the table having a plurality of attributes including belonging business object coding, attribute name, data type of the attribute, and default value of the attribute;
[0024] (2-5) Establishing a business relationship table t_business_link using a PLM system visual table building tool, the table having a plurality of attributes including parent object coding, child object coding, and association relationship;
[0025] (2-6) Establishing a business object display page table t_businsee_view using a PLM system visual table building tool, the table including:
[0026] (a) associated business object coding;
[0027] (b) when instance data is displayed in a table, business attributes displayed by the table, controls configured by a table column, operation buttons configured on the table, and paging of table data;
[0028] (c) when instance data is displayed in a form, business attributes displayed by the form, display controls of the business attributes, and operation buttons configured on the form;
[0029] (d) when instance data is displayed in a tree structure, business attributes displayed by a tree node, and right-click menus configured by the tree node;
[0030] (2-7) Using the PLM system visual table building tool to build the structure relation table t_business_view_link of the page, which is used to express three kinds of page combination modes of parent-child structure, including:
[0031] (a) The child business object instance data is displayed in the form of associated tab node_tab, and the child association is under the parent;
[0032] (b) The parent business object instance data is displayed in the form of tree control node, and the child business object instance data is displayed in the form of table control;
[0033] (c) The parent and child business object instance data are displayed in the form of tree control node;
[0034] (2-8) Set the counter i = 0;
[0035] (2-9) Using the import tool of the PLM system, import the object code of the i-th object business[i] in the updated first array object set obtained in step (2-1) and the table name of the table structure corresponding to the object into the business object table t_business established in step (2-3), and import the fields of the i-th object business[i] table in the updated first array object set into the business attribute table t_property established in step (2-4), to respectively generate the data items of the business object table t_business and the data items of the business attribute table t_property;
[0036] (2-10) Generate the entity data table t_data[i] related to the i-th object business[i] in the updated first array object set, the table name of the entity data table t_data[i] is the table name of the table structure corresponding to the object imported in step (2-9), and the entries in the entity data table t_data[i] are the fields of the i-th object business[i] table imported in step (2-9);
[0037] (2-11) Using the visual configuration tool of the PLM system, configure the display mode of the instance data of the i-th object business[i] in the updated first array object set obtained in step (2-1) to obtain the page display configuration of the object business[i];
[0038] (2-12) Import the page display configuration of the object business[i] obtained in step (2-10) into the business object display page table t_businsee_view established in step (2-6) to generate the data items of the business object display page table t_businsee_view;
[0039] (2-13) set i = i + 1;
[0040] (2-14) judge whether i is less than the total number of objects in the updated first array object set business, if yes, return to step (2-9), otherwise, go to step (2-15);
[0041] (2-15) set counter j = 0;
[0042] (2-16) use the import tool of the PLM to import the business table relationship in the jth object viewGroup[j] in the second array object set obtained in step (2-2) into the business relationship table t_business_link established in step (2-5), to generate the data item of the business relationship table t_business_link;
[0043] (2-17) generate the entity data table t_data_link[j] related to the jth object viewGroup[j] in the updated second array object set, the table name of the entity data table t_data_link[j] is the table name of the table structure corresponding to the object imported in step (2-16), and the fields in the table t_data_link[i] include the parent object code, the child object code, the parent object ID, and the child object ID;
[0044] (2-18) use the visual configuration tool of the PLM system to establish the corresponding page structure relationship configuration for the jth object viewGroup[j] in the updated first array object set obtained in step (2-2);
[0045] (2-19) import the page structure relationship configuration of the jth object viewGroup[j] obtained in step (2-18) into the structure relationship table t_business_view_link established in step (2-5), to generate the data item of the structure relationship table t_business_view_link;
[0046] (2-20) set j = j + 1;
[0047] (2-21) judge whether j is less than the total number of objects in the updated second array object set viewGroup in step (2-2), if yes, return to step (2-16), otherwise, go to step (2-22);
[0048] (2-22) The data items of the business object table t_business and the data items of the business attribute table t_property generated according to step (2-9), the data items of the object display page table t_businsee_view generated according to step (2-12), the data items of the business relationship table t_business_link generated according to step (2-16), the data items of the structure relationship table t_business_view_link generated according to step (2-19), the entity data table t_data[i] generated according to step (2-10), and the entity data table t_data_link generated according to step (2-17) are used to construct a data model of the PLM system.
[0049] Preferably, step (3) comprises the following sub-steps:
[0050] (3-1) Constructing a third array object set form according to the business design scheme obtained in step (1), using the PowerDesigner tool to convert the window appearance design requirements and the window function requirements in the business design scheme obtained in step (1) into objects, and adding the objects to the third array object set form to obtain an updated third array object set;
[0051] (3-2) Using the software development tool Visual Studio Code to establish two window templates form_mode_a and form_mode_b, and configuring parameter items for each window template, the parameter items including: name, root business object code, root business data unique identifier, and whether to display the lower right tab parameter isShowTab;
[0052] (3-3) Using the visual table building tool in the PLM system to establish the window configuration table t_plm_form and the navigation menu table t_plm_menu of the PLM system;
[0053] (3-4) Setting the counter k = 0;
[0054] (3-5) According to the window appearance design requirements and the window function requirements corresponding to the kth object form[k] in the updated third array object set in step (3-1), selecting a window template from the window templates obtained in step (3-2) as the window template of the kth object form[k];
[0055] (3-6) defining the form generating function newform_mode_a or newform_mode_b corresponding to the form template of the kth object form[k] selected in step (3-5), the parameter items configured for the form template in step (3-2), and the window appearance design requirements and window function requirements corresponding to the object form[k];
[0056] (3-7) importing the form generating function corresponding to the kth object form[k] obtained in step (3-6) into the form configuration table t_plm_form obtained in step (3-3) using the import tool of the PLM, to generate a PLM service form configuration item which is a t_plm_form data, and wherein includes the values corresponding to the fields of the unique identifier formId, form name, form parameter, form generating function, etc. of the PLM service form obtained in step (3-3), and causing the Snowflake algorithm to generate the ID value formId corresponding to the PLM service form configuration item;
[0057] (3-8) setting the navigation menu name for the kth object form[k] in the third array object set updated in step (3-1);
[0058] (3-9) generating a navigation menu configuration item (which is a t_plm_menu data, and wherein includes the values corresponding to the fields of the unique identifier menuId, menu name, unique identifier formId of the PLM service form corresponding to the menu, etc. obtained in step (3-3)) in the navigation menu table t_plm_menu obtained in step (3-3) using the built-in function of the PLM system according to the navigation menu name obtained in step (3-8), and causing the Snowflake algorithm to generate the ID value menuId corresponding to the navigation menu configuration item;
[0059] (3-10) setting k=k+1;
[0060] (3-11) judging whether k is less than the total number of objects in the array object set form, if yes, returning to step (3-5), otherwise the process ends.
[0061] Preferably, the form configuration table t_plm_form includes the fields of the unique identifier formId of the PLM service form, form template, form name, form parameter, form generating function, etc., each data of the table t_plm_form is a configuration item of a PLM service form, the navigation menu table t_plm_menu includes the fields of the unique identifier menuId of the menu, menu name, unique identifier formId of the PLM service form corresponding to the menu, etc., and each data of t_plm_menu is a navigation menu configuration item;
[0062] The process of generating the form template corresponding to the form generation function newform_mode_a in step (3-6) is as follows. First, according to the window appearance design requirement of the object form[k], the parameter isShowTab of the tab in the lower right corner of the parameter item of the form template obtained in step (3-3) is assigned a value of true or false. Then, according to the window function requirement of the object form[k], the root business object code rootCode and the unique identifier rootID of the root business data in the parameter item of the form template obtained in step (3-3) are assigned values: the root business object code rootCode is the object code of the ith object business[i] imported in step (2-9), and the unique identifier rootID of the root business data is the ID of the entity data table t_data[i]. Subsequently, the form corresponding to form[k] is named, and the name in the parameter item of the form template is assigned a value according to the name. Thereafter, the parameter businessForm is defined. Finally, the form generation function is defined:
[0063] businessForm = newform_mode_a (name, rootCode, rootID, isShowTab)
[0064] Preferably, step (4) comprises the following sub-steps:
[0065] (4-1) obtaining the navigation menu item input by the user, and parsing the navigation menu item to obtain its unique identifier menuId;
[0066] (4-2) according to the unique identifier menuId obtained in step (4-1), and using the encapsulated SQL query statement, querying the unique identifier formId of the PLM business form corresponding to the navigation menu item obtained in step (4-1) in the navigation menu t_plm_menu obtained in step (3-3);
[0067] (4-3) according to the unique identifier formId of the PLM business form obtained in step (4-2), and using the encapsulated SQL query statement, querying the configuration information of the PLM business form corresponding to the navigation menu item obtained in step (4-1) in the form configuration table t_plm_form established in step (3-3), including the form template, the form name name, the form parameter, and the form generation function;
[0068] (4-4) generating the PLM business window corresponding to the navigation menu item obtained in step (4-1) using the window template in the configuration information of the window obtained in step (4-4) and the window generating function in the configuration information of the window obtained in step (4-4), wherein the appearance of the PLM business window is consistent with the window template on which the PLM business window depends;
[0069] (4-5) importing the window parameters in the configuration information of the window obtained in step (4-3) into the PLM business window obtained in step (4-4) to obtain the business window of the PLM.
[0070] Preferably, step (5) comprises the following sub-steps:
[0071] (5-1) importing the root business object code rootCode and the unique identifier rootID of the root business data in the window parameters in the configuration information of the PLM business window obtained in step (4-3) into the tree control area on the left side of the business window obtained in step (4);
[0072] (5-2) initializing the parameters parentCode and parentOid, assigning the root business object code rootCode imported in step (5-1) to the parameter parentCode, and assigning the unique identifier rootID of the root business data imported in step (5-1) to the parameter parentOid;
[0073] (5-3) using the encapsulated SQL query statement to query the display mode of the instance data of the business object with the business object code equal to the parameter parentCode in the tree structure in the business object display page table t_businsee_view established in step (2-6);
[0074] (5-4) using the encapsulated SQL query statement to query the table name t_data_a of the table structure with the business object code equal to the parameter parentCode obtained in step (5-2) in the business object table t_business established in step (2-3), and obtaining the entity data table corresponding to the table name t_data_a;
[0075] (5-5) using the encapsulated SQL query statement to query the instance data with the ID value equal to the parameter parentOid obtained in step (5-2) in the entity data table obtained in step (5-4);
[0076] (5-6) generating the parent node parentNode of the tree control area on the left side of the business window using the window drawing function according to the instance data obtained in step (5-5) and the display mode of the instance data in the tree structure obtained in step (5-3);
[0077] (5-7) initialize parameters childCode, linkCode, and t_data_b, t_data_link to null;
[0078] (5-8) in the business relationship table t_business_link established in step (2-5), use the encapsulated SQL query statement to query the business relationship object set childrenList whose parent object code is equal to the parameter parentCode obtained in step (5-2);
[0079] (5-9) judge whether the size of the business relationship object set childrenList obtained in step (5-8) is greater than 0, if yes, then go to step (5-10), otherwise the process ends;
[0080] (5-10) set the counter m = 0;
[0081] (5-11) get the mth object childrenList[m] in the business relationship object set childrenList obtained in step (5-8), set the parameter childCode obtained in step (5-7) to the child object code of the mth object childrenList[m], and set the parameter linkCode to the relationship object code of the mth object childrenList[m];
[0082] (5-12) in the page structure relationship table t_business_view_link established in step (2-7), use the encapsulated SQL query statement to query the page structure whose parent object code is equal to the parameter parentCode obtained in step (5-2) and whose child object code is equal to the parameter childCode obtained in step (5-7);
[0083] (5-13) judge whether the page structure obtained in step (5-12) contains the relationship node_node, if yes, then go to step (5-14), otherwise go to step (5-23);
[0084] (5-14) in the business object display page table t_business_view established in step (2-6), use the encapsulated SQL query statement to query the display mode of the instance data in the tree structure whose business object code is equal to the parameter childCode obtained in step (5-7);
[0085] (5-15) In the business object table t_business established in step (2-3), a table structure table name t_data_b with a business object code equal to the parameter childCode is queried using a packaged SQL query statement, and the corresponding entity data table is obtained according to the table name t_data_b;
[0086] (5-16) In the business object table t_business established in step (2-3), a table structure table name t_data_link with a business object code equal to the parameter linkCode obtained in step (5-7) is queried using a packaged SQL query statement, and the corresponding entity data table is obtained according to the table name t_data_link;
[0087] (5-17) In the entity data table obtained in step (5-16), a relationship object instance data collection childrenObjList with a parent object code equal to the parameter parentCode and a parent object ID equal to the parameter parentOid is queried using a packaged SQL query statement;
[0088] (5-18) The parameter n is set to 0;
[0089] (5-19) The nth object childrenObjList[n] in the relationship object instance data collection childrenObjList obtained in step (5-17) is obtained, and the value of the parameter childrenObjId is set to the child object ID value of the object childrenObjList[n];
[0090] (5-20) In the entity data table obtained in step (5-15), an instance data with an ID value equal to the parameter childrenObjId is queried using a packaged SQL query statement;
[0091] (5-21) According to the instance data obtained in step (5-20) and the instance data obtained in step (5-14), a child node childNode is generated in the tree structure display mode using a window drawing function, and the child node childNode is hung under the parent node parentNode obtained in step (5-6), thereby forming a parent-child relationship between parentNode and childNode;
[0092] (5-22) The parentCode is set to childCode, the parentNode is set to childNode, the parentOid is set to childId, and step (5-8) is returned;
[0093] (5-23) The parameter n is set to n+1;
[0094] (5-24) judging whether n is less than the size of the relationship object instance data set childrenObjList, if yes, returning to step (5-19), otherwise, going to step (5-25);
[0095] (5-25) setting m = m + 1;
[0096] (5-26) judging whether m is less than the size of the business relationship object set childrenList, if yes, returning to step (5-11), otherwise, going to step (5-27).
[0097] Preferably, step (8) comprises the following sub-steps:
[0098] (8-1) initializing parameters nodeCode and nodeOid as null, parsing the tree node obtained in step (6) to obtain the business object code and the business data unique identifier of the tree node, assigning the business object code to parameter nodeCode and assigning the business data unique identifier to parameter nodeOid;
[0099] (8-2) in the structure relationship table t_business_view_link of the page established in step (2-7), using an encapsulated SQL query statement to query the page structure relationship with the parent object code equal to parameter nodeCode and the page combination mode equal to parameter node_grid;
[0100] (8-3) initializing parameters gridCode and linGridCode as null, assigning the child object code of the page structure relationship obtained in step (8-2) to parameter gridCode and assigning the relationship object code of the page structure relationship to parameter linGridCode;
[0101] (8-4) in the display page table t_business_view established in step (2-6), using an encapsulated SQL query statement to query the display mode of the instance data with the business object code equal to parameter gridCode in the table control;
[0102] (8-5) in the business object table t_business established in step (2-3), using an encapsulated SQL query statement to query the table structure t_data_b of the business object code equal to parameter gridCode, and obtaining the corresponding entity data table according to the table name t_data_b;
[0103] (8-6) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_link of the table structure whose business object code is equal to the parameter linGridCode, and obtain the corresponding entity data table based on the table name t_data_link;
[0104] (8-7) In the entity data table obtained in step (8-6), use the encapsulated SQL query statement to query the child object ID set childrenIdList where the parent object code is equal to the parameter nodeCode, the parent object ID is equal to the parameter nodeOid, and the child object code is equal to the parameter gridCode;
[0105] (8-8) In the entity data table obtained in step (8-5), use the encapsulated SQL query statement to query the instance data childrenObjList whose ID belongs to the child object ID set childrenIdList obtained in step (8-7);
[0106] (8-9) Based on the instance data obtained in step (8-8) and the display method obtained in step (8-4), generate a table-shaped control in the upper right area of the business window of the PLM system obtained in step (4).
[0107] Preferably, step (9) includes the following sub-steps:
[0108] (9-1) Initialize the parameters nodeCode and nodeOid to be empty, parse the tree node obtained in step (6) to obtain the business object code and business data unique identifier of the tree node, assign the business object code to nodeCode, and assign the business data unique identifier to nodeOid;
[0109] (9-2) In the display page table t_businsee_view established in step (2-6), use the encapsulated SQL query statement to query how the instance data whose business object code is equal to the parameter nodeCode is displayed in the form control;
[0110] (9-3) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_a of the table structure whose business object code is equal to the parameter nodeCode, and obtain the corresponding entity data table based on the table name t_data_a;
[0111] (9-4) In the entity data table obtained in step (9-3), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter nodeOid;
[0112] (9-5) Based on the instance data in step (9-4) and the display method obtained in step (9-2), generate a form-type control in the upper right area of the current PLM business form.
[0113] Preferably, step (10) includes the following sub-steps:
[0114] (10-1) Parse the PLM business form obtained in step (4) to obtain the parameter isShowTab of the business form, and determine whether the parameter isShowTab is true. If the value of isisShowTab is true, initialize an empty tab control in the lower right area of the business form and proceed to step (10-2); otherwise, the process ends.
[0115] (10-2) Initialize the parameters parentCode and parentOid to be empty, and determine whether the upper right area of the PLM business form obtained in step (4) is a table-type control. If it is, obtain the row data entered by the user on the control, assign the business object code of the row data to parentCode, and assign the unique identifier of the row data to parentOid, and then proceed to step (10-3). Otherwise, parse the tree node obtained in step (6) to obtain the business object code and unique identifier of the tree node, assign the business object code of the tree node to the parameter parentCode, and assign the unique identifier of the tree node to the parameter parentOid, and then proceed to step (10-3).
[0116] (10-3) In the business relationship table t_business_link established in step (2-5), use the encapsulated SQL query statement to query the collection of business relationship objects childrenList whose parent object code is equal to the parameter parentCode;
[0117] (10-4) Initialize the parameters pageCode and pageLinkCode to be empty;
[0118] (10-5) Set the counter m=0;
[0119] (10-6) Obtain the m-th object childrenList[m] from the childrenList collection of business relationship objects obtained in step (10-3), set the pageCode parameter obtained in step (10-2) to the child object code of the m-th object childrenList[m], and set the pageLinkCode parameter to the relationship object code of the m-th object childrenList[m].
[0120] (10-7) In the step (2-7), the structure relationship table t_business_view_link of the page is established, and the encapsulated SQL query statement is used to query the structure relationship of the page with the parent object code equal to the parameter parentCode and the child object code equal to the parameter pageCode;
[0121] (10-8) It is judged whether the page structure relationship obtained in the step (10-7) contains the associated tab node_tab. If yes, go to the step (10-9), otherwise go to the step (10-17);
[0122] (10-9) The parameter TabView is initialized, and the control form of the associated tab node_tab obtained in the step (10-8) is assigned to the parameter TabView;
[0123] (10-10) In the business object table t_business established in the step (2-3), the encapsulated SQL query statement is used to query the table structure t_data_b with the business object code equal to the parameter pageCode, and the corresponding entity data table is obtained according to the table name t_data_b;
[0124] (10-11) In the business object table t_business established in the step (2-3), the encapsulated SQL query statement is used to query the table structure t_data_link with the business object code equal to the parameter pageLinkCode, and the corresponding entity data table is obtained according to the table name t_data_link;
[0125] (10-12) In the entity data table obtained in the step (10-11), the encapsulated SQL query statement is used to query the child object ID set childrenIdList with the parent object code equal to the parameter parentCode, the parent object ID equal to the parameter parentOid and the child object code equal to the parameter pageCode;
[0126] (10-13) In the entity data table with the table name t_data_b obtained in the step (10-10), the encapsulated SQL query statement is used to query the instance data childrenObjList with the ID belonging to the child object ID set childrenIdList obtained in the step (10-12);
[0127] (10-14) In the display page table t_business_view established in the step (2-6), the encapsulated SQL query statement is used to query the display mode of the instance data with the business object code equal to the parameter pageCode and the control form equal to the parameter TabView;
[0128] (10-15) According to the instance data obtained in step (10-13) and the display mode obtained in step (10-14), a tab page in the form of a control equal to the parameter TabView is generated;
[0129] (10-16) The tab page obtained in step (10-15) is added to a tab control;
[0130] (10-17) m is set to m+1;
[0131] (10-18) It is judged whether m is less than the size of the sub-object set childrenList, if yes, the process returns to step (10-6), otherwise the process ends.
[0132] According to another aspect of the present application, a system for generating a PLM business form through data modeling is provided, comprising:
[0133] A first module is configured to acquire a business design scheme of a PLM system, and acquire table structure, table relationship, window appearance design requirements, and window function requirements in the business design scheme;
[0134] A second module is configured to generate a data model of the PLM system according to the business design scheme of the PLM system acquired by the first module;
[0135] A third module is configured to generate a plurality of PLM business form configuration items and corresponding navigation menu configuration items according to the business design scheme of the PLM system acquired by the first module;
[0136] A fourth module is configured to start and load the PLM system, and generate a PLM business form according to the plurality of PLM business form configuration items and corresponding navigation menu configuration items generated by the third module;
[0137] A fifth module is configured to generate a control in the form of a tree in a left area of the business form of the PLM system obtained by the fourth module;
[0138] A sixth module is configured to acquire a tree node input by a user from the control in the form of a tree obtained by the fifth module;
[0139] A seventh module is configured to parse the PLM business form obtained by the fourth module, acquire a corresponding form template, and judge whether the form template is form_mode_a or form_mode_b, if the form template is form_mode_a, the process proceeds to an eighth module, if the form template is form_mode_b, the process proceeds to a ninth module;
[0140] The eighth module is used for generating a table form control in the upper right area of the PLM business window obtained by the fourth module according to the tree node obtained by the sixth module;
[0141] The ninth module is used for generating a form control in the upper right area of the PLM business window obtained by the fourth module according to the PLM business window obtained by the fourth module and the tree node obtained by the sixth module;
[0142] The tenth module is used for generating a tab form control in the lower right area of the PLM business window obtained by the fourth module.
[0143] Overall, compared with the prior art, the above technology conceived by the present application can achieve the following beneficial results:
[0144] (1) The present application dynamically generates the data model of the PLM system and the PLM business window configuration item and the corresponding navigation menu configuration item from the PLM system business design scheme to the PLM system by adopting steps (1) to (3), shortens the development cycle of the PLM business window, reduces the development cost, and improves the adaptability of the PLM business window;
[0145] (2) The present scheme can overcome the technical problem that the existing low-code generation method cannot handle complex windows and logic by generating refined window structures in different areas under the overall framework of the PLM business window by adopting steps (5) to (10);
[0146] (3) The present application generates the PLM business window that meets different business requirements by using a unified window generation method through the established window layout by adopting steps (3) to (4);
[0147] (4) The present application directly inputs the system design scheme into the PLM system by adopting steps (2) to (3) in a configuration manner, so that the PLM system has good adaptability and scalability;
[0148] (5) The present application has a wide range of applications, relies on the window layout, dynamically generates and loads the business window of the PLM system by reading the design scheme input in a configuration manner, and can be applied to many aspects of the PLM system business, and has a wide range of applications. BRIEF DESCRIPTION OF DRAWINGS
[0149] Figure 1 is the overall flowchart of the method for generating the PLM business window by data modeling of the present application;
[0150] Figure 2 is the detailed flowchart of step (2) in the method of the present application;
[0151] Figure 3is a schematic diagram of the form layout form_mode_a generated by the present application;
[0152] Figure 4 is a schematic diagram of the form layout form_mode_b generated by the present application;
[0153] Figure 5 is a detailed flow chart of step (5) in the method of the present application;
[0154] Figure 6 is a detailed flow chart of step (10) in the method of the present application. DETAILED DESCRIPTION
[0155] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0156] The basic idea of the present application is to use the import tool of the PLM system to import the business design scheme of the PLM system, generate the data model of the PLM system and the PLM business form configuration item and its corresponding navigation menu configuration item; obtain the navigation menu item input by the user, query the unique identifier formId of the PLM business form corresponding to the menu according to the unique identifier menuId, obtain the configuration item of the PLM business form according to formId, generate the PLM business form according to the obtained configuration item, query the imported data model according to the parameters of the PLM business form, and generate the details of each area of the PLM business form.
[0157] As shown in Figure 1 , the present application provides a method for generating a PLM business form through data modeling, comprising the following steps:
[0158] (1) Obtain a business design scheme of a PLM system, and obtain the table structure, table relationship, form appearance design requirements, and form function requirements in the business design scheme.
[0159] (2) Generate a data model of the PLM system according to the business design scheme of the PLM system obtained in step (1).
[0160] As shown in Figure 2 , this step comprises the following sub-steps:
[0161] (2-1) Constructing a first array object set business according to the business design scheme obtained in step (1), converting the table structure in the business design scheme obtained in step (1) into a first object (the first object includes object code, table name of the table structure corresponding to the object, fields of the table, etc.) using the PowerDesigner tool, and adding the first object to the first array object set business to obtain an updated first array object set;
[0162] (2-2) Constructing a second array object set viewGroup according to the business design scheme obtained in step (1), converting the table relationship in the business design scheme obtained in step (1) into a second object (the second object includes relationship object code, table name of the relationship table corresponding to the relationship object, object code of the parent table corresponding to the table relationship, object code of the child table corresponding to the table relationship) using the PowerDesigner tool, and adding the second object to the second array object set viewGroup to obtain an updated second array object set;
[0163] (2-3) Establishing a business object table t_business using a PLM system visual table building tool, which has a plurality of attributes including business object code, table name of the table structure, etc.
[0164] (2-4) Establishing a business attribute table t_property using a PLM system visual table building tool, which has a plurality of attributes including the business object code to which the attribute belongs, attribute name, data type of the attribute, and default value of the attribute, etc.
[0165] (2-5) Establishing a business relationship table t_business_link using a PLM system visual table building tool, which has a plurality of attributes including parent object code, child object code, and association relationship (subordinate / association), etc.
[0166] (2-6) Establishing a business object display page table t_businsee_view using a PLM system visual table building tool, including:
[0167] (a) Associated business object code;
[0168] (b) When instance data is displayed in a table (Grid), business attributes displayed by the table, controls configured by the table column, operation buttons configured on the table, and paging of table data;
[0169] (c) When instance data is displayed in a form (Form), business attributes displayed by the form, display controls of the business attributes, and operation buttons configured on the form;
[0170] (d) When the example data is displayed in a tree structure (Tree), the business attributes displayed by the tree nodes, and the right-click menu configured for the tree nodes;
[0171] (2-7) The structure relationship table t_business_view_link of the page is established using the visualization table establishment tool of the PLM system, which is used to express three kinds of page combination modes of the parent-child structure, including:
[0172] (a) The child business object instance data is displayed in the form of an associated tab node_tab, and the child association is under the parent. The associated tab has two control forms: Grid (filling the associated tab page in the form of a table), or Form (filling the associated tab page in the form of a form);
[0173] (b) The parent business object instance data is displayed in the form of a tree control node, and the child business object instance data is displayed in the form of a table control. The child association is under the parent node_grid;
[0174] (c) The parent and child business object instance data are displayed in the form of a tree control node, and the child is hung under the parent node_node;
[0175] (2-8) Set the counter i = 0;
[0176] (2-9) Using the import tool of the PLM system, the object code of the i-th object business[i] in the updated first array object set obtained in step (2-1) and the table name of the table structure corresponding to the object are imported into the business object table t_business established in step (2-3), and the fields of the i-th object business[i] table in the updated first array object set are imported into the business attribute table t_property established in step (2-4), to respectively generate the data items of the business object table t_business and the data items of the business attribute table t_property;
[0177] (2-10) Generate the entity data table t_data[i] related to the i-th object business[i] in the updated first array object set. The table name of the entity data table t_data[i] is the table name of the table structure corresponding to the object imported in step (2-9). The entries in the entity data table t_data[i] are the fields of the i-th object business[i] table imported in step (2-9);
[0178] (2-11) using the visual configuration tool of the PLM system to configure the display mode of the instance data of the business object of the i-th object business[i] in the updated first array object set obtained in step (2-1) to obtain the page display configuration of the object business[i];
[0179] (2-12) importing the page display configuration of the object business[i] obtained in step (2-10) into the business object display page table t_business_view established in step (2-6) to generate the data item of the business object display page table t_business_view;
[0180] (2-13) setting i = i + 1;
[0181] (2-14) judging whether i is less than the total number of objects in the updated first array object set business, if yes, returning to step (2-9), otherwise, proceeding to step (2-15);
[0182] (2-15) setting the counter j = 0;
[0183] (2-16) using the import tool of the PLM to import the business table relationship in the j-th object viewGroup[j] in the second array object set obtained in step (2-2) into the business relationship table t_business_link established in step (2-5) to generate the data item of the business relationship table t_business_link;
[0184] (2-17) generating the entity data table t_data_link[j] related to the j-th object viewGroup[j] in the updated second array object set, the table name of the entity data table t_data_link[j] being the table name of the table structure corresponding to the object imported in step (2-16), the fields in the table t_data_link[i] including the parent object code, the child object code, the parent object ID, and the child object ID;
[0185] (2-18) using the visual configuration tool of the PLM system to establish the corresponding page structure relationship configuration for the j-th object viewGroup[j] in the updated first array object set obtained in step (2-2);
[0186] (2-19) importing the page structure relationship configuration of the j-th object viewGroup[j] obtained in step (2-18) into the structure relationship table t_business_view_link established in step (2-5) to generate the data item of the structure relationship table t_business_view_link;
[0187] (2-20) Set j = j + 1;
[0188] (2-21) Determine whether j is less than the total number of objects in the second array object set viewGroup updated in step (2-2). If yes, return to step (2-16), otherwise go to step (2-22);
[0189] (2-22) Construct the data model of the PLM system according to the data items of the business object table t_business and the data items of the business attribute table t_property generated in step (2-9), the data items of the object display page table t_business_view generated in step (2-12), the data items of the business relationship table t_business_link generated in step (2-16), the data items of the structure relationship table t_business_view_link generated in step (2-19), the entity data table t_data[i] generated in step (2-10), and the entity data table t_data_link generated in step (2-17).
[0190] Traditionally, business objects, attributes of business objects, and relationships between business objects are built into programs. When business requirements change and the above structures need to be adjusted, the business personnel first proposes the change requirements, the architect adjusts the design scheme, the programmer develops and implements it, and after testing, it is redeployed.
[0191] The advantage of this step is that the design scheme is input into the system, the system receives the input, and generates the data model of the PLM system. The PLM system represents business objects, business attributes, display methods of business objects, structural relationships between business objects, and combined display methods of business objects in the form of a data model. When the business scheme needs to be changed, only the input design scheme needs to be changed, and the system synchronously updates the data model, without the need to change the PLM system program again.
[0192] (3) Generate a plurality of PLM business form configuration items and their corresponding navigation menu configuration items according to the business design scheme of the PLM system obtained in step (1).
[0193] Specifically, this step is to construct, add, and modify forms carrying business functions of the PLM system in a configured manner by establishing two kinds of form layouts, and to construct, add, and modify the navigation menu of the PLM system in a configured manner, so as to achieve the purpose of configuring the business functions of the PLM system.
[0194] This step includes the following sub-steps:
[0195] (3-1) Constructing a third array object set form according to the business design scheme obtained in step (1), using the PowerDesigner tool to convert the window appearance design requirements and window function requirements in the business design scheme obtained in step (1) into objects, and adding the objects to the third array object set form to obtain an updated third array object set;
[0196] (3-2) Using the software development tool Visual Studio Code to establish two window templates form_mode_a and form_mode_b, and configuring parameter items for each window template;
[0197] Specifically, all business interfaces of the PLM system are dynamically generated according to the two window templates.
[0198] The layout of the window template form_mode_a is shown in FIG. (3): the left side is a tree control area, the upper right is a table control area, and the lower right is a group of tab areas, each tab being composed of a table or a form;
[0199] The layout of the window template form_mode_b is shown in FIG. (4): the left side is a tree control area, the upper right is a form control area, and the lower right is a group of tab areas, each tab being composed of a table or a form;
[0200] The parameter items of the window template include: name, root business object code, root business data unique identifier, and whether to display the lower right tabs isShowTab;
[0201] (3-3) Using the visual table building tool in the PLM system to establish the window configuration table t_plm_form and the navigation menu table t_plm_menu of the PLM system;
[0202] Specifically, the window configuration table t_plm_form includes the unique identifier formId of the PLM business window, the window template, the window name, the window parameter, the window generation function, etc. Each data of the table t_plm_form is a configuration item of a PLM business window. The navigation menu table t_plm_menu includes the menu unique identifier menuId, the menu name, the unique identifier formId of the PLM business window corresponding to the menu, etc. Each data of the t_plm_menu is a navigation menu configuration item;
[0203] (3-4) Setting the counter k = 0;
[0204] (3-5) According to the form[k] of the kth object in the third array object set updated in step (3-1) corresponding to the window appearance design requirement and the window function requirement, a window template is selected from the window template obtained in step (3-2) as the window template of the kth object form[k];
[0205] Specifically, the selected window template is form_mode_a (as shown in Figure 3 ) or form_mode_b (as shown in Figure 4 );
[0206] (3-6) According to the window template of the kth object form[k] selected in step (3-5), the parameter item configured for the window template in step (3-2), and the window appearance design requirement and the window function requirement corresponding to the object form[k], the window generation function newform_mode_a or newform_mode_b corresponding to the window template is defined;
[0207] Specifically, the process of generating the window generation function newform_mode_a corresponding to the window template in this step is as follows: first, according to the window appearance design requirement (whether to display the lower right tab) corresponding to the object form[k], the parameter isShowTab of the lower right tab in the parameter item of the window template obtained in step (3-3) is assigned true or false; then, according to the window function requirement corresponding to the object form[k], the root business object code rootCode and the unique identifier rootID of the root business data in the parameter item of the window template obtained in step (3-3) are assigned: the root business object code rootCode is the object code of the ith object business[i] imported in step (2-9), and the unique identifier rootID of the root business data is the ID of the entity data table t_data[i]; subsequently, the window corresponding to form[k] is named, and the name name in the parameter item of the window template is assigned according to the naming; thereafter, the out-parameter businessForm (generated PLM business window) is defined; finally, the window generation function is defined:
[0208] businessForm=newform_mode_a(name,rootCode,rootID,isShowTab);
[0209] The process of generating the window generation function newform_mode_b corresponding to the window template is the same as the above, and the only difference is that:
[0210] businessForm = new form_mode_b (name, rootCode, rootID, isShowTab) ;
[0211] (3-7) Using the import tool of the PLM, the form generating function corresponding to the kth object form[k] obtained in step (3-6) is imported into the form configuration table t_plm_form obtained in step (3-3) to generate a PLM business form configuration item (it is a t_plm_form data, which includes the values corresponding to the fields of the unique identifier formId, form name, form parameter, form generating function of the PLM business form obtained in step (3-3)) and make Snowflake algorithm to generate the ID value formId corresponding to the PLM business form configuration item;
[0212] (3-8) Set the navigation menu name for the kth object form[k] in the third array object set updated in step (3-1);
[0213] (3-9) According to the navigation menu name obtained in step (3-8), use the built-in function of the PLM system to generate a navigation menu configuration item (it is a t_plm_menu data, which includes the values corresponding to the fields of the menu unique identifier menuId, menu name, menu corresponding PLM business form unique identifier formId obtained in step (3-3)) in the navigation menu table t_plm_menu obtained in step (3-3), and make Snowflake algorithm to generate the ID value menuId corresponding to the navigation menu configuration item;
[0214] (3-10) Set k=k+1;
[0215] (3-11) Determine whether k is less than the total number of objects in the array object set form. If yes, return to step (3-5), otherwise the process ends;
[0216] The advantage of this step is that relying on the two kinds of form templates established in step (3-2), the numerous business forms of the PLM system can be flexibly configured, and there is no need to develop forms separately for each business. The system function has good scalability and can be constructed, added, modified, and removed according to business needs.
[0217] (4) Start and load the PLM system, and generate the PLM business form according to the multiple PLM business form configuration items and the navigation menu configuration items corresponding thereto generated in step (3).
[0218] Specifically, in this step, the PLM system is started manually by the user, the PLM system reads the navigation menu table t_plm_menu, loads the navigation menu of the PLM system, and the user can click the buttons of the navigation menu according to the business requirements to open the corresponding business interface.
[0219] This step includes the following sub-steps:
[0220] (4-1) Obtain the navigation menu item input by the user and parse the navigation menu item to obtain its unique identifier menuId;
[0221] (4-2) According to the unique identifier menuId obtained in step (4-1), and using the encapsulated SQL query statement, query the unique identifier formId of the PLM business form corresponding to the navigation menu item obtained in step (4-1) in the navigation menu t_plm_menu obtained in step (3-3);
[0222] (4-3) According to the unique identifier formId obtained in step (4-2), and using the encapsulated SQL query statement, query the configuration information of the PLM business form corresponding to the navigation menu item obtained in step (4-1) in the form configuration table t_plm_form established in step (3-3), including the form template, the form name name, the form parameters (including the root business object code rootCode and the unique identifier rootID of the root business data), and the form generation function;
[0223] (4-4) According to the form template in the configuration information of the form obtained in step (4-3), and using the form generation function in the configuration information of the form obtained in step (4-4), generate the PLM business form corresponding to the navigation menu item obtained in step (4-1), the appearance of the PLM business form is consistent with the form template it depends on;
[0224] Specifically, if the form template is form_mode_a, the form is as shown in FIG. (3), and if the form template is form_mode_b, the form is as shown in FIG. (4);
[0225] (4-5) Import the form parameters (including the name name, the root business object code rootCode, the unique identifier rootID of the root business data, and the parameter isShowTab whether to display the tab at the lower right) in the configuration information of the form obtained in step (4-3) into the PLM business form obtained in step (4-4) to obtain the PLM business form;
[0226] (5) generating the control (for carrying the business content and function of the PLM system) in the tree form (the child node under the parent node) in the left area of the business window of the PLM system obtained in step (4);
[0227] As shown in Figure 5 , this step includes the following sub-steps:
[0228] (5-1) importing the root business object code rootCode and the unique identifier rootID of the root business data in the form parameter in the configuration information of the PLM business window obtained in step (4-3) into the tree control area (as shown in Figure 3 and Figure 4 ) in the left side of the business window obtained in step (4), wherein Tree represents the tree area, Grid represents the table area, Form represents the form area, and Tab represents the tab area.
[0229] (5-2) initializing the parameters parentCode and parentOid, assigning the root business object code rootCode imported in step (5-1) to the parameter parentCode, and assigning the unique identifier rootID of the root business data imported in step (5-1) to the parameter parentOid;
[0230] (5-3) using the encapsulated SQL query statement to query the display mode (the business attribute displayed by the tree node, the right-click menu configured by the tree node) of the instance data of the business object with the business object code equal to the parameter parentCode in the tree structure in the business object display page table t_businsee_view established in step (2-6);
[0231] (5-4) using the encapsulated SQL query statement to query the table structure table name t_data_a with the business object code equal to the parameter parentCode obtained in step (5-2) in the business object table t_business established in step (2-3), and obtaining the entity data table corresponding to the table name t_data_a;
[0232] (5-5) using the encapsulated SQL query statement to query the instance data with the ID value equal to the parameter parentOid obtained in step (5-2) in the entity data table obtained in step (5-4);
[0233] (5-6) generating the parent node parentNode of the tree control area in the left side of the business window using the form drawing function according to the display mode of the instance data obtained in step (5-5) and the instance data obtained in step (5-3) in the tree structure;
[0234] (5-7) initialize parameters childCode, linkCode, and t_data_b, t_data_link to null;
[0235] (5-8) in the business relationship table t_business_link established in step (2-5), use the encapsulated SQL query statement to query the business relationship object set childrenList whose parent object code is equal to the parameter parentCode obtained in step (5-2);
[0236] (5-9) judge whether the size of the business relationship object set childrenList obtained in step (5-8) is greater than 0, if yes, then go to step (5-10), otherwise the process ends;
[0237] (5-10) set the counter m = 0;
[0238] (5-11) get the mth object childrenList[m] in the business relationship object set childrenList obtained in step (5-8), set the parameter childCode obtained in step (5-7) to the child object code of the mth object childrenList[m], and set the parameter linkCode to the relationship object code of the mth object childrenList[m];
[0239] (5-12) in the page structure relationship table t_business_view_link established in step (2-7), use the encapsulated SQL query statement to query the page structure whose parent object code is equal to the parameter parentCode obtained in step (5-2) and whose child object code is equal to the parameter childCode obtained in step (5-7);
[0240] (5-13) judge whether the page structure obtained in step (5-12) contains the relationship node_node (the child is hung under the parent in the form of the child node), if yes, then go to step (5-14), otherwise go to step (5-23);
[0241] (5-14) in the business object display page table t_business_view established in step (2-6), use the encapsulated SQL query statement to query the display mode (i.e. the business attribute displayed by the tree node, the right-click menu configured by the tree node) of the instance data whose business object code is equal to the parameter childCode obtained in step (5-7) in the tree structure;
[0242] (5-15) In the business object table t_business established in step (2-3), a table structure table name t_data_b with a business object code equal to the parameter childCode is queried using a packaged SQL query statement, and the corresponding entity data table is obtained according to the table name t_data_b;
[0243] (5-16) In the business object table t_business established in step (2-3), a table structure table name t_data_link with a business object code equal to the parameter linkCode obtained in step (5-7) is queried using a packaged SQL query statement, and the corresponding entity data table is obtained according to the table name t_data_link;
[0244] (5-17) In the entity data table obtained in step (5-16), a relationship object instance data collection childrenObjList with a parent object code equal to the parameter parentCode and a parent object ID equal to the parameter parentOid is queried using a packaged SQL query statement;
[0245] (5-18) Set the parameter n=0;
[0246] (5-19) The nth object childrenObjList[n] in the relationship object instance data collection childrenObjList obtained in step (5-17) is obtained, and the value of the parameter childrenObjId is set to be equal to the child object ID value of the object childrenObjList[n];
[0247] (5-20) In the entity data table obtained in step (5-15), an instance data with an ID value equal to the parameter childrenObjId is queried using a packaged SQL query statement;
[0248] (5-21) According to the instance data obtained in step (5-20) and the instance data obtained in step (5-14) in the tree structure display mode (business properties displayed by tree nodes, right-click menu configured by tree nodes), a window drawing function is used to generate a child node childNode of the tree control area, and the child node childNode is hung below the parent node parentNode obtained in step (5-6), thereby forming a parent-child relationship between parentNode and childNode;
[0249] (5-22) Set parentCode=childCode, parentNode=childNode, parentOid=childId, and return to step (5-8);
[0250] (5-23) Set n = n + 1;
[0251] (5-24) Determine whether n is less than the size of the relationship object instance data set childrenObjList. If yes, return to step (5-19). Otherwise, go to step (5-25);
[0252] (5-25) Set m = m + 1;
[0253] (5-26) Determine whether m is less than the size of the business relationship object set childrenList. If yes, return to step (5-11). Otherwise, go to step (5-27);
[0254] The advantage of this step is that by analyzing the data model configured in step (2), the data of the relevant business theme of the PLM system can be displayed in a tree form according to the parameters passed in by the window. The relevant business theme of the data and the display mode of the data are all based on the data model configured in step (2). When the business requirement changes, the code does not need to be updated. Only the corresponding data model needs to be adjusted, and the form and content of the region can be adjusted synchronously.
[0255] (6) Obtain the tree node input by the user from the tree form control obtained in step (5);
[0256] (7) Analyze the PLM business window obtained in step (4). Obtain the corresponding window template, and determine whether the window template is form_mode_a or form_mode_b. If the window template is form_mode_a, go to step (8). If the window template is form_mode_b, go to step (9);
[0257] (8) According to the tree node obtained in step (6), generate a table form control (used to carry the PLM business content and functions) in the upper right region of the PLM business window obtained in step (4).
[0258] Specifically, this step includes the following sub-steps:
[0259] (8-1) Initialize the parameters nodeCode and nodeOid to be empty. Analyze the tree node obtained in step (6) to obtain the business object code and business data unique identifier of the tree node. Assign the business object code to the parameter nodeCode, and assign the business data unique identifier to the parameter nodeOid;
[0260] (8-2) In the step (2-7), the page structure relationship table t_business_view_link is established, and the encapsulated SQL query statement is used to query the page structure relationship whose parent object code is equal to the parameter nodeCode and whose page combination mode is equal to the parameter node_grid (the parent business object instance data is displayed in the form of a tree control node, and the child business object instance data is displayed in the form of a table control);
[0261] (8-3) The parameters gridCode and linGridCode are initialized as null, the child object code of the page structure relationship obtained in the step (8-2) is assigned to the parameter gridCode, and the relationship object code of the page structure relationship is assigned to the parameter linGridCode;
[0262] (8-4) In the display page table t_business_view established in the step (2-6), the encapsulated SQL query statement is used to query the display mode of the instance data in the table control whose business object code is equal to the parameter gridCode (including the business properties displayed in the table, the control configured in the table column, the operation button configured on the table, and the paging of the table data);
[0263] (8-5) In the business object table t_business established in the step (2-3), the encapsulated SQL query statement is used to query the table structure table name t_data_b of the business object code equal to the parameter gridCode, and the corresponding entity data table is obtained according to the table name t_data_b;
[0264] (8-6) In the business object table t_business established in the step (2-3), the encapsulated SQL query statement is used to query the table structure table name t_data_link of the business object code equal to the parameter linGridCode, and the corresponding entity data table is obtained according to the table name t_data_link;
[0265] (8-7) In the entity data table obtained in the step (8-6), the encapsulated SQL query statement is used to query the child object ID set childrenIdList whose parent object code is equal to the parameter nodeCode, whose parent object ID is equal to the parameter nodeOid, and whose child object code is equal to the parameter gridCode;
[0266] (8-8) In the entity data table obtained in the step (8-5), the encapsulated SQL query statement is used to query the instance data childrenObjList whose ID belongs to the child object ID set childrenIdList obtained in the step (8-7);
[0267] (8-9) According to the instance data obtained in step (8-8) and the display mode obtained in step (8-4), a table form control is generated in the right upper area of the business form of the PLM system obtained in step (4).
[0268] The advantage of this step is that the data of different business subjects can be displayed in the table area, and the display mode of the data (column configuration, menu configuration) is based on the data model configured in step (2). When the business requirement changes, the code does not need to be updated. By adjusting the corresponding data model, the form and content of this area can be adjusted synchronously.
[0269] (9) According to the PLM business form obtained in step (4) and the tree node obtained in step (6), a form control (carrying PLM business content and functions) is generated in the right upper area of the PLM business form obtained in step (4).
[0270] Specifically, this step includes the following sub-steps:
[0271] (9-1) Initialize the parameters nodeCode and nodeOid to empty, and parse the tree node obtained in step (6) to obtain the business object code and business data unique identifier of the tree node. Assign the business object code to nodeCode and the business data unique identifier to nodeOid;
[0272] (9-2) In the display page table t_businsee_view established in step (2-6), use the encapsulated SQL query statement to query the display mode of the instance data in the form control whose business object code is equal to the parameter nodeCode (including the business properties displayed in the form, the display control of the business properties, and the operation buttons configured on the form);
[0273] (9-3) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table structure table name t_data_a whose business object code is equal to the parameter nodeCode, and obtain the corresponding entity data table according to the table name t_data_a;
[0274] (9-4) In the entity data table obtained in step (9-3), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter nodeOid;
[0275] (9-5) According to the instance data of step (9-4) and the display mode obtained in step (9-2), a form control is generated in the right upper area of the current PLM business form;
[0276] The advantage of this step is that different business subject data can be displayed in the form area, and the data display mode (hidden and displayed fields, field display control, and field arrangement position) is based on the data model configured in step (2). When the business requirement changes, the code does not need to be updated. Only the corresponding data model needs to be adjusted to synchronize the form and content of the area.
[0277] (10) According to the PLM business form obtained in step (4), a tab form control (the tab is composed of multiple pages, and a table or form is generated on each page) is generated in the lower right area of the form.
[0278] As shown in Figure 6 , this step includes the following sub-steps:
[0279] (10-1) The PLM business form obtained in step (4) is parsed to obtain the parameter isShowTab (which is a parameter indicating whether to display the tab in the lower right) of the business form, and it is determined whether the parameter isShowTab is true (True). If the isShowTab value is true, an empty tab control is initialized in the lower right area of the business form, and step (10-2) is entered. Otherwise, the process ends.
[0280] (10-2) The parameters parentCode and parentOid are initialized to empty, and it is determined whether the upper right area of the PLM business form obtained in step (4) is a table form control. If so, the row data input by the user on the control is obtained, the business object code of the row data is assigned to parentCode, and the unique identifier of the row data is assigned to parentOid. Then step (10-3) is entered. Otherwise, the tree node obtained in step (6) is parsed to obtain the business object code and unique identifier of the tree node. The business object code of the tree node is assigned to the parameter parentCode, and the unique identifier of the tree node is assigned to the parameter parentOid. Then step (10-3) is entered.
[0281] (10-3) In the business relationship table t_business_link established in step (2-5), the encapsulated SQL query statement is used to query the business relationship object set childrenList whose parent object code is equal to the parameter parentCode.
[0282] (10-4) The parameters pageCode and pageLinkCode are initialized to empty.
[0283] (10-5) Set the counter m = 0.
[0284] (10-6) Get the mth object childrenList[m] in the service relation object set childrenList obtained in step (10-3), set the parameter pageCode obtained in step (10-2) as the child object code of the mth object childrenList[m], and set the parameter pageLinkCode as the relation object code of the mth object childrenList[m];
[0285] (10-7) In the structure relation table t_business_view_link of the page established in step (2-7), use the encapsulated SQL query statement to query the structure relation of the page with the parent object code equal to the parameter parentCode and the child object code equal to the parameter pageCode;
[0286] (10-8) Determine whether the page structure relation obtained in step (10-7) contains the associated tab node_tab (the child business object instance data is displayed in the form of a tab page, and the child association is under the parent), if yes, go to step (10-9), otherwise go to step (10-17);
[0287] (10-9) Initialize the parameter TabView, and assign the control form (Grid or Form) of the associated tab node_tab obtained in step (10-8) to the parameter TabView;
[0288] (10-10) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table structure of the table name t_data_b with the business object code equal to the parameter pageCode, and obtain the corresponding entity data table according to the table name t_data_b;
[0289] (10-11) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table structure of the table name t_data_link with the business object code equal to the parameter pageLinkCode, and obtain the corresponding entity data table according to the table name t_data_link;
[0290] (10-12) In the entity data table obtained in step (10-11), use the encapsulated SQL query statement to query the child object ID set childrenIdList with the parent object code equal to the parameter parentCode, the parent object ID equal to the parameter parentOid, and the child object code equal to the parameter pageCode;
[0291] (10-13) In the entity data table named t_data_b obtained in step (10-10), encapsulated SQL query statements are used to query instance data childrenObjList whose IDs belong to the sub-object ID set childrenIdList obtained in step (10-12);
[0292] (10-14) In the display page table t_businsee_view established in step (2-6), encapsulated SQL query statements are used to query the display mode of instance data whose business object code is equal to the parameter pageCode and whose control form is equal to the parameter TabView (value: Grid or Form);
[0293] (10-15) According to the instance data obtained in step (10-13) and the display mode obtained in step (10-14), a tab page whose control form is equal to the parameter TabView is generated;
[0294] (10-16) The tab page obtained in step (10-15) is added to a tab control;
[0295] (10-17) m is set to m=m+1;
[0296] (10-18) It is judged whether m is less than the size of the sub-object set childrenList, if yes, step (10-6) is returned, otherwise the process is ended;
[0297] The advantage of the present step is that data of different business themes can be displayed in the tab area, and which themes are displayed and in what way (data table, form) are all based on the data model configured in step (2), when the business requirement changes, the code does not need to be updated, only the corresponding data model needs to be adjusted, and the form and content of the area can be adjusted synchronously.
[0298] Those skilled in the art can easily understand that the above description is only the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for generating PLM business forms through data modeling, characterized in that, Includes the following steps: (1) Obtain the business design scheme of the PLM system, and obtain the table structure, table relationship, form appearance design requirements, and form function requirements in the business design scheme; (2) Generate the data model of the PLM system based on the business design scheme of the PLM system obtained in step (1); (3) Generate multiple PLM business form configuration items and their corresponding navigation menu configuration items based on the business design scheme of the PLM system obtained in step (1); step (3) includes the following sub-steps: (3-1) Construct a third array object set form based on the business design scheme obtained in step (1). Use PowerDesigner to convert the form appearance design requirements and form function requirements in the business design scheme obtained in step (1) into objects, and add the objects to the third array object set form to obtain the updated third array object set. (3-2) Use the software development tool Visual Studio Code to create two form templates form_mode_a and form_mode_b, and configure parameters for each form template. These parameters include: name, root code, unique identifier of root data, and isShowTab parameter to show the tab in the lower right corner. (3-3) Use the visual table creation tool in the PLM system to create the form configuration table t_plm_form and the navigation menu table t_plm_menu of the PLM system; (3-4) Set the counter k=0; (3-5) Based on the form appearance design requirements and form function requirements of the form[k] of the kth object in the third array of objects updated in step (3-1), select a form template from the form templates obtained in step (3-2) as the form template of the kth object form[k]. (3-6) Based on the form template of the k-th object form[k] selected in step (3-5), the parameter items configured for the form template in step (3-2), and the form appearance design requirements and form function requirements corresponding to the object form[k], define the form generation function newform_mode_a or newform_mode_b corresponding to the form template; (3-7) Use the PLM import tool to import the form generation function corresponding to the k-th object form[k] obtained in step (3-6) into the form configuration table t_plm_form obtained in step (3-3) to generate a PLM business form configuration item, which is t_plm_form data, including the values of the fields such as the unique identifier formId of the PLM business form obtained in step (3-3), form name, form parameters, and form generation function, and make the Snowflake algorithm generate the corresponding ID value formId for the PLM business form configuration item; (3-8) Set the navigation menu name for the k-th object form[k] in the third array of objects updated in step (3-1); (3-9) Based on the navigation menu name obtained in step (3-8), use the built-in function of the PLM system to generate a navigation menu configuration item in the navigation menu table t_plm_menu obtained in step (3-3), and use the snowflake algorithm to generate the corresponding ID value menuId for the navigation menu configuration item; (3-10) Set k=k+1; (3-11) Determine if k is less than the total number of objects in the array object collection form. If yes, return to step (3-5); otherwise, the process ends. (4) Start and load the PLM system, and generate the PLM business form according to the multiple PLM business form configuration items and their corresponding navigation menu configuration items generated in step (3); (5) Generate tree-shaped controls in the left area of the business window of the PLM system obtained in step (4); (6) Obtain the tree nodes input by the user from the tree-shaped control obtained in step (5); (7) Parse the PLM business form obtained in step (4); obtain its corresponding form template, and determine whether the form template is form_mode_a or form_mode_b. If the form template is form_mode_a, proceed to step (8); if the form template is form_mode_b, proceed to step (9). (8) Based on the tree nodes obtained in step (6), generate a table-style control in the upper right area of the PLM business form obtained in step (4); (9) Based on the PLM business form obtained in step (4) and the tree node obtained in step (6), generate a form-type control in the upper right area of the PLM business form obtained in step (4); (10) Based on the PLM business form obtained in step (4), generate a tab control in the lower right area of the form.
2. The method for generating PLM business forms through data modeling according to claim 1, characterized in that, Step (2) includes the following sub-steps: (2-1) Construct the first array object set business according to the business design scheme obtained in step (1), and use the PowerDesigner tool to convert the table structure in the business design scheme obtained in step (1) into the first object. The first object includes the object code, the table name of the table structure corresponding to the object, the fields of the table, etc., and add the first object to the first array object set business to obtain the updated first array object set. (2-2) Construct a second array object collection viewGroup based on the business design scheme obtained in step (1). Use PowerDesigner tool to convert the table relationship in the business design scheme obtained in step (1) into a second object. The second object includes the relationship object code, the table name of the relationship table corresponding to the relationship object, the object code of the parent table corresponding to the table relationship, and the object code of the child table corresponding to the table relationship. Add the second object to the second array object collection viewGroup to obtain the updated second array object collection. (2-3) Use the PLM system's visual table creation tool to create a business object table t_business, which has multiple attributes, including the business object code, table name of the table structure, etc. (2-4) Use the PLM system's visual table creation tool to create a business attribute table t_property, which has multiple attributes, including the code of the business object to which it belongs, the attribute name, the data type of the attribute, and the default value of the attribute, etc. (2-5) Use the PLM system's visual table creation tool to create a business relationship table t_business_link, which has multiple attributes, including parent object code, child object code, and association relationship; (2-6) Use the PLM system's visual table creation tool to create the business object display page table t_businsee_view, including: (a) The code of the associated business object; (b) When instance data is displayed in a table, the business attributes displayed in the table, the controls configured in the table columns, the operation buttons configured on the table, and the pagination of the table data; (c) When instance data is displayed as a form, the business attributes displayed in the form, the display controls for the business attributes, and the operation buttons configured on the form; (d) When instance data is displayed in a tree structure, the business attributes displayed in the tree nodes and the right-click menu configured in the tree nodes; (2-7) Use the PLM system's visual table creation tool to create the page structure relationship table t_business_view_link, which is used to express three ways of combining parent and child pages, including: (a) Sub-business object instance data is displayed in the form of a node_tab related tab, with sub-related tabs below the parent; (b) The parent business object instance data is displayed as nodes in a tree control, and the child business object instance data is displayed as a table control; (c) Both parent and child business object instance data are displayed in the form of tree control nodes; (2-8) Set counter i=0; (2-9) Using the import tool of the PLM system, import the object code of the i-th object business[i] in the updated first array of objects obtained in step (2-1) and the table name of the table structure corresponding to the object into the business object table t_business established in step (2-3), and import the fields of the table of the i-th object business[i] in the updated first array of objects into the business attribute table t_property established in step (2-4) to generate data items of the business object table t_business and the business attribute table t_property respectively; (2-10) Generate and update the entity data table t_data[i] related to the i-th object business[i] in the first array of objects. The table name of the entity data table t_data[i] is the table name of the table structure corresponding to the object imported in step (2-9). The entries in the entity data table t_data[i] are the fields of the table of the i-th object business[i] imported in step (2-9). (2-11) Use the visual configuration tool of the PLM system to configure the display method of the instance data of the business object business[i] in the updated first array of objects obtained in step (2-1) to obtain the page display configuration of the object business[i]. (2-12) Import the page display configuration of the object business[i] obtained in step (2-10) into the business object display page table t_businsee_view established in step (2-6) to generate data items of the business object display page table t_businsee_view; (2-13) Set i = i + 1; (2-14) Determine if i is less than the total number of objects in the updated first array object set business. If yes, return to step (2-9); otherwise, proceed to step (2-15). (2-15) Set counter j=0; (2-16) Use the PLM import tool to import the business table relationship in the j-th object viewGroup[j] in the second array object set obtained in step (2-2) into the business relationship table t_business_link established in step (2-5) to generate the data items of the business relationship table t_business_link; (2-17) Generate and update the entity data table t_data_link[j] related to the j-th object viewGroup[j] in the second array object collection. The table name of the entity data table t_data_link[j] is the table name of the table structure corresponding to the object imported in step (2-16). The fields in the table t_data_link[i] include the parent object code, child object code, parent object ID, and child object ID. (2-18) Use the visual configuration tool of the PLM system to establish the corresponding page structure relationship configuration for the j-th object viewGroup[j] in the updated first array of objects obtained in step (2-2); (2-19) Import the page structure relationship configuration of the j-th object viewGroup[j] obtained in step (2-18) into the structure relationship table t_business_view_link established in step (2-5) to generate the data items of the structure relationship table t_business_view_link; (2-20) Set j = j + 1; (2-21) Determine if j is less than the total number of objects in the second array object collection viewGroup after step (2-2). If so, return to step (2-16); otherwise, proceed to step (2-22). (2-22) Based on the data items of the business object table t_business and the business attribute table t_property generated in step (2-9), the data items of the object display page table t_businesssee_view generated in step (2-12), the data items of the business relationship table t_business_link generated in step (2-16), the data items of the structural relationship table t_business_view_link generated in step (2-19), the entity data table t_data[i] generated in step (2-10), and the entity data table t_data_link generated in step (2-17), construct the data model of the PLM system.
3. The method for generating PLM business forms through data modeling according to claim 2, characterized in that, The form configuration table t_plm_form includes fields such as the unique identifier formId of the PLM business form, form template, form name, form parameters, and form generation function. Each data entry in the t_plm_form table represents a configuration item for a PLM business form. The navigation menu table t_plm_menu includes fields such as the unique identifier menuId of the menu, menu name, and the unique identifier formId of the PLM business form corresponding to the menu. Each data entry in the t_plm_menu table represents a navigation menu configuration item. The process of generating the form generation function newform_mode_a corresponding to the form template in step (3-6) is as follows: First, according to the form appearance design requirements corresponding to object form[k], the parameter isShowTab of the tab in the lower right corner of the form template obtained in step (3-3) is assigned the value true or false; then, according to the form function requirements corresponding to object form[k], the root business object code rootCode and the unique identifier rootID of the root business data in the parameter items of the form template obtained in step (3-3) are assigned the values: the root business object code rootCode is the object code of the i-th object business[i] imported in step (2-9), and the unique identifier rootID of the root business data is the ID of the entity data table t_data[i]; then, the form corresponding to form[k] is named, and the name is assigned according to the name in the parameter item of the form template; Next, define the parameter businessForm; finally, define the form generation function: businessForm=newform_mode_a(name,rootCode,rootID,isShowTab).
4. The method for generating PLM business forms through data modeling according to claim 3, characterized in that, Step (4) includes the following sub-steps: (4-1) Obtain the navigation menu item input by the user and parse the navigation menu item to obtain its unique identifier menuId; (4-2) Based on the unique identifier menuId obtained in step (4-1) and using the encapsulated SQL query statement, query the unique identifier formId of the PLM business form corresponding to the navigation menu item obtained in step (4-1) in the navigation menu t_plm_menu obtained in step (3-3); (4-3) Based on the unique identifier formId of the PLM business form obtained in step (4-2) and using the encapsulated SQL query statement, query the configuration information of the PLM business form corresponding to the navigation menu item obtained in step (4-1) in the form configuration table t_plm_form established in step (3-3), including the form template, form name, form parameters, and form generation function; (4-4) Based on the form template in the form configuration information obtained in step (4-3) and using the form generation function in the form configuration information obtained in step (4-4), generate the PLM business form corresponding to the navigation menu item obtained in step (4-1). The appearance of the PLM business form is consistent with the form template it depends on. (4-5) Import the form parameters from the form configuration information obtained in step (4-3) into the PLM business form obtained in step (4-4) to obtain the PLM business form.
5. The method for generating PLM business forms through data modeling according to claim 4, characterized in that, Step (5) includes the following sub-steps: (5-1) Import the root business object code rootCode and the unique identifier rootID of the root business data from the configuration information of the PLM business form obtained in step (4-3) into the tree control area on the left side of the business form obtained in step (4). (5-2) Initialize the parameters parentCode and parentOid. Assign the root code of the root business object imported in step (5-1) to the parameter parentCode, and assign the unique identifier of the root business data imported in step (5-1) to the parameter parentOid. (5-3) In the business object display page table t_businsee_view established in step (2-6), use the encapsulated SQL query statement to query how the instance data of the business object whose business object code is equal to the parameter parentCode is displayed in the tree structure; (5-4) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_a of the table structure whose business object code is equal to the parameter parentCode obtained in step (5-2), and obtain the entity data table corresponding to the table name t_data_a; (5-5) In the entity data table obtained in step (5-4), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter parentOid obtained in step (5-2); (5-6) Based on the instance data obtained in step (5-5) and the display method of the instance data obtained in step (5-3) in the tree structure, use the form drawing function to generate the parent node of the tree control area on the left side of the business form. (5-7) Initialize the parameters childCode, linkCode, and t_data_b and t_data_link to be empty; (5-8) In the business relationship table t_business_link established in step (2-5), use the encapsulated SQL query statement to query the collection of business relationship objects childrenList whose parent object code is equal to the parameter parentCode obtained in step (5-2); (5-9) Determine if the size of the childrenList, the collection of business relationship objects obtained in step (5-8), is greater than 0. If it is, proceed to step (5-10); otherwise, the process ends. (5-10) Set the counter m=0; (5-11) Obtain the m-th object childrenList[m] from the childrenList collection of business relationship objects obtained in step (5-8), set the childCode parameter obtained in step (5-7) as the child object code of the m-th object childrenList[m], and set the linkCode parameter as the relationship object code of the m-th object childrenList[m]. (5-12) In the page structure relationship table t_business_view_link established in step (2-7), use the encapsulated SQL query statement to query the page structure relationship where the parent object code is equal to the parameter parentCode obtained in step (5-2) and the child object code is equal to the parameter childCode obtained in step (5-7); (5-13) Determine whether the structural relationship of the page obtained in (5-12) contains the relationship node_node. If it does, proceed to step (5-14); otherwise, proceed to step (5-23). (5-14) In the business object display page table t_businsee_view established in step (2-6), use the encapsulated SQL query statement to query the display method of instance data whose business object code is equal to the parameter childCode obtained in step (5-7) in the tree structure; (5-15) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_b of the table structure whose business object code is equal to the parameter childCode, and obtain the corresponding entity data table based on the table name t_data_b; (5-16) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_link of the table structure whose business object code is equal to the parameter linkCode obtained in step (5-7), and obtain the entity data table corresponding to the table name t_data_link; (5-17) In the entity data table obtained in step (5-16), use the encapsulated SQL query statement to query the data collection of relational object instances whose parent object code is equal to the parameter parentCode and whose parent object ID is equal to the parameter parentOid, childrenObjList; (5-18) Set parameter n=0; (5-19) Obtain the nth object childrenObjList[n] in the data set of relational object instances obtained in step (5-17), and set the value of the parameter childrenObjId to be equal to the child object ID value of the object childrenObjList[n]. (5-20) In the entity data table obtained in step (5-15), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter childrenObjId; (5-21) Based on the instance data obtained in step (5-20) and the instance data obtained in step (5-14) in the tree structure display mode, use the form drawing function to generate the child node childNode of the tree control area, and attach the child node childNode below the parent node parentNode obtained in step (5-6), thereby forming the parent-child hierarchical relationship between parentNode and childNode; (5-22) Set parentCode=childCode, parentNode=childNode, parentOid=childId, and return to step (5-8); (5-23) Set n = n + 1; (5-24) Determine whether n is less than the size of the childrenObjList data collection of relational object instances. If yes, return to step (5-19); otherwise, proceed to step (5-25). (5-25) Set m = m + 1; (5-26) Determine whether m is less than the size of the business relationship object collection childrenList. If so, return to step (5-11); otherwise, proceed to step (5-27).
6. The method for generating PLM business forms through data modeling according to claim 5, characterized in that, Step (8) includes the following sub-steps: (8-1) Initialize the parameters nodeCode and nodeOid to be empty, parse the tree node obtained in step (6) to obtain the business object code and business data unique identifier of the tree node, assign the business object code to the parameter nodeCode, and assign the business data unique identifier to the parameter nodeOid; (8-2) In the page structure relationship table t_business_view_link established in step (2-7), use the encapsulated SQL query statement to query the page structure relationship where the parent object code is equal to the parameter nodeCode and the page combination method is equal to the parameter node_grid; (8-3) Initialize the parameters gridCode and linGridCode to empty, assign the sub-object codes of the page structure relationship obtained in step (8-2) to the parameter gridCode, and assign the relation object codes of the page structure relationship to the parameter linGridCode; (8-4) In the display page table t_businsee_view created in step (2-6), use the encapsulated SQL query statement to query how the instance data whose business object code is equal to the parameter gridCode is displayed in the table control; (8-5) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_b of the table structure whose business object code is equal to the parameter gridCode, and obtain the corresponding entity data table based on the table name t_data_b; (8-6) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_link of the table structure whose business object code is equal to the parameter linGridCode, and obtain the corresponding entity data table based on the table name t_data_link; (8-7) In the entity data table obtained in step (8-6), use the encapsulated SQL query statement to query the child object ID set childrenIdList where the parent object code is equal to the parameter nodeCode, the parent object ID is equal to the parameter nodeOid, and the child object code is equal to the parameter gridCode; (8-8) In the entity data table obtained in step (8-5), use the encapsulated SQL query statement to query the instance data childrenObjList whose ID belongs to the child object ID set childrenIdList obtained in step (8-7); (8-9) Based on the instance data obtained in step (8-8) and the display method obtained in step (8-4), generate a table-shaped control in the upper right area of the business window of the PLM system obtained in step (4).
7. The method for generating PLM business forms through data modeling according to claim 6, characterized in that, Step (9) includes the following sub-steps: (9-1) Initialize the parameters nodeCode and nodeOid to be empty, parse the tree node obtained in step (6) to obtain the business object code and business data unique identifier of the tree node, assign the business object code to nodeCode, and assign the business data unique identifier to nodeOid; (9-2) In the display page table t_businsee_view established in step (2-6), use the encapsulated SQL query statement to query how the instance data whose business object code is equal to the parameter nodeCode is displayed in the form control; (9-3) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_a of the table structure whose business object code is equal to the parameter nodeCode, and obtain the corresponding entity data table based on the table name t_data_a; (9-4) In the entity data table obtained in step (9-3), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter nodeOid; (9-5) Based on the instance data in step (9-4) and the display method obtained in step (9-2), generate a form-type control in the upper right area of the current PLM business form.
8. The method for generating PLM business forms through data modeling according to claim 7, characterized in that, Step (10) includes the following sub-steps: (10-1) Parse the PLM business form obtained in step (4) to obtain the parameter isShowTab of the business form, and determine whether the parameter isShowTab is true. If the value of isisShowTab is true, initialize an empty tab control in the lower right area of the business form and proceed to step (10-2); otherwise, the process ends. (10-2) Initialize the parameters parentCode and parentOid to be empty, and determine whether the upper right area of the PLM business form obtained in step (4) is a table-type control. If it is, obtain the row data entered by the user on the control, assign the business object code of the row data to parentCode, and assign the unique identifier of the row data to parentOid, and then proceed to step (10-3). Otherwise, parse the tree node obtained in step (6) to obtain the business object code and unique identifier of the tree node, assign the business object code of the tree node to the parameter parentCode, and assign the unique identifier of the tree node to the parameter parentOid, and then proceed to step (10-3). (10-3) In the business relationship table t_business_link established in step (2-5), use the encapsulated SQL query statement to query the collection of business relationship objects childrenList whose parent object code is equal to the parameter parentCode; (10-4) Initialize the parameters pageCode and pageLinkCode to be empty; (10-5) Set the counter m=0; (10-6) Obtain the m-th object childrenList[m] from the childrenList collection of business relationship objects obtained in step (10-3), set the pageCode parameter obtained in step (10-2) to the child object code of the m-th object childrenList[m], and set the pageLinkCode parameter to the relationship object code of the m-th object childrenList[m]. (10-7) In the page structure relationship table t_business_view_link established in step (2-7), use the encapsulated SQL query statement to query the structure relationship of pages whose parent object code is equal to the parameter parentCode and whose child object code is equal to the parameter pageCode; (10-8) Determine whether the page structure relationship obtained in (10-7) includes the associated tab node_tab. If it does, proceed to step (10-9); otherwise, proceed to step (10-17). (10-9) Initialize the parameter TabView by assigning the control form of the associated tab node_tab obtained in step (10-8) to the parameter TabView; (10-10) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_b of the table structure whose business object code is equal to the parameter pageCode, and obtain the corresponding entity data table based on the table name t_data_b; (10-11) In the business object table t_business established in step (2-3), use the encapsulated SQL query statement to query the table name t_data_link of the table structure whose business object code is equal to the parameter pageLinkCode, and obtain the corresponding entity data table based on the table name t_data_link; (10-12) In the entity data table obtained in step (10-11), use the encapsulated SQL query statement to query the child object ID set childrenIdList where the parent object code is equal to the parameter parentCode, the parent object ID is equal to the parameter parentOid, and the child object code is equal to the parameter pageCode; (10-13) In the entity data table named t_data_b obtained in step (10-10), use the encapsulated SQL query statement to query the instance data childrenObjList whose ID belongs to the child object ID set childrenIdList obtained in step (10-12); (10-14) In the display page table t_businsee_view established in step (2-6), use the encapsulated SQL query statement to query the display method of instance data whose business object code is equal to the parameter pageCode and whose control form is equal to the parameter TabView; (10-15) Based on the instance data obtained in step (10-13) and the display method obtained in step (10-14), generate a tab page with a control form equal to the parameter TabView; (10-16) Add the tab page obtained in step (10-15) to the tab control; (10-17) Set m = m + 1; (10-18) Determine if m is less than the size of the child object collection childrenList. If it is, return to step (10-6); otherwise, the process ends.
9. A system for generating PLM business forms through data modeling, implemented based on the method for generating PLM business forms through data modeling as described in claim 1, characterized in that, The system includes: The first module is used to obtain the business design scheme of the PLM system, and to obtain the table structure, table relationships, form appearance design requirements, and form function requirements in the business design scheme. The second module is used to generate the data model of the PLM system based on the business design scheme of the PLM system obtained from the first module. The third module is used to generate multiple PLM business form configuration items and their corresponding navigation menu configuration items based on the business design scheme of the PLM system obtained from the first module. The fourth module is used to start and load the PLM system, and generate PLM business forms based on the multiple PLM business form configuration items and their corresponding navigation menu configuration items generated by the third module. The fifth module is used to generate tree-shaped controls in the left area of the business form of the PLM system obtained in the fourth module; The sixth module is used to obtain the tree nodes input by the user from the tree-shaped control obtained from the fifth module; The seventh module is used to parse the PLM business form obtained from the fourth module; obtain its corresponding form template, and determine whether the form template is form_mode_a or form_mode_b. If the form template is form_mode_a, then proceed to the eighth module; if the form template is form_mode_b, then proceed to the ninth module. The eighth module is used to generate a table-style control in the upper right area of the PLM business form obtained in the fourth module, based on the tree nodes obtained in the sixth module. The ninth module is used to generate form-type controls in the upper right area of the PLM business form obtained from the fourth module, based on the PLM business form obtained from the fourth module and the tree nodes obtained from the sixth module. The tenth module is used to generate tab-style controls in the lower right area of the PLM business form obtained from the fourth module.
Citation Information
Patent Citations
Front end interface control implementation method based on component development
CN106293777A
System integration method and system based on intermediate data pool and visual self-definition
CN117435678A