CN115905224A - Working hour data processing method and device, computer equipment and storage medium - Google Patents

Working hour data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115905224A
CN115905224A CN202211414323.6A CN202211414323A CN115905224A CN 115905224 A CN115905224 A CN 115905224A CN 202211414323 A CN202211414323 A CN 202211414323A CN 115905224 A CN115905224 A CN 115905224A
Authority
CN
China
Prior art keywords
data
man
hour
target data
hour data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211414323.6A
Other languages
Chinese (zh)
Inventor
王颖奇
冯斌
刘业兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Fulin Technology Co Ltd
Original Assignee
Shenzhen Fulin Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Fulin Technology Co Ltd filed Critical Shenzhen Fulin Technology Co Ltd
Priority to CN202211414323.6A priority Critical patent/CN115905224A/en
Publication of CN115905224A publication Critical patent/CN115905224A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application belongs to the field of artificial intelligence and relates to a man-hour data processing method which comprises the steps of obtaining a data query request and a current working mode; wherein the data query request is used for querying man-hour data; calling all man-hour data corresponding to the data query request from the database; respectively acquiring a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data; if the first identification is the same as the second identification, the man-hour data is used as target data; if the first identification is different from the second identification, acquiring a cycle granularity corresponding to the current working mode, and performing data conversion processing on the work time data according to the cycle granularity to generate target data; and processing the target data into report data. The application also provides a man-hour data processing device, a computer device and a storage medium. The method and the device realize flexible switching among project models and have wide applicability.

Description

Working hour data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for processing man-hour data, a computer device, and a storage medium.
Background
In the current project management, different working modes correspond to different working granularities, so different project models need to be set for adaptation; however, due to the difference in the format of the stored man-hour data in each working mode, if the mode needs to be switched, a new project model needs to be reset, and the man-hour data is migrated from the original project model to the new project model, which is complicated in steps and cannot realize flexible switching between the project models.
Disclosure of Invention
An embodiment of the present application provides a man-hour data processing method, an apparatus, a computer device, and a storage medium, so as to solve a problem in the prior art that flexible switching between project models cannot be achieved.
In order to solve the above technical problem, an embodiment of the present application provides a man-hour data processing method, which adopts the following technical solutions:
a man-hour data processing method comprises the following steps:
acquiring a data query request and a current working mode; wherein the data query request is used for querying man-hour data;
calling all the man-hour data corresponding to the data query request from a database;
respectively acquiring a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data;
if the first identification is the same as the second identification, the man-hour data is used as target data;
if the first identification is different from the second identification, obtaining a cycle granularity corresponding to the current working mode, and performing data conversion processing on the man-hour data according to the cycle granularity to generate target data;
and processing the target data into report data.
Further, the step of performing data conversion processing on the man-hour data according to the cycle granularity to generate target data includes:
classifying all the called man-hour data according to the work item categories to obtain the work item categories corresponding to each man-hour data;
and performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data.
Further, the current working mode is a summary mode, and the data conversion processing is split processing; the step of performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data comprises the following steps:
and splitting the man-hour data in the workitem category according to the cycle granularity to obtain a plurality of target data, wherein one target data corresponds to one cycle granularity.
Further, the current working mode is a simple mode, and the data conversion processing is merging processing; the step of performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data comprises the following steps:
and merging all the man-hour data in the work item category according to the cycle granularity to obtain target data corresponding to the cycle granularity.
Further, the step of processing the target data into report data includes:
judging whether the target data is duration data or not to obtain a judgment result;
and carrying out format conversion on the target data according to the judgment result to obtain the report data.
Further, the step of judging whether the target data is duration data or not to obtain a judgment result includes:
extracting a start time and an end time from the target data;
if the attribute value of the starting time meets a first threshold value and the attribute value of the ending time does not meet a second threshold value, obtaining a judgment result that the target data is not the duration data;
and if the attribute value of the starting time meets a first threshold value and the attribute value of the ending time does not meet a second threshold value, obtaining a judgment result that the target data is duration data.
Further, the step of performing format conversion on the target data according to the judgment result to obtain the report data includes:
if the judgment result is that the target data is the duration data, splitting the target data to obtain a plurality of sub-target data, and converting the formats of the merged sub-target data to form report data;
and if the judgment result is that the target data is not the time length data, converting the target data format to form report data.
In order to solve the above technical problem, an embodiment of the present application further provides a man-hour data processing apparatus, which adopts the following technical solutions:
the first acquisition module is used for acquiring a data query request and a current working mode; wherein, the data query request is used for querying man-hour data;
the calling module is used for calling all the man-hour data corresponding to the data query request from a database;
the second acquisition module is used for respectively acquiring a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data;
the determining module is used for taking the man-hour data as target data if the first identification is the same as the second identification;
the generating module is used for acquiring the cycle granularity corresponding to the current working mode if the first identifier is different from the second identifier, and performing data conversion processing on the man-hour data according to the cycle granularity to generate target data;
and the processing module is used for processing the target data into report data.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
the memory has stored therein computer readable instructions which, when executed by the processor, implement the steps of the man-hour data processing method as described above.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
the computer readable storage medium has stored thereon computer readable instructions which, when executed by a processor, implement the steps of the man-hour data processing method as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: acquiring a data query request and a current working mode; wherein the data query request is used for querying man-hour data; calling all the man-hour data corresponding to the data query request from a database; respectively acquiring a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data; if the first identification is the same as the second identification, the man-hour data is used as target data; if the first identification and the second identification are different, obtaining a cycle granularity corresponding to the current working mode, and performing data conversion processing on the man-hour data according to the cycle granularity to generate target data; processing the target data into report data; whether the man-hour data correspond to the current working mode or not is determined according to the first identification and the second identification, whether the formats of the man-hour data and the current working mode are the same or not is determined, and when the formats of the man-hour data and the current working mode are different, the man-hour data are converted according to the period granularity, so that the man-hour data correspond to the format of the current working mode, data migration is avoided, flexible switching between project models is achieved, and the applicability is wide.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the description below are some embodiments of the present application, and that other drawings may be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a man-hour data processing method according to the present application;
FIG. 3 is a schematic block diagram of one embodiment of a man-hour data processing apparatus according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the foregoing drawings are used for distinguishing between different objects and not for describing a particular sequential order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Mov I picture expectsgroup Aud I o Layer I, mpeg compression standard audio Layer 3), MP4 players (Mov I ng P I picture expipe group Aud I o Layer I V, mpeg compression standard audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the man-hour data processing method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the man-hour data processing apparatus is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a method of man-hour data processing in accordance with the present application is shown. The man-hour data processing method comprises the following steps:
step S201, acquiring a data query request and a current working mode; wherein the data query request is used for querying the man-hour data.
In this embodiment, the electronic device (for example, the server/terminal device shown in fig. 1) on which the man-hour data processing method operates may obtain the data query request and the current operating mode through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G/5G connection, a wifi connection, a bluetooth connection, a wimax connection, a Z i gbee connection, a UWB (u l t ra W i deband) connection, and other wireless connection means now known or developed in the future.
Screening man-hour data acquisition conditions on an operation interface of a user through a terminal (such as a mobile phone, a tablet, a PC (personal computer) and the like) to generate the data query request; the data obtaining conditions may use time and work items as granularity, for example, obtain all man-hour data in time a, and obtain man-hour data under work item B.
The current working mode is characterized as the current working mode; wherein, the current working mode can be a simple mode or a summary mode; in the simple mode, the work items and the working hour data are in one-to-one correspondence; in the summary mode, one work item corresponds to at least one of the man-hour data.
The labor hour data includes a person in charge, an item, and a time parameter; wherein the responsible person is characterized as a handler who handles the item; the above items are characterized as tasks that all the responsible persons need to handle; the time parameter is characterized as the time (such as duration, date, etc.) of the matter processed by the responsible person, wherein the time parameter comprises at least one of starting time, ending time and working duration.
It should be further noted that, among the above items, if the current working mode is the summary mode, one work item is split into at least one item, which can be understood as dividing the total task into a plurality of subtask items; and if the current working mode is the simple mode, the working item is the item.
And step S202, calling all the man-hour data corresponding to the data query request from a database.
In this embodiment, the database is used to store the labor hour data, and each labor hour data is stored separately according to the category of the work items, so as to facilitate management and calling of the data.
Initially, setting attribute values of a starting time and an ending time respectively; receiving a data storage request sent by a user side, wherein the data storage request carries working hour data to be stored;
if the current working mode is a simple mode and the attribute values of the starting time and the ending time both meet the preset values, the period represented as the working hour data is the starting time, whether the working data are stored in the working item category of the database or not is judged at the moment, if yes, the working hour data to be stored are covered on the working data in the working item category of the database, and if not, the working hour data to be stored are newly added to the working item category of the database, so that the working item category and the working hour data in the database are in a one-to-one state.
If the current working mode is a summarizing mode, the attribute value of the starting time meets the preset value, and the attribute value of the ending time does not meet the preset value, the working hour data is represented as duration data, the duration of the working hour data is calculated according to the starting time and the ending time, the working hour data is split according to the period granularity to obtain a plurality of sub-working hour data, and each sub-working hour data is stored into the work item category corresponding to the working hour data in the database as the working hour data; if the period granularity is day and the time length of the man-hour data is 3 days, splitting the time length of the man-hour data to obtain 3 sub-man-hour data with the value of 1 day.
It should be noted that if the attribute value of the start time does not satisfy the preset value, it is characterized that the working data is abnormal, a re-input instruction is sent to the user side, and after new working hour data to be stored, which is fed back by the user side based on the re-input instruction, is received, the working hour data storage step to be stored is repeated.
Step S203, respectively obtaining a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data.
In this embodiment, the first identifier is characterized as a mode in which the current working mode is located, and if the current working mode is a simple mode, the first identifier is 1; when the current working mode is the summary mode, the first identifier is 2.
The second identification is characterized by a data format corresponding to the man-hour data; if the man-hour data is in a simple mode, the data information of the man-hour data is in a simple data format, and the corresponding second identifier is 1; if the man-hour data is in the data format in the summary mode, the data information of the man-hour data is summary data, and the corresponding second identifier is 2.
In some embodiments, the second identifier may also be determined by attribute values of the start time and the end time; if the attribute values of the starting time and the ending time both meet the preset value, determining that the second identifier is 1; and if the attribute value of the starting time meets the preset value and the attribute value of the ending time does not meet the preset value, determining that the second identifier is 2.
And step S204, if the first identifier is the same as the second identifier, using the man-hour data as target data.
In this embodiment, if the first identifier and the second identifier are the same, the first identifier and the second identifier are characterized as a data format of the man-hour data storage format and a data format of the man-hour data required by the current working mode; if the storage format of the man-hour data is a simple data format, the corresponding current working mode is a simple mode; if the storage format of the working hour data is a summary data format, the corresponding current working mode is a summary mode.
Step S205, if the first identifier is different from the second identifier, obtaining a cycle granularity corresponding to the current working mode, and performing data conversion processing on the man-hour data according to the cycle granularity to generate target data.
In this embodiment, if the first identifier and the second identifier are different, it is characterized that the storage format of the man-hour data is inconsistent with the data format of the man-hour data required by the current working mode, and at this time, the man-hour data needs to be converted to adapt to the man-hour data format required by the current working mode; if the storage format of the man-hour data is a simple data format, the current working mode is a summary mode, and the two modes are not consistent; if the storage format of the man-hour data is a summarized data format, the corresponding current working mode is a simple mode, and the two modes are not consistent.
The period granularity may be in units of year, month, day or time, and is not particularly limited herein.
And step S206, processing the target data into report data.
In this embodiment, the target data is converted according to a format of a report to obtain report data; the report data is convenient for the user to consult, such as displaying in a report table format, so as to divide the target data every day, and thus, the user can know the data state of the working hours every day.
The above embodiments of the present application mainly have the following beneficial effects: whether the working hour data correspond to the current working mode or not is determined according to the first identification and the second identification so as to determine whether the formats of the working hour data and the current working mode are the same, and when the formats of the working hour data and the current working mode are different, the working hour data are subjected to data conversion processing according to the period granularity so as to correspond to the format of the current working mode, so that data migration is avoided, flexible switching between project models is realized, and the applicability is wide.
In some optional implementations, in step S205, the performing data conversion processing on the man-hour data according to the cycle granularity, and the generating target data includes:
classifying all the called man-hour data according to the classes of the work items to obtain the class of the work items corresponding to each man-hour data;
and performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data.
In this embodiment, the called man-hour data is classified according to the work item category, so as to facilitate the data conversion processing of the following man-hour data.
In practical application, one man-hour data corresponds to one first code, one work item type corresponds to one second code, and if the first code of the man-hour data is consistent with the second code of the work item type, the work data is characterized to correspond to the work item type.
In some optional implementations, the current working mode is a summary mode, and the data conversion processing is split processing; the step of performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data comprises the following steps:
and splitting the man-hour data in the workitem category according to the cycle granularity to obtain a plurality of target data, wherein one target data corresponds to one cycle granularity.
In this embodiment, when the first identifier and the second identifier are not equal, the format of the man-hour data is represented as not corresponding to the format of the man-hour data set in the current working mode; if the format of the labor hour data is a simple data format, one work item type corresponds to one labor hour data, the labor hour data in the work item type is split according to the period granularity to obtain a plurality of continuous target data, and therefore the format of the labor hour data is adapted to the format of a summary mode, a project model does not need to be reconstructed, a large amount of data are migrated, the applicability of the project model is improved, and the flexibility is strong.
If the period granularity is day and the duration of the man-hour data is 3 days, splitting the duration of the man-hour data to obtain 3 sub-man-hour data with the value of 1 day, and taking the sub-working data as target data.
In some embodiments, after the target data is generated, the target data is sent to the user side for confirmation, and if the user side sends the modification instruction, the target data to be modified is determined according to the modification instruction, and the target data to be modified is modified.
And if the target data to be modified is positioned in the middle of the continuous target data, the target data to be modified is separately split, the target data in front of the target data to be modified is respectively merged, and the target data behind the target data to be modified is merged so as to highlight the target data to be modified, so that the user can conveniently look up the target data. If the period granularity is 1 day, the continuous target data are respectively A1, A2, A3, A4 and A5, if the target data to be modified is A3, the A3 is separated, the A1 and the A2 are combined, and the A4 and the A5 are combined.
In some optional implementations, the current working mode is a simple mode, and the data conversion processing is merging processing; the step of performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data comprises the following steps:
and merging all the man-hour data in the workitem category according to the cycle granularity to obtain target data corresponding to the cycle granularity.
In this embodiment, when the first identifier and the second identifier are not equal, the format of the man-hour data is represented as not corresponding to the format of the man-hour data set in the current working mode; if the format of the man-hour data is a summarized data format, corresponding to a plurality of man-hour data in one work item category, extracting the starting time and the ending time of each man-hour data at the moment, determining the minimum starting time and the maximum ending time, calculating the man-hour duration as a time parameter according to the minimum starting time and the maximum ending time, and combining all the man-hour data to obtain target data in a simple data format.
In some optional implementation manners, in step S206, the step of processing the target data into report data includes:
judging whether the target data is duration data or not to obtain a judgment result;
and carrying out format conversion on the target data according to the judgment result to obtain the report data.
In this embodiment, whether the target data is the duration data is judged, and the format type of the target data is determined to be a simple data format or a summarized data format, so that corresponding format conversion is performed according to the target data of different format types, and the format of the target data conforms to the format of the report.
In some optional implementation manners, the step of determining whether the target data is duration data to obtain a determination result includes:
extracting a start time and an end time from the target data;
if the attribute value of the starting time meets a first threshold value and the attribute value of the ending time does not meet a second threshold value, obtaining a judgment result that the target data is not the duration data;
and if the attribute value of the starting time meets a first threshold value and the attribute value of the ending time does not meet a second threshold value, obtaining a judgment result that the target data is duration data.
In this embodiment, the first threshold and the second threshold may be the same or different, and are not limited specifically herein.
The duration data is characterized as time segment data, and if the starting time is 11 months and 4 days and the ending time is 11 months and 7 days, the duration data is 3 days; if the starting time is 11 months and 4 days and the ending time is 11 months and 4 days, the duration data does not exist.
In practical application, because the work item categories in the simple mode are in one-to-one correspondence with the target data, the target data in the simple mode is not duration data; the working item types and the target data in the summarizing mode are in one-to-many correspondence, so that the target data in the summarizing mode are duration data; based on the method, whether the target data need to be split or not is determined according to whether the target data are duration data or not.
In some optional implementation manners, the step of performing format conversion on the target data according to the determination result to obtain the report data includes:
if the judgment result is that the target data is the duration data, splitting the target data to obtain a plurality of sub-target data, and converting the formats of the merged sub-target data to form report data;
and if the judgment result is that the target data is not the time length data, converting the target data format to form report data.
In this embodiment, after the target data is obtained, format conversion is performed on the target data to make the format of the target data conform to the format of the report, and after the data after format conversion is input to the report, the report is rendered to form report data.
It is emphasized that, in order to further ensure the privacy and security of the man-hour data information, the man-hour data information may also be stored in a node of a block chain.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. The artificial intelligence (Art I f I c I a l I nte l I gene, ai) is a theory, method, technology and application system for simulating, extending and expanding human intelligence, sensing environment, acquiring knowledge and obtaining optimal results by using knowledge by using a digital computer or a machine controlled by the digital computer.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware that is configured to be instructed by computer-readable instructions, which can be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2 described above, the present application provides an embodiment of a man-hour data processing apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 3, the man-hour data processing apparatus 300 according to the present embodiment includes: a first obtaining module 301, a calling module 302, a second obtaining module 303, a determining module 304 and a processing module 306. Wherein:
a first obtaining module 301, configured to obtain a data query request and a current working mode; wherein, the data query request is used for querying man-hour data;
a calling module 302, configured to call all the man-hour data corresponding to the data query request from a database;
a second obtaining module 303, configured to obtain a first identifier corresponding to the current working mode and a second identifier corresponding to the labor-hour data, respectively;
a determining module 304, configured to take the man-hour data as target data if the first identifier is the same as the second identifier;
a generating module 305, configured to obtain a cycle granularity corresponding to the current working mode if the first identifier is different from the second identifier, and perform data conversion processing on the man-hour data according to the cycle granularity to generate target data;
and the processing module 306 is configured to process the target data into report data.
The above embodiments of the present application mainly have the following beneficial effects: whether the man-hour data correspond to the current working mode or not is determined according to the first identification and the second identification, whether the formats of the man-hour data and the current working mode are the same or not is determined, and when the formats of the man-hour data and the current working mode are different, the man-hour data are converted according to the period granularity, so that the man-hour data correspond to the format of the current working mode, data migration is avoided, flexible switching between project models is achieved, and the applicability is wide.
In some alternative implementations, the generation module 305 includes a classification sub-module and a generation sub-module. Wherein:
the classification submodule is used for classifying all the called labor-hour data according to the categories of the working items to obtain the category of the working items corresponding to each piece of labor-hour data;
and the generation submodule is used for performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data.
In some optional implementations, the current working mode is a summary mode, and the data conversion processing is split processing; the generation submodule comprises a splitting unit. Wherein:
and the splitting unit is used for splitting the man-hour data in the work item category according to the cycle granularity to obtain a plurality of target data, wherein one target data corresponds to one cycle granularity.
In some optional implementations, the current working mode is a simple mode, and the data conversion processing is merging processing; the generation submodule includes a merging unit. Wherein:
and the merging unit is used for merging all the man-hour data in the work item category according to the cycle granularity to obtain target data corresponding to the cycle granularity.
In some optional implementations, the processing module 306 includes a determining sub-module and a format conversion sub-module. Wherein:
the judgment sub-module is used for judging whether the target data is duration data or not to obtain a judgment result;
and the format conversion submodule is used for carrying out format conversion on the target data according to the judgment result to obtain the report data.
In some optional implementations, the judgment sub-module includes an extraction unit, a first judgment unit, and a second judgment unit. Wherein:
an extracting unit configured to extract a start time and an end time from the target data;
a first determining subunit, configured to obtain a determination result that the target data is not duration data if the attribute value of the start time satisfies a first threshold and the attribute value of the end time does not satisfy a second threshold;
and the second judging subunit is configured to obtain a judgment result that the target data is duration data if the attribute value of the start time satisfies the first threshold and the attribute value of the end time does not satisfy the second threshold.
In some optional implementations, the format conversion sub-module includes a first format conversion unit and a second format conversion unit. Wherein:
a first format conversion unit, configured to, if the determination result is that the target data is duration data, split the target data to obtain multiple sub-target data, and perform format conversion on the merged sub-target data to form report data;
and the second format conversion unit is used for converting the format of the target data to form report data if the judgment result is that the target data is not the duration data.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both an internal storage unit of the computer device 4 and an external storage device thereof. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as computer readable instructions of a man-hour data processing method. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, for example, computer readable instructions for executing the man-hour data processing method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The above embodiments of the present application mainly have the following beneficial effects: whether the working hour data correspond to the current working mode or not is determined according to the first identification and the second identification so as to determine whether the formats of the working hour data and the current working mode are the same, and when the formats of the working hour data and the current working mode are different, the working hour data are subjected to data conversion processing according to the period granularity so as to correspond to the format of the current working mode, so that data migration is avoided, flexible switching between project models is realized, and the applicability is wide.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the man-hour data processing method as described above.
The above embodiments of the present application mainly have the following beneficial effects: whether the man-hour data correspond to the current working mode or not is determined according to the first identification and the second identification, whether the formats of the man-hour data and the current working mode are the same or not is determined, and when the formats of the man-hour data and the current working mode are different, the man-hour data are converted according to the period granularity, so that the man-hour data correspond to the format of the current working mode, data migration is avoided, flexible switching between project models is achieved, and the applicability is wide.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It should be understood that the above-described embodiments are merely exemplary of some, and not all, embodiments of the present application, and that the drawings illustrate preferred embodiments of the present application without limiting the scope of the claims appended hereto. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that modifications can be made to the embodiments described in the foregoing detailed description, or equivalents can be substituted for some of the features described therein. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields, and all the equivalent structures are within the protection scope of the present application.

Claims (10)

1. A man-hour data processing method is characterized by comprising the following steps:
acquiring a data query request and a current working mode; wherein, the data query request is used for querying man-hour data;
calling all man-hour data corresponding to the data query request from a database;
respectively acquiring a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data;
if the first identification is the same as the second identification, the man-hour data is used as target data;
if the first identification is different from the second identification, obtaining a cycle granularity corresponding to the current working mode, and performing data conversion processing on the man-hour data according to the cycle granularity to generate target data;
and processing the target data into report data.
2. The man-hour data processing method according to claim 1, wherein the step of performing data conversion processing on the man-hour data at the cycle granularity to generate target data includes:
classifying all the called man-hour data according to the work item categories to obtain the work item categories corresponding to each man-hour data;
and performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data.
3. The man-hour data processing method according to claim 2, wherein the current working mode is a summary mode, and the data conversion processing is split processing; the step of performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data comprises the following steps:
and splitting the man-hour data in the workitem category according to the cycle granularity to obtain a plurality of target data, wherein one target data corresponds to one cycle granularity.
4. The man-hour data processing method according to claim 2, wherein the current operation mode is a simple mode, and the data conversion processing is merge processing; the step of performing data conversion processing on the man-hour data in the work item category according to the cycle granularity to generate target data comprises the following steps:
and merging all the man-hour data in the work item category according to the cycle granularity to obtain target data corresponding to the cycle granularity.
5. The man-hour data processing method according to any one of claims 1 to 4, wherein the step of processing the target data into report data includes:
judging whether the target data is duration data or not to obtain a judgment result;
and carrying out format conversion on the target data according to the judgment result to obtain the report data.
6. The man-hour data processing method according to claim 5, wherein the step of judging whether the target data is time length data and obtaining a judgment result comprises:
extracting a start time and an end time from the target data;
if the attribute value of the starting time meets a first threshold value and the attribute value of the ending time does not meet a second threshold value, obtaining a judgment result that the target data is not duration data;
and if the attribute value of the starting time meets a first threshold value and the attribute value of the ending time does not meet a second threshold value, obtaining a judgment result that the target data is duration data.
7. The man-hour data processing method according to claim 6, wherein the step of converting the format of the target data according to the determination result to obtain the report data comprises:
if the judgment result is that the target data is the duration data, splitting the target data to obtain a plurality of sub-target data, and converting the formats of the merged sub-target data to form report data;
and if the judgment result is that the target data is not the time length data, converting the target data format to form report data.
8. A man-hour data processing apparatus, comprising:
the first acquisition module is used for acquiring a data query request and a current working mode; wherein, the data query request is used for querying man-hour data;
the calling module is used for calling all the man-hour data corresponding to the data query request from a database;
the second acquisition module is used for respectively acquiring a first identifier corresponding to the current working mode and a second identifier corresponding to the man-hour data;
the determining module is used for taking the man-hour data as target data if the first identification is the same as the second identification;
the generating module is used for acquiring the cycle granularity corresponding to the current working mode if the first identifier is different from the second identifier, and performing data conversion processing on the man-hour data according to the cycle granularity to generate target data;
and the processing module is used for processing the target data into report data.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the man-hour data processing method of any one of claims 1 to 7.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the man-hour data processing method according to any one of claims 1 to 7.
CN202211414323.6A 2022-11-11 2022-11-11 Working hour data processing method and device, computer equipment and storage medium Pending CN115905224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211414323.6A CN115905224A (en) 2022-11-11 2022-11-11 Working hour data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211414323.6A CN115905224A (en) 2022-11-11 2022-11-11 Working hour data processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115905224A true CN115905224A (en) 2023-04-04

Family

ID=86473886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211414323.6A Pending CN115905224A (en) 2022-11-11 2022-11-11 Working hour data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115905224A (en)

Similar Documents

Publication Publication Date Title
CN112613917A (en) Information pushing method, device and equipment based on user portrait and storage medium
CN115237857A (en) Log processing method and device, computer equipment and storage medium
CN115794341A (en) Task scheduling method, device, equipment and storage medium based on artificial intelligence
CN115794437A (en) Calling method and device of microservice, computer equipment and storage medium
CN114996675A (en) Data query method and device, computer equipment and storage medium
CN112860662B (en) Automatic production data blood relationship establishment method, device, computer equipment and storage medium
CN112507141A (en) Investigation task generation method and device, computer equipment and storage medium
CN117251228A (en) Function management method, device, computer equipment and storage medium
CN116956326A (en) Authority data processing method and device, computer equipment and storage medium
CN116681045A (en) Report generation method, report generation device, computer equipment and storage medium
CN116383787A (en) Page creation method, page creation device, computer equipment and storage medium
CN115757075A (en) Task abnormity detection method and device, computer equipment and storage medium
CN115543565A (en) Task processing method and device, computer equipment and storage medium
CN115905224A (en) Working hour data processing method and device, computer equipment and storage medium
CN115904657A (en) Document generation method and device, computer equipment and storage medium
CN115080045A (en) Link generation method and device, computer equipment and storage medium
CN115936910A (en) Fee data processing method and device, computer equipment and storage medium
CN117076595A (en) Text processing method, device, equipment and storage medium based on artificial intelligence
CN117390119A (en) Task processing method, device, computer equipment and storage medium
CN116401061A (en) Method and device for processing resource data, computer equipment and storage medium
CN117251490A (en) Data query method, device, computer equipment and storage medium
CN115756571A (en) Code data processing method and device, computer equipment and storage medium
CN117112665A (en) Link data processing method and device, computer equipment and storage medium
CN115809241A (en) Data storage method and device, computer equipment and storage medium
CN116611936A (en) Data analysis method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination