解决终审页面纸质签收查询错误并增加纸质扫描条件查询

master
zengwh 5 years ago
parent f0c2396f63
commit 0262bad63e

@ -95,8 +95,8 @@ public class lastVerifyController {
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status";
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态,纸质状态,纸质扫描";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status,remark,checkName";
try {
//是否查询纸质签收状态的相关处理
archiveMasterService.setLastVerifyList(archiveMasterVo);

@ -210,14 +210,32 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
patientIds.append("'").append(master.getPatientId()).append("'");
}
}
//将查询结果带入查询oracle返回集合
List<String> selectList = new ArrayList<>();
List<String> selectList1 = new ArrayList<>();
//selectList.add("1304063");
//selectList.add("1304458");
if(masters.size() > 30){
patientIds = null;
}
selectList = selectOracleGetSignList(patientIds,selectList);
for(Archive_Master master : masters) {
if (StringUtils.isNotBlank(master.getPatientId())) {
if (StringUtils.isNotBlank(master.getPatientId())) {
for (String patientId : selectList) {
if (master.getPatientId().equals(patientId)) {
selectList1.add(master.getPatientId());
break;
}
}
}
}
}
//设置进查询条件
if(!CollectionUtils.isEmpty(selectList)) {
vo.setPatientIdsForSign(selectList1);
}
}
//将查询结果带入查询oracle返回集合
List<String> selectList = new ArrayList<>();
//selectList.add("1304063");
//selectList.add("1304458");
selectList = selectOracleGetSignList(patientIds,selectList);
//设置进查询条件
vo.setPatientIdsForSign(selectList);
}
return vo;
}
@ -265,8 +283,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
}
//赋值纸质扫描上传情况
List<Archive_Detail> details = detailMapper.selectIsScan(patientIdStr.toString(),1);
//赋值签收情况
List<String> selectList = new ArrayList<>();
try{
@ -287,17 +303,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
}
//组织是否纸质扫描
String isScan = "否";
if(!CollectionUtils.isEmpty(details)){
for (Archive_Detail detail:details) {
if(detail.getMasterid().equals(masterVo.getId())){
isScan = "是";
break;
}
}
}
masterVo.setCheckName(isScan);
}
}catch (Exception e){
e.printStackTrace();
@ -1149,8 +1154,13 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
@Override
public List<String> selectOracleGetSignList(StringBuilder patientIdStr, List<String> selectList){
//查询签收情况
String sql = "select fpat_no from v_jswzh_archive_bqreg where fpat_no in ("+patientIdStr.toString()+")" +
String sql = "";
if(StringUtils.isNotBlank(patientIdStr)){
sql = "select fpat_no from v_jswzh_archive_bqreg where fpat_no in ("+patientIdStr.toString()+")" +
"and freg_date is not null";
}else{
sql = "select fpat_no from v_jswzh_archive_bqreg where freg_date is not null";
}
//执行查询
try{
selectList = OracleConnect.selectList(sql);

@ -499,9 +499,25 @@
dead_days
ELSE
days
END from emr_overtime_set where id = 1) days
END from emr_overtime_set where id = 1) days,
CASE
WHEN MasterID IS NULL THEN
'否' ELSE '是'
END checkName
from archive_master m
LEFT JOIN ( SELECT MasterID FROM archive_detail INNER JOIN archive_master ON archive_detail.MasterID = archive_master.id WHERE Source = '扫描上传' GROUP BY MasterID ) archive_detail ON m.id = archive_detail.MasterID
where 1=1 and ArchiveState in ('64','1024')
<if test="checkName != null and checkName != ''">
AND MasterID IS
<choose>
<when test="checkName == 0">
NULL
</when>
<when test="checkName == 1">
NOT NULL
</when>
</choose>
</if>
<!--查询纸质签收状态-->
<if test="isSign != null">
and patient_id

@ -185,6 +185,14 @@
<option value="0">未签收</option>
</select>
</div>
<div class="form-group divCss">
<label>纸质扫描:</label>
<select class="form-control input-sm" id="checkName">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>
<button type="button" class="btn btn-primary btn-sm divCss" id="approvesBtn">批量审核</button>
@ -654,7 +662,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2020-11-13"></script>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-02-02"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-16"></script>
<script src="${path}/static/js/statistics/getDeptCommom.js"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>

@ -73,7 +73,8 @@ function initTable() {
endDateTo: $("#endDateTo").val(),
doctorInCharge:$("#doctorInCharge").val(),
isSign:$("#isSign").val(),
isSearch:$("#isSearch").val()
isSearch:$("#isSearch").val(),
checkName:$("#checkName").val()
};
return temp;
},
@ -489,6 +490,7 @@ function callApproveDiag(ids,count) {
$("#status1").val("64");
$("#verifyText").val("");
$("#approveCount").val(count);
$("#changeReason").val('');
}
//查看初审信息
@ -635,5 +637,5 @@ $("#excelBtn").click(function () {
var endDateTo = $("#endDateTo").val();
window.location.href = path+"/lastVerify/exportExcel?inpNo=" + inpNo + "&visitId=" + visitId +
"&name=" + name + "&deptName=" + deptName
+ "&startDateTo=" + startDateTo + "&endDateTo=" + endDateTo+"&isSearch="+$("#isSearch").val()+"&doctorInCharge="+$("#doctorInCharge").val()+"&isSign="+$("#isSign").val();
+ "&startDateTo=" + startDateTo + "&endDateTo=" + endDateTo+"&isSearch="+$("#isSearch").val()+"&doctorInCharge="+$("#doctorInCharge").val()+"&isSign="+$("#isSign").val()+"&checkName="+$("#checkName").val();
});
Loading…
Cancel
Save