Commit 8a9239be by dong

fix

parent ab5c6a03
......@@ -34,14 +34,10 @@ def adds():
token = request.headers['token']
tProjectFlows = req_dic['tProjectFlows']
d = datetime.now()
try:
status = ''
project_id = ''
for i in tProjectFlows:
try:
st = i["tProjectFlowStopList"]
if st:
status = '遇到堵点'
obj = TKeyproject(
construction_address=req_dic["constructionAddress"],
floor_space=req_dic["floorSpace"],
......@@ -54,12 +50,17 @@ def adds():
project_name=req_dic["projectName"],
project_progress=req_dic["projectProgress"],
total_money=req_dic["totalMoney"],
project_status=status
project_status=''
)
db.session.add(obj)
db.session.commit()
project_id = obj.id
print(project_id)
for i in tProjectFlows:
try:
st = i["tProjectFlowStopList"]
if st:
status = '遇到堵点'
except:
if i["endTime"] and d > datetime.strptime(i["endTime"], "%Y-%m-%d"):
status = '已完成'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment