Method and system for generating 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, and form generation and logic processing are achieved quickly and flexibly, which is suitable for multiple PLM system application scenarios.
Patent Information
- Application Number
- CN202510991455.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-07-18
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 form configuration items and navigation menu configuration items, and generating tree, table, form and tab control in different areas, and configuring them using the PLM system's visual table creation and import tools.
It shortens the development cycle, reduces costs, improves adaptability, can handle complex forms and logic, has a wide range of applications, and meets different business needs.
Smart Images

Figure CN120950064A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of design and development technology of Product Lifecycle Management (PLM) systems, and more specifically, relates to a method and system for generating PLM business forms through data modeling. Background Technology
[0002] PLM (Product Lifecycle Management) is an information management software used to manage the entire lifecycle of a product, from concept design, R&D, manufacturing, sales to withdrawal from the market. PLM systems are widely used in industries such as automobile manufacturing, complete equipment, shipbuilding and marine, and high-tech electronics. The PLM business form carries the application scenarios of the PLM system in different fields, realizing functions such as data entry and management, information integration and sharing, and collaborative R&D and production. It is the core module of the PLM system.
[0003] There are two existing methods for generating PLM business forms: The first is the deep customization method, which designs the appearance, business functions, and backend data structure of PLM business forms based on the unique business needs, data structures, or industry standards (such as financial risk control, complete sets of equipment, and shipbuilding and marine) of specific PLM customers, generating customized PLM business forms for customers; The second is the low-code generation method, which relies on a low-code development platform and uses a graphical interface to design the interface layout by dragging and dropping field components to generate PLM business forms.
[0004] However, both of the above generation methods have some drawbacks that cannot be ignored:
[0005] First, the deep customization method requires developing a separate PLM business form for each customer based on their business needs. This method has disadvantages such as being time-consuming, costly, and having poor adaptability. When the user's business needs change, the form needs to be redeveloped to meet the new business needs.
[0006] Second, low-code generation can be flexibly adjusted and iterated quickly according to changes in business needs, but it cannot handle complex forms and logic. Summary of the Invention
[0007] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a method and system for generating PLM business forms through data modeling. The purpose is to solve the technical problems of long time consumption, high cost and poor adaptability of the existing deep customization method, as well as the technical problem of needing to redevelop for new business needs when users’ business needs change, and the technical problem that the existing low code generation method cannot handle complex forms and logic.
[0008] To achieve the above objectives, according to one aspect of the present invention, a method for generating PLM business forms through data modeling is provided, comprising the following steps:
[0009] (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;
[0010] (2) Generate the data model of the PLM system based on the business design scheme of the PLM system obtained in step (1);
[0011] (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);
[0012] (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);
[0013] (5) Generate tree-shaped controls in the left area of the business window of the PLM system obtained in step (4);
[0014] (6) Obtain the tree nodes input by the user from the tree-shaped control obtained in step (5);
[0015] (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).
[0016] (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);
[0017] (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);
[0018] (10) Based on the PLM business form obtained in step (4), generate a tab control in the lower right area of the form.
[0019] Preferably, step (2) includes the following sub-steps:
[0020] (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.
[0021] (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.
[0022] (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.
[0023] (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.
[0024] (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, association relationship, etc.
[0025] (2-6) Use the PLM system's visual table creation tool to create the business object display page table t_businsee_view, including:
[0026] (a) The code of the associated business object;
[0027] (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;
[0028] (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;
[0029] (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;
[0030] (2-7) Use the PLM system's visual table creation tool to establish the page structure relationship table t_business_view_link, which is used to express three ways of combining parent and child pages, including:
[0031] (a) Sub-business object instance data is displayed in the form of an association tab (node_tab), with sub-associations below the parent;
[0032] (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;
[0033] (c) Both parent and child business object instance data are displayed in the form of tree control nodes;
[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 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;
[0036] (2-10) Generate an entity data table t_data[i] related to the i-th object business[i] in the updated 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).
[0037] (2-11) Use the PLM system's visual configuration tool to configure the display method of the instance data of the business object in the i-th object business[i] of the updated first array of objects obtained in step (2-1).
[0038] To obtain the page display configuration of object business[i];
[0039] (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;
[0040] (2-13) Set i = i + 1;
[0041] (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).
[0042] (2-15) Set counter j = 0;
[0043] (2-16) Use the PLM import tool to import the business table relationship in the j-th object viewGroup[j] of 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;
[0044] (2-17) Generate an entity data table t_data_link[j] related to the j-th object viewGroup[j] in the updated 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 parent object code, child object code, parent object ID, and child object ID.
[0045] (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);
[0046] (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;
[0047] (2-20) Set j = j + 1;
[0048] (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 yes, return to step (2-16); otherwise, proceed to step (2-22).
[0049] (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.
[0050] Preferably, step (3) includes the following sub-steps:
[0051] (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.
[0052] (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 business data, and isShowTab parameter to show the tab in the lower right corner.
[0053] (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;
[0054] (3-4) Set the counter k = 0;
[0055] (3-5) Based on the form appearance design requirements and form function requirements corresponding to 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].
[0056] (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;
[0057] (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;
[0058] (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);
[0059] (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). (It is a t_plm_menu data, which includes the values of the menu unique identifier menuId, menu name, and the PLM business form unique identifier formId corresponding to the menu obtained in step (3-3). Then, use the Snowflake algorithm to generate the corresponding ID value menuId for the navigation menu configuration item.
[0060] (3-10) Set k = k + 1;
[0061] (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.
[0062] Preferably, 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 is 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 is a navigation menu configuration item.
[0063] 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 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; then, the parameter businessForm is defined; finally, the form generation function is defined:
[0064] businessForm=newform_mode_a(name,rootCode,rootID,isShowTab).
[0065] Preferably, step (4) includes the following sub-steps:
[0066] (4-1) Obtain the navigation menu item input by the user and parse the navigation menu item to obtain its unique identifier menuId;
[0067] (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);
[0068] (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;
[0069] (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.
[0070] (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.
[0071] Preferably, step (5) includes the following sub-steps:
[0072] (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).
[0073] (5-2) Initialize parameters parentCode and parentOid. Assign the root business object code rootCode imported in step (5-1) to parameter parentCode, and assign the unique identifier rootID of the root business data imported in step (5-1) to parameter parentOid.
[0074] (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 the display method of the instance data of the business object whose business object code is equal to the parameter parentCode in the tree structure;
[0075] (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;
[0076] (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);
[0077] (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.
[0078] (5-7) Initialize the parameters childCode, linkCode, and t_data_b and t_data_link to be empty;
[0079] (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);
[0080] (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.
[0081] (5-10) Set the counter m = 0;
[0082] (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) to the child object code of the m-th object childrenList[m], and set the linkCode parameter to the relationship object code of the m-th object childrenList[m].
[0083] (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);
[0084] (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).
[0085] (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;
[0086] (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;
[0087] (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;
[0088] (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 childrenObjList whose parent object code is equal to the parameter parentCode and whose parent object ID is equal to the parameter parentOid;
[0089] (5-18) Set parameter n = 0;
[0090] (5-19) Obtain the nth object childObjList[n] in the data set of relational object instances obtained in step (5-17), and set the value of the parameter childObjId to be equal to the child object ID value of the object childObjList[n].
[0091] (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;
[0092] (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 a parent-child hierarchical relationship between parentNode and childNode;
[0093] (5-22) Set parentCode = childCode, parentNode = childNode, parentOid = childId, and return to step (5-8);
[0094] (5-23) Set n = n + 1;
[0095] (5-24) Determine if 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).
[0096] (5-25) Set m = m + 1;
[0097] (5-26) Determine if 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).
[0098] Preferably, step (8) includes the following sub-steps:
[0099] (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;
[0100] (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;
[0101] (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;
[0102] (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;
[0103] (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;
[0104] (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;
[0105] (8-7) In the entity data table obtained in step (8-6), use the encapsulated SQL query statement to query the child object ID collection 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;
[0106] (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);
[0107] (8-9) Based on the instance data obtained in step (8-8) and the display method obtained in step (8-4), generate a table-style control in the upper right area of the business window of the PLM system obtained in step (4).
[0108] Preferably, step (9) includes the following sub-steps:
[0109] (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;
[0110] (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 method of instance data whose business object code is equal to the parameter nodeCode in the form control;
[0111] (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;
[0112] (9-4) In the entity data table obtained in step (8-3), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter nodeOid;
[0113] (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.
[0114] Preferably, step (10) includes the following sub-steps:
[0115] (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).
[0116] Otherwise, the process ends;
[0117] (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).
[0118] (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;
[0119] (10-4) Initialize the parameters pageCode and pageLinkCode to be empty;
[0120] (10-5) Set the counter m = 0;
[0121] (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].
[0122] (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;
[0123] (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).
[0124] (10-9) Initialize the TabView parameter by assigning the control form of the associated tab node_tab obtained in step (10-8) to the TabView parameter;
[0125] (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.
[0126] (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;
[0127] (10-12) In the entity data table obtained in step (10-11), use the encapsulated SQL query statement to query the child object ID collection 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;
[0128] (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);
[0129] (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;
[0130] (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;
[0131] (10-16) Add the tab page obtained in step (10-15) to the tab control;
[0132] (10-17) Set m = m + 1;
[0133] (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.
[0134] According to another aspect of the present invention, a system for generating PLM business forms through data modeling is provided, comprising:
[0135] 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.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] 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;
[0140] The sixth module is used to obtain the tree nodes input by the user from the tree-shaped control obtained from the fifth module;
[0141] 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.
[0142] 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.
[0143] 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.
[0144] 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.
[0145] In summary, compared with the prior art, the above-described technology conceived in this invention can achieve the following beneficial results:
[0146] (1) By adopting steps (1) to (3) of the present invention, the business design scheme of the PLM system is applied to the PLM system, thereby dynamically generating the data model of the PLM system and the configuration items of the PLM business form and its corresponding navigation menu configuration items, which shortens the development cycle of the PLM business form, reduces the development cost, and improves the adaptability of the PLM business form.
[0147] (2) This solution uses steps (5) to (10) to generate detailed window structures in different areas under the overall framework of PLM business window, thus overcoming the technical problem that the existing low code generation method cannot handle complex windows and logic.
[0148] (3) By adopting steps (3) to (4), the present invention generates PLM business forms that meet different business needs through the established window layout and a unified window generation method.
[0149] (4) The present invention adopts steps (2) to (3); through configuration, the system design scheme is directly input into the PLM system, so that the PLM system has good adaptability and scalability.
[0150] (5) This invention has a wide range of applications. Based on the window layout, it dynamically generates and loads the business windows of the PLM system by reading the design scheme input in a configurable manner. It can be applied to many aspects of PLM system business and has a wide range of applications. Attached Figure Description
[0151] Figure 1 This is an overall flowchart of the method for generating PLM business forms through data modeling according to the present invention;
[0152] Figure 2 This is a detailed flowchart of step (2) in the method of the present invention;
[0153] Figure 3This is a schematic diagram of the form layout form_mode_a generated by the present invention;
[0154] Figure 4 This is a schematic diagram of the form_mode_b generated by the present invention;
[0155] Figure 5 This is a detailed flowchart of step (5) in the method of the present invention;
[0156] Figure 6 This is a detailed flowchart of step (10) in the method of the present invention. Detailed Implementation
[0157] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0158] The basic idea of this invention 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 configuration items of the PLM business form and their corresponding navigation menu configuration items; obtain the navigation menu items input by the user, and query the unique identifier formId of the PLM business form corresponding to the menu based on the unique identifier menuId, query the configuration items of the PLM business form based on formId, generate the PLM business form based on the obtained configuration items, and query the imported data model based on the parameters of the PLM business form to generate the details of each area of the PLM business form.
[0159] like Figure 1 As shown, this invention provides a method for generating PLM business forms through data modeling, comprising the following steps:
[0160] (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.
[0161] (2) Generate the data model of the PLM system based on the business design scheme of the PLM system obtained in step (1).
[0162] like Figure 2 As shown, this step includes the following sub-steps:
[0163] (2-1) Construct the first array object set business according to the business design scheme obtained in step (1), 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.
[0164] (2-2) Construct a second array object collection viewGroup based on the business design scheme obtained in step (1), and use the 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), and add the second object to the second array object collection viewGroup to obtain the updated second array object collection;
[0165] (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.
[0166] (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.
[0167] (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 (subordinate / association).
[0168] (2-6) Use the PLM system's visual table creation tool to create the business object display page table t_businsee_view, including:
[0169] (a) The code of the associated business object;
[0170] (b) When instance data is displayed as a grid, the business attributes displayed in the grid, the controls configured in the grid columns, the operation buttons configured on the grid, and the pagination of the grid data;
[0171] (c) When instance data is displayed as a form, the business attributes displayed on the form, the display controls for the business attributes, and the operation buttons configured on the form;
[0172] (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;
[0173] (2-7) Use the PLM system's visual table creation tool to establish the page structure relationship table t_business_view_link, which is used to express three ways of combining parent and child pages, including:
[0174] (a) Sub-business object instance data is displayed in the form of an associated tab node_tab, with the sub-association below the parent. This associated tab has two control forms: Grid (fills the associated tab page in table form) or Form (fills the associated tab page in form form).
[0175] (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. The child is associated with the node_grid below the parent.
[0176] (c) Both parent and child business object instance data are displayed in the form of tree control nodes, with the child node attached to the parent node (node_node);
[0177] (2-8) Set the counter i = 0;
[0178] (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;
[0179] (2-10) Generate an entity data table t_data[i] related to the i-th object business[i] in the updated 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).
[0180] (2-11) Use the PLM system's visual configuration tool to configure the display method of the instance data of the business object in the i-th object business[i] of the updated first array of objects obtained in step (2-1).
[0181] To obtain the page display configuration of object business[i];
[0182] (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;
[0183] (2-13) Set i = i + 1;
[0184] (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).
[0185] (2-15) Set counter j = 0;
[0186] (2-16) Use the PLM import tool to import the business table relationship in the j-th object viewGroup[j] of 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;
[0187] (2-17) Generate an entity data table t_data_link[j] related to the j-th object viewGroup[j] in the updated second array object collection. The table name of t_data_link[j] is the table name of the table structure corresponding to the object imported in step (2-16). The fields in table t_data_link[i] include parent object code, child object code, parent object ID, and child object ID.
[0188] (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);
[0189] (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;
[0190] (2-20) Set j = j + 1;
[0191] (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 yes, return to step (2-16); otherwise, proceed to step (2-22).
[0192] (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.
[0193] Traditionally, business objects, their attributes, and the relationships between them are all built into the program. When business requirements change and the above structure needs to be adjusted, the business personnel first propose the change request, which is then submitted to the architect to adjust the design scheme. The programmers then develop and implement the solution, and it is redeployed after testing.
[0194] The advantage of this step is that the design scheme is used as system input, 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 data models; when the business scheme needs to be changed, only the input design scheme needs to be changed, and the system updates the data model synchronously, without having to modify the PLM system program again.
[0195] (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).
[0196] Specifically, this step involves creating two form layouts to construct, add, and modify forms that carry the business functions of the PLM system in a configuration manner; and to construct, add, and modify the navigation menu of the PLM system in a configuration manner, thereby achieving the purpose of configuring the business functions of the PLM system.
[0197] This step includes the following sub-steps:
[0198] (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.
[0199] (3-2) Use the software development tool Visual Studio Code to create two form templates, form_mode_a and form_mode_b, and configure parameter items for each form template;
[0200] Specifically, all business interfaces of the PLM system are dynamically generated based on these two form templates.
[0201] The layout of the form template form_mode_a is shown in Figure (3): the left side is the tree control area, the upper right side is the table control area, and the lower right side is a set of tab areas, each tab consisting of a table or form;
[0202] The layout of the form template form_mode_b is shown in Figure (4): the left side is the tree control area, the upper right side is the form control area, and the lower right side is a set of tab areas, each tab consisting of a table or form;
[0203] The parameters of the form template include: name, root code of the root business object, unique identifier of the root business data, and isShowTab parameter to indicate whether to display the tab in the lower right corner.
[0204] (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;
[0205] Specifically, 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.
[0206] (3-4) Set the counter k = 0;
[0207] (3-5) Based on the form appearance design requirements and form function requirements corresponding to 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].
[0208] Specifically, the selected form template is form_mode_a (e.g., Figure 3 (as shown) or form_mode_b (as shown) Figure 4 (as shown);
[0209] (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;
[0210] Specifically, the process of generating the form generation function `newform_mode_a` corresponding to the form template in this step is as follows: First, based on the form appearance design requirements (whether to display the tab in the lower right corner) corresponding to object `form[k]`, assign the value `true` or `false` to the parameter `isShowTab` of the lower right tab in the form template obtained in step (3-3); then, based on the form function requirements corresponding to object `form[k]`, assign values to 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): 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]`; subsequently, name the form corresponding to `form[k]`, assigning the value `name` according to the name in the parameter item of the form template; then, define the parameter `businessForm` (the generated PLM business form); finally, define the form generation function:
[0211] businessForm=newform_mode_a(name,rootCode,rootID,isShowTab);
[0212] The process of generating the form template corresponding to the form generation function newform_mode_b is the same as described above, with the only difference being:
[0213] businessForm=newform_mode_b(name,rootCode,rootID,isShowTab);
[0214] (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 a t_plm_form data, including the values of the unique identifier formId, form name, form parameters, form generation function and other fields of the PLM business form obtained in step (3-3), and use the Snowflake algorithm to generate the corresponding ID value formId for the PLM business form configuration item;
[0215] (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);
[0216] (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). (It is a t_plm_menu data, which includes the values of the menu unique identifier menuId, menu name, and the PLM business form unique identifier formId corresponding to the menu obtained in step (3-3). Then, use the Snowflake algorithm to generate the corresponding ID value menuId for the navigation menu configuration item.
[0217] (3-10) Set k = k + 1;
[0218] (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.
[0219] The advantage of this step is that, based on the two form templates established in step (3-2), the numerous business forms of the PLM system can be flexibly configured without the need to develop separate forms for each business; the system functions have good scalability and can construct, add, modify, and remove business functions according to business needs.
[0220] (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).
[0221] Specifically, in this step, the user manually starts the PLM system. The PLM system reads the navigation menu table t_plm_menu and loads the PLM system's navigation menu. The user can then click the button in the navigation menu to open the corresponding business interface according to their business needs.
[0222] This step includes the following sub-steps:
[0223] (4-1) Obtain the navigation menu item input by the user and parse the navigation menu item to obtain its unique identifier menuId;
[0224] (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);
[0225] (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 (including root business object code rootCode and unique identifier rootID of root business data), and form generation function;
[0226] (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.
[0227] Specifically, if the form template is form_mode_a, the form is as shown in Figure (3); if the form template is form_mode_b, the form is as shown in Figure (4).
[0228] (4-5) Import the form parameters (including name, root business object code rootCode, root ID, and isShowTab parameter for whether to display the tab in the lower right corner) 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.
[0229] (5) Generate a tree-shaped control (parent node with child nodes) in the left area of the business window of the PLM system obtained in step (4) (to carry the business content and functions of the PLM system);
[0230] like Figure 5 As shown, this step includes the following sub-steps:
[0231] (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) (e.g., Figure 3 and Figure 4 In the diagram (as shown), Tree represents the tree area, Grid represents the table area, Form represents the form area, and Tab represents the tab area.
[0232] (5-2) Initialize parameters parentCode and parentOid. Assign the root business object code rootCode imported in step (5-1) to parameter parentCode, and assign the unique identifier rootID of the root business data imported in step (5-1) to parameter parentOid.
[0233] (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 the display method of the instance data of the business object whose business object code is equal to the parameter parentCode in the tree structure (the business attributes displayed in the tree node, the right-click menu configured in the tree node);
[0234] (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;
[0235] (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);
[0236] (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.
[0237] (5-7) Initialize the parameters childCode, linkCode, and t_data_b and t_data_link to be empty;
[0238] (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);
[0239] (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.
[0240] (5-10) Set the counter m = 0;
[0241] (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) to the child object code of the m-th object childrenList[m], and set the linkCode parameter to the relationship object code of the m-th object childrenList[m].
[0242] (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);
[0243] (5-13) Determine whether the page structure relationship obtained in (5-12) contains the relationship node_node (the child is attached to the parent as a child node). If it does, proceed to step (5-14); otherwise, proceed to step (5-23).
[0244] (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 (i.e. the business attributes displayed in the tree node, the right-click menu configured in the tree node);
[0245] (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;
[0246] (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;
[0247] (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 childrenObjList whose parent object code is equal to the parameter parentCode and whose parent object ID is equal to the parameter parentOid;
[0248] (5-18) Set parameter n = 0;
[0249] (5-19) Obtain the nth object childObjList[n] in the data set of relational object instances obtained in step (5-17), and set the value of the parameter childObjId to be equal to the child object ID value of the object childObjList[n].
[0250] (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;
[0251] (5-21) Based on the instance data obtained in step (5-20) and step (5-14) in the tree structure display mode (business attributes of tree node display, right-click menu of tree node configuration), 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 a parent-child hierarchical relationship between parentNode and childNode;
[0252] (5-22) Set parentCode = childCode, parentNode = childNode, parentOid = childId, and return to step (5-8);
[0253] (5-23) Set n = n + 1;
[0254] (5-24) Determine if 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).
[0255] (5-25) Set m = m + 1;
[0256] (5-26) Determine if 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).
[0257] The advantage of this step is that by parsing the data model configured in step (2), the data of the relevant business topics of the PLM system can be presented in a tree-like form according to the parameters passed in by the form. The relevant business topics of the data and the display method of the data are all based on the data model configured in step (2). When the business requirements change, there is no need to update the code. Only the corresponding data model needs to be adjusted to adjust the form and content of the area synchronously.
[0258] (6) Obtain the tree nodes input by the user from the tree-shaped control obtained in step (5);
[0259] (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).
[0260] (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) (to carry PLM business content and functions).
[0261] Specifically, this step includes the following sub-steps:
[0262] (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;
[0263] (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 (the parent business object instance data is displayed in the form of tree control nodes and the child business object instance data is displayed in the form of table control);
[0264] (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;
[0265] (8-4) 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 gridCode in the table control (including the business attributes of the table display, the controls configured in the table columns, the operation buttons configured on the table, and the pagination of the table data).
[0266] (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;
[0267] (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;
[0268] (8-7) In the entity data table obtained in step (8-6), use the encapsulated SQL query statement to query the child object ID collection 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;
[0269] (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);
[0270] (8-9) Based on the instance data obtained in step (8-8) and the display method obtained in step (8-4), generate a table-style control in the upper right area of the business window of the PLM system obtained in step (4).
[0271] The advantage of this step is that it can display data on different business themes in the table area. The data display method (column configuration, menu configuration) is based on the data model configured in step (2). When business requirements change, there is no need to update the code. Only the corresponding data model needs to be adjusted to adjust the form and content of the area synchronously.
[0272] (9) Based on the PLM business form obtained in step (4) and the tree node obtained in step (6), generate a form-type control (carrying PLM business content and functions) in the upper right area of the PLM business form obtained in step (4).
[0273] Specifically, this step includes the following sub-steps:
[0274] (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;
[0275] (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 method of instance data whose business object code is equal to the parameter nodeCode in the form control (including the business attributes displayed in the form, the display control of the business attributes, and the operation buttons configured on the form);
[0276] (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;
[0277] (9-4) In the entity data table obtained in step (8-3), use the encapsulated SQL query statement to query the instance data whose ID value is equal to the parameter nodeOid;
[0278] (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;
[0279] The advantage of this step is that it can display data on different business themes in the form area. The way the data is displayed (the fields that are shown and hidden, the controls on which the fields are displayed, and the arrangement of the fields) is based on the data model configured in step (2). When the business requirements change, there is no need to update the code. You only need to adjust the corresponding data model to adjust the form and content of the area in a synchronous manner.
[0280] (10) Based on the PLM business form obtained in step (4), generate a tab control in the lower right area of the form (the tab consists of multiple pages, and a table or form is generated on each page).
[0281] like Figure 6 As shown, this step includes the following sub-steps:
[0282] (10-1) Parse the PLM business form obtained in step (4) to obtain the parameter isShowTab of the business form (which is the parameter for whether to display the tab in the lower right corner), 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.
[0283] (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).
[0284] (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;
[0285] (10-4) Initialize the parameters pageCode and pageLinkCode to be empty;
[0286] (10-5) Set the counter m = 0;
[0287] (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].
[0288] (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;
[0289] (10-8) Determine whether the page structure relationship obtained in (10-7) includes the associated tab node_tab (the sub-business object instance data is displayed in the form of a tab page, and the sub-association is below the parent). If yes, proceed to step (10-9); otherwise, proceed to step (10-17).
[0290] (10-9) Initialize the TabView parameter by assigning the control form (Grid or Form) of the associated tab node_tab obtained in step (10-8) to the TabView parameter;
[0291] (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.
[0292] (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;
[0293] (10-12) In the entity data table obtained in step (10-11), use the encapsulated SQL query statement to query the child object ID collection 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;
[0294] (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);
[0295] (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 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 is Grid or Form);
[0296] (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;
[0297] (10-16) Add the tab page obtained in step (10-15) to the tab control;
[0298] (10-17) Set m = m + 1;
[0299] (10-18) Determine if m is less than the size of the child object collection childrenList. If so, return to step (10-6); otherwise, the process ends.
[0300] The advantage of this step is that it can display data on different business themes in the tab area. Which themes to display and how to display them (data tables, forms) are all based on the data model configured in step (2). When business requirements change, there is no need to update the code. You only need to adjust the corresponding data model to adjust the form and content of the area synchronously.
[0301] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
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); (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, association relationship, etc. (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 establish 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 an association tab (node_tab), with sub-associations 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 the 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 an entity data table t_data[i] related to the i-th object business[i] in the updated 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] of 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 an entity data table t_data_link[j] related to the j-th object viewGroup[j] in the updated 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 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 yes, 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 1 or 2, characterized in that, 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 business 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 corresponding to 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). (It is a t_plm_menu data, which includes the values of the menu unique identifier menuId, menu name, and the PLM business form unique identifier formId corresponding to the menu obtained in step (3-3). Then, 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. The method for generating PLM business forms through data modeling according to claim 3, 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).
5. The method for generating PLM business forms through data modeling according to claim 4, 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.
6. The method for generating PLM business forms through data modeling according to claim 5, 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 parameters parentCode and parentOid. Assign the root business object code rootCode imported in step (5-1) to parameter parentCode, and assign the unique identifier rootID of the root business data imported in step (5-1) to 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 the display method of the instance data of the business object whose business object code is equal to the parameter parentCode 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) to the child object code of the m-th object childrenList[m], and set the linkCode parameter to 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 childrenObjList whose parent object code is equal to the parameter parentCode and whose parent object ID is equal to the parameter parentOid; (5-18) Set parameter n = 0; (5-19) Obtain the nth object childObjList[n] in the data set of relational object instances obtained in step (5-17), and set the value of the parameter childObjId to be equal to the child object ID value of the object childObjList[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 a 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 if 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 if 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).
7. The method for generating PLM business forms through data modeling according to claim 6, 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 collection 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-style control in the upper right area of the business window of the PLM system obtained in step (4).
8. The method for generating PLM business forms through data modeling according to claim 7, 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 the display method of instance data whose business object code is equal to the parameter nodeCode 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 (8-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.
9. The method for generating PLM business forms through data modeling according to claim 8, 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 collection 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.
10. A system for generating PLM business forms through data modeling, characterized in that, include: 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
Window describing method and making language of logical, represent and data separation
CN101082862A
Front end interface control implementation method based on component development
CN106293777A
PLM system service object execution system and execution method
CN111596977A
SQL visual design generation method and system based on business metadata
CN112783966A
System integration method and system based on intermediate data pool and visual self-definition
CN117435678A