Method and device for generating working calendar and storage medium
By obtaining and adjusting the preset initial work calendar, the final work calendar is generated based on the estimated completion time and type of unfinished orders, which solves the problem that work calendar cannot be flexibly generated in the existing technology, and improves the practicality and adaptability of production plans sex.
Patent Information
- Application Number
- CN202411333635.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology cannot flexibly generate a work calendar, resulting in inefficient production efficiency and affecting the production effect of the factory.
By obtaining the initial work calendar for each date within the preset future time, determine the estimated completion time cut-off point for unfinished orders, and adjust the initial work calendar according to the type of each date to be adjusted, generate the final work calendar, and update it adaptively Daily work calendar.
It realizes flexible generation and update of work calendars, improves the practicality of production plans, reduces artificial generation errors, and is more in line with the actual production situation.
Smart Images

Figure CN119444155A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of manufacturing industry, and specifically to a method, device and storage medium for generating a work calendar. Background Art
[0002] In the manufacturing industry, the formulation and execution of production plans are directly related to the factory's operational efficiency and economic benefits. Today's factories basically use fixed work calendars to arrange the factory's production activities. However, in the actual production process of the factory, there are often many emergencies, resulting in inconsistencies between the actual work and the work calendar. The existing fixed work calendar cannot be changed in time, which often results in low production efficiency and affects the factory's production results. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device and storage medium for generating a work calendar, so as to solve the problem in the prior art that the work calendar cannot be flexibly generated and the work calendar has poor practicality.
[0004] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a method for generating a work calendar, the method comprising:
[0005] Get the initial working calendar for each date within the preset future time period;
[0006] Determine the estimated completion time cutoff for unfinished orders, and determine the date between the current time point and the estimated completion time cutoff as the date to be adjusted;
[0007] Adjusting the initial working calendar according to the type of each date to be adjusted to obtain a first working calendar for each date to be adjusted, wherein the type includes working days and rest days;
[0008] In the event that an outstanding order is updated, determine the target time required to complete the updated outstanding order;
[0009] Determine the total working hours and total rest hours in all first working calendars;
[0010] When the target duration is greater than the total working duration and less than the sum of the total working duration and the total rest duration, determine the dates to be adjusted corresponding to the multiple first working calendars that represent non-starting work in all the first working calendars, and determine a preset number of dates to be adjusted that represent non-starting work and are closest to the current time point as the selected dates;
[0011] When the target duration is greater than the sum of the total working duration and the total rest duration, the to-be-adjusted dates corresponding to the plurality of first working calendars that indicate non-working hours in all the first working calendars are determined as the candidate dates;
[0012] The first working calendar of each to-be-selected date is adjusted according to the updated unfinished orders to obtain the final working calendar of each to-be-selected date, and the first working calendars of all to-be-adjusted dates except the to-be-selected date are determined as the corresponding final working calendars.
[0013] In an embodiment of the present application, when an unfinished order is updated, the target duration required to complete the updated unfinished order is determined, including: determining the priority of each unfinished order in the updated unfinished orders; arranging each updated unfinished order in descending order based on the priority, and determining at least one process corresponding to each updated unfinished order after the sorting in turn; determining the target duration based on at least one process of each updated unfinished order after the sorting and the number of updated unfinished orders.
[0014] In an embodiment of the present application, determining the target duration based on at least one process of each updated unfinished order after sorting and the number of updated unfinished orders includes: obtaining the average unit working time corresponding to each process of each updated unfinished order after sorting; and determining the target duration by multiplying the product of all average unit working times corresponding to all updated unfinished orders after sorting and the number of all updated unfinished orders.
[0015] In an embodiment of the present application, determining the total working hours and total rest time in all first working calendars includes: for each first working calendar, obtaining the shifts in the first working calendar, the working hours of each shift and the rest time of each shift; for each first working calendar, determining the working hours and rest time of the first working calendar according to the total number of shifts in the first working calendar, the working hours of each shift and the rest time of each shift; determining the total working hours according to the working hours of all first working calendars, and determining the total rest time according to the rest time of all first working calendars.
[0016] In an embodiment of the present application, the method further includes: when the target duration is less than or equal to the total start time, determining the first working calendar of each date to be adjusted as the final working calendar of each date to be adjusted.
[0017] In an embodiment of the present application, rest days include preset rest days and holidays, and adjusting the initial working calendar according to the type of each date to be adjusted includes: traversing each date to be adjusted to determine whether each date to be adjusted is a preset rest day; for any date to be adjusted, if the date to be adjusted is not a preset rest day, determining whether the date to be adjusted is a holiday; for any date to be adjusted, if the date to be adjusted is not a holiday, determining that the date to be adjusted is a working day; for any date to be adjusted, if the date to be adjusted is a working day, adjusting the initial working calendar of the date to be adjusted according to the start time and shift schedule of the date to be adjusted to obtain the first working calendar of the date to be adjusted; for any date to be adjusted, if the date to be adjusted is a preset rest day or holiday, adjusting the initial working calendar of the date to be adjusted according to the rest time of the date to be adjusted to obtain the first working calendar of the date to be adjusted.
[0018] In an embodiment of the present application, the method also includes: after determining the first working calendar of all dates to be adjusted except the selected date as the corresponding final working calendar, obtaining the authority of the object to perform the production task, wherein each final working calendar is associated with the organizational structure of the factory, and the organizational structure includes at least one of the factory, the workshop and the production line; and displaying the corresponding final working calendar to the object based on the authority of the object.
[0019] In an embodiment of the present application, the object's permissions include factory level, workshop level and production line level, and displaying the corresponding final work calendar to the object based on the object's permissions includes: when the object's permissions are at the factory level, displaying the final work calendar corresponding to the factory level to the object; when the object's permissions are at the workshop level, displaying the final work calendar corresponding to the workshop level to the object; when the object's permissions are at the production line level, displaying the final work calendar corresponding to the production line level to the object.
[0020] A second aspect of the present application provides a device for generating a work calendar, comprising:
[0021] a memory configured to store instructions;
[0022] The processor is configured to call instructions from the memory and implement the above method for generating a work calendar when executing the instructions.
[0023] A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the above-mentioned method for generating a work calendar.
[0024] Through the above technical solution, an initial working calendar for each date within a preset future duration is obtained; the estimated completion time cutoff of unfinished orders is determined, and the dates between the current time point and the estimated completion time cutoff are determined as dates to be adjusted; the initial working calendar is adjusted according to the type of each date to be adjusted to obtain the first working calendar for each date to be adjusted, wherein the types include working days and rest days; when an unfinished order is updated, the target duration required to complete the updated unfinished order is determined; the total working hours and total rest hours in all first working calendars are determined; when the target duration is greater than the total working hours and less than the sum of the total working hours and the total rest hours, the dates to be adjusted corresponding to multiple first working calendars representing unstarted work in all first working calendars are determined. , and determine a preset number of to-be-adjusted dates closest to the current time point that represent non-start work as the candidate dates; when the target duration is greater than the sum of the total start time and the total rest time, determine the to-be-adjusted dates corresponding to multiple first working calendars that represent non-start work in all first working calendars as the candidate dates; adjust the first working calendar of each candidate date according to the updated unfinished orders to obtain the final working calendar of each candidate date, and determine the first working calendars of all the other to-be-adjusted dates except the candidate date as the corresponding final working calendars. The work calendar for each day can be adaptively generated or updated, and the way to update the work calendar is more flexible, more practical, reduces human-generated errors, and is more in line with actual production conditions.
[0025] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0027] Figure 1 A schematic diagram of a process for generating a work calendar according to an embodiment of the present application is shown;
[0028] Figure 2 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0030] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0031] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0032] Figure 1 The following schematically shows a flow chart of a method for generating a work calendar according to an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a method for generating a work calendar, which may include the following steps.
[0033] Step 101: Obtain an initial working calendar for each date within a preset future time period.
[0034] Step 102: Determine the estimated completion time cutoff of the unfinished order, and determine the date between the current time point and the estimated completion time cutoff as the date to be adjusted.
[0035] Step 103: Adjust the initial working calendar according to the type of each date to be adjusted to obtain a first working calendar for each date to be adjusted, wherein the type includes working days and rest days.
[0036] The processor can obtain the initial working calendar for each date within a preset future duration. The initial working calendar may include information such as the initial work plan and shift schedule for each date. The preset future duration may be user-defined. The processor may also obtain unfinished orders and determine the estimated completion time cutoffs for the unfinished orders. After determining the estimated completion time cutoffs for the unfinished orders, the processor may determine the dates from the current time point to the estimated completion time cutoff as the dates to be adjusted. After determining the dates to be adjusted, the processor may adjust the initial working calendar according to the type of each date to be adjusted to obtain the first working calendar for each date to be adjusted. The types include working days and rest days.
[0037] In an embodiment of the present application, rest days include preset rest days and holidays, and adjusting the initial working calendar according to the type of each date to be adjusted includes: traversing each date to be adjusted to determine whether each date to be adjusted is a preset rest day; for any date to be adjusted, if the date to be adjusted is not a preset rest day, determining whether the date to be adjusted is a holiday; for any date to be adjusted, if the date to be adjusted is not a holiday, determining that the date to be adjusted is a working day; for any date to be adjusted, if the date to be adjusted is a working day, adjusting the initial working calendar of the date to be adjusted according to the start time and shift schedule of the date to be adjusted to obtain the first working calendar of the date to be adjusted; for any date to be adjusted, if the date to be adjusted is a preset rest day or holiday, adjusting the initial working calendar of the date to be adjusted according to the rest time of the date to be adjusted to obtain the first working calendar of the date to be adjusted.
[0038] The rest days may include preset rest days and holidays, wherein the preset rest days may include weekly rest days, monthly rest days, etc. The processor may adjust the initial working calendar according to the type of each date to be adjusted, wherein the type of each date to be adjusted may be a working day or a rest day. The processor may traverse each date to be adjusted to determine whether each date to be adjusted is a preset rest day. For any date to be adjusted, the processor may determine whether the adjustment date is a preset rest day. In the case that the date to be adjusted is not a preset rest day, the processor may determine whether the adjustment date is a holiday. In the case that the adjustment date is not a holiday, the processor may determine that the adjustment date is a working day. In the case that the adjustment date is determined to be a working day, the processor may adjust the initial working calendar of the adjustment date according to the start time and the shift schedule of the adjustment date to obtain the first working calendar of the adjustment date. In the case that the adjustment date is a preset rest day or a holiday, the processor may adjust the initial working calendar of the adjustment date according to the rest time of the adjustment date to obtain the first working calendar of the adjustment date.
[0039] Step 104: When an uncompleted order is updated, determine the target time required to complete the updated uncompleted order.
[0040] The processor may also determine whether an uncompleted order is updated. If an uncompleted order is updated, the processor may determine a target time required to complete the updated uncompleted order.
[0041] In an embodiment of the present application, when an unfinished order is updated, the target duration required to complete the updated unfinished order is determined, including: determining the priority of each unfinished order in the updated unfinished orders; arranging each updated unfinished order in descending order based on the priority, and determining at least one process corresponding to each updated unfinished order after the sorting in turn; determining the target duration based on at least one process of each updated unfinished order after the sorting and the number of updated unfinished orders.
[0042] The processor can determine whether an unfinished order has been updated. For example, the raw materials required for the unfinished order may be delayed or there may be an inserted order. In the event that an unfinished order is updated, the processor can determine the target duration required to complete the updated unfinished order. Specifically, the processor can determine the priority of each unfinished order in the updated unfinished orders. After determining the priority of each unfinished order, the processor can sort each updated unfinished order in descending order based on the priority, and determine at least one process corresponding to each updated unfinished order after sorting in turn. After determining at least one process corresponding to each updated unfinished order, the processor can determine the target duration based on at least one process of each updated unfinished order after sorting and the number of updated unfinished orders.
[0043] In an embodiment of the present application, determining the target duration based on at least one process of each updated unfinished order after sorting and the number of updated unfinished orders includes: obtaining the average unit working time corresponding to each process of each updated unfinished order after sorting; and determining the target duration by multiplying the product of all average unit working times corresponding to all updated unfinished orders after sorting and the number of all updated unfinished orders.
[0044] The processor may determine the target duration according to at least one process of each updated unfinished order after sorting and the number of updated unfinished orders. Specifically, the processor may obtain the average unit working time corresponding to each process of each updated unfinished order after sorting. The product of all the average unit working time corresponding to all the updated unfinished orders after sorting and the number of all the updated unfinished orders is determined as the target duration.
[0045] For example, in the event of an inserted order, the processor can arrange the orders in descending order according to the order batch of each unfinished order after the inserted order, the user's mandatory requirements for each unfinished order, the insertion order requirements, the locked batches, and the normal stocking requirements, so that each unfinished order is arranged in descending order based on its priority. After the unfinished orders are arranged in descending order, the processor can determine the corresponding process of each unfinished order and the working time required for each process in turn, so as to obtain the average unit working time corresponding to each process of each updated unfinished order. After obtaining the average unit working time corresponding to each process of each updated unfinished order, the processor can determine the product of all the average unit working times corresponding to all the sorted updated unfinished orders and the number of all the updated unfinished orders as the target time.
[0046] Step 105: Determine the total working hours and the total rest hours in all first working calendars.
[0047] The processor may determine the total working hours and the total rest hours in all first working calendars.
[0048] In an embodiment of the present application, determining the total working hours and total rest time in all first working calendars includes: for each first working calendar, obtaining the shifts in the first working calendar, the working hours of each shift and the rest time of each shift; for each first working calendar, determining the working hours and rest time of the first working calendar according to the total number of shifts in the first working calendar, the working hours of each shift and the rest time of each shift; determining the total working hours according to the working hours of all first working calendars, and determining the total rest time according to the rest time of all first working calendars.
[0049] The processor can determine the total working hours and total rest time in all the first working calendars. Specifically, for each first working calendar, the processor can obtain the shifts in each first working calendar, the working hours of each shift, and the rest time of each shift. After obtaining the shifts in the first working calendar, the working hours of each shift, and the rest time of each shift, the processor can determine the working hours and rest time of the first working calendar according to the total number of shifts in the first working calendar, the working hours of each shift, and the rest time of each shift. After obtaining the working hours and rest time of each first working calendar, the processor can determine the total rest time according to the total working hours that are missing from the working hours of all the first working calendars, and according to the rest time of all the first working calendars.
[0050] Step 106: When the target duration is greater than the total working hours and less than the sum of the total working hours and the total rest time, determine the dates to be adjusted corresponding to multiple first working calendars in all first working calendars that represent non-start work, and determine a preset number of dates to be adjusted that represent non-start work and are closest to the current time point as the selected dates.
[0051] Step 107: when the target duration is greater than the sum of the total working duration and the total rest duration, the dates to be adjusted corresponding to the plurality of first working calendars that indicate non-working hours in all the first working calendars are determined as the candidate dates.
[0052] Step 108: Adjust the first working calendar of each to-be-selected date according to the updated unfinished orders to obtain the final working calendar of each to-be-selected date, and determine the first working calendars of all to-be-adjusted dates except the to-be-selected date as the corresponding final working calendars.
[0053] After determining the total working hours and the total rest time, the processor can compare the target time, the total working hours and the total rest time. When the target time is greater than the total working hours and less than the sum of the total rest time and the total rest time, the processor can determine the dates to be adjusted corresponding to the multiple first working calendars in all the first working calendars that represent non-starting work, and determine the preset number of dates to be adjusted that are closest to the current time point as the dates to be selected. When the target time is greater than the sum of the total working hours and the total rest time, the processor can determine the dates to be adjusted corresponding to the multiple first working calendars in all the first working calendars that represent non-starting work as the dates to be selected. After determining the dates to be selected, the processor can adjust the first working calendar of each date to be selected according to the updated unfinished orders to obtain the final working calendar of each date to be selected, and determine the first working calendar of all dates to be adjusted except the date to be selected as the final working calendar corresponding to the dates to be adjusted except the date to be selected. The generated final working calendar is a time management task that can be used to plan and track various production tasks or activities and to manage the factory's production plan.
[0054] In the real-time example of this application, when the target duration is greater than the sum of the total working hours and the total rest time, the processor can determine the dates to be adjusted corresponding to the multiple first working calendars that represent the unstarted work in all the first working calendars as the selected dates. The processor can also determine the additional production time required for the updated unfinished orders based on the target duration, the sum of the total working hours and the total rest time, and prompt the use of outsourcing production to assist production based on the additional production time, so that all unfinished orders can be completed on time and meet user needs.
[0055] In an embodiment of the present application, the method further includes: when the target duration is less than or equal to the total start time, determining the first working calendar of each date to be adjusted as the final working calendar of each date to be adjusted.
[0056] After determining the total working hours and the total rest time, the processor can compare the target time, the total working hours and the total rest time. When the target time is less than or equal to the total working hours, the processor can determine the first working calendar of each date to be adjusted as the final working calendar of each date to be adjusted.
[0057] In an embodiment of the present application, the method also includes: after determining the first working calendar of all dates to be adjusted except the selected date as the corresponding final working calendar, obtaining the authority of the object to perform the production task, wherein each final working calendar is associated with the organizational structure of the factory, and the organizational structure includes at least one of the factory, the workshop and the production line; and displaying the corresponding final working calendar to the object based on the authority of the object.
[0058] After determining the first working calendar of all the dates to be adjusted except the selected date as the corresponding final working calendar, the processor can obtain the authority of the object of the production task to be executed, wherein each final working calendar is associated with the organizational structure of the factory, and the organizational structure includes at least one of the factory, the workshop and the production line. After obtaining the authority of the object of the production task to be executed, the processor can display the corresponding final working calendar to the object of the production task to be executed based on the authority of the object of the production task to be executed.
[0059] In an embodiment of the present application, the object's permissions include factory level, workshop level and production line level, and displaying the corresponding final work calendar to the object based on the object's permissions includes: when the object's permissions are at the factory level, displaying the final work calendar corresponding to the factory level to the object; when the object's permissions are at the workshop level, displaying the final work calendar corresponding to the workshop level to the object; when the object's permissions are at the production line level, displaying the final work calendar corresponding to the production line level to the object.
[0060] The permissions of the object to be executed for the production task include factory level, workshop level and production line level. Among them, the factory level usually refers to the entire factory or enterprise. The workshop level usually refers to a specific production area or department. The production line level usually refers to a specific production line. The processor can display the corresponding final work calendar to the object based on the permissions of the object. Specifically, the processor can determine the permissions of the object to be executed for the production task. In the case where the permissions of the object are at the factory level, the processor can display the final work calendar corresponding to the factory level to the object. In the case where the permissions of the object are at the workshop level, the processor can display the final work calendar corresponding to the workshop level to the object. In the case where the permissions of the object are at the production line level, the processor can display the final work calendar corresponding to the production line level to the object.
[0061] For example, for an object with production line-level authority, if there is no final working calendar at the production line level for the final working calendar of all dates to be adjusted, the processor can show the final working calendar of the workshop level, the upper level of the production line level, to the object. If there is no final working calendar at the production line level for the final working calendar of all adjusted dates, and there is no final working calendar at the workshop level, the processor can show the final working calendar at the factory level to the object, so that each object can understand the working calendar that best suits itself and meets its own needs, thereby improving work efficiency.
[0062] In an embodiment of the present application, the processor can obtain a series of basic data such as holiday data, various shift systems, shifts, and shift scheduling that each production line or workshop in the factory can enjoy, and fill in the collected basic data according to the work calendar template to obtain the initial work calendar of each calendar within the preset duration. After obtaining the initial work calendar of each date within the preset duration, the processor can determine the estimated completion time cutoff of the unfinished orders in the factory, and determine multiple dates to be adjusted between the current time point and the estimated completion time cutoff. The processor can traverse each date to be adjusted, first match each date to be adjusted with a weekend, and determine whether it is a weekend. In the case that any date to be adjusted is a weekend, the processor can adjust the initial work calendar of any date to be adjusted to obtain the first work calendar of any date to be adjusted. In the case that any date to be adjusted is not a weekend, the processor can determine whether any date to be adjusted is a monthly holiday. In the case that any date to be adjusted is a monthly holiday, the processor can adjust the initial work calendar of any date to be adjusted to obtain the first work calendar of any date to be adjusted. In the case that any date to be adjusted is not a monthly holiday, the processor may determine that any date to be adjusted is a working day. In the case that any date to be adjusted is a working day, the processor may adjust the initial working calendar of any date to be adjusted to obtain the first working calendar of any date to be adjusted. In the case of obtaining the first working calendar of each date to be adjusted, the processor may use the first working date of each date to be adjusted to overwrite the initial working calendar of each date to be adjusted, so as to ensure that each date to be adjusted has only one latest and most accurate working calendar.
[0063] When the unfinished orders in the factory are updated, the processor can determine the target time required to complete the updated unfinished orders based on the updated unfinished orders. The processor can also determine the total working hours and total rest time in all the first working calendars, and compare the target time, the total working hours, and the total rest time.
[0064] When the target duration is less than the total start time, the processor may determine the first working calendar of each date to be adjusted as the final working calendar of each date to be adjusted.
[0065] When the target duration is greater than the total working duration and less than the sum of the total working duration and the total rest duration, the processor can select the dates to be adjusted corresponding to the first working calendars that are not started in all the first working calendars, and determine the preset number of dates to be adjusted that are closest to the current time point as the selected dates. The preset number is determined by the user based on the target duration.
[0066] When the target duration is greater than the sum of the total working duration and the total resting duration, the processor may determine the to-be-adjusted dates corresponding to the plurality of first working calendars representing non-starting of work in all the first working calendars as the to-be-selected dates.
[0067] After determining the dates to be selected, the processor can adjust the first working calendar of each date to be selected according to the updated unfinished orders to obtain the final working calendar of each date to be selected, and determine the first working calendars of all dates to be adjusted except the date to be selected as the corresponding final working calendars.
[0068] Through the above technical solution, the daily work calendar can be adaptively generated or updated, and the method of updating the work calendar is more flexible and more practical, which reduces human-generated errors and is more in line with actual production conditions.
[0069] Figure 1 FIG. 1 is a flow chart of a method for generating a work calendar in one embodiment. Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0070] The present application also provides a device for generating a work calendar, including:
[0071] a memory configured to store instructions;
[0072] The processor is configured to call instructions from the memory and implement the above method for generating a work calendar when executing the instructions.
[0073] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned method for generating a work calendar.
[0074] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 2As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as target duration, total working hours and total rest time. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for generating a work calendar is implemented.
[0075] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0076] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining an initial working calendar for each date within a preset future duration; determining an estimated completion time cutoff for unfinished orders, and determining dates from the current time point to the estimated completion time cutoff as dates to be adjusted; adjusting the initial working calendar according to the type of each date to be adjusted to obtain a first working calendar for each date to be adjusted, wherein the types include working days and rest days; in the event that an unfinished order is updated, determining a target duration required to complete the updated unfinished order; determining the total working hours and rest hours in all first working calendars; and when the target duration is greater than the total working hours, determining the total rest hours. When the target working hours are longer and less than the sum of the total working hours and the total rest hours, determine the dates to be adjusted corresponding to multiple first working calendars that represent non-start work in all the first working calendars, and determine a preset number of dates to be adjusted that represent non-start work and are closest to the current time point as the selected dates; when the target working hours are longer and less than the sum of the total working hours and the total rest hours, determine the dates to be adjusted corresponding to multiple first working calendars that represent non-start work in all the first working calendars as the selected dates; adjust the first working calendar of each selected date according to the updated unfinished orders to obtain the final working calendar of each selected date, and determine the first working calendars of all the adjusted dates except the selected date as the corresponding final working calendars.
[0077] In one embodiment, when an unfinished order is updated, the target duration required to complete the updated unfinished order is determined, including: determining the priority of each unfinished order in the updated unfinished orders; arranging each updated unfinished order in descending order based on the priority, and determining at least one process corresponding to each updated unfinished order after sorting in turn; determining the target duration based on at least one process of each updated unfinished order after sorting and the number of updated unfinished orders.
[0078] In one embodiment, determining the target duration based on at least one process of each updated unfinished order after sorting and the number of updated unfinished orders includes: obtaining the average unit working time corresponding to each process of each updated unfinished order after sorting; and determining the target duration by multiplying the product of all average unit working times corresponding to all updated unfinished orders after sorting and the number of all updated unfinished orders.
[0079] In one embodiment, determining the total working hours and total rest time in all first working calendars includes: for each first working calendar, obtaining the shifts in the first working calendar, the working hours of each shift and the rest time of each shift; for each first working calendar, determining the working hours and rest time of the first working calendar according to the total number of shifts in the first working calendar, the working hours of each shift and the rest time of each shift; determining the total working hours according to the working hours of all first working calendars, and determining the total rest time according to the rest time of all first working calendars.
[0080] In one embodiment, the method further includes: when the target duration is less than or equal to the total start time, determining the first working calendar of each date to be adjusted as the final working calendar of each date to be adjusted.
[0081] In one embodiment, rest days include preset rest days and holidays, and adjusting the initial working calendar according to the type of each date to be adjusted includes: traversing each date to be adjusted to determine whether each date to be adjusted is a preset rest day; for any date to be adjusted, if the date to be adjusted is not a preset rest day, determining whether the date to be adjusted is a holiday; for any date to be adjusted, if the date to be adjusted is not a holiday, determining that the date to be adjusted is a working day; for any date to be adjusted, if the date to be adjusted is a working day, adjusting the initial working calendar of the date to be adjusted according to the start time and shift schedule of the date to be adjusted to obtain the first working calendar of the date to be adjusted; for any date to be adjusted, if the date to be adjusted is a preset rest day or a holiday, adjusting the initial working calendar of the date to be adjusted according to the rest time of the date to be adjusted to obtain the first working calendar of the date to be adjusted.
[0082] In one embodiment, the method also includes: after determining the first working calendar of all dates to be adjusted except the selected date as the corresponding final working calendar, obtaining the authority of the object to perform the production task, wherein each final working calendar is associated with the organizational structure of the factory, and the organizational structure includes at least one of the factory, the workshop and the production line; and displaying the corresponding final working calendar to the object based on the authority of the object.
[0083] In one embodiment, the object's permissions include factory level, workshop level, and production line level, and displaying the corresponding final work calendar to the object based on the object's permissions includes: when the object's permissions are at the factory level, displaying the final work calendar corresponding to the factory level to the object; when the object's permissions are at the workshop level, displaying the final work calendar corresponding to the workshop level to the object; when the object's permissions are at the production line level, displaying the final work calendar corresponding to the production line level to the object.
[0084] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the steps of the method for generating a work calendar.
[0085] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0086] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0089] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0090] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0091] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0092] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0093] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for generating a work calendar, characterized in that: The method comprises: Get the initial working calendar for each date within the preset future time period; Determine the estimated completion time cutoff of the unfinished orders, and determine the date between the current time point and the estimated completion time cutoff as the date to be adjusted; Adjusting the initial working calendar according to the type of each date to be adjusted to obtain a first working calendar for each date to be adjusted, wherein the type includes working days and rest days; In the event that the unfinished order is updated, determining a target time required to complete the updated unfinished order; Determine the total working hours and total rest hours in all first working calendars; When the target duration is greater than the total working duration and less than the sum of the total working duration and the total rest duration, determining the dates to be adjusted corresponding to a plurality of first working calendars in all the first working calendars that represent non-working hours, and determining a preset number of dates to be adjusted that represent non-working hours that are closest to the current time point as the selected dates; When the target duration is greater than the sum of the total working duration and the total rest duration, determining the to-be-adjusted dates corresponding to the plurality of first working calendars that are not working in all the first working calendars as the candidate dates; The first working calendar of each to-be-selected date is adjusted according to the updated unfinished orders to obtain the final working calendar of each to-be-selected date, and the first working calendars of all to-be-adjusted dates except the to-be-selected date are determined as the corresponding final working calendars.
2. The method for generating a work calendar according to claim 1, characterized in that: In the case where the unfinished order is updated, determining a target time required to complete the updated unfinished order includes: determining a priority of each of the uncompleted orders in the updated uncompleted orders; Arrange each updated unfinished order in descending order based on the priority, and sequentially determine at least one process corresponding to each updated unfinished order after the sorting; The target duration is determined according to at least one process of each updated unfinished order after sorting and the quantity of the updated unfinished orders.
3. The method for generating a work calendar according to claim 2, characterized in that: The determining the target duration according to at least one process of each updated unfinished order after sorting and the number of the updated unfinished orders comprises: Get the average unit working time corresponding to each process of each updated unfinished order after sorting; The target duration is determined by multiplying the product of all average unit working hours corresponding to all updated unfinished orders after sorting and the number of all updated unfinished orders.
4. The method for generating a work calendar according to claim 1, characterized in that: Determining the total working hours and the total rest hours in all first working calendars includes: For each first working calendar, obtaining the shifts in the first working calendar, the start time of each shift, and the rest time of each shift; For each first working calendar, determining the start time and rest time of the first working calendar according to the total number of shifts in the first working calendar, the start time of each shift, and the rest time of each shift; The total working time is determined according to the working time of all the first working calendars, and the total rest time is determined according to the rest time of all the first working calendars.
5. The method for generating a work calendar according to claim 1, characterized in that: The method further comprises: When the target duration is less than or equal to the total start time, the first working calendar of each date to be adjusted is determined as the final working calendar of each date to be adjusted.
6. The method for generating a work calendar according to claim 1, characterized in that: The rest days include preset rest days and holidays, and the adjusting of the initial working calendar according to the type of each date to be adjusted includes: Traverse each date to be adjusted to determine whether each date to be adjusted is a preset rest day; For any date to be adjusted, if the date to be adjusted is not a preset rest day, determining whether the date to be adjusted is a holiday; For any date to be adjusted, if the date to be adjusted is not a holiday, determining the date to be adjusted to be a working day; For any date to be adjusted, if the date to be adjusted is the working day, the initial working calendar of the date to be adjusted is adjusted according to the start time and the shift schedule of the date to be adjusted to obtain a first working calendar of the date to be adjusted; For any date to be adjusted, when the date to be adjusted is a preset rest day or holiday, the initial working calendar of the date to be adjusted is adjusted according to the rest time of the date to be adjusted to obtain a first working calendar of the date to be adjusted.
7. The method for generating a work calendar according to claim 1, characterized in that: The method further comprises: After determining the first working calendar of all the dates to be adjusted except the selected date as the corresponding final working calendar, obtaining the authority of the object of the production task to be executed, wherein each final working calendar is associated with the organizational structure of the factory, and the organizational structure includes at least one of the factory, the workshop and the production line; The corresponding final work calendar is displayed to the object based on the authority of the object.
8. The method for generating a work calendar according to claim 7, characterized in that: The permissions of the object include factory level, workshop level and production line level, and the display of the corresponding final work calendar to the object based on the permissions of the object includes: In the case where the authority of the object is at the factory level, displaying a final work calendar corresponding to the factory level to the object; In the case where the authority of the object is at the workshop level, displaying a final work calendar corresponding to the workshop level to the object; In a case where the authority of the object is at the production line level, a final work calendar corresponding to the production line level is displayed to the object.
9. A device for generating a work calendar, characterized in that: include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the method for generating a work calendar according to any one of claims 1 to 8 when executing the instructions.
10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the method for generating a work calendar according to any one of claims 1 to 8.
Citation Information
Patent Citations
PCB enterprise order management and production planning system
CN104299107A
Data processing method and device
CN114240077A
Working calendar document generation method and device, equipment and storage medium
CN115796818A
Order insertion system and method considering production constraint and delivery time constraint
CN116307411A
Scheduling optimization system for made-to-order product
JP2003131721A