forked from erp-dev/erp
feat: wecomm setting clean
This commit is contained in:
@@ -28,8 +28,11 @@ def build_printing_job_followup_url(*, printing_order_id: int | None) -> str:
|
||||
tmpl = getattr(
|
||||
settings,
|
||||
"PRINTING_JOB_STATE_ADVANCED_FOLLOWUP_URL_TEMPLATE",
|
||||
"https://app.yuwen.cloud/workstation/production/batch-advance?orderId={order_id}",
|
||||
"",
|
||||
)
|
||||
tmpl = (str(tmpl or "")).strip()
|
||||
if not tmpl:
|
||||
return ""
|
||||
oid = printing_order_id if printing_order_id is not None else ""
|
||||
try:
|
||||
return str(tmpl).format(order_id=str(oid))
|
||||
@@ -128,19 +131,21 @@ def render_printing_job_state_markdown(
|
||||
"- **推进状态**:**{state_name}**\n"
|
||||
"- **推进时间**:`{advanced_at}`\n"
|
||||
"- **发送者**:{sender}\n"
|
||||
"- **跟进地址**:[{followup_url}]({followup_url})\n"
|
||||
"{followup_line}"
|
||||
"\n"
|
||||
"**工序参数**:\n"
|
||||
"{process_params_markdown}\n"
|
||||
),
|
||||
)
|
||||
followup_url = (followup_url or "").strip()
|
||||
followup_line = f"- **跟进地址**:[{followup_url}]({followup_url})\n" if followup_url else ""
|
||||
return template.format(
|
||||
printing_order_id=str(printing_order_id),
|
||||
printing_job_id=str(printing_job_id),
|
||||
state_name=str(state_name),
|
||||
advanced_at=str(advanced_at),
|
||||
sender=str(sender_label or "系统自动发送"),
|
||||
followup_url=str(followup_url),
|
||||
followup_line=str(followup_line),
|
||||
process_params_markdown=str(process_params_markdown),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user