diff --git a/hb_client/.env.development b/hb_client/.env.development index 003a43c..ef83e12 100644 --- a/hb_client/.env.development +++ b/hb_client/.env.development @@ -2,8 +2,8 @@ ENV = 'development' # base api -#VUE_APP_BASE_API = 'http://127.0.0.1:8000/api' -VUE_APP_BASE_API = 'http://47.95.0.242:2222/api' +VUE_APP_BASE_API = 'http://127.0.0.1:8000/api' +#VUE_APP_BASE_API = 'http://47.95.0.242:2222/api' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, diff --git a/hb_server/apps/pm/services.py b/hb_server/apps/pm/services.py index c5e420b..b5eef7e 100644 --- a/hb_server/apps/pm/services.py +++ b/hb_server/apps/pm/services.py @@ -10,8 +10,8 @@ class PmService: """ ret = {} subplans = SubProductionPlan.objects.filter(production_plan=plan, is_deleted=False) - qs = subplans.values('process', 'process__name', 'process__number').annotate(count=Sum('main_count'), - count_real=Sum('main_count_real'), count_ok=Sum('main_count_ok'), count_notok=Sum('main_count_notok')) + qs = subplans.values('process', 'process__name', 'process__number').annotate(count=Sum('count'), + count_real=Sum('count_real'), count_ok=Sum('count_ok'), count_notok=Sum('count_notok')) qs_list = list(qs) for i in qs_list: ret[i['process__number']] = { diff --git a/hb_server/apps/srm/serializers.py b/hb_server/apps/srm/serializers.py index 41543df..edea221 100644 --- a/hb_server/apps/srm/serializers.py +++ b/hb_server/apps/srm/serializers.py @@ -7,7 +7,7 @@ class SubplanGanttSerializer(serializers.ModelSerializer): product_ = MaterialSimpleSerializer(source='product', read_only=True) class Meta: model = SubProductionPlan - fields = ['id', 'number', 'start_date', 'end_date', 'count', 'count_real', 'count_ok', 'start_date_real', 'end_date_real', 'process_'] + fields = ['id', 'number', 'start_date', 'end_date', 'count', 'count_real', 'count_ok', 'start_date_real', 'end_date_real', 'process_', 'product_'] class PlanGanttSerializer(serializers.ModelSerializer): children = serializers.SerializerMethodField()