1.使用shif时序计算作品中的延迟. [英] 1. Calculation of Delay in a work using shif timing.
问题描述
大家好,
我想计算任何工作/过程的延迟时间.我有轮班时间表,就像办公室时间表一样,一天可能是一班,二班或三班.在这段时间之间,有几分钟的休息时间供午餐或茶歇之用.
一个工作/过程可以在第一班完成,也可以进行到第二班,第三班,或者工作也可以到第二天进行.而且我有标准的时间来完成工作/流程.
Hi All,
I want to calculate delay time for any work/process. I have shifts timing table just like office timing and it may be 1st, 2nd, or 3rd shift in a day. In between the timing few minute breaks are there for lunch or tea break etc.
One work/Process may be finished within 1st shift or it may go to 2nd, 3rd shift also or work may go to next day any shift also. And I have a standard time for the work/process to complete.
ShiftTime
ID Shift FromTime ToTime Descriptioin
1 1 05:55 07:55 10 mins tea break
2 1 08:05 09:55 30 min lunch break
3 1 10:25 12:30 10 min tea break
4 1 12:40 14:30 End of 1st Shift.
5 2 15:01 17:00 10 min tea break
6 2 17:10 19:30 30 min lunch break
7 2 20:00 21:50 10 min tea break
8 2 22:00 23:35 End of 2nd Shift.
StandaredTime
ID Stage StageName StandardTime(MINUTE)
1 1 WELD 600
2 2 PAINT 800
3 1 ASSEMBLY 800
4 1 QC 200
因此,我必须计算一个工作/流程的延迟时间.
情况1-支持今天只有两次轮班. Process1在第二班开始于18:30开始,StandardTime是10小时以完成该过程,并假设第二天第一班完成.所以.计算将是这样的.
23:35(第一天第二班结束)-18:30(流程开始时间)-00:30分钟(午餐时间)-00:10(下午茶时间)= 4:25分钟.工作完成了.接下来的5:30分钟,工作将在第二天的第一班完成.第二天的计算将是相同的.
上午5:55 + 5:35(剩余工作时间)+ 30分钟(午餐休息)+ 10分钟(下午茶休息).因此,工作应在下午12:00 AM之前完成.
而假期我也要计算.而且我需要增加这个假期来计算延迟.
So I have to calculate the delay time for one work/process.
Case 1 - Support Today there are only two shift. Process1 got started on 2nd shift at 18:30 and StandardTime is 10 Hours to complete the process and suppose it got finished next day 1st shift. So. Calculation would be something like this.
23:35(End of 2nd shift of first day) - 18:30 (Process starting time) -00:30 mins (Lunch break) -00:10 (mins tea break) = 4:25 mins. Job is done. Next 5:30 mins job will be done on next day 1st shift. Next day calculation would be the same like.
5:55 am + 5:35 (hr job remain) + 30 min (lunch break) + 10 min (tea break). So the work should be finished by 12:00 AM afternoon.
And Holiday also I have to calculate. And I need to add to this holiday to calculate delay.
ID NoOfShift Date
1 2 2009-01-01 00:00:00.000
2 1 2009-01-02 00:00:00.000
3 2 2009-01-03 00:00:00.000
4 0 2009-01-04 00:00:00.000
5 2 2009-01-05 00:00:00.000
6 1 2009-01-06 00:00:00.000
Note : NoOfShift 0 means holiday for that day.
我不知道如何计算.
谢谢
Shambhu
I am not getting any idea how to calculate.
Thanks
Shambhu
推荐答案
如果您学会使用搜索引擎,则可能会获得更多帮助.
您可以使用搜索引擎找出什么是搜索引擎. :)
尝试搜索 sql server计算时差并开始阅读,直到找到您了解的内容.然后尝试一下.如果您遇到问题,请在此处再次提出具体问题.
You are likely to get more help if you learn to use a search engine.
You can use a search engine to find out what a search engine is. :)
Try searching for sql server calculate time difference and start reading till you find something that you understand. Then try it out. If you get a problem then ask here again with the specific problem.
这篇关于1.使用shif时序计算作品中的延迟.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!