bug524 [门诊/医生个人报卡管理] 传染病报告卡保存后数据回显失败:病例分类、日期及分型字段为空

This commit is contained in:
2026-05-15 18:16:12 +08:00
parent d984b89967
commit 51ae3aad29
3 changed files with 16 additions and 5 deletions

View File

@@ -83,6 +83,9 @@ public class InfectiousCardDto {
/** 病例分类 */
private String diseaseType;
/** 病例分类 */
private Integer caseClass;
/** 发病日期 */
private LocalDate onsetDate;

View File

@@ -112,12 +112,15 @@ public class InfectiousDiseaseReportDto {
private Integer caseClass;
/** 发病日期(默认诊断时间,病原携带者填初检日期) */
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate onsetDate;
/** 诊断日期(精确到小时) */
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime diagDate;
/** 死亡日期(死亡病例必填) */
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate deathDate;
/** 订正病名(订正报告必填) */
@@ -136,6 +139,7 @@ public class InfectiousDiseaseReportDto {
private String reportDoc;
/** 填卡日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate reportDate;
/** 报卡名称代码 1-中华人民共和国传染病报告卡 */
@@ -160,4 +164,4 @@ public class InfectiousDiseaseReportDto {
/** 医生ID */
@JsonSerialize(using = ToStringSerializer.class)
private Long doctorId;
}
}

View File

@@ -1025,7 +1025,11 @@ function parseBirthDate(birthDate) {
function normalizeDate(value) {
if (!value) return '';
return String(value).split(/[T ]/)[0];
const datePart = String(value).split(/[T ]/)[0].replace(/\//g, '-');
const parts = datePart.split('-');
if (parts.length !== 3) return datePart;
const [year, month, day] = parts;
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`;
}
function normalizeSex(value) {
@@ -1116,7 +1120,7 @@ function showReport(reportData = {}, readOnly = true) {
addressHouse: reportData.addressHouse || '',
patientBelong: reportData.patientBelong || 1,
occupation: reportData.occupation || '',
caseClass: reportData.diseaseType != null ? String(reportData.diseaseType) : '',
caseClass: reportData.caseClass != null ? String(reportData.caseClass) : '',
onsetDate: normalizeDate(reportData.onsetDate),
diagDate: normalizeDate(reportData.diagDate),
deathDate: normalizeDate(reportData.deathDate),
@@ -1125,7 +1129,7 @@ function showReport(reportData = {}, readOnly = true) {
selectedClassB: diseaseSelection.selectedClassB,
selectedClassC: diseaseSelection.selectedClassC,
otherDisease: reportData.otherDisease || (diseaseCode === 'OTHER' ? reportData.diseaseName || '' : ''),
diseaseType: reportData.diseaseSubtype || '',
diseaseType: reportData.diseaseSubtype || reportData.diseaseType || '',
reportOrg: reportData.reportOrg || '',
reportOrgPhone: reportData.reportOrgPhone || '',
reportDoc: reportData.reportDoc || '',
@@ -1466,7 +1470,7 @@ async function buildSubmitData() {
reportDate: formData.reportDate || null,
cardNameCode: 1, // 默认中华人民共和国传染病报告卡
registrationSource: 1, // 默认门诊
status: '',
status: null,
deptId: props.deptId || null,
doctorId: props.doctorId || null,
};