|
@@ -182,10 +182,12 @@ async def create_inspection_task(
|
|
|
# 创建新的预案记录
|
|
|
start_time = body['start_time']
|
|
|
if start_time =='':
|
|
|
- start_time = datetime.now().strftime("%Y-%m-%d 00:00:00")
|
|
|
+ start_time = body['end_time']
|
|
|
end_time = body['end_time']
|
|
|
if end_time =='':
|
|
|
- end_time= '9999-12-31 00:00:00'
|
|
|
+ end_time= body['start_time']
|
|
|
+ if start_time == '' and end_time=='':
|
|
|
+ start_time = end_time = datetime.now().strftime("%Y-%m-%d 00:00:00")
|
|
|
new_task = RiskManagementInspectionTask(
|
|
|
inspection_business=body['business'],
|
|
|
start_time = start_time,
|