新增接口 更新检查数据打印状态

This commit is contained in:
weapon 2025-07-04 10:00:29 +08:00
parent 7c708f0716
commit b5d9b2a77d
8 changed files with 71 additions and 1 deletions

View File

@ -260,6 +260,14 @@ public class PatientexamlistController {
return success(pageResult);
}
@PutMapping("/updatePrintStatus")
@Operation(summary = "更新打印状态")
public CommonResult<Boolean> updatePrintStatus(@RequestBody ReportPrintStatusUpdateVO reqVO) {
patientexamlistService.updatePrintStatus(reqVO);
return success(true);
}
@GetMapping("/positiveStatistics")
@Operation(summary = "阳性统计")
public CommonResult<List<Map<String, Object>>> getPositiveStatistics(@Valid PositiveStatisticsReqVO reqVO) {

View File

@ -37,6 +37,9 @@ public class ReportPrintPageReqVO extends PageParam {
@Schema(description = "患者姓名", example = "赵六")
private String pname;
@Schema(description = "打印状态")
private Integer printStatus;
@Schema(description = "机构ID", example = "29289")
private String orgId;

View File

@ -0,0 +1,20 @@
package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@Schema(description = "管理后台 - PACS检查报告单 打印状态请求VO ")
@Data
//@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ReportPrintStatusUpdateVO {
@Schema(description = "检查id")
private String id;
@Schema(description = "检查id集合")
private List<String> idList;
}

View File

@ -200,4 +200,7 @@ public class PatientexamlistDO extends BaseDO {
@TableField(value = "sfz")
private String sfz;
@TableField(value = "print_status")
private Integer printStatus;
}

View File

@ -35,6 +35,10 @@ public class WithdrawRecordDO {
* 操作人员
*/
private String operator;
/**
* 打回之前的pdf报告单
*/
private String lastPdfUrl;
/**
* 打回日期
*/

View File

@ -53,6 +53,7 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
.likeIfPresent(PatientexamlistDO::getDeviceName, reqVO.getDeviceName())
.eqIfPresent(PatientexamlistDO::getDeviceType, reqVO.getDeviceType())
.likeIfPresent(PatientexamlistDO::getPName, reqVO.getPname())
.eqIfPresent(PatientexamlistDO::getPrintStatus,reqVO.getPrintStatus())
.isNotNull(PatientexamlistDO::getDiagDate)
.eq(PatientexamlistDO::getReportstatus, "已审核")
.orderByDesc(PatientexamlistDO::getExamDate));

View File

@ -172,4 +172,10 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
* @param withdrawRecordDO
*/
void withdrawPatientExam(WithdrawRecordDO withdrawRecordDO);
/**
* 更新打印状态
* @param reqVO
*/
void updatePrintStatus(ReportPrintStatusUpdateVO reqVO);
}

View File

@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.tblist.dal.mysql.ecganalysisparas.Ecganalysispara
import cn.iocoder.yudao.module.tblist.dal.mysql.positivestatistics.PositivestatisticsMapper;
import cn.iocoder.yudao.module.tblist.dal.mysql.withdrawrecord.WithdrawRecordMapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -174,6 +175,8 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
if (pageReqVO != null) {
pageReqVO.setOrgId(user.getOrgId());
}
// 默认查询当天的检查数据
return patientexamlistMapper.selectPage(pageReqVO);
}
@ -655,6 +658,10 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
@Override
@Transactional(rollbackFor = Exception.class)
public void withdrawPatientExam(WithdrawRecordDO withdrawRecordDO) {
// 根据检查id获取患者检查表中的pdf报告单
PatientexamlistDO patientexamlistDO = patientexamlistMapper.selectOne(new LambdaQueryWrapper<PatientexamlistDO>()
.eq(PatientexamlistDO::getExamId, withdrawRecordDO.getExamId()));
// 根据检查id更新患者检查表中的三个字段reportstatusreviewStatuspdfurl
LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<PatientexamlistDO>()
.eq(PatientexamlistDO::getExamId,withdrawRecordDO.getExamId())
@ -664,13 +671,31 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
patientexamlistMapper.update(updateWrapper);
String nickname = SecurityFrameworkUtils.getLoginUserNickname();
withdrawRecordDO.setOperator(nickname).setWithdrawDate(LocalDateTime.now());
withdrawRecordDO.setOperator(nickname)
.setWithdrawDate(LocalDateTime.now())
.setLastPdfUrl(patientexamlistDO.getPdfurl());
// 插入数据暂时先不记录打回原因
withdrawRecordMapper.insert(withdrawRecordDO);
}
@Override
public void updatePrintStatus(ReportPrintStatusUpdateVO reqVO) {
Set<String> idList = new HashSet<>();
if(reqVO.getId() != null){
idList.add(reqVO.getId());
}
if(reqVO.getIdList() != null){
idList.addAll(reqVO.getIdList());
}
LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<PatientexamlistDO>()
.in(PatientexamlistDO::getId, idList)
.set(PatientexamlistDO::getPrintStatus, 1);
patientexamlistMapper.update(updateWrapper);
}
public Image getAcroField_Image(String url) {
Image out = null;
try {