chore: customize branding for Baihua
This commit is contained in:
@@ -1866,7 +1866,7 @@ def _default_miniapp_product_import_point_name(db: Session) -> str:
|
||||
.order_by(MiniAppAttendancePoint.name.asc())
|
||||
.limit(1)
|
||||
)
|
||||
or "宁波嘉恒智能科技有限公司"
|
||||
or "宁波百华智能科技有限公司"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -119,13 +119,13 @@ def _get_notice_creator_phone(db: Session) -> str:
|
||||
def _assistant_config_read(row: AiAssistantConfig | None) -> AiAssistantConfigRead:
|
||||
if not row:
|
||||
return AiAssistantConfigRead(
|
||||
assistant_name="嘉恒工艺助手",
|
||||
assistant_name="百华工艺助手",
|
||||
provider_name="",
|
||||
api_base_url="",
|
||||
api_key=None,
|
||||
model_name="",
|
||||
temperature=0.3,
|
||||
system_prompt="你是宁波嘉恒智能五金 ERP 的企业助手,优先解释业务流程、字段含义、数据异常和操作步骤。",
|
||||
system_prompt="你是宁波百华智能五金 ERP 的企业助手,优先解释业务流程、字段含义、数据异常和操作步骤。",
|
||||
enabled=False,
|
||||
config_id=None,
|
||||
api_key_configured=False,
|
||||
|
||||
@@ -6,7 +6,7 @@ from sqlalchemy.engine import URL
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
app_name: str = Field(default="Jiaheng Hardware ERP API", alias="APP_NAME")
|
||||
app_name: str = Field(default="Baihua Hardware ERP API", alias="APP_NAME")
|
||||
app_env: str = Field(default="dev", alias="APP_ENV")
|
||||
app_host: str = Field(default="0.0.0.0", alias="APP_HOST")
|
||||
app_port: int = Field(default=8000, alias="APP_PORT")
|
||||
|
||||
+1
-1
@@ -49,5 +49,5 @@ def root() -> dict[str, str]:
|
||||
return {
|
||||
"name": settings.app_name,
|
||||
"env": settings.app_env,
|
||||
"message": "Jiaheng Hardware ERP API is running.",
|
||||
"message": "Baihua Hardware ERP API is running.",
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class MiniAppPersonAttendancePoint(Base):
|
||||
class MiniAppProduct(Base):
|
||||
__tablename__ = "products"
|
||||
|
||||
attendance_point_name: Mapped[str] = mapped_column(String(128), primary_key=True, server_default=text("'宁波嘉恒智能科技有限公司'"))
|
||||
attendance_point_name: Mapped[str] = mapped_column(String(128), primary_key=True, server_default=text("'宁波百华智能科技有限公司'"))
|
||||
project_no: Mapped[str] = mapped_column(String(64), primary_key=True)
|
||||
product_name: Mapped[str] = mapped_column(String(255), primary_key=True)
|
||||
device_no: Mapped[str] = mapped_column(String(64), primary_key=True)
|
||||
@@ -74,7 +74,7 @@ class MiniAppProductionReport(Base):
|
||||
__tablename__ = "production_reports"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
attendance_point_name: Mapped[str] = mapped_column(String(128), server_default=text("'宁波嘉恒智能科技有限公司'"))
|
||||
attendance_point_name: Mapped[str] = mapped_column(String(128), server_default=text("'宁波百华智能科技有限公司'"))
|
||||
session_id: Mapped[int] = mapped_column(BigInteger)
|
||||
employee_phone: Mapped[str] = mapped_column(ForeignKey("personnel.phone"))
|
||||
report_date: Mapped[object] = mapped_column(Date)
|
||||
@@ -103,7 +103,7 @@ class MiniAppProductionReportItem(Base):
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
report_id: Mapped[int] = mapped_column(ForeignKey("production_reports.id"))
|
||||
attendance_point_name: Mapped[str] = mapped_column(String(128), server_default=text("'宁波嘉恒智能科技有限公司'"))
|
||||
attendance_point_name: Mapped[str] = mapped_column(String(128), server_default=text("'宁波百华智能科技有限公司'"))
|
||||
device_no: Mapped[str] = mapped_column(String(64))
|
||||
project_no: Mapped[str] = mapped_column(String(64))
|
||||
product_name: Mapped[str] = mapped_column(String(255))
|
||||
|
||||
@@ -167,7 +167,7 @@ class AiAssistantConfig(Base):
|
||||
__tablename__ = "sys_ai_assistant_config"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
assistant_name: Mapped[str] = mapped_column(String(100), server_default=text("'嘉恒工艺助手'"))
|
||||
assistant_name: Mapped[str] = mapped_column(String(100), server_default=text("'百华工艺助手'"))
|
||||
provider_name: Mapped[str | None] = mapped_column(String(100), nullable=True)
|
||||
api_base_url: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
api_key: Mapped[str | None] = mapped_column(String(512), nullable=True)
|
||||
|
||||
@@ -30,7 +30,7 @@ class BroadcastMessageRead(BroadcastMessageCreate):
|
||||
|
||||
|
||||
class AiAssistantConfigUpdate(BaseModel):
|
||||
assistant_name: str = Field(default="嘉恒工艺助手", min_length=1, max_length=100)
|
||||
assistant_name: str = Field(default="百华工艺助手", min_length=1, max_length=100)
|
||||
provider_name: str | None = None
|
||||
api_base_url: str | None = None
|
||||
api_key: str | None = None
|
||||
|
||||
@@ -6,7 +6,7 @@ from app.schemas.domain import CostInsight, InventoryLotSummary, MiniAppField, O
|
||||
|
||||
def get_dashboard_payload() -> DashboardPayload:
|
||||
return DashboardPayload(
|
||||
company="宁波嘉恒智能科技有限公司",
|
||||
company="宁波百华智能科技有限公司",
|
||||
overview=[
|
||||
OverviewMetric(
|
||||
code="sales_open",
|
||||
|
||||
@@ -58,7 +58,7 @@ MENU_PERMISSION_TREE = [
|
||||
("MENU_PURCHASE_ORDER", "采购订单", []),
|
||||
("MENU_PURCHASE_RECEIPT", "到货入库", []),
|
||||
("MENU_QUALITY_INSPECTION", "质量检验", []),
|
||||
("MENU_INVENTORY_LEDGER", "嘉恒仓库", []),
|
||||
("MENU_INVENTORY_LEDGER", "百华仓库", []),
|
||||
],
|
||||
),
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user