增加打印状态查询

gaoming_branch
zengwh 4 years ago
parent 7b7c30e338
commit 6a087f0025

@ -220,7 +220,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
StringBuilder patientIdStr = new StringBuilder();
for (Archive_Master_Vo masterVo : list) {
//科室名称编码转名称
deptNameCode2Name(dictionaries, masterVo);
@ -231,23 +230,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}else if(status.equals(EnumVerify.DocState.CallBacked.getCode())){
masterVo.setStatus(EnumVerify.DocState.CallBacked.getName());
}
if(StringUtils.isNotBlank(patientIdStr)){
patientIdStr.append(",");
}
masterVo.setPrintStatus("否");
patientIdStr.append(masterVo.getPatientId());
}
//设置打印状态
List<TUuPrint> tUuPrints = tUuPrintMapper.selectAllByPatientId(patientIdStr.toString());
if(!CollectionUtils.isEmpty(tUuPrints)){
for (Archive_Master_Vo masterVo : list) {
for (TUuPrint tUuPrint : tUuPrints){
if(tUuPrint.getPatientId().equals(masterVo.getPatientId())){
masterVo.setPrintStatus("是");
break;
}
}
}
}
}
return list;
@ -290,10 +272,9 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
//组织完整性字段并完整的更新archive_master表的完整性字段值为完整LockInfo='完整'
//updateMasterBySuccess(list);
//转换科室与赋值超期天数
String patientIds = selectByColumnChange(list);
selectByColumnChange(list);
//根据状态code转换状态及判断显示按钮
if(null != list && !list.isEmpty()){
List<TUuPrint> tUuPrints = tUuPrintMapper.selectAllByPatientId(patientIds);
//查询流转角色集合
List<ArchiveFlowRole> flowRoles = flowRoleMapper.selectAll();
//计算属于哪种审核角色
@ -318,17 +299,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
masterVo.setBtns(btns);
}
}
//定义打印状态
String printStatus = "否";
if(!CollectionUtils.isEmpty(tUuPrints)){
for(TUuPrint tUuPrint : tUuPrints){
if(tUuPrint.getPatientId().equals(masterVo.getPatientId())){
printStatus = "是";
break;
}
}
}
masterVo.setPrintStatus(printStatus);
}
}
}

@ -612,6 +612,9 @@
(select distinct jzh from archive_other_ext where sysFlag = -300)
</sql>
<sql id="selectPatientIdByPrintInfo">
(SELECT DISTINCT patient_id FROM archive_printInfo WHERE print_userid not in (1,2399) and D1 > 0)
</sql>
<!---出院-->
<select id="selectByColumn" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select * from (
@ -622,9 +625,16 @@
'是'
ELSE
'否'
END callBackStatus
END callBackStatus,
CASE
WHEN printInfoTable.patient_id IS NOT NULL THEN
'是'
ELSE
'否'
END printStatus
from archive_master
LEFT JOIN <include refid="selectCallBackList"></include> archive_other_ext ON archive_master.patient_id = archive_other_ext.jzh
LEFT JOIN <include refid="selectPatientIdByPrintInfo"></include> printInfoTable ON printInfoTable.patient_id = archive_master.patient_id
<where><include refid="beHospitalSearch"></include>
<if test="callBackStatus != null">
<choose>
@ -636,6 +646,16 @@
</otherwise>
</choose>
</if>
<if test="printStatus != null and printStatus != ''">
<choose>
<when test="printStatus == 1">
AND printInfoTable.patient_id is not null
</when>
<otherwise>
AND printInfoTable.patient_id is null
</otherwise>
</choose>
</if>
</where>
<if test="userName!= null and userName != ''">UNION ALL
SELECT
@ -687,12 +707,19 @@
'是'
ELSE
'否'
END callBackStatus
END callBackStatus,
CASE
WHEN printInfoTable.patient_id IS NOT NULL THEN
'是'
ELSE
'否'
END printStatus
from archive_master m
LEFT JOIN
<include refid="selectCallBackList"></include> archive_other_ext
ON m.patient_id = archive_other_ext.jzh
LEFT JOIN ( SELECT MasterID FROM archive_detail WHERE Source = '扫描上传' AND archive_detail.flag = '0' GROUP BY MasterID ) archive_detail ON m.id = archive_detail.MasterID
LEFT JOIN <include refid="selectPatientIdByPrintInfo"></include> printInfoTable ON printInfoTable.patient_id = m.patient_id
where 1=1 and ArchiveState in ('64','1024')
<if test="callBackStatus != null">
<choose>
@ -704,6 +731,16 @@
</otherwise>
</choose>
</if>
<if test="printStatus != null and printStatus != ''">
<choose>
<when test="printStatus == 1">
AND printInfoTable.patient_id is not null
</when>
<otherwise>
AND printInfoTable.patient_id is null
</otherwise>
</choose>
</if>
<if test="checkName != null and checkName != ''">
AND MasterID IS
<choose>

@ -241,6 +241,14 @@
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss">
<label>打印状态:</label>
<select class="form-control input-sm" id="printStatus">
<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>
@ -847,7 +855,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/beHospList/beHospList.js?time=2021-08-01"></script>
<script src="${path}/static/js/beHospList/beHospList.js?time=2021-08-04"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2021-08-01"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -201,6 +201,14 @@
<option value="0">否</option>
</select>
</div>
<div class="form-group divCss">
<label>打印状态:</label>
<select class="form-control input-sm" id="printStatus">
<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>
@ -679,7 +687,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-08-01"></script>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-08-04"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2021-08-01"></script>
<script src="${path}/static/js/statistics/getDeptCommom.js"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>

@ -72,7 +72,8 @@ function initTable() {
isSuccess:$("#isSuccessSearch").val(),
infoId:$("#infoId").val(),
operRole:$("#checker").val(),
callBackStatus:$("#callBackStatus").val()
callBackStatus:$("#callBackStatus").val(),
printStatus:$("#printStatus").val()
};
return temp;
},

@ -75,7 +75,8 @@ function initTable() {
isSign:$("#isSign").val(),
isSearch:$("#isSearch").val(),
checkName:$("#checkName").val(),
callBackStatus:$("#callBackStatus").val()
callBackStatus:$("#callBackStatus").val(),
printStatus:$("#printStatus").val()
};
return temp;
},

Loading…
Cancel
Save