Commit 3d3f02d9 by Aeolus

增加机柜指令运行时间

parent 5756af86
......@@ -73,6 +73,7 @@ class Machine(Base):
status = Column(TINYINT(1), server_default=text("'1'"), comment='状态: 1正常-1删除')
created_at = Column(TIMESTAMP, nullable=False, server_default=text("CURRENT_TIMESTAMP"))
updated_at = Column(TIMESTAMP, nullable=False, server_default=text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"))
command_time = Column(INTEGER(1), nullable=False)
class MachineProduction(Base):
......
......@@ -88,6 +88,7 @@ def run_get_machine_no():
machine = Machine.query.filter_by(qrcode_no=qrcode_no).first()
if machine:
return BaseResponse(data={"machine_no": machine.machine_no, "status": machine.status, "mac_no": machine.mac})
return BaseResponse(data={"machine_no": machine.machine_no, "status": machine.status, "mac_no": machine.mac,
"command_time":machine.command_time})
else:
return jsonify(MACHINE_NOT_EXIST_ERROR)
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