鞍钢bug修改
This commit is contained in:
parent
a2131c16e0
commit
b6f534ab44
@ -142,7 +142,13 @@ public class XzRiskPredictionController {
|
||||
.eq(WorkerInfo::getInserviceType, 1));
|
||||
resultMap.put("total", list.size());
|
||||
// 高龄人员
|
||||
long ageCount = list.stream().filter(l -> StringUtils.isNotBlank(l.getBirthday()) && DateUtil.ageOfNow(l.getBirthday()) >= 50).count();
|
||||
long ageCount = list.stream().filter(l -> {
|
||||
try {
|
||||
return StringUtils.isNotBlank(l.getBirthday()) && DateUtil.ageOfNow(l.getBirthday()) >= 50;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}).count();
|
||||
resultMap.put("age", list.size() == 0 ? null : new BigDecimal(ageCount).divide(new BigDecimal(list.size()), 2, BigDecimal.ROUND_HALF_UP));
|
||||
// 特殊工种人数
|
||||
WorkerType workerType = workerTypeService.getOne(Wrappers.<WorkerType>lambdaQuery()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user