Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ba27a782
authored
2023-01-06 19:28:51 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fsm update
1 parent
ec4ef15b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
15 deletions
src/apps/doc/models.py
src/pos/views.py
src/apps/doc/models.py
View file @
ba27a78
...
...
@@ -1063,7 +1063,7 @@ class AFCCompareReportNew(models.Model):
situ_db_label
=
'afc'
class
AFC
NscInvoice
(
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'
...
...
src/pos/views.py
View file @
ba27a78
...
...
@@ -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
,
AFC
NscInvoice
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
)
HIL
NscInvoice
.
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
()
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment