ba27a782 by 王聪

fsm update

1 parent ec4ef15b
......@@ -1063,7 +1063,7 @@ class AFCCompareReportNew(models.Model):
situ_db_label = 'afc'
class AFCNscInvoice(models.Model):
class NscInvoice(models.Model):
id = models.AutoField(primary_key=True, verbose_name="id") # 主键
vin = models.CharField(max_length=64, verbose_name="车架号") # 索引
content = models.TextField(null=True, verbose_name="nsc发票信息")
......@@ -1071,17 +1071,7 @@ class AFCNscInvoice(models.Model):
class Meta:
managed = False
db_table = 'afc_nsc_invoice'
situ_db_label = 'afc'
db_table = 'nsc_invoice'
situ_db_label = 'hil'
class HILNscInvoice(models.Model):
id = models.AutoField(primary_key=True, verbose_name="id") # 主键
vin = models.CharField(max_length=64, verbose_name="车架号") # 索引
content = models.TextField(null=True, verbose_name="nsc发票信息")
create_time = models.DateTimeField(verbose_name='创建时间') # 索引
class Meta:
managed = False
db_table = 'hil_nsc_invoice'
situ_db_label = 'hil'
......
......@@ -8,7 +8,7 @@ from common.tools.comparison import cp
from common.mixins import LoggerMixin
from rest_framework.permissions import IsAuthenticated
from apps.account.authentication import OAuth2AuthenticationWithUser
from apps.doc.models import HILNscInvoice, AFCNscInvoice
from apps.doc.models import NscInvoice
import json
from datetime import datetime
......@@ -53,7 +53,7 @@ class NSCInvoiceView(GenericView):
vat = content.get('vat', 0.0)
vat_rate = content.get('vatRate', 0.0)
HILNscInvoice.objects.create(vin=vin, content=json.dumps(content), create_time=datetime.now())
NscInvoice.objects.create(vin=vin, content=json.dumps(content), create_time=datetime.now())
return response.ok()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!