修改bug

master
luolyjava 6 years ago
parent b95e8cf081
commit f76e2e1ac6

@ -197,6 +197,18 @@ public class CommomSearchController {
}
}
@RequestMapping("getCommonInfo")
@ResponseBody
public String getCommonInfo(){
try {
List<CommomVo> commomVoList = commomMapper.selectAllInfo();
return JSON.toJSONString(commomVoList);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
@RequestMapping("getDept174")
@ResponseBody
public String getDept174(){

@ -88,4 +88,10 @@ public interface CommomMapper {
* patientId,name,admissId
* */
List<CommomVo> selectCommomByInpatientNo(@Param("inpatientNo")String inpatientNo);
/**
*
* @return
*/
List<CommomVo> selectAllInfo();
}

@ -5,7 +5,7 @@ jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=qf_record
jdbc.username=sa
jdbc.password=docus702
jdbc.password=123456
#dataSource2
jdbc.url2=jdbc\:sqlserver\://localhost:1433;databaseName=blgd_java

@ -109,6 +109,12 @@
WHERE
patient_id in (${patientIds})
</select>
<select id="selectAllInfo" resultType="com.emr.vo.commomSearch.CommomVo">
select
inpatient_no,
name
from commomtable
</select>
<!--根据住院次数和病案号和姓名查询patientId-->
<select id="selectPatientIdByAdmissTimesAndInpatientNoAndName" resultType="java.lang.String" parameterType="java.lang.String">
SELECT

@ -13,6 +13,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.css" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
@ -20,6 +22,7 @@
<![endif]-->
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.js?time=2019-12-25"></script>
<script type="text/javascript" src="${path}/static/js/pinying.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script>
<script>
var path = "${path}";
</script>
@ -28,6 +31,9 @@
margin-right: -15px;
margin-bottom: -15px;
}
.collapse{
overflow-y:scroll;
}
.labelDiv{
padding-top: 2%;
padding-right: 0;
@ -37,10 +43,10 @@
padding-top: 2%;
}
/*搜索区域*/
.panel-group{
/*.panel-group{
height: 254px;
margin-bottom: 0!important;
}
}*/
/*按钮组*/
.btns{
width:102%;
@ -254,13 +260,14 @@
<label class="control-label">病案号:</label>
</div>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no" onkeyup="getInpatientNoContents('inpatient_no')" onfocus="getInpatientNoContents('inpatient_no')" onblur="clearContent('inpatient_no')">
<div id="inpatient_noDiv">
<select class="selectpicker form-control input-sm inputValue" id="inpatient_no" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select>
<%--<input type="text" class="form-control input-sm inputValue" id="inpatient_no" onkeyup="getInpatientNoContents('inpatient_no')" onfocus="getInpatientNoContents('inpatient_no')" onblur="clearContent('inpatient_no')">
<div id="inpatient_noDiv" style="overflow:auto;">
<table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="inpatient_noContent"></tbody>
</table>
</div>
</div>--%>
</div>
</div>
</div>

@ -1,3 +1,4 @@
<%@ page import="java.util.ArrayList" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
@ -17,6 +18,14 @@
<![endif]-->
<script>
var path = "${path}";
var array = new Array();
var nameArray = new Array();
<c:forEach items="${relateds}" var="related">
array.push("${related.id}");
</c:forEach>
<c:forEach items="${relateds}" var="related">
nameArray.push("${related.name}");
</c:forEach>
</script>
<style type="text/css">
body {
@ -137,6 +146,9 @@
<a data-toggle="collapse" href="#b">
可收缩
</a>
<a data-toggle="collapse" onclick="checkCancel(array, nameArray)">
取消
</a>
</h5>
</div>
<div id="b" class="panel-collapse collapse in">
@ -152,7 +164,7 @@
</div>
</div>
<div class="bottomDiv">
<div class="blockDiv">
<div class="blockDiv" id="blockDiv">
<form id="block">
</form>

@ -1251,6 +1251,7 @@
'</div>',
'<div class="pull-' + this.options.paginationHAlign + ' pagination">',
'<ul class="pagination' + sprintf(' pagination-%s', this.options.iconSize) + '">',
'<li class="page-first"><a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" >' + this.options.paginationFirstText + '</a></li>',
'<li class="page-pre"><a href="javascript:void(0)" rel="external nofollow" rel="external nofollow" >' + this.options.paginationPreText + '</a></li>');
if (this.totalPages < 5) {

@ -19,6 +19,8 @@ $(function () {
loadDiag();
//加载手术字典
loadOperate();
//加载inpatientNo
loadInpatientNo();
});
//加载性别
function loadSex() {
@ -45,6 +47,32 @@ function loadSex(){
})
}
//加载病案号
function loadInpatientNo() {
$.ajax({
type: 'get',
url: path + '/commom/getCommonInfo',
dataType: 'json',
success: function (data) {
if (null != data) {
$("#inpatient_no").empty();
var html = '<option value=""></option>';
for (var i = 0; i < data.length; i++) {
if (data[i].name != '' && data[i].inpatientNo != '') {
var name = data[i].name;
var inpatientNo = data[i].inpatientNo;
/*var py = makePy(name);
var pingyin = ConvertPinyin(name);*/
html += '<option value="' + inpatientNo + '">' + inpatientNo + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + name + '</option>';
}
}
$("#inpatient_no").append(html);
$("#inpatient_no").selectpicker('refresh');
}
}
})
}
//加载科室
function loadDept() {
$.ajax({
@ -90,6 +118,7 @@ function loadDiagStatus(){
}
})
}
//加载诊断编码和诊断名称
function loadDiag() {
$.ajax({
@ -119,6 +148,7 @@ function loadDiag(){
}
})
}
//加载手术字典
function loadOperate() {
$.ajax({
@ -160,6 +190,7 @@ $("#isOper").change(function () {
})
//时间格式属性名集合
var commomtable = 'commomtable';
//拼接sql
function getSql() {
var inputValue = getInputValue();
@ -433,21 +464,43 @@ function getSql(){
$("#sql").val("");
}
}
//搜索功能
function search() {
var inpatient_no = $("#inpatient_no").val();
var startTime1 = $("#startTime1").val();
var endTime1 = $("#endTime1").val();
var startTime2 = $("#startTime2").val();
var endTime2 = $("#endTime2").val();
var age1 = $("#age1").val();
var age2 = $("#age2").val();
console.log("1111" + startTime1 + endTime1 + startTime2 + endTime2);
if (inpatient_no != '' && (inpatient_no.indexOf(",") == -1 || inpatient_no.indexOf("") == -1) && inpatient_no.length > 16) {
toastr.warning("病案号的长度太长!");
return false;
}
if ((age1 != '' && age2 == '') || (age1 == '' && age2 != '')) {
toastr.warning("请输入完整年龄时间段!");
return false;
}
if ((startTime1 != '' && endTime1 == '') || (startTime1 == '' && endTime1 != '')) {
toastr.warning("请输入完整的入院日期时间段!");
return false;
}
if ((startTime2 != '' && endTime2 == '') || (startTime2 == '' && endTime2 != '')) {
toastr.warning("请输入完整的出院日期时间段!");
return false;
}
getSql();
freshTable();
}
//查看详情
function showDetail(patientId) {
//隐藏模板选项
//window.location.href=path+"/commom/showRecord?patientId="+patientId;
}
//导出excel功能
function exportExcel() {
getChecked();
@ -499,6 +552,7 @@ function exportExcel(){
}
/*}*/
}
/*****************************************输入框边输入内容边搜索功能方法*************************************************/
//级联病案号且长度超过4个字节才查询
function getInpatientNoContents(id) {
@ -521,6 +575,7 @@ function getInpatientNoContents(id) {
return;
}
}
//级联诊断码
function getDiagCodeContents(id) {
var keyword = document.getElementById(id).value;
@ -542,6 +597,7 @@ function getDiagCodeContents(id) {
return;
}
}
//级联手术编码
function getOperateCodeContents(id) {
var keyword = document.getElementById(id).value;
@ -563,6 +619,7 @@ function getOperateCodeContents(id) {
return;
}
}
//添加内容tr td
function insertContent(content, id) {
clearContent(id);
@ -605,6 +662,7 @@ function insertContent(content,id) {
};
}
}
//清楚内容方法
function clearContent(id) {
var popNode = document.getElementById(id + "Div");
@ -615,6 +673,7 @@ function clearContent(id) {
contentNode.removeChild(contentNode.childNodes[i]);
}
}
//设置样式
function setLocation(id) {
var inputNode = document.getElementById(id);
@ -628,3 +687,6 @@ function setLocation(id){
popNode.style.left = left + "px";
document.getElementById(id + "Content_table").style.width = width + "px";
}

@ -417,3 +417,22 @@ function dynamicCheck(checked,idVal,val,name,options,inputs){
initDateInput(idVal)
}
}
//全不选
function checkCancel(array, nameArray) {
if (array.length){
for (var i = 0; i < array.length; i++){
document.getElementById(array[i]).checked = false;
}
}
if (nameArray.length){
for (var i = 0; i < nameArray.length; i++){
var nameVal = nameArray[i].replace(".","");
if($("#div"+nameVal).text() == ($("#div"+nameVal).parent().find('>div:last').text())){
$("#div"+nameVal).prev("div").children("div:last-child").remove();
}
$("#div"+nameVal).remove();
}
}
$("#checks").val('');
}

@ -146,6 +146,8 @@ function freshTable(){
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText : '上一页',
paginationNextText : '下一页',
paginationFirstText: '<',
paginationLastText: '>',
detailView: flag,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 5, //每页的记录行数(*

Loading…
Cancel
Save