|
@@ -566,13 +566,13 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if(StringUtils.isNotEmpty(homePage.getAge())){
|
|
|
//兼容数据库出现 .03岁数据 作后期判断处理
|
|
|
String ageData = homePage.getAge();
|
|
|
- if(homePage.getAge().contains(".")){
|
|
|
+ String ageUnitString = homePage.getAgeUnit() == null ? "" : homePage.getAgeUnit();
|
|
|
+ if(homePage.getAge().contains(".")&&"岁".equals(ageUnitString)){
|
|
|
String ageString = homePage.getAge().split("\\.")[0];
|
|
|
//该年龄作为判断使用
|
|
|
homePage.setAge(StringUtils.isEmpty(ageString)==true? "0"+homePage.getAge():homePage.getAge());
|
|
|
}
|
|
|
//根据时间单位对模版年龄进行区分
|
|
|
- String ageUnitString = homePage.getAgeUnit() == null ? "" : homePage.getAgeUnit();
|
|
|
if(Double.parseDouble(homePage.getAge())<=1&& "岁".equals(ageUnitString)){
|
|
|
homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth())==true ? "0":homePage.getNewbornMonth());
|
|
|
homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay())==true ? "0":homePage.getNewbornDay());
|