update
This commit is contained in:
parent
8e578953cc
commit
f3975c0feb
@ -116,9 +116,16 @@ async def get_community_time_periods(
|
||||
"""获取社区的配送时段列表"""
|
||||
try:
|
||||
# 查询社区的配送时段
|
||||
community_time_periods = db.query(CommunityTimePeriodDB, TimePeriodDB.name.label("time_period_name"),TimePeriodDB.from_time.label("time_period_from_time"), TimePeriodDB.to_time.label("time_period_to_time")).join(TimePeriodDB).filter(
|
||||
CommunityTimePeriodDB.community_id == community_id
|
||||
).order_by(TimePeriodDB.from_time).all()
|
||||
community_time_periods = db.query(CommunityTimePeriodDB,\
|
||||
TimePeriodDB.name.label("time_period_name"),\
|
||||
TimePeriodDB.from_time.label("time_period_from_time"), \
|
||||
TimePeriodDB.to_time.label("time_period_to_time"))\
|
||||
.join(TimePeriodDB, CommunityTimePeriodDB.time_period_id == TimePeriodDB.id)\
|
||||
.filter(
|
||||
CommunityTimePeriodDB.community_id == community_id
|
||||
)\
|
||||
.order_by(TimePeriodDB.from_time)\
|
||||
.all()
|
||||
|
||||
result = []
|
||||
tomorrow_count=0
|
||||
|
||||
@ -108,6 +108,8 @@ async def partner_community_list(
|
||||
.limit(limit)\
|
||||
.all()
|
||||
|
||||
# 获取总数
|
||||
# 防止慢查询
|
||||
total_count = db.query(CommunitySetMapping.community_id)\
|
||||
.join(CommunitySet, CommunitySetMapping.set_id == CommunitySet.id)\
|
||||
.filter(CommunitySet.user_id == current_user.userid)\
|
||||
|
||||
@ -35,14 +35,14 @@ class QwenClient:
|
||||
messages = [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "你是一个专门识别快递取件码的助手。请准确提取图片中的所有取件码信息。"
|
||||
"content": "你是一个专门识别快递的取件码,运单号的助手。请准确提取图片中的所有取件码和运单号信息。"
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "请识别图中驿站的所有取件码,以[{\"station\":\"驿站名字\",\"pickup_codes\":[\"3232\",\"2323\"]}]的格式返回。只返回JSON格式数据,不要其他解释。"
|
||||
"text": "请识别图中驿站的所有取件码或者运单号,以[{\"station\":\"驿站名字\",\"pickup_codes\":[\"3232\",\"2323\"]}]的格式返回。只返回JSON格式数据,不要其他解释。"
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
|
||||
@ -117,7 +117,7 @@ class ShippingOrderPackageDB(Base):
|
||||
orderid = Column(String(32), ForeignKey("shipping_orders.orderid"), index=True)
|
||||
station_id = Column(Integer, nullable=True)
|
||||
station_name = Column(String(50), nullable=False)
|
||||
pickup_codes = Column(String(100), nullable=False)
|
||||
pickup_codes = Column(String(500), nullable=False)
|
||||
create_time = Column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
# Pydantic 模型
|
||||
|
||||
Loading…
Reference in New Issue
Block a user