查询条件修改

This commit is contained in:
Flow 2025-06-30 15:09:40 +08:00
parent f0a6d1dff2
commit ad89e8ecbc
6 changed files with 15 additions and 52 deletions

View File

@ -440,7 +440,7 @@ public class InspectPatientController {
@Operation(summary = "发送检验申请单")
public CommonResult<Boolean> syncinspectApplyTj(@RequestParam("medicalSn") String medicalSn) throws JsonProcessingException {
//获取患者信息
InspectPatientDO patientDO = patientService.getPatientInfo(medicalSn);
InspectPatientDO patientDO = patientService.getnewPatientInfo(medicalSn);
if (patientDO != null) {
String checkBarCode1, checkBarCode2, checkBarCode3;
@ -591,11 +591,7 @@ public class InspectPatientController {
String barCodestatus=reportData.getBarCodeStatus();
//更新检验检查状态
if (barCodestatus!=null) {
if (pacsDataService.existsReportStatus(medicalSn, model)) {
pacsDataService.updateReportStatus(medicalSn, model, barCodestatus);
} else {
pacsDataService.insertReportStatus(medicalSn, model, barCodestatus);
}
pacsDataService.upsertReportStatus(medicalSn, model, barCodestatus);
}
if (!reportPath.contains("报告暂未出")) {
StringBuilder sb = new StringBuilder();
@ -645,11 +641,7 @@ public class InspectPatientController {
String barCodestatus=reportData.getBarCodeStatus();
//更新检验检查状态
if (barCodestatus!=null) {
if (pacsDataService.existsReportStatus(medicalSn, model)) {
pacsDataService.updateReportStatus(medicalSn, model, barCodestatus);
} else {
pacsDataService.insertReportStatus(medicalSn, model, barCodestatus);
}
pacsDataService.upsertReportStatus(medicalSn, model, barCodestatus);
}
if (!reportPath.contains("报告暂未出")) {
StringBuilder sb = new StringBuilder();
@ -761,7 +753,7 @@ public class InspectPatientController {
@Operation(summary = "回传体检相关信息")
public CommonResult<Boolean> PushJYPatientInfo(@RequestParam("medicalSn") String medicalSn) throws JsonProcessingException {
//获取患者信息
InspectPatientDO patientDO = patientService.getPatientInfo(medicalSn);
InspectPatientDO patientDO = patientService.getnewPatientInfo(medicalSn);
if (patientDO != null) {
if (patientDO.getNcgcode() != null && patientDO.getXcgcode() != null && patientDO.getShqx() != null) {
// 定义条形码列表
@ -1841,7 +1833,7 @@ public class InspectPatientController {
@RequestParam("pdfUrl") String pdfUrl) {
try {
// 获取患者信息
InspectPatientDO patientDO = patientService.getPatientInfo(medicalSn);
InspectPatientDO patientDO = patientService.getnewPatientInfo(medicalSn);
if (patientDO == null) {
return success(false, "未找到该患者信息");
}

View File

@ -42,13 +42,6 @@ public interface InspectPacsDataMapper extends BaseMapperX<InspectPacsDataDO> {
@Param("type") String type,
@Param("status") String status);
/**
* 更新检验报告状态
*/
int updateReportStatus(@Param("medicalSn") String medicalSn,
@Param("type") String type,
@Param("status") String status);
/**
* 统计检验报告状态表中指定体检编号和类型的记录数
*/

View File

@ -50,24 +50,14 @@ public interface InspectPacsDataService {
void updatebarcodestatus(String medicalSn, String type, String barcodestatus);
/**
* 插入检验报告状态到tb_report_status表
* 插入或更新检验报告状态到tb_report_status表upsert操作
*
* @param medicalSn 体检编号
* @param type 类型
* @param status 状态
* @return 影响行数
*/
int insertReportStatus(String medicalSn, String type, String status);
/**
* 更新检验报告状态到tb_report_status表
*
* @param medicalSn 体检编号
* @param type 类型
* @param status 状态
* @return 影响行数
*/
int updateReportStatus(String medicalSn, String type, String status);
int upsertReportStatus(String medicalSn, String type, String status);
/**
* 获得pacs抓取数据

View File

@ -81,21 +81,13 @@ public class InspectPacsDataServiceImpl implements InspectPacsDataService {
}
/**
* 插入检验报告状态到tb_report_status表
* 插入或更新检验报告状态到tb_report_status表upsert操作
*/
@Override
public int insertReportStatus(String medicalSn, String type, String status) {
public int upsertReportStatus(String medicalSn, String type, String status) {
return pacsDataMapper.insertReportStatus(medicalSn, type, status);
}
/**
* 更新检验报告状态到tb_report_status表
*/
@Override
public int updateReportStatus(String medicalSn, String type, String status) {
return pacsDataMapper.updateReportStatus(medicalSn, type, status);
}
private void validatePacsDataExists(Integer id) {
if (pacsDataMapper.selectById(id) == null) {

View File

@ -192,8 +192,9 @@ public class InspectPatientServiceImpl implements InspectPatientService {
InspectPatientDO::getSmiflag,
InspectPatientDO::getPulflag,
InspectPatientDO::getXcgcode,
InspectPatientDO::getNcgcode,
InspectPatientDO::getShqx,
InspectPatientDO::getNcgcode,
InspectPatientDO::getShqx,
InspectPatientDO::getPdfurl,
InspectPatientDO::getMedicalDateTime
);

View File

@ -9,19 +9,14 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<!-- 插入检验报告状态 -->
<!-- 插入或更新检验报告状态 -->
<insert id="insertReportStatus">
INSERT INTO tb_report_status (medicalSn, type, status)
VALUES (#{medicalSn}, #{type}, #{status})
ON DUPLICATE KEY UPDATE
status = VALUES(status)
</insert>
<!-- 更新检验报告状态 -->
<update id="updateReportStatus">
UPDATE tb_report_status
SET status = #{status}
WHERE medicalSn = #{medicalSn} AND type = #{type}
</update>
<!-- 统计检验报告状态表中指定体检编号和类型的记录数 -->
<select id="countReportStatus" resultType="int">
SELECT COUNT(*) FROM tb_report_status WHERE medicalSn = #{medicalSn} AND type = #{type}