From f0a21a51c63be79708c0600a9226f9305b45506f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 12 Sep 2026 19:07:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(voucher):=20=E4=BB=A3=E9=87=91=E5=88=B8?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=AE=BF=E4=B8=BB=E6=8E=A5=E5=85=A5=E2=80=94?= =?UTF-8?q?=E2=80=94build.sh=E5=9B=9B=E6=B8=85=E5=8D=95(clone/pip/xls2ui/?= =?UTF-8?q?=E8=BD=AF=E9=93=BE)+pipeline=5Fapp.py=20load=5Fvoucher(ticket?= =?UTF-8?q?=E5=90=8E,=E6=B3=A8=E5=86=8C=E9=80=81=E5=88=B8=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=8C=82=E9=92=A9)+import=5Finit=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=A7=8D=E5=AD=90+index.ui=E5=AE=A2=E6=88=B7'=E6=88=91?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E9=87=91=E5=88=B8'/=E7=AE=A1=E7=90=86'?= =?UTF-8?q?=E4=BB=A3=E9=87=91=E5=88=B8=E7=AE=A1=E7=90=86'(is=5Fticket=5Fst?= =?UTF-8?q?aff=E9=97=A8=E7=A6=81)=E8=8F=9C=E5=8D=95;=E9=85=8D=E5=A5=97vouc?= =?UTF-8?q?her=E4=BB=93=E5=BA=936cf7098?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pipeline_app.py | 6 ++++++ build.sh | 8 ++++---- scripts/import_init.py | 1 + wwwroot/index.ui | 12 ++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/pipeline_app.py b/app/pipeline_app.py index 260698e..f608e6d 100644 --- a/app/pipeline_app.py +++ b/app/pipeline_app.py @@ -136,6 +136,11 @@ def init(): from ticket.init import load_ticket except ImportError: def load_ticket(): pass + # voucher:代金券(模板/规则/实例/流水 + 注册送券事件挂钩 organization:c:after) + try: + from voucher.init import load_voucher + except ImportError: + def load_voucher(): pass set_globalvariable() ServerEnv().get_module_dbname = get_module_dbname @@ -159,6 +164,7 @@ def init(): load_pipeline_service() load_pipeline_task() # 任务中心交互层:注册 task_detail/step_panel 页面所需 Jinja helper(依赖 pipeline_service) load_ticket() # 工单管理:依赖 pipeline_service(待办provider注册+llm_bridge+rag_client),agent poller 随 worker 进程启动 + load_voucher() # 代金券:规则引擎+注册送券挂钩(bind organization:c:after,须在任何发券路径前加载) load_pipeline_platform() # 平台内部 agent(依赖 pipeline_service 的 llm_bridge) load_pipeline_bidding() # 投标产线能力包(依赖 pipeline_service 的 capability 分发) load_pipeline_opportunity() # 商机产线能力包(数据来自数据爬取平台内网 HTTP) diff --git a/build.sh b/build.sh index 01b7b06..394eebb 100644 --- a/build.sh +++ b/build.sh @@ -56,7 +56,7 @@ done # 注:evaluate 只 clone 不 install——其 wwwroot/json/models 嵌套在包内(evaluate/evaluate/), # 与本脚本 pkgs//wwwroot 软链约定不兼容,且依赖 VBench/torch 重环境; # 待营销产线开发时连同结构规范化一起接入。 -for mod in pipeline-sdlc showcase evaluate pipeline-service pipeline-task tenant app_audit product_management discount pricing unipay smssend accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pipeline-llm pipeline-platform pipeline-opportunity ticket; do +for mod in pipeline-sdlc showcase evaluate pipeline-service pipeline-task tenant app_audit product_management discount pricing unipay smssend accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pipeline-llm pipeline-platform pipeline-opportunity ticket voucher; do cd "$cdir/pkgs" if [ ! -d "$mod" ]; then git clone https://git.opencomputing.cn/yumoqing/$mod || echo "SKIP: $mod" @@ -67,7 +67,7 @@ done # 6. pip install all modules from pkgs/(pipeline-service 是普通 install 非 editable,部署必 pull+pip install 都做) # 注意与第 5 步 clone 清单对齐:clone 了却不 install 的模块,主程序 try/except 会静默降级—— # 模块整个消失且零报错(account_resource 等 4 个此前正是这种状态,测试机靠手工补装)。 -for mod in pipeline_core pipeline_ops pipeline-sdlc showcase pipeline-service pipeline-task tenant app_audit product_management discount pricing unipay smssend accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pipeline-llm pipeline-platform pipeline-opportunity ticket; do +for mod in pipeline_core pipeline_ops pipeline-sdlc showcase pipeline-service pipeline-task tenant app_audit product_management discount pricing unipay smssend accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pipeline-llm pipeline-platform pipeline-opportunity ticket voucher; do if [ -d "pkgs/$mod" ]; then "$cdir/py3/bin/pip" install "pkgs/$mod/" 2>&1 | tail -1 fi @@ -101,7 +101,7 @@ fi # ⚠ 清单不能盲目扩成"全模块动态扫描":product_management/dingdingflow 的生成目录 # 是 git 跟踪的(重生成会弄脏工作树),且第 6 步有 xls2ui 覆盖后的手工修补—— # 新模块入列前先确认其生成目录在模块 .gitignore 内。 -for mod in appbase pipeline_core pipeline_ops pipeline-sdlc rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pricing pipeline-llm pipeline-opportunity discount; do +for mod in appbase pipeline_core pipeline_ops pipeline-sdlc rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pricing pipeline-llm pipeline-opportunity discount voucher; do json_dir="pkgs/$mod/json" if [ -d "$json_dir" ] && ls "$json_dir"/*.json >/dev/null 2>&1; then cd "$json_dir" @@ -112,7 +112,7 @@ done # 8. Link module wwwroot directories (symlinks from pkgs/) -for mod in pipeline-sdlc showcase tenant pipeline_core pipeline_ops appbase app_audit product_management discount pricing unipay rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pipeline-llm pipeline-platform pipeline-opportunity pipeline-task ticket; do +for mod in pipeline-sdlc showcase tenant pipeline_core pipeline_ops appbase app_audit product_management discount pricing unipay rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pipeline-llm pipeline-platform pipeline-opportunity pipeline-task ticket voucher; do src="pkgs/$mod/wwwroot" dst="wwwroot/$mod" if [ -d "$src" ]; then diff --git a/scripts/import_init.py b/scripts/import_init.py index f91a130..0c1cbc4 100644 --- a/scripts/import_init.py +++ b/scripts/import_init.py @@ -36,6 +36,7 @@ INIT_MODULES = [ ('pipeline-opportunity', 'pkgs/pipeline-opportunity/init/data.json'), ('pipeline-llm', 'pkgs/pipeline-llm/init/data.json'), ('ticket', 'pkgs/ticket/init/data.json'), + ('voucher', 'pkgs/voucher/init/data.json'), ] diff --git a/wwwroot/index.ui b/wwwroot/index.ui index b3b6cf6..d313794 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -217,6 +217,12 @@ "icon": "", "script": "this.open_tab({name:'cust_tickets',label:'我的工单',url:'/ticket/my/index.ui',removable:true})" }, + { + "name": "cust_vouchers", + "label": "我的代金券", + "icon": "", + "script": "this.open_tab({name:'cust_vouchers',label:'我的代金券',url:'/voucher/my/index.ui',removable:true})" + }, { "name": "cust_account", "label": "我的账户", @@ -561,6 +567,12 @@ "icon": "", "script": "this.open_tab({name:'ticket_manage',label:'工单管理',url:'/ticket/manage/index.ui',removable:true})" }, + { + "name": "voucher_manage", + "label": "代金券管理", + "icon": "", + "script": "this.open_tab({name:'voucher_manage',label:'代金券管理',url:'/voucher/index.ui',removable:true})" + }, {% endif %} { "name": "sysmgr",