### Batch Query Request Example Source: https://help.fxiaoke.com/9bfb/221e/70d7 This is an example of a GET request to the batch query interface. Ensure to replace 'MyDoman/path/' with the actual ERP access path provided by the vendor. The 'startTime' and 'endTime' parameters should be Unix timestamps in milliseconds. ```http GET http://MyDoman/path/queryMasterBatch?objAPIName=查询 ERP 对象的 APIName&startTime=数据变更的开始时间(unix 时间戳,单位毫 秒)&endTime=数据变更的结束时间(unix 时间戳,单位毫秒)&includeDetail=true&offset=获取记录的偏移&limit=当前请求记录条数 ``` -------------------------------- ### Linux Service Setup Script Source: https://help.fxiaoke.com/9bfb/c68f/502e/8fe0 This shell script automates the creation and management of a systemd service for the SAP connector. It checks for Java installation, creates a service file, and manages the service lifecycle (start, enable, status). ```bash #!/bin/bash basePath=$(pwd) serviceName="sapConnect" jarPath="$basePath/sapConnect.jar" libraryPath="-Djava.library.path=$basePath/sapjar" config="--spring.config.location=file:$basePath/config/application.properties" # 检查Java是否安装 function check_java_installed { if ! command -v java &> /dev/null then echo "未找到Java环境,请确保Java已安装并配置在PATH中。" exit 1 fi } echo "检查Java环境..." check_java_installed servicePath="/etc/systemd/system/${serviceName}.service" # 检查服务是否已存在 if [ -f "$servicePath" ]; then echo "服务已存在,配置文件路径:$servicePath" read -p "是否重新生成配置文件并重启服务?(y/n): " response if [ "$response" != "y" ]; then echo "已退出。" exit 0 fi fi if [ ! -f "$jarPath" ]; then echo "目录下不存在jar包:db-proxy-server.jar" exit 1 fi # 创建服务文件 cat <"$servicePath" [Unit] Description=Java Service - $serviceName After=network.target network-online.target Wants=network-online.target [Service] Type=simple ExecStart=/usr/bin/java -jar $jarPath $libraryPath $config WorkingDirectory=$basePath User=root Restart=on-failure RestartSec=3 [Install] WantedBy=multi-user.target EOF echo "配置文件已生成并写入:$servicePath" # 重新加载systemd守护进程,启动和启用服务 systemctl daemon-reload systemctl start $serviceName systemctl enable $serviceName # 等待进度条 echo -n "启动服务中" for i in {1..10}; do echo -n "." sleep 1 done echo "完成" echo "服务${serviceName}已启动。" echo "在app/logs下查看服务日志" echo "执行以下命令查看服务状态: systemctl status $serviceName" # 显示服务状态 systemctl status $serviceName ``` -------------------------------- ### Example settings.json for ShareDev Initialization Source: https://help.fxiaoke.com/ee88/a823/23ff This JSON object contains essential tenant configuration details required for initializing a ShareDev project. Ensure 'enterpriseEA', 'domain', and 'certificate' are correctly set. ```json { "enterpriseEA": "fktest001", "domain": "https://www.fxiaoke.com", "certificate": "ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnpkV0lpT2lKU1pYRjFaWE4wVkc5clpXNGlMQ0pwYzNNaU9pSkRSVkF0VTJWeWRtVnlJaXdpWlc1MFpYSndjbWx6WlVGalkyOTFiblFpT2lKbWEzUmxjM1E0TlRBM0lpd2laVzUwWlhKd2NtbHpaVWxrSWpvNE1qUXpNRElzSW5ObGMzTnBiMjVKWkNJNklqWTNNemN6WmpjM0xUSXdPVFV0TkdJMVpTMDVZbVU0TFdOaE16VXpZV0k1T0dVME5pSXNJbVY0Y0NJNk16ZzNNelV4TURVeE9Dd2lkWE5sY2tsa0lqb3hNREF3TENKcFlYUWlPakUzTnprd056UTVOVGw5Lm9Sbjdfc1FJSmtsVlAxUGQy" } ``` -------------------------------- ### Invalid API Request Example (GET and POST) Source: https://help.fxiaoke.com/9bfb/c68f/b2b9/00d6 Examples for the 'invalid' API endpoint, showing how to pass parameters via URL for GET requests or in the request body for POST requests. It uses field variables for object name and data ID. ```xml get方式,拼接到url里面invalid?objAPIName=#(objAPIName)&dataId=#(dataId) ``` ```xml post方式,放在请求体里面 #(objAPIName) #(dataId) ``` -------------------------------- ### Main Table SQL Configuration Example Source: https://help.fxiaoke.com/9bfb/c68f/0540/ea19 This example demonstrates the YAML configuration for a main table, including query, batch query, ID query, insert, update, and invalidation SQL statements. It supports different date precisions and custom WHERE clauses. ```yaml #YAML # 当时间精度为ms querySql: select * from test2 where ${__where} batchWhere: - date = ${startTime__d} and id > ${lastMaxId} order by date,id # 当lastMaxId为空时,不会执行 - date > ${startTime__d} and date <= ${endTime__d} order by date,id idWhere: - id = ${dataId}::INTEGER insertSql: | INSERT INTO test2 ("name", "date") VALUES(${name}, ${date__d}); updateSql: | UPDATE test2 SET name=${name}, date=${date__d} WHERE id=${id}::INTEGER; invalidSql: | UPDATE test2 SET is_deleted=true WHERE id=${id}::INTEGER invalidRelationSqls:| UPDATE test2-1 SET is_deleted=true WHERE pid=${id}::INTEGER ``` -------------------------------- ### Initialize CTA SDK Source: https://help.fxiaoke.com/93d5/0f81/5171 Basic initialization of the CTA SDK with a CTA ID. This is the simplest way to get started. ```javascript const cta = FsYxt.CtaSDK({ ctaId: "your-cta-id" }); ``` -------------------------------- ### Install sharedev using PowerShell Source: https://help.fxiaoke.com/ee88/a823/23ff Execute this command in PowerShell to download and run the sharedev installation script. Ensure the execution policy is set appropriately before running. ```powershell irm https://developer.fxiaoke.com/sharedev/install.ps1 | iex ``` -------------------------------- ### Single Query Request Example Source: https://help.fxiaoke.com/9bfb/221e/70d7 This is an example of a GET request to the single query interface, used to retrieve a specific record by its ID. Replace 'MyDoman/path/' with the actual ERP access path. The 'dataId' parameter specifies the unique identifier of the data to be fetched. ```http GET http://MyDoman/path/queryMasterById?objAPIName=查询 ERP 侧对象的 APIName&dataId=数据 id&includeDetail=true ``` -------------------------------- ### 查询企业裁判文书 Source: https://help.fxiaoke.com/ee88/4d1a/b52d/87b6/bc91 用于查询裁判文书标题、全文、案号、法院、审理程序、原被告和原文链接等信息。 ```cli sharecrm intelligence risk action-judicial-risk-judgment-documents ``` -------------------------------- ### winsw Commands for SAP Proxy Service Management Source: https://help.fxiaoke.com/9bfb/c68f/502e/8fe0 Common winsw commands to manage the SAP proxy service, including installation, starting, stopping, and uninstallation. ```bash winsw.exe install winsw.exe start winsw.exe stop winsw.exe uninstall ``` -------------------------------- ### 企业知识产权单类型查询 Source: https://help.fxiaoke.com/ee88/4d1a/b52d/87b6/bc91 通过单个 `actionType` 查询指定的一类知识产权信息。如需同时获取多类知识产权信息,应使用企业知识产权多类型组合查询。 ```cli sharecrm intelligence ip intellectual-property ``` -------------------------------- ### Configure Approval Process with ShareDev Source: https://help.fxiaoke.com/ee88/a823/23ff Set up multi-level approval workflows for business objects. This example configures a two-level approval for purchase requisitions. ```bash /sharedev-approval 给采购申请单配置一个二级审批流程:部门经理审批→总经理审批,审批通过后自动更新申请单状态为"已批准"。 ```