常用查询页面增加病案号切换是否模糊查询,常用查询排序先患者姓名升序再住院次数升序

master
zengwh 4 years ago
parent 67adb306eb
commit 6dce0de661

@ -12,3 +12,5 @@
打印日志增加费用一列修复打印预览只有一张是上传图片报错、打印下载日志因升级mybatis安全漏洞导致字段类型不匹配
#2.0.7 2022-01-19
打印下载日志因升级mybatis安全漏洞导致字段类型不匹配
#2.0.8 2022-02-21
常用查询页面增加病案号切换是否模糊查询,常用查询排序先患者姓名升序再住院次数升序

@ -196,7 +196,7 @@
<input type="hidden" id="showPrint" value="${CURRENT_USER.userAge}">
<input type="hidden" id="flag" value="file_path">
<!--查询的sql ORDER BY 语句-->
<input type="hidden" id="orderBys" value=" order by commomtable.name">
<input type="hidden" id="orderBys" value=" order by commomtable.name,commomtable.admiss_times">
<!--该用户借阅申请的审批过了且未过期的病案不可重复申请可查看的病案主键patientId-->
<input type="hidden" id="approves">
<!--该用户下载申请的审批过了且未过期的病案不可重复申请可查看的病案主键patientId-->
@ -293,6 +293,9 @@
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no"
maxlength="16">
<input type="checkbox" id="inpatientNoCheckbox"
class="otherTable operTable isOperInput"><label for="inpatientNoCheckbox"
class="checkBoxClass">模糊查询</label>
</div>
</div>
</div>
@ -853,7 +856,7 @@
})
</script>
<script type="text/javascript" src="${path}/static/js/recordManage/templateSearch/searchCommomMethodqf.js?time=2021-11-28"></script>
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/commomListqf.js?time=2021-12-23"></script>
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/commomListqf.js?time=2022-02-21_1"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
<script type="text/javascript" src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>

@ -369,33 +369,38 @@ function getSql() {
if (inpatientNo != '') {
name = 'inpatient_no';
inpatientNo = inpatientNo.replace(/(^\s*)|(\s*$)/g, "");
//1.逗号隔开
if (inpatientNo.indexOf(",") != -1 || inpatientNo.indexOf("") != -1) {
if (inpatientNo.indexOf(",") != -1) {
inpatientNo = inpatientNo.split(",");
} else if (inpatientNo.indexOf("") != -1) {
inpatientNo = inpatientNo.split("");
}
for (var i = 0; i < inpatientNo.length; i++) {
if (inpatientNo[i] != '') {
inpatientNo[i] = inpatientNo[i].replace(/(^\s*)|(\s*$)/g, "");
//拼接前括号
if (i == 0) {
whereNames += "(";
}
if (i != inpatientNo.length - 1) {
whereNames += commomtable + "." + name + " LIKE '%" + inpatientNo[i] + "%' OR ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + inpatientNo[i] + "%')";
var inpatientNoCheckbox = $("#inpatientNoCheckbox").is(':checked');
if(inpatientNoCheckbox) {
//1.逗号隔开
if (inpatientNo.indexOf(",") != -1 || inpatientNo.indexOf("") != -1) {
if (inpatientNo.indexOf(",") != -1) {
inpatientNo = inpatientNo.split(",");
} else if (inpatientNo.indexOf("") != -1) {
inpatientNo = inpatientNo.split("");
}
for (var i = 0; i < inpatientNo.length; i++) {
if (inpatientNo[i] != '') {
inpatientNo[i] = inpatientNo[i].replace(/(^\s*)|(\s*$)/g, "");
//拼接前括号
if (i == 0) {
whereNames += "(";
}
if (i != inpatientNo.length - 1) {
whereNames += commomtable + "." + name + " LIKE '%" + inpatientNo[i] + "%' OR ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + inpatientNo[i] + "%')";
}
}
}
whereNames += " AND ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}
whereNames += " AND ";
} else {
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";
}else{
whereNames += commomtable + "." + name + " = '" + $("#" + name).val() + "' AND ";
}
}
//ID
//ID
if ($("#admiss_id").val() != '') {
name = 'admiss_id';
whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND ";

Loading…
Cancel
Save