ba27a782 by 王聪

fsm update

1 parent ec4ef15b
...@@ -1063,7 +1063,7 @@ class AFCCompareReportNew(models.Model): ...@@ -1063,7 +1063,7 @@ class AFCCompareReportNew(models.Model):
1063 situ_db_label = 'afc' 1063 situ_db_label = 'afc'
1064 1064
1065 1065
1066 class AFCNscInvoice(models.Model): 1066 class NscInvoice(models.Model):
1067 id = models.AutoField(primary_key=True, verbose_name="id") # 主键 1067 id = models.AutoField(primary_key=True, verbose_name="id") # 主键
1068 vin = models.CharField(max_length=64, verbose_name="车架号") # 索引 1068 vin = models.CharField(max_length=64, verbose_name="车架号") # 索引
1069 content = models.TextField(null=True, verbose_name="nsc发票信息") 1069 content = models.TextField(null=True, verbose_name="nsc发票信息")
...@@ -1071,17 +1071,7 @@ class AFCNscInvoice(models.Model): ...@@ -1071,17 +1071,7 @@ class AFCNscInvoice(models.Model):
1071 1071
1072 class Meta: 1072 class Meta:
1073 managed = False 1073 managed = False
1074 db_table = 'afc_nsc_invoice' 1074 db_table = 'nsc_invoice'
1075 situ_db_label = 'afc' 1075 situ_db_label = 'hil'
1076 1076
1077 1077
1078 class HILNscInvoice(models.Model):
1079 id = models.AutoField(primary_key=True, verbose_name="id") # 主键
1080 vin = models.CharField(max_length=64, verbose_name="车架号") # 索引
1081 content = models.TextField(null=True, verbose_name="nsc发票信息")
1082 create_time = models.DateTimeField(verbose_name='创建时间') # 索引
1083
1084 class Meta:
1085 managed = False
1086 db_table = 'hil_nsc_invoice'
1087 situ_db_label = 'hil'
......
...@@ -8,7 +8,7 @@ from common.tools.comparison import cp ...@@ -8,7 +8,7 @@ from common.tools.comparison import cp
8 from common.mixins import LoggerMixin 8 from common.mixins import LoggerMixin
9 from rest_framework.permissions import IsAuthenticated 9 from rest_framework.permissions import IsAuthenticated
10 from apps.account.authentication import OAuth2AuthenticationWithUser 10 from apps.account.authentication import OAuth2AuthenticationWithUser
11 from apps.doc.models import HILNscInvoice, AFCNscInvoice 11 from apps.doc.models import NscInvoice
12 import json 12 import json
13 from datetime import datetime 13 from datetime import datetime
14 14
...@@ -53,7 +53,7 @@ class NSCInvoiceView(GenericView): ...@@ -53,7 +53,7 @@ class NSCInvoiceView(GenericView):
53 vat = content.get('vat', 0.0) 53 vat = content.get('vat', 0.0)
54 vat_rate = content.get('vatRate', 0.0) 54 vat_rate = content.get('vatRate', 0.0)
55 55
56 HILNscInvoice.objects.create(vin=vin, content=json.dumps(content), create_time=datetime.now()) 56 NscInvoice.objects.create(vin=vin, content=json.dumps(content), create_time=datetime.now())
57 return response.ok() 57 return response.ok()
58 58
59 59
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!