def workWH(eID,title): is_enable_leftbutton = True is_enable_rightbutton = True today = todayDate() #create items for WH wh = currentTimeProcess("WH") item_plan = FakeStatusTracking.objects.filter(plan_wh_start__year=today.year, plan_wh_start__month=today.month, plan_wh_start__day=today.day).values_list("plan_id","plan_wh_start", "product_id","actual_wh_start","process1","process2","process3").order_by('plan_wh_start') items = list(item_plan) return render_to_response('WH/listWH.html',locals())
def workPT(eID,title): is_enable_leftbutton = True is_enable_rightbutton = True #create items for PT today = todayDate() pt = str(currentTimeProcess("PT")) item_plan = FakeStatusTracking.objects.filter(plan_pt_start__year=today.year, plan_pt_start__month=today.month, plan_pt_start__day=today.day).values_list("plan_id","plan_pt_start", "plan_pt_end", "product_id", "actual_pt_start", "actual_pt_end","process2","process4").order_by('plan_pt_start') items = list(item_plan) return render_to_response('PT/listPT.html', locals())
def showPC(eID,title): today = todayDate() page = "PC" is_enable_leftbutton = True is_enable_rightbutton = True #create items for PC #extra = db_type(FakeStatusTracking.objects.all()) item_plan_cr = FakeStatusTracking.objects.filter(plan_cr_start__year= today.year, plan_cr_start__month=today.month, plan_cr_start__day=today.day).values_list("plan_cr_start","plan_cr_end","product_id","actual_cr_start","actual_cr_end","days_left","plan_amount","actual_amount_cr").order_by('plan_cr_start') #temp_contents = extra[0].days_left #item_plan_cr = FakeStatusTracking.objects.filter(plan_cr_start__year= today.year, plan_cr_start__month=today.month, plan_cr_start__day=today.day).values_list("plan_cr_start","plan_cr_end","product_id","actual_cr_start","actual_cr_end").order_by('plan_cr_start') #item_plan_cr = FakeStatusTracking.objects.filter(plan_cr_start__year= item_plan_cv = FakeStatusTracking.objects.filter(plan_cv_start__year=today.year, plan_cv_start__month=today.month, plan_cv_start__day=today.day).values_list("plan_cv_start", "plan_cv_end", "product_id", "actual_cv_start", "actual_cv_end", "cv_machine","process1","plan_due").order_by('plan_cv_start') item_plan_pt = FakeStatusTracking.objects.filter(plan_pt_start__year=today.year, plan_pt_start__month=today.month, plan_pt_start__day=today.day).values_list("plan_pt_start", "plan_pt_end", "product_id", "actual_pt_start", "actual_pt_end","process2","plan_due").order_by('plan_pt_start') #bug here ordering (also in utility line67) item_plan_wh = FakeStatusTracking.objects.filter(plan_wh_start__year=today.year, plan_wh_start__month=today.month, plan_wh_start__day=today.day).values_list("plan_wh_start", "product_id","actual_wh_start","process1","process2","process3","plan_due").order_by('plan_wh_start') items_plan_cr = list(item_plan_cr) items_plan_cv = list(item_plan_cv) items_plan_pt = list(item_plan_pt) items_plan_wh = list (item_plan_wh) cr = currentTimeProcess("CR") cv = currentTimeProcess("CV") cvThreeCS = currentTimeProcess("3CS") cvThreeCL = currentTimeProcess("3CL") cvTwoCL = currentTimeProcess("2CL") cvThreeCW = currentTimeProcess("3CW") cvTwoCS = currentTimeProcess("2CS") pt = currentTimeProcess("PT") wh = currentTimeProcess("WH") currentTimeProcess("WH") #prepare list for CR size = len(items_plan_cr) if(currentProcess("CR")!='idle'): pos = positionOfCurrentProcess("CR",currentProcess("CR")[0][0:8]) else : pos = size #temp_contents = currentProcess("CV") startList = returnStartingPoint(pos,size) endList = startList+getPCItemNum() items_plan_cr=items_plan_cr[startList:endList] #prepare list for CV size = len(items_plan_cv) pos = positionOfCurrentProcess("CV",currentProcess("CV")[0][0:8]) startList = returnStartingPoint(pos,size) endList = startList+getPCItemNum() items_plan_cv=items_plan_cv[startList:endList] #prepare list for PT size = len(items_plan_pt) pos = positionOfCurrentProcess("PT",currentProcess("PT")[0][0:8]) startList = returnStartingPoint(pos,size) endList = startList+getPCItemNum() items_plan_pt=items_plan_pt[startList:endList] #prepare list for WH size = len(items_plan_wh) #pos =currentProcess("WH")[0][0] #temp_contents = currentProcess("WH")[0][0] pos = positionOfCurrentProcess("WH",currentProcess("WH")[0][0]) startList = returnStartingPoint(pos,size) endList = startList+getPCItemNum() items_plan_wh=items_plan_wh[startList:endList] #temp_contents = currentProcess("2CL") return render_to_response('PC/view.html', locals())