Commit 2fb37f8b by 朱淼

fixbug

parent a9b59261
......@@ -42,6 +42,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -427,8 +428,10 @@ public class DataScreenServiceImpl implements DataScreenService {
Map<String,String> elderNameMap = platElders.stream().collect(Collectors.toMap(PlatElder::getId,PlatElder::getName));
Map<String, PlatElderListVO> elderBedPathMap = mapElderBedPath(platElders);
List<PlatAlarmStatisticsListVo> list = new ArrayList<>();
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
DateFormat dft = new SimpleDateFormat("HH:mm:ss");
// DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
// DateFormat dft = new SimpleDateFormat("HH:mm:ss");
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
DateTimeFormatter dft = DateTimeFormatter.ofPattern("HH:mm:ss");
for (PlatAlarmRecord record : alarmRecords){
List<String> elderIds = Arrays.asList(record.getElderIds().split(","));
......@@ -459,8 +462,8 @@ public class DataScreenServiceImpl implements DataScreenService {
listVo.setPath(pathName);
listVo.setElderName(elderName);
listVo.setType(record.getAlarmType());
listVo.setAlarmDate(df.format(record.getAlarmDate()));
listVo.setAlarmTime(dft.format(record.getAlarmDate()));
listVo.setAlarmDate(record.getAlarmDate().format(df));
listVo.setAlarmTime(record.getAlarmDate().format(dft));
list.add(listVo);
}
......
......@@ -171,7 +171,10 @@ public class WorkStationServiceImpl implements WorkStationService {
elderIds.forEach(e -> {
elderIdList.addAll(Arrays.asList(e.split(",")));
});
dto.setElderIds(elderIdList);
if(StringUtil.isNotEmpty(dto.getAlarmType())){
dto.setElderIds(elderIdList);
}
//长者对应的报警类型
Map<String, Map<String,String>> elderAlarmTypeMap = mapElderAlarmType(alarmRecords);
Page<WorkStationInstitutionRoomVO> pages = platRoomService.workStationPage(
......@@ -350,7 +353,10 @@ public class WorkStationServiceImpl implements WorkStationService {
elderIds.forEach(e -> {
elderIdList.addAll(Arrays.asList(e.split(",")));
});
dto.setElderIds(elderIdList);
if(StringUtil.isNotEmpty(dto.getAlarmType())){
dto.setElderIds(elderIdList);
}
//长者对应的报警类型
Map<String, Map<String,String>> elderAlarmTypeMap = mapElderAlarmType(alarmRecords);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment