From 879f552947313cfc34a85e0e35fb44075e158810 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 22 十月 2024 13:51:04 +0800
Subject: [PATCH] 345
---
app.js | 46 ++++++++++++++++++++++++++--------------------
1 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/app.js b/app.js
index bc1dd9d..990acf1 100644
--- a/app.js
+++ b/app.js
@@ -139,28 +139,22 @@
if (rows.length > 0) {
const user = rows[0];
response = {
- retCode: "1",
- uinfo: {
- title: user.client_code,
- cardID: user.code,
- userNum: user.patient_no,
+ recode: 2001,
+ userinfo: {
name: user.patient_name,
sex: user.patient_gender === 0 ? '男' : '女',
age: getAgeFromIdCard(user.patient_identity_no),
- headimgurl: user.patient_avatar_icon,
- imgBaseData: '',
+ usernum: user.patient_no,
+ address: user.code,
remark: '患者人脸识别111'
},
- dbinfo: {}, // 如果没有需要更新的数据库信息,可以保持空
- msg: "success"
+ remsg: "success"
};
- // res.json(response);
} else {
response = {
retCode: "0",
msg: "没有找到患者,请先检查患者code"
};
- // res.json(response);
}
} else {
response = {
@@ -233,18 +227,24 @@
if (rows.length > 0) {
const user = rows[0];
const response = {
- retCode: "1",
- result: {
+ code: "1",
+ result:[ {
patientId: user.code,
fullName: user.patient_name,
gender: user.patient_gender,
age: getAgeFromIdCard(user.patient_identity_no),
- // phoneNum:user.
- headimgurl: user.patient_avatar_icon,
- imgBaseData: '',
- remark: ''
- },
- dbinfo: {}, // 如果没有需要更新的数据库信息,可以保持空
+ phoneNum:user.patient_mobile,
+ address: user.patient_avatar_icon,
+ idType: user.patient_identity_type,
+ idNum: user.patient_identity_no,
+ height:'',
+ weight:'',
+ requestDoctor:'',
+ requestDept :"",
+ examDoctor:'',
+ examDept:"",
+ diagnosisDoctor:''
+ }],
msg: "success"
};
res.json(response);
@@ -268,6 +268,12 @@
console
})
+/**
+ * PostCheckExam 病人信息及检测结果以JSON的形式回传至服务器
+ */
+app.post('/PostCheckExam',async(req,res)=>{
+
+})
// 启动服务器
app.listen(port, async () => {
console.log(`Server running at http://localhost:${port}/`);
@@ -289,7 +295,7 @@
await fs.writeFile(outputPath, buffer);
const ossUrl = await getOssUrl(outputPath)
// 删除本地图片
- // delImg(outputPath)
+ delImg(outputPath)
console.log('File saved to', outputPath);
console.log(`得到ossUrl=${ossUrl}`)
return ossUrl
--
Gitblit v1.8.0