18 lines
		
	
	
		
			617 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			617 B
		
	
	
	
		
			Python
		
	
	
	
from django.shortcuts import render
 | 
						|
from rest_framework import serializers
 | 
						|
from rest_framework.generics import ListAPIView
 | 
						|
from rest_framework.response import Response
 | 
						|
from apps.pm.models import ProductionPlan, SubProductionPlan
 | 
						|
from apps.srm.serializers import PlanGanttSerializer
 | 
						|
# Create your views here.
 | 
						|
 | 
						|
class GanttPlan(ListAPIView):
 | 
						|
    """
 | 
						|
    计划-子计划甘特图
 | 
						|
    """
 | 
						|
    perms_map = {'get':'*'}
 | 
						|
    serializer_class = PlanGanttSerializer
 | 
						|
    queryset = ProductionPlan.objects.filter(is_deleted=False, is_planed=True).prefetch_related('subplan_plan', 'subplan_plan__process')
 | 
						|
    ordering = ['-id']
 | 
						|
 |