feat(supplychain): 集成供应链模块 + filemgr
- build.sh 四处列表 + 8b DDL 循环加 filemgr supplychain - app/pipeline_app.py: load_filemgr() + load_supplychain()(filemgr 先于 supplychain)
This commit is contained in:
parent
4f00b931f5
commit
6f5d4a6136
@ -91,6 +91,16 @@ def init():
|
||||
from product_management import load_product_management
|
||||
except ImportError:
|
||||
def load_product_management(): pass
|
||||
# filemgr:文件/附件管理(supplychain 合同附件依赖)
|
||||
try:
|
||||
from filemgr.init import load_filemgr
|
||||
except ImportError:
|
||||
def load_filemgr(): pass
|
||||
# supplychain:供应商/分销商/供应链折扣管理
|
||||
try:
|
||||
from supplychain.init import load_supplychain
|
||||
except ImportError:
|
||||
def load_supplychain(): pass
|
||||
|
||||
set_globalvariable()
|
||||
ServerEnv().get_module_dbname = get_module_dbname
|
||||
@ -109,6 +119,8 @@ def init():
|
||||
load_account_resource()
|
||||
load_storage_resource()
|
||||
load_product_management() # 产品层:依赖资源模块的 product_interface
|
||||
load_filemgr() # 文件管理:先于 supplychain(合同附件依赖)
|
||||
load_supplychain() # 供应链:供应商/分销商/折扣
|
||||
load_pipeline_service()
|
||||
load_sdlc_adapter()
|
||||
load_app_audit()
|
||||
|
||||
12
build.sh
12
build.sh
@ -53,7 +53,7 @@ for mod in pipeline_core pipeline_ops pipeline_dist; do
|
||||
done
|
||||
|
||||
# 5. Install business modules (clone external, local already in pkgs)
|
||||
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; 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; do
|
||||
cd "$cdir/pkgs"
|
||||
if [ ! -d "$mod" ]; then
|
||||
git clone https://git.opencomputing.cn/yumoqing/$mod || echo "SKIP: $mod"
|
||||
@ -62,7 +62,7 @@ for mod in pipeline-sdlc showcase evaluate pipeline-service pipeline-task tenant
|
||||
done
|
||||
|
||||
# 6. pip install all modules from pkgs/(pipeline-service 是普通 install 非 editable,部署必 pull+pip install 都做)
|
||||
for mod in pipeline_core pipeline_ops pipeline_dist pipeline-sdlc showcase pipeline-service tenant app_audit product_management discount pricing unipay smssend accounting uapi rag dingdingflow account_resource storage_resource; do
|
||||
for mod in pipeline_core pipeline_ops pipeline_dist pipeline-sdlc showcase pipeline-service tenant app_audit product_management discount pricing unipay smssend accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain; do
|
||||
if [ -d "pkgs/$mod" ]; then
|
||||
"$cdir/py3/bin/pip" install "pkgs/$mod/" 2>&1 | tail -1
|
||||
fi
|
||||
@ -89,7 +89,7 @@ if [ -d "pkgs/pipeline_core/skills_library" ]; then
|
||||
fi
|
||||
|
||||
# 7. Regenerate CRUD from json for all pipeline modules
|
||||
for mod in appbase pipeline_core pipeline_ops pipeline_dist pipeline-sdlc rbac dapi accounting uapi rag dingdingflow account_resource storage_resource; do
|
||||
for mod in appbase pipeline_core pipeline_ops pipeline_dist pipeline-sdlc rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain; do
|
||||
json_dir="pkgs/$mod/json"
|
||||
models_dir="pkgs/$mod/models"
|
||||
wwwroot_dir="pkgs/$mod/wwwroot"
|
||||
@ -102,7 +102,7 @@ done
|
||||
|
||||
|
||||
# 8. Link module wwwroot directories (symlinks from pkgs/)
|
||||
for mod in pipeline-sdlc showcase tenant pipeline_core pipeline_ops pipeline_dist appbase app_audit product_management discount pricing unipay rbac dapi accounting uapi rag dingdingflow account_resource storage_resource; do
|
||||
for mod in pipeline-sdlc showcase tenant pipeline_core pipeline_ops pipeline_dist appbase app_audit product_management discount pricing unipay rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain; do
|
||||
src="pkgs/$mod/wwwroot"
|
||||
dst="wwwroot/$mod"
|
||||
if [ -d "$src" ]; then
|
||||
@ -117,7 +117,7 @@ mkdir -p wwwroot/pipeline_task
|
||||
# 8b. uapi + rag 模块建表 + 导入外部服务配置种子
|
||||
# uapi 表(upapp/uapi/uapiio...)必须先建,rag 的 uapi_seed.sql 才有表可插
|
||||
# rag 表统一 rag_ 前缀,与产线业务表隔离;数据独立于 ragserver(同代码不同宿主,各自的数据)
|
||||
for m in uapi rag dingdingflow account_resource storage_resource; do
|
||||
for m in uapi rag dingdingflow account_resource storage_resource filemgr supplychain; do
|
||||
if [ -d "pkgs/$m/models" ] && ls pkgs/$m/models/*.json >/dev/null 2>&1; then
|
||||
cd "$cdir/pkgs/$m/models"
|
||||
"$cdir/py3/bin/json2ddl" mysql . > "/tmp/pipeline_${m}_ddl.sql" || {
|
||||
@ -143,6 +143,8 @@ for sqlfile in ['/tmp/pipeline_uapi_ddl.sql', '/tmp/pipeline_rag_ddl.sql',
|
||||
'/tmp/pipeline_dingdingflow_ddl.sql',
|
||||
'/tmp/pipeline_account_resource_ddl.sql',
|
||||
'/tmp/pipeline_storage_resource_ddl.sql',
|
||||
'/tmp/pipeline_filemgr_ddl.sql',
|
||||
'/tmp/pipeline_supplychain_ddl.sql',
|
||||
'pkgs/rag/init/uapi_seed.sql']:
|
||||
if not os.path.exists(sqlfile):
|
||||
print(' SKIP (missing): %s' % sqlfile)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user