bug 处理

This commit is contained in:
13405411873 2025-07-28 23:41:07 +08:00
parent 27a1777b09
commit cc8e31ce08
15 changed files with 227 additions and 44 deletions

View File

@ -1,23 +1,33 @@
//const baseUrl = "https://www.xishuibeishan.com/asdProject"
// const baseUrl = "https://www.xishuibeishan.com/asdProject"
//const baseUrl = "https://www.xishuibeishan.com/asdProject"
// const baseUrl = "http://192.168.31.25:8082/asdProject"
const baseUrl = "https://www.jieyi-autism.com/asdProject"
//const baseUrl = "http://192.168.31.25:8082/asdProject"
// const baseUrl = "https://localhost/asdProject"
// const baseUrl = "https://43.140.199.34/jeecg-boot"
// const baseUrl = "http://43.140.199.34:8080/jeecg-boot"
// const basePicUrl = "http://43.140.199.34:8080/jeecg-boot/sys/common/static"
// const basePicUrl = "https://www.xishuibeishan.com/jeecg-boot/sys/common/static"
const basePicUrl = "https://www.xishuibeishan.com/jeecg-boot/sys/common/static"
// const SOCKETAPI = "wss://howcode.online";
const SOCKETAPI1 = "https://www.xishuibeishan.com/jeecg-boot/messageServer/";
// const SOCKETAPI1 = "wss://www.xishuibeishan.com/jeecg-boot/messageServer/";
// const SOCKETAPI1 = "ws://43.140.199.34:8080/jeecg-boot/messageServer/";
// 应用信息
const appInfo = {
// 应用名称
name: "孑医测评",
// 应用版本
version: "1.0",
// 应用logo
logo: "/static/logo.png'",
// 官方网站
site_url: "http://ruoyi.vip",
// 政策协议
agreements: [{
title: "隐私政策",
url: "https://ruoyi.vip/protocol.html"
},
{
title: "用户服务协议",
url: "https://ruoyi.vip/protocol.html"
}
]
}
export {
baseUrl,
basePicUrl,
SOCKETAPI1
}
SOCKETAPI1,
appInfo
}

View File

@ -60,6 +60,17 @@ public class PatientScriptController extends BaseController {
return toAjax(this.patientScriptService.saveBatch(patientScripts));
}
/**
* 新增数据
*
* @param patientScript 实体对象
* @return 新增结果
*/
@PostMapping("/updateNum")
public AjaxResult updateNum(@RequestBody PatientScript patientScript) throws IOException, InterruptedException {
return toAjax(this.patientScriptService.updateNum(patientScript));
}
/**
* 删除数据

View File

@ -75,6 +75,8 @@ public class PatientScript extends BaseEntity {
private String kydw;
private String fzr;
private String phone;
//排序
private Integer orderNum;
}

View File

@ -16,6 +16,7 @@ import java.util.List;
public interface PatientScriptMapper {
List<PatientScript> selectList(PatientScript patientScript);
void addData(PatientScript patientScript);
void updateNum(PatientScript patientScript);
void updateStatus(PatientScript patientScript);
void removeByIds(@Param("idList") List<Long> idList);
PatientScript getById(@Param("id") Long id);

View File

@ -28,6 +28,8 @@ public interface PatientScriptService {
Boolean saveBatch(List<PatientScript> patientScripts) ;
Boolean updateNum(PatientScript patientScript);
}

View File

@ -696,6 +696,12 @@ public class PatientScriptServiceImpl implements PatientScriptService {
return true;
}
@Override
public Boolean updateNum(PatientScript patientScript) {
scriptMapper.updateNum(patientScript);
return true;
}
// 每半小时执行一次
@Scheduled(cron = "0 0/3 * * * ?")
public void scanData() throws IOException, InterruptedException, TemplateException {
@ -1159,9 +1165,7 @@ public class PatientScriptServiceImpl implements PatientScriptService {
}
}
}catch (Exception e){
}
}catch (Exception ignored){}
}

View File

@ -464,7 +464,7 @@ public class AsdRecordServiceImpl implements IAsdRecordService
reportMap.put("正常",itTmp.get("score").toString());
}
});
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getRecordTime(),"yyyy-MM-dd")
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getCreateTime(),"yyyy-MM-dd HH:mm")
,String.valueOf(Integer.valueOf(reportMap.get("冷漠")) +Integer.valueOf(reportMap.get("被动"))) ,reportMap.get("正常") ,reportMap.get("主动"),it.getReportResult(),it.getTotalScore().toString(),Optional.ofNullable(it.getTimeUse()).orElse(0).toString()
};
List<String> contentRowList = new ArrayList<>();
@ -575,7 +575,7 @@ public class AsdRecordServiceImpl implements IAsdRecordService
reportMap.put("正常",itTmp.get("score").toString());
}
});
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getRecordTime(),"yyyy-MM-dd")
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getCreateTime(),"yyyy-MM-dd HH:mm")
,reportMap.get("冷漠") ,reportMap.get("被动") ,reportMap.get("正常") ,reportMap.get("主动"),it.getReportResult(),it.getTotalScore().toString(),Optional.ofNullable(it.getTimeUse()).orElse(0).toString()
};
List<String> contentRowList = new ArrayList<>();
@ -687,7 +687,7 @@ public class AsdRecordServiceImpl implements IAsdRecordService
reportMap.put("感觉",itTmp.get("score").toString());
}
});
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getRecordTime(),"yyyy-MM-dd")
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getCreateTime(),"yyyy-MM-dd HH:mm")
,reportMap.get("语言") ,reportMap.get("运动") ,reportMap.get("交往") ,reportMap.get("生活自理"),reportMap.get("感觉"),it.getReportResult(),it.getTotalScore().toString(),Optional.ofNullable(it.getTimeUse()).orElse(0).toString()
};
List<String> contentRowList = new ArrayList<>();
@ -776,7 +776,7 @@ public class AsdRecordServiceImpl implements IAsdRecordService
reportMap.put("社交技能",itTmp.get("score").toString());
}
});
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getRecordTime(),"yyyy-MM-dd")
String[] contentRow ={it.getChildName(),it.getChildSex(), DateUtil.format(it.getBirthday(),"yyyy-MM-dd"),"中国",it.getNickName(),it.getPhone(),DateUtil.format(it.getCreateTime(),"yyyy-MM-dd HH:mm")
,reportMap.get("想象力") ,reportMap.get("注意力切换能力") ,reportMap.get("沟通能力") ,reportMap.get("细节的注意"),reportMap.get("社交技能"),it.getReportResult(),it.getTotalScore().toString(),Optional.ofNullable(it.getTimeUse()).orElse(0).toString()
};
List<String> contentRowList = new ArrayList<>();

View File

@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="kydw" column="kydw" />
<result property="fzr" column="fzr"/>
<result property="phone" column="phone"/>
<result property="orderNum" column="order_num"/>
</resultMap>
<update id="updateStatus" parameterType="com.ruoyi.script.entity.PatientScript">
update patient_script
@ -45,6 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
repetition_time = #{repetitionTime}
where id = #{id}
</update>
<update id="updateNum" parameterType="com.ruoyi.script.entity.PatientScript">
update patient_script
set `order_num` = #{orderNum}
where id = #{id}
</update>
<delete id="removeByIds" parameterType="java.util.List">
delete from patient_script where id in
<foreach collection="idList" item="id" separator="," open="(" close=")">
@ -62,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> and status= #{status} </if>
<if test="type != null and type != ''"> and `type`= #{type} </if>
</where>
order by create_time desc
order by order_num asc,create_time desc
</select>
<select id="getById" resultMap="PatientScriptResult">
select * from patient_script
@ -105,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isAll != null">`is_all`,</if>
<if test="createTime != null">create_time,</if>
<if test="createId != null">create_id,</if>
<if test="orderNum != null">order_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientName != null">#{patientName},</if>
@ -133,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isAll != null">#{isAll},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createId != null">create_id,</if>
<if test="orderNum != null">#{orderNum},</if>
</trim>
</insert>

View File

@ -62,7 +62,7 @@
</div>
<div class="logo-size">
北京北山医疗科技有限公司
苏州领弦医疗科技有限公司
</div>
</div>
<div class="footer-contact">
@ -82,8 +82,8 @@
</div>
<div class="web_icp">
<div class="left">
<a href="">版权所有北京北山医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息京ICP备2022031410号</a>
<a href="">版权所有苏州领弦医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息苏ICP备2025185440号-1</a>
</div>
<div class="right" @click="">
</div>

View File

@ -70,7 +70,7 @@
</div>
<div class="logo-size">
北京北山医疗科技有限公司
苏州领弦医疗科技有限公司
</div>
</div>
<div class="footer-contact">
@ -90,8 +90,8 @@
</div>
<div class="web_icp">
<div class="left">
<a href="">版权所有北京北山医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息京ICP备2022031410号</a>
<a href="">版权所有苏州领弦医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息苏ICP备2025185440号-1</a>
</div>
<div class="right" @click="">
</div>

View File

@ -30,6 +30,20 @@
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="生成排序" align="center" prop="orderNum" >
<div style="display: flex;align-items: center">
<input
type="number"
min="1"
step="1"
v-model.number="scope.row.orderNum"
@input="handleOrderNumInput(scope.row)"
@keydown="onlyPositiveInteger"
oninput="if(value.length>1 && value[0] == '0') value = value.slice(1); if(value < 0) value = ''" style="width: 100px;margin-right: 10px;border: 1px solid #ccc;height: 30px;border-radius: 5px;"
>
<el-button size="mini" icon="el-icon-check" circle @click="updateOrderNum(scope.row)"></el-button>
</div>
</el-table-column>
<el-table-column label="患者姓名" align="center" prop="patientName" />
<el-table-column label="年龄" align="center" prop="patientAge" />
<el-table-column label="性别" align="center" prop="patientSex" />
@ -147,6 +161,12 @@
<el-input v-model="item.shDoctor" placeholder="审核医生" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'生成排序' " :prop="'items.' + index + '.orderNum'" >
<el-input-number step="1" step-strictly v-model="item.orderNum" placeholder="生成排序" :min="0"/>
</el-form-item>
</el-col>
<div class="right_button">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="removeItem(index)">删除</el-button>
</div>
@ -237,7 +257,8 @@ export default {
form: [
{
patientSex: '',
scanTime: ''
scanTime: '',
orderNum:1
}
],
//
@ -267,6 +288,40 @@ export default {
this.getList();
},
methods: {
/**
* 限制只能输入正整数
*/
onlyPositiveInteger(event) {
// 退Tab
const allowedKeys = ['Backspace', 'Delete', 'Tab', 'ArrowLeft', 'ArrowRight'];
if (allowedKeys.includes(event.key)) {
return;
}
//
if (!/^[0-9]$/.test(event.key)) {
event.preventDefault();
}
},
/**
* 处理排序号输入
*/
handleOrderNumInput(row) {
//
if (row.orderNum !== null && row.orderNum !== undefined) {
//
if (typeof row.orderNum === 'string' && row.orderNum.length > 1 && row.orderNum[0] === '0') {
row.orderNum = parseInt(row.orderNum, 10) || '';
}
//
if (row.orderNum <0) {
row.orderNum = 1;
}
}
},
/** 查询测评记录列表 */
getList() {
this.loading = true;
@ -288,7 +343,8 @@ export default {
this.form = [
{
patientSex: '',
scanTime: ''
scanTime: '',
orderNum:1
}
];
this.resetForm("form");
@ -413,7 +469,8 @@ export default {
addItem() {
this.form.push({
patientSex: '',
scanTime: ''
scanTime: '',
orderNum:1
});
},
removeItem(index) {

View File

@ -30,6 +30,22 @@
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="生成排序" align="center" prop="orderNum" >
<template slot-scope="scope">
<div style="display: flex;align-items: center">
<input
type="number"
min="1"
step="1"
v-model.number="scope.row.orderNum"
@input="handleOrderNumInput(scope.row)"
@keydown="onlyPositiveInteger"
oninput="if(value.length>1 && value[0] == '0') value = value.slice(1); if(value < 0) value = ''" style="width: 100px;margin-right: 10px;border: 1px solid #ccc;height: 30px;border-radius: 5px;"
>
<el-button size="mini" icon="el-icon-check" circle @click="updateOrderNum(scope.row)"></el-button>
</div>
</template>
</el-table-column>
<el-table-column label="患者姓名" align="center" prop="patientName" />
<el-table-column label="年龄" align="center" prop="patientAge" />
<el-table-column label="性别" align="center" prop="patientSex" />
@ -147,6 +163,11 @@
<el-input v-model="item.shDoctor" placeholder="审核医生" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'生成排序' " :prop="'items.' + index + '.orderNum'" >
<el-input-number step="1" step-strictly v-model="item.orderNum" placeholder="生成排序" :min="0" />
</el-form-item>
</el-col>
<div class="right_button">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="removeItem(index)">删除</el-button>
</div>
@ -172,7 +193,7 @@ import {
getRecord,
delRecord,
addRecord,
updateRecord,
updateNum,
exportReport
} from "./scriptSh";
import request from '@/utils/request'
@ -237,7 +258,8 @@ export default {
form: [
{
patientSex: '',
scanTime: ''
scanTime: '',
orderNum:1
}
],
//
@ -267,6 +289,56 @@ export default {
this.getList();
},
methods: {
/**
* 限制只能输入正整数
*/
onlyPositiveInteger(event) {
// 退Tab
const allowedKeys = ['Backspace', 'Delete', 'Tab', 'ArrowLeft', 'ArrowRight'];
if (allowedKeys.includes(event.key)) {
return;
}
//
if (!/^[0-9]$/.test(event.key)) {
event.preventDefault();
}
},
/**
* 处理排序号输入
*/
handleOrderNumInput(row) {
//
if (row.orderNum !== null && row.orderNum !== undefined) {
//
if (typeof row.orderNum === 'string' && row.orderNum.length > 1 && row.orderNum[0] === '0') {
row.orderNum = parseInt(row.orderNum, 10) || '';
}
//
if (row.orderNum <0) {
row.orderNum = 1;
}
}
},
/**
* 更新排序号
*/
updateOrderNum(row) {
if (!row.orderNum || row.orderNum < 1) {
this.$message.warning("排序号必须为正整数");
return;
}
// scriptSh.js
updateNum({id: row.id, orderNum: row.orderNum}).then(response => {
this.$modal.msgSuccess("排序号更新成功");
}).catch(() => {
this.$modal.msgError("排序号更新失败");
});
},
/** 查询测评记录列表 */
getList() {
this.loading = true;
@ -288,7 +360,8 @@ export default {
this.form = [
{
patientSex: '',
scanTime: ''
scanTime: '',
orderNum:1
}
];
this.resetForm("form");
@ -413,7 +486,8 @@ export default {
addItem() {
this.form.push({
patientSex: '',
scanTime: ''
scanTime: '',
orderNum:1
});
},
removeItem(index) {
@ -442,4 +516,12 @@ export default {
margin-left: 45px;
margin-bottom: 10px;
}
input{
width: 100px;
margin-right: 10px;
border: 1px solid #ccc;
height: 30px;
border-radius: 5px;
}
</style>

View File

@ -26,6 +26,14 @@ export function addRecord(data) {
})
}
export function updateNum(data) {
return request({
url: '/sys/patientScript/updateNum',
method: 'post',
data: data
})
}
// 删除测评记录

View File

@ -63,7 +63,7 @@
</div>
<div class="logo-size">
北京北山医疗科技有限公司
苏州领弦医疗科技有限公司
</div>
</div>
<div class="footer-contact">
@ -83,8 +83,8 @@
</div>
<div class="web_icp">
<div class="left">
<a href="">版权所有北京北山医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息京ICP备2022031410号</a>
<a href="">版权所有苏州领弦医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息苏ICP备2025185440号-1</a>
</div>
<div class="right" @click="">
</div>

View File

@ -77,7 +77,7 @@
</div>
<div class="logo-size">
北京北山医疗科技有限公司
苏州领弦医疗科技有限公司
</div>
</div>
<div class="footer-contact">
@ -97,8 +97,8 @@
</div>
<div class="web_icp">
<div class="left">
<a href="">版权所有北京北山医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息京ICP备2022031410号</a>
<a href="">版权所有苏州领弦医疗科技有限公司</a>
<a href="https://beian.miit.gov.cn">备案信息苏ICP备2025185440号-1</a>
</div>
<div class="right" @click="">
</div>