Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
shijing 2021-12-29 17:02:30 +08:00
commit e2ee06e21b
3 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -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']] = {

View File

@ -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()