Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
665ca72c
Commit
665ca72c
authored
Apr 01, 2024
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8e0c9cd0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
apps/import_project/view.py
+25
-10
No files found.
apps/import_project/view.py
View file @
665ca72c
...
@@ -35,24 +35,35 @@ def adds():
...
@@ -35,24 +35,35 @@ def adds():
tProjectFlows
=
req_dic
[
'tProjectFlows'
]
tProjectFlows
=
req_dic
[
'tProjectFlows'
]
try
:
try
:
obj
=
TKeyproject
(
obj
=
TKeyproject
(
advance_requirement
=
req_dic
[
"advanceRequirement"
],
clogging_point
=
req_dic
[
"cloggingPoint"
],
construction_address
=
req_dic
[
"constructionAddress"
],
construction_address
=
req_dic
[
"constructionAddress"
],
county
=
req_dic
[
"county"
],
deadline_completion
=
req_dic
[
"deadlineCompletion"
],
floor_space
=
req_dic
[
"floorSpace"
],
floor_space
=
req_dic
[
"floorSpace"
],
investment_commitment
=
req_dic
[
"investmentCommitment"
],
investment_commitment
=
req_dic
[
"investmentCommitment"
],
investment_entity
=
req_dic
[
"investmentEntity"
],
investment_entity
=
req_dic
[
"investmentEntity"
],
leading_department
=
req_dic
[
"leadingDepartment"
],
leading_department
=
req_dic
[
"leadingDepartment"
],
policy_statement
=
req_dic
[
"policyStatement"
],
policy_statement
=
req_dic
[
"policyStatement"
],
project_day
=
req_dic
[
"projectDay"
],
project_introduce
=
req_dic
[
"projectIntroduce"
],
project_introduce
=
req_dic
[
"projectIntroduce"
],
project_leader
=
req_dic
[
"projectLeader"
],
project_leader
=
req_dic
[
"projectLeader"
],
project_name
=
req_dic
[
"projectName"
],
project_name
=
req_dic
[
"projectName"
],
project_progress
=
req_dic
[
"projectProgress"
],
project_progress
=
req_dic
[
"projectProgress"
],
project_status
=
req_dic
[
"projectStatus"
],
total_money
=
req_dic
[
"totalMoney"
],
responsible_department
=
req_dic
[
"responsibleDepartment"
],
# clogging_point=req_dic["cloggingPoint"],
total_money
=
req_dic
[
"totalMoney"
])
# construction_address=req_dic["constructionAddress"],
# county=req_dic["county"],
# deadline_completion=req_dic["deadlineCompletion"],
# floor_space=req_dic["floorSpace"],
# investment_commitment=req_dic["investmentCommitment"],
# investment_entity=req_dic["investmentEntity"],
# leading_department=req_dic["leadingDepartment"],
# policy_statement=req_dic["policyStatement"],
# project_day=req_dic["projectDay"],
# project_introduce=req_dic["projectIntroduce"],
# project_leader=req_dic["projectLeader"],
# project_name=req_dic["projectName"],
# project_progress=req_dic["projectProgress"],
# project_status=req_dic["projectStatus"],
# responsible_department=req_dic["responsibleDepartment"],
# total_money=req_dic["totalMoney"]
)
db
.
session
.
add
(
obj
)
db
.
session
.
add
(
obj
)
db
.
session
.
commit
()
db
.
session
.
commit
()
project_id
=
obj
.
id
project_id
=
obj
.
id
...
@@ -64,13 +75,15 @@ def adds():
...
@@ -64,13 +75,15 @@ def adds():
process_schedule
=
i
[
"processSchedule"
],
process_schedule
=
i
[
"processSchedule"
],
project_id
=
project_id
,
project_id
=
project_id
,
start_time
=
i
[
"startTime"
],
start_time
=
i
[
"startTime"
],
status
=
i
[
"status"
])
# status=i["status"]
)
db
.
session
.
add
(
flow_obj
)
db
.
session
.
add
(
flow_obj
)
db
.
session
.
commit
()
db
.
session
.
commit
()
flow_id
=
flow_obj
.
id
flow_id
=
flow_obj
.
id
print
(
flow_id
)
print
(
flow_id
)
if
len
(
i
)
==
14
and
i
[
"tProjectFlowStopList"
]:
try
:
if
i
[
"tProjectFlowStopList"
]:
flow_stop_li
=
i
[
"tProjectFlowStopList"
]
flow_stop_li
=
i
[
"tProjectFlowStopList"
]
for
flow_stop
in
flow_stop_li
:
for
flow_stop
in
flow_stop_li
:
stop_obj
=
TProjectFlowStop
(
stop_obj
=
TProjectFlowStop
(
...
@@ -82,6 +95,8 @@ def adds():
...
@@ -82,6 +95,8 @@ def adds():
)
)
db
.
session
.
add
(
stop_obj
)
db
.
session
.
add
(
stop_obj
)
db
.
session
.
commit
()
db
.
session
.
commit
()
except
:
continue
record_log
(
token
,
"项目台账新增了{}"
.
format
(
req_dic
[
'projectName'
]))
record_log
(
token
,
"项目台账新增了{}"
.
format
(
req_dic
[
'projectName'
]))
return
jsonify
(
msg
=
"操作成功"
,
code
=
200
)
return
jsonify
(
msg
=
"操作成功"
,
code
=
200
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment