Search

CN-116226192-B - Work item query method, device, equipment and storage medium

CN116226192BCN 116226192 BCN116226192 BCN 116226192BCN-116226192-B

Abstract

The application relates to a work item query method, a device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the steps of receiving a work item query request of user equipment, wherein the work item query request comprises an identifier of a target work item and a target version number, querying a target version identifier corresponding to the target version number of the target work item from a first mapping relation based on the identifier of the target work item and the target version number, wherein the first mapping relation comprises identifiers of different work items, version identifiers and version numbers, querying a target field identifier from a second mapping relation based on the target version identifier, wherein the second mapping relation comprises one or more field identifiers corresponding to different version identifiers, querying a field name and a field value of the target work item corresponding to the target version number from a third mapping relation based on the target field identifier, and wherein the third mapping relation comprises a field name and a field value corresponding to different field identifiers.

Inventors

  • ZHANG JIANRONG
  • XIE JIGANG
  • Tan chang
  • ZHANG YU
  • HUANG DAIJUN

Assignees

  • 中国联合网络通信集团有限公司
  • 联通数字科技有限公司
  • 联通云数据有限公司

Dates

Publication Date
20260505
Application Date
20221230

Claims (8)

  1. 1. A method for querying a work item, comprising: receiving a work item query request sent by user equipment, wherein the work item query request comprises an identifier of a target work item and a target version number; Inquiring a target version identifier corresponding to the target version number of the target work item from a first mapping relation according to the identifier of the target work item and the target version number, wherein the first mapping relation comprises identifiers of different work items, version identifiers and version numbers; Inquiring a target field identifier from a second mapping relation according to the target version identifier, wherein the second mapping relation comprises one or more field identifiers corresponding to different version identifiers; Inquiring a field name and a field value of the target work item corresponding to the target version number from a third mapping relation according to the target field identifier, wherein the third mapping relation comprises field names and field values corresponding to different field identifiers; Receiving a work item modification request sent by the user equipment, wherein the work item modification request comprises an identification of the target work item and a modification field, and the modification field comprises a field name to be modified and a field value of the field name to be modified; generating an update version number of the modification field; updating the first mapping relation based on the update version number and the identification of the target work item; in the updated first mapping relation, the current version number of the target working item is the updated version number, and the parent version number of the updated version number is the current version number of the target working item before updating; Comparing the modified field with a father version field to obtain a first field name, a second field name and a field value of the second field name, wherein the father version field is the content of the father version of the update version number, the first field name is the field name with the same field name and field value in the modified field and the father version field, and the second field name is the field name with different field names or field values in the modified field and the father version field; Updating the third mapping relation according to the second field name and the field value of the second field name; and updating the second mapping relation according to the field identification of the first field name, the field identification of the second field name and the version identification of the updated version number.
  2. 2. The work item querying method as in claim 1, further comprising: receiving a version information query request of the user equipment, wherein the version information query request comprises the current version number of the target work item; Inquiring a father version number of the current version number from the first mapping relation according to the current version number until an initial version number of the target working item is inquired to obtain version information of the target working item, wherein the version information comprises all version numbers of the target working item and father-son relations between two adjacent version numbers; And sending the version information of the target work item to the user equipment so that the user equipment displays the version information of the target work item.
  3. 3. The work item querying method of any one of claims 1-2, wherein the method further comprises: Receiving a work item recovery request sent by the user equipment, wherein the work item recovery request comprises an identifier of the target work item and a version number to be recovered; And under the condition that the version number to be restored exists in the first mapping relation, updating the version number to be restored to the current version number of the target work item, and updating the first mapping relation and the second mapping relation based on the version number to be restored.
  4. 4. The work item inquiring device is characterized by comprising a receiving unit, an inquiring unit, a generating unit, an updating unit and a comparing unit; The receiving unit is used for receiving a work item query request sent by user equipment, wherein the work item query request comprises an identifier of a target work item and a target version number; The query unit is used for querying a target version identifier corresponding to the target version number of the target work item from a first mapping relation according to the identifier of the target work item and the target version number, wherein the first mapping relation comprises identifiers of different work items, version identifiers and version numbers; The query unit is further configured to query a target field identifier from a second mapping relationship according to the target version identifier, where the second mapping relationship includes one or more field identifiers corresponding to different version identifiers; the query unit is further configured to query, according to the target field identifier, a field name and a field value of the target work item corresponding to the target version number from a third mapping relationship, where the third mapping relationship includes field names and field values corresponding to different field identifiers; The receiving unit is further configured to receive a work item modification request sent by the user equipment, where the work item modification request includes an identifier of the target work item and a modification field, and the modification field includes a field name to be modified and a field value of the field name to be modified; The generating unit is used for generating an update version number of the modification field; The updating unit is configured to update the first mapping relationship based on the update version number and the identifier of the target work item; in the updated first mapping relation, the current version of the target work item is the updated version number, and the parent version number of the updated version number is the current version number of the target work item before updating; The comparison unit is used for comparing the modified field with a father version field to obtain a first field name, a second field name and a field value of the second field name, wherein the father version field is the content of the father version of the updated version number, the first field name is the field name with the same field name and field value in the modified field and the father version field, and the second field name is the field name with different field names or field values in the modified field and the father version field; the updating unit is further configured to update the third mapping relationship according to the second field name and a field value of the second field name; the updating unit is further configured to update the second mapping relationship according to the field identifier of the first field name, the field identifier of the second field name, and the version identifier of the update version number.
  5. 5. The work item querying device as in claim 4, wherein the work item querying device further comprises a transmitting unit; the receiving unit is further configured to receive a version information query request of the user equipment, where the version information query request includes a current version number of the target work item; The query unit is further configured to query a parent version number of the current version number from the first mapping relationship according to the current version number until an initial version number of the target work item is queried to obtain version information of the target work item, where the version information includes all version numbers of the target work item and a parent-child relationship between two adjacent version numbers; The sending unit is configured to send the version information of the target work item to the user equipment, so that the user equipment displays the version information of the target work item.
  6. 6. The work item query device according to any one of claims 4-5, wherein the receiving unit is further configured to receive a work item recovery request sent by the user equipment, where the work item recovery request includes an identifier of the target work item and a version number to be recovered; The updating unit is further configured to update the version number to be restored to a current version number of the target work item when the version number to be restored exists in the first mapping relationship, and update the first mapping relationship and the second mapping relationship based on the version number to be restored.
  7. 7. An electronic device, comprising: A processor; A memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 3.
  8. 8. A computer readable storage medium, characterized in that, when computer-executable instructions stored in the computer readable storage medium are executed by a processor of an electronic device, the electronic device is capable of performing the method of any one of claims 1 to 3.

Description

Work item query method, device, equipment and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for querying a work item. Background The work items are small and specific work contents formed after the large and abstract work items are subjected to refinement analysis, and are used for making more accurate work plans and realizing team cooperation. A work item typically contains information about the description of the work content, the responsible person, the expected work time, and the completion time. In the prior art, work items of different versions are stored in a file mode mainly through an open-source distributed version control system git, but in the use of the work items, when errors occur in the work items, the work items cannot be queried based on the work item versions. Disclosure of Invention The application provides a work item query method, a device, equipment and a storage medium, which at least solve the technical problem that work items cannot be queried based on work item versions in the related technology. The technical scheme of the application is as follows: According to a first aspect of the embodiment of the application, a work item query method is provided, which comprises the steps of receiving a work item query request sent by user equipment, wherein the work item query request comprises an identifier of a target work item and a target version number, querying a target version identifier corresponding to the target version number of the target work item from a first mapping relation according to the identifier of the target work item and the target version number, wherein the first mapping relation comprises identifiers of different work items, version identifiers and version numbers, querying a target field identifier from a second mapping relation according to the target version identifier, wherein the second mapping relation comprises one or more field identifiers corresponding to different version identifiers, querying a field name and a field value corresponding to the target version number of the target work item from a third mapping relation according to the target field identifier, and the third mapping relation comprises a field name and a field value corresponding to different field identifiers. In one possible implementation, the method further comprises the steps of receiving a version information query request of the user equipment, wherein the version information query request comprises a current version number of a target work item, querying a parent version number of the current version number from a first mapping relation according to the current version number until an initial version number of the target work item is queried to obtain version information of the target work item, wherein the version information comprises all version numbers of the target work item and father-son relations between two adjacent version numbers, and sending the version information of the target work item to the user equipment to enable the user equipment to display the version information of the target work item. In one possible implementation manner, the method further comprises the steps of receiving a work item modification request sent by the user equipment; the work item modification request comprises an identification and modification field of a target work item, the modification field comprises a field name to be modified and a field value of a field name to be modified, an update version number of the modification field is generated, a first mapping relation is updated based on the update version number and the identification of the target work item, the current version number of the target work item is an update version number in the updated first mapping relation, the father version number of the update version number is the current version number before the update of the target work item, the modification field is compared with the father version field to obtain a first field name, a second field name and a field value of the second field name, the father version field is the content of the father version of the update version number, the first field name is the field name of which the field name is the same as the field name in the modification field and the father version, the second field name is different from the field name in the modification field and the father version, the third mapping relation is updated according to the field name of the second field name and the field value of the second field name is different from the field name of the update version name, and the update version number of the update version number is obtained. In a possible implementation manner, the method further comprises the steps of receiving a work item recovery request sent by the user equipment, wherein the work item recovery request comprises an identifi