From 67573c1d9d9af8e0dd448f82eebe395f41e3b0c1 Mon Sep 17 00:00:00 2001 From: chenqi Date: Wed, 1 Apr 2026 09:27:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E8=AF=8A=E6=96=AD?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8E=92=E6=9F=A5=E6=89=8B=E6=9C=AF=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E7=94=9F=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/impl/RequestFormManageAppServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java index 78310752..948e76be 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java @@ -135,6 +135,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer ChargeItem chargeItem; // 诊疗集合 List activityList = requestFormSaveDto.getActivityList(); + log.info("保存申请单,typeCode={}, activityListSize={}, encounterId={}", typeCode, activityList != null ? activityList.size() : 0, encounterId); // 诊疗执行科室配置 List activityOrganizationConfig = requestFormManageAppMapper.getActivityOrganizationConfig(typeCode); From 4d13acacc2e2190d63e24237dcb6353322b1803f Mon Sep 17 00:00:00 2001 From: chenqi Date: Wed, 1 Apr 2026 09:35:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore(deps):=20=E6=B7=BB=E5=8A=A0=20lodash?= =?UTF-8?q?=20=E4=BE=9D=E8=B5=96=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 package.json 中新增 lodash 依赖,版本为 ^4.17.21 - 更新依赖配置以支持工具函数库的引入 --- .../public/help-center/vuepress-theme-vdoing-doc/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json index 6ed468f8..58bd25e0 100644 --- a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/package.json @@ -16,6 +16,7 @@ "dayjs": "^1.9.7", "inquirer": "^7.1.0", "json2yaml": "^1.1.0", + "lodash": "^4.17.21", "vuepress": "1.9.9", "vuepress-plugin-baidu-tongji": "^1.0.1", "vuepress-plugin-demo-block": "^0.7.2", @@ -27,4 +28,4 @@ "yamljs": "^0.3.0" }, "dependencies": {} -} +} \ No newline at end of file From df78ff29bdf52dd1f5cd6fe4261dcf00752f3cc2 Mon Sep 17 00:00:00 2001 From: chenqi Date: Wed, 1 Apr 2026 10:03:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(build):=20=E8=A7=A3=E5=86=B3=20lodash.t?= =?UTF-8?q?emplate=20=E4=B8=AD=20assignWith=20=E5=87=BD=E6=95=B0=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 JavaScript 脚本修复 lodash.template 模块中的 assignWith 问题 - 提供 Shell 脚本支持 Linux/Mac 系统的自动修复功能 - 实现 assignWith 函数的简单 polyfill 版本以确保兼容性 - 添加补丁检测机制防止重复修补同一文件 - 在构建前自动运行修复脚本确保依赖完整性 --- .../fix-lodash-manual.js | 78 +++++++++++++++++++ .../vuepress-theme-vdoing-doc/fix-lodash.js | 55 +++++++++++++ .../vuepress-theme-vdoing-doc/fix-lodash.sh | 48 ++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash-manual.js create mode 100644 openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.js create mode 100644 openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.sh diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash-manual.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash-manual.js new file mode 100644 index 00000000..e9dae314 --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash-manual.js @@ -0,0 +1,78 @@ +#!/usr/bin/env node +/** + * Fix lodash.template assignWith issue - Manual fix script + * Run this after npm/yarn install and before build + * + * Usage: node fix-lodash-manual.js + */ +const fs = require('fs'); +const path = require('path'); + +const lodashTemplatePath = path.join(__dirname, 'node_modules', 'lodash.template', 'index.js'); + +if (!fs.existsSync(lodashTemplatePath)) { + console.error('❌ lodash.template not found at:', lodashTemplatePath); + console.error('Please run npm install or yarn install first'); + process.exit(1); +} + +let content = fs.readFileSync(lodashTemplatePath, 'utf8'); + +// Check if already patched +if (content.includes('/* LODASH_TEMPLATE_PATCHED */')) { + console.log('✓ lodash.template already patched'); + process.exit(0); +} + +// Check if assignWith is actually missing +if (content.includes('assignWith')) { + // Check if it's used but not defined + const hasFunctionDefinition = /function\s+assignWith|var\s+assignWith\s*=/.test(content); + if (hasFunctionDefinition) { + console.log('✓ assignWith is already defined in lodash.template'); + process.exit(0); + } +} + +console.log('🔧 Patching lodash.template...'); + +// Simple assignWith implementation +const assignWithImpl = `/* LODASH_TEMPLATE_PATCHED */ +// assignWith polyfill for lodash.template +function assignWith(object, source, customizer) { + if (object == null) return object; + var props = Object.keys(Object(source)); + for (var i = 0; i < props.length; i++) { + var key = props[i]; + var value = source[key]; + var assignedValue = customizer ? customizer(object[key], value, key, object, source) : value; + if (assignedValue !== undefined) { + object[key] = assignedValue; + } + } + return object; +} +`; + +// Find first line break after comments +let insertPos = 0; +const lines = content.split('\n'); +for (let i = 0; i < lines.length; i++) { + if (lines[i].trim() === ' */' || lines[i].trim() === '*/') { + insertPos = content.indexOf('\n', content.indexOf(lines[i])) + 1; + break; + } +} + +if (insertPos === 0) { + insertPos = content.indexOf('\n') + 1; +} + +const before = content.substring(0, insertPos); +const after = content.substring(insertPos); + +content = before + '\n' + assignWithImpl + after; + +fs.writeFileSync(lodashTemplatePath, content); +console.log('✅ Successfully patched lodash.template with assignWith function'); +console.log(' File:', lodashTemplatePath); diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.js b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.js new file mode 100644 index 00000000..379c26cc --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.js @@ -0,0 +1,55 @@ +/** + * Fix lodash.template assignWith issue + * This script patches the lodash.template module to include assignWith + */ +const fs = require('fs'); +const path = require('path'); + +const lodashTemplatePath = path.join(__dirname, 'node_modules', 'lodash.template', 'index.js'); + +if (!fs.existsSync(lodashTemplatePath)) { + console.log('lodash.template not found, skipping patch'); + process.exit(0); +} + +let content = fs.readFileSync(lodashTemplatePath, 'utf8'); + +// Check if already patched +if (content.includes('/* LODASH_TEMPLATE_PATCHED */')) { + console.log('lodash.template already patched'); + process.exit(0); +} + +// Simple assignWith implementation +const assignWithImpl = ` +/* LODASH_TEMPLATE_PATCHED */ +// Simple assignWith implementation +function assignWith(object, source, customizer) { + if (object == null) { + return object; + } + var props = Object.keys(Object(source)); + var index = -1; + var length = props.length; + + while (++index < length) { + var key = props[index]; + var value = source[key]; + var assignedValue = customizer ? customizer(object[key], value, key, object, source) : value; + if (assignedValue !== undefined) { + object[key] = assignedValue; + } + } + return object; +} +`; + +// Insert at the beginning of the file after any comments +const firstLineEnd = content.indexOf('\n') + 1; +const before = content.substring(0, firstLineEnd); +const after = content.substring(firstLineEnd); + +content = before + assignWithImpl + after; + +fs.writeFileSync(lodashTemplatePath, content); +console.log('✓ Patched lodash.template with assignWith function'); diff --git a/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.sh b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.sh new file mode 100644 index 00000000..505dfd4e --- /dev/null +++ b/openhis-ui-vue3/public/help-center/vuepress-theme-vdoing-doc/fix-lodash.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Fix lodash.template assignWith issue for Linux/Mac servers +# Run this script after npm/yarn install + +LODGASH_TEMPLATE="node_modules/lodash.template/index.js" + +if [ ! -f "$LODGASH_TEMPLATE" ]; then + echo "❌ lodash.template not found. Please run npm install or yarn install first." + exit 1 +fi + +# Check if already patched +if grep -q "LODASH_TEMPLATE_PATCHED" "$LODGASH_TEMPLATE"; then + echo "✓ lodash.template already patched" + exit 0 +fi + +echo "🔧 Patching lodash.template..." + +# Create a temporary file with the patch +PATCH=$(cat <<'EOF' +/* LODASH_TEMPLATE_PATCHED */ +// assignWith polyfill for lodash.template +function assignWith(object, source, customizer) { + if (object == null) return object; + var props = Object.keys(Object(source)); + for (var i = 0; i < props.length; i++) { + var key = props[i]; + var value = source[key]; + var assignedValue = customizer ? customizer(object[key], value, key, object, source) : value; + if (assignedValue !== undefined) { + object[key] = assignedValue; + } + } + return object; +} + +EOF +) + +# Insert after the first line (license comment) +{ + head -n 1 "$LODGASH_TEMPLATE" + echo "$PATCH" + tail -n +2 "$LODGASH_TEMPLATE" +} > "$LODGASH_TEMPLATE.tmp" && mv "$LODGASH_TEMPLATE.tmp" "$LODGASH_TEMPLATE" + +echo "✅ Successfully patched lodash.template with assignWith function"