增加条形码时间

This commit is contained in:
Euni4U 2025-04-23 10:57:27 +08:00
parent f4c0c84373
commit 137de4c9dc
8 changed files with 69 additions and 4 deletions

View File

@ -1953,4 +1953,13 @@ public class InspectPatientController {
/*ExcelUtils.write(response, "统计.xls", "数据", InspectDoctorRespVO.class, /*ExcelUtils.write(response, "统计.xls", "数据", InspectDoctorRespVO.class,
BeanUtils.toBean(list, InspectDoctorRespVO.class));*/ BeanUtils.toBean(list, InspectDoctorRespVO.class));*/
} }
@PutMapping("/updateBarcodeTime")
@Operation(summary = "更新条码时间")
public CommonResult<Boolean> updateBarcodeTime(@RequestParam("medicalSn") String medicalSn,
@RequestParam(value = "barcodetime", required = false)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Date barcodetime) {
patientService.updateBarcodeTime(medicalSn, barcodetime);
return success(true);
}
} }

View File

@ -140,4 +140,9 @@ public class InspectPatientPageReqVO extends PageParam {
@Schema(description = "报告地址") @Schema(description = "报告地址")
private String pdfurl; private String pdfurl;
@Schema(description = "条形码打印时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ", timezone = "GMT+8")
private LocalDateTime barcodetime;
} }

View File

@ -150,4 +150,9 @@ public class InspectPatientRespVO {
@Schema(description = "总检医生") @Schema(description = "总检医生")
private String chiefinspector; private String chiefinspector;
@Schema(description = "条形码打印时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ", timezone = "GMT+8")
private LocalDateTime barcodetime;
} }

View File

@ -117,6 +117,9 @@ public class InspectPatientSaveReqVO {
@Schema(description = "打印时间") @Schema(description = "打印时间")
private LocalDateTime printtime; private LocalDateTime printtime;
@Schema(description = "条行码打印时间")
private LocalDateTime barcodetime;
@Schema(description = "总检医生id") @Schema(description = "总检医生id")
private String chiefinspectorid; private String chiefinspectorid;

View File

@ -206,6 +206,12 @@ public class InspectPatientDO {
@TableField("printtime") @TableField("printtime")
@JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss")
private LocalDateTime printtime; private LocalDateTime printtime;
/**
* 条行码打印时间
*/
@TableField("barcodetime")
@JsonFormat(pattern = "yyyy-MM-dd yyyy-MM-dd HH:mm:ss")
private LocalDateTime barcodetime;
/** /**
* 报告地址 * 报告地址

View File

@ -40,11 +40,11 @@ public interface InspectPatientMapper extends BaseMapperX<InspectPatientDO> {
.eqIfPresent(InspectPatientDO::getSummaryResult, reqVO.getSummaryResult()) .eqIfPresent(InspectPatientDO::getSummaryResult, reqVO.getSummaryResult())
.eqIfPresent(InspectPatientDO::getAuditor, reqVO.getAuditor()) .eqIfPresent(InspectPatientDO::getAuditor, reqVO.getAuditor())
.eqIfPresent(InspectPatientDO::getAuditStatus, reqVO.getAuditStatus()) .eqIfPresent(InspectPatientDO::getAuditStatus, reqVO.getAuditStatus())
//.eqIfPresent(InspectPatientDO::getInspectionOpinion, reqVO.getInspectionOpinion()) // .eqIfPresent(InspectPatientDO::getInspectionOpinion, reqVO.getInspectionOpinion())
.eqIfPresent(InspectPatientDO::getIsprint, reqVO.getIsprint()) .eqIfPresent(InspectPatientDO::getIsprint, reqVO.getIsprint())
// .betweenIfPresent(InspectPatientDO::getAuditorTime, reqVO.getAuditorTime()) // .betweenIfPresent(InspectPatientDO::getAuditorTime, reqVO.getAuditorTime())
.betweenIfPresent(InspectPatientDO::getPrinttime, reqVO.getPrintTimeRange()) .betweenIfPresent(InspectPatientDO::getPrinttime, reqVO.getPrintTimeRange());
.orderByDesc(InspectPatientDO::getId); // .orderByDesc(InspectPatientDO::getId);
// if (reqVO.getInspectionStatus() != null) { // if (reqVO.getInspectionStatus() != null) {
// if (reqVO.getInspectionStatus() == 0) { // if (reqVO.getInspectionStatus() == 0) {
// // 如果传过来的值为0查询InspectionOpinion字段不为空 // // 如果传过来的值为0查询InspectionOpinion字段不为空
@ -55,7 +55,25 @@ public interface InspectPatientMapper extends BaseMapperX<InspectPatientDO> {
// queryWrapper.and(wrapper -> wrapper.isNull(InspectPatientDO::getSummaryResult).or().eq(InspectPatientDO::getSummaryResult, "")); // queryWrapper.and(wrapper -> wrapper.isNull(InspectPatientDO::getSummaryResult).or().eq(InspectPatientDO::getSummaryResult, ""));
// } // }
// } // }
// 只查询需要的字段
queryWrapper.select(
InspectPatientDO::getId,
InspectPatientDO::getMedicalSn,
InspectPatientDO::getPName,
InspectPatientDO::getGender,
InspectPatientDO::getBirthday,
InspectPatientDO::getCardType,
InspectPatientDO::getCardId,
InspectPatientDO::getPhoneNum,
InspectPatientDO::getStatus,
InspectPatientDO::getMedicalDateTime,
InspectPatientDO::getHeadPicUrl,
InspectPatientDO::getSummaryResult,
InspectPatientDO::getAuditor,
InspectPatientDO::getAuditStatus,
InspectPatientDO::getIsprint,
InspectPatientDO::getPrinttime
);
return selectPage(reqVO, queryWrapper); return selectPage(reqVO, queryWrapper);
} }

View File

@ -160,4 +160,12 @@ public interface InspectPatientService {
List<PatientSupplementVO> getPatientSupplementsByDates(List<LocalDate> dates); List<PatientSupplementVO> getPatientSupplementsByDates(List<LocalDate> dates);
void exportStatistics(List<LocalDate> dates, HttpServletResponse response); void exportStatistics(List<LocalDate> dates, HttpServletResponse response);
/**
* 根据体检编号更新条码时间
*
* @param medicalSn 体检编号
* @param barcodetime 条码时间
*/
void updateBarcodeTime(String medicalSn, Date barcodetime);
} }

View File

@ -1013,4 +1013,15 @@ public class InspectPatientServiceImpl implements InspectPatientService {
// 转换为Excel VO对象 // 转换为Excel VO对象
return BeanUtils.toBean(patientList, InspectPatientExcelVO.class); return BeanUtils.toBean(patientList, InspectPatientExcelVO.class);
} }
@Override
public void updateBarcodeTime(String medicalSn, Date barcodetime) {
// 构建更新条件
LambdaUpdateWrapper<InspectPatientDO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(InspectPatientDO::getMedicalSn, medicalSn)
.set(InspectPatientDO::getBarcodetime, barcodetime);
// 执行更新
patientMapper.update(null, updateWrapper);
}
} }