diff --git a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java index 9bfdec06..b1f326d9 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java @@ -3,6 +3,7 @@ package com.ccsens.ht.service; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdcardUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.ht.bean.dto.PatientReportDto; import com.ccsens.ht.bean.po.*; @@ -84,6 +85,7 @@ public class PatientReportService implements IPatientReportService { htPatientReport.setDoctorId(doctors.get(0).getId()); htPatientReport.setPatientId(generate.getPatientId()); htPatientReport.setPatientIdcard(htPatient.getIdcard()); + htPatientReport.setPatientAge(StrUtil.isEmpty(htPatient.getIdcard()) ? null : (byte)IdcardUtil.getAgeByIdCard(htPatient.getIdcard())); htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE); htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today()); htPatientReport.setSerialNumber(htPatient.getId() + "_" + (times + 1)); diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index 5c2cd5c4..5889ff7f 100644 --- a/ht/src/main/resources/application.yml +++ b/ht/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev - include: common, util-dev \ No newline at end of file + active: test + include: common, util-test \ No newline at end of file