召回模块(查询条件召回人下拉框,导出及查询显示列表召回人显示名称)

master
hujl 4 years ago
parent 9cd5be03c2
commit 9344a4d620

@ -51,8 +51,10 @@ public class medicalRecallDateController {
String[] header = {"日志id","病历清单id","住院号","住院次数","名字","性别","身份证","召回人","召回时间","召回原因","状态","归档状态"};
String[] fileNames = {"logId","archiveDetailId","inpNo","visitId","name","sex","idNo","creater","createDate","recallReason","state","archivestate"};
//文件名
String fileName = "日志信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
String fileName = "召回日志数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//构造excel的数据
emrLogVo.setLogContent("病案召回");
emrLogVo.setSysFlag("EMR_Medical_Record");
List<Emr_Log_Vo> list = logService.selectByCol(emrLogVo);
ThreadExcelUtils utils = new ThreadExcelUtils(fileName, "", header, fileNames);
String result=utils.exportExcelToFilePath(response,utils.listConvert(list));

@ -47,33 +47,55 @@ public class LogServiceImpl implements LogService {
public OffsetLimitPage selectByCol(Emr_Log_Vo emr_log_vo, Integer offset, Integer limit) {
PageHelper.offsetPage(offset, limit);
List<Emr_Log_Vo> newsInfoList = logMapper.selectByCol(emr_log_vo);
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null){
Map<String,JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, new Function<JSONObject,String>() {
@Override
public String apply(JSONObject temp) {
return temp.getString("userName");
}});
for (Emr_Log_Vo emrLogVo : newsInfoList) {
JSONObject userInfo = mappedMovies.get(emrLogVo.getCreater());
if (userInfo==null){
emrLogVo.setCreater(emrLogVo.getCreater());
}else {
emrLogVo.setCreater(userInfo.getString("name"));
}
}
if(newsInfoList!=null && newsInfoList.size()>0) {
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null) {
Map<String, JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, new Function<JSONObject, String>() {
@Override
public String apply(JSONObject temp) {
return temp.getString("userName");
}
});
//召回人
for (Emr_Log_Vo emrLogVo : newsInfoList) {
JSONObject userInfo = mappedMovies.get(emrLogVo.getCreater());
if (userInfo == null) {
emrLogVo.setCreater(emrLogVo.getCreater());
} else {
emrLogVo.setCreater(userInfo.getString("name"));
}
}
}
}
return new OffsetLimitPage((Page) newsInfoList);
}
@Override
public List<Emr_Log_Vo> selectByCol(Emr_Log_Vo emr_log_vo) {
return logMapper.selectByCol(emr_log_vo);
List<Emr_Log_Vo> newsInfoList = logMapper.selectByCol(emr_log_vo);
if(newsInfoList!=null && newsInfoList.size()>0) {
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null) {
Map<String, JSONObject> mappedMovies = Maps.uniqueIndex(powerUserList, new Function<JSONObject, String>() {
@Override
public String apply(JSONObject temp) {
return temp.getString("userName");
}
});
//召回人
for (Emr_Log_Vo emrLogVo : newsInfoList) {
JSONObject userInfo = mappedMovies.get(emrLogVo.getCreater());
if (userInfo == null) {
emrLogVo.setCreater(emrLogVo.getCreater());
} else {
emrLogVo.setCreater(userInfo.getString("name"));
}
}
}
}
return newsInfoList;
}
@Override

@ -190,25 +190,28 @@
<if test="idNo != null and idNo != ''">
and m.ID_NO like '%'+#{idNo,jdbcType=NCHAR}+'%'
</if>
<if test="logTitle != null">
<if test="logTitle != null and logTitle != ''">
and l.log_title = #{logTitle,jdbcType=NVARCHAR}
</if>
<if test="logContent != null">
<if test="logContent != null and logContent != ''">
and l.log_content = #{logContent,jdbcType=NVARCHAR}
</if>
<if test="ip != null">
<if test="ip != null and ip != ''">
and l.ip = #{ip,jdbcType=NCHAR}
</if>
<if test="sysId != null">
<if test="sysId != null ">
and l.sys_id = #{sysId,jdbcType=INTEGER}
</if>
<if test="sysFlag != null">
<if test="sysFlag != null and sysFlag != ''">
and l.sys_flag = #{sysFlag,jdbcType=VARCHAR}
</if>
<if test="creater != null">
and l.creater = #{creater,jdbcType=NVARCHAR}
<if test="creater != null and creater != ''">
and l.creater in
<foreach item="item" collection="creater.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="remark != null">
<if test="remark != null and remark != ''">
and l.remark = #{remark,jdbcType=NVARCHAR}
</if>
<choose>

@ -94,7 +94,12 @@
<if test="masterID != null and masterID != ''"> and s.masterID = #{masterID}</if>
<if test="detailID != null and detailID != ''"> and s.detailID = #{detailID}</if>
<if test="dTime != null and dTime != ''"> and s.dTime = #{dTime}</if>
<if test="c1 != null and c1 != ''"> and s.C1 like '%'+#{c1}+'%'</if>
<if test="c1 != null and c1 != ''">
and s.C1 in
<foreach item="item" collection="c1.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="c2 != null and c2 != ''"> and s.C2 = #{c2}</if>
<if test="c3 != null and c3 != ''"> and s.C3 = #{c3}</if>
<if test="c4 != null and c4 != ''"> and s.C4 = #{c4}</if>

@ -106,8 +106,14 @@
</div>
</div>
<div class="form-group divCss8">
<label for="creater">召回人:</label>
<input type="text" class="input-sm form-control" id="creater" placeholder="请输入召回人">
<label>召回人:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="creater" id="creater" title="请输入召回人"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" data-none-results-text="没找到相应记录{0}">
<%--<option value="--">全部</option>--%>
<%--<option value="02852">aaaa 02852</option>
<option value="00643">aaaa 00643</option>--%>
</select>
<%--<input type="text" class="input-sm form-control" id="creater" placeholder="请输入召回人">--%>
</div>
<div class="form-group divCss">
<label for="state">召回状态 :</label>
@ -129,10 +135,8 @@
<div class="columns columns-right btn-group pull-right" style="margin-top:0px;">
<div class="btn-group btn-info">
<select id="sel_exportoption" class="form-control">                
<option value="">导出当前页面数据</option>
               
<option value="">导出当前页面数据</option>                
<option value="all">导出全部数据</option>
               --%>
<option value="selected">导出选中数据</option>
</select>
</div>
@ -150,6 +154,7 @@
<script>
var tipLoad=1;
$(function () {
var url = window.location.href;
@ -191,6 +196,27 @@
return data;
}
function getUserList() {
//获取role为病案室、病案室管理的用户
$.ajax({
url:"${path}/getPowerUserList",
type:"GET",
data:{"type":1},
success:function (data) {
if (data != null) {
for (var i = 0; i < data.length; i++) {
$("#creater").append("<option value=" + data[i].userName + ">" + data[i].name + "</option>");
//$("#backer").append("<option value=" + data[i].userName + ">" + data[i].name + "</option>");
}
}
$(".selectpicker").selectpicker('refresh');
}
})
}
getUserList();
function initTable() {
if(tipLoad == 1){
$("#table").bootstrapTable({ // 对应table标签的id
@ -260,6 +286,7 @@
inpNo: "" + $("#inpNo").val(),
visitId: "" + $("#visitId").val(),
name: "" + $("#name").val(),
creater:"" + $("#creater").val(),
archivestate: "" + $("#archivestate").val(),
state: "" + $("#state").val(),
startDate: $("#startDate").val(),
@ -437,7 +464,7 @@
} else {
toastr.warning("正在查询,请稍等...");
}
$(".selectpicker").selectpicker( 'deselectAll' );
//$(".selectpicker").selectpicker( 'deselectAll' );
// $('#table').bootstrapTable('destroy');
//$('#table').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
//刷新
@ -470,11 +497,12 @@
var idNo = "" + $("#idNo").val();
var state = "" + $("#state").val();
var archivestate = "" + $("#archivestate").val();
var creater=""+$("#creater").val();
var startDate = "" + $("#startDate").val();
var endDate=""+ $("#endDate").val();
var logContent="病案召回";
window.location.href = "${path}/recallDate/exportExcel?inpNo=" + inpNo + "&visitId=" + visitId +
"&name=" + name + "&state=" + state + "&idNo=" + idNo + "&archivestate=" + archivestate
"&name=" + name + "&state=" + state + "&idNo=" + idNo + "&archivestate=" + archivestate+ "&creater="+creater
+ "&startDate=" + startDate + "&endDate=" + endDate+ "&logContent="+logContent;
});

@ -460,7 +460,9 @@
<%-- <input type="text" class="input-sm form-control" id="signer" placeholder="请输入签收人">--%>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="signer" id="signer" title="请输入签收人"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" data-none-results-text="没找到相应记录{0}">
<option value="--">全部</option>
<%-- <option value="--">全部</option>--%>
<%-- <option value="02852">aaaa 02852</option>
<option value="00643">aaaa 00643</option>--%>
</select>
</div>

Loading…
Cancel
Save