|
|
@ -15,6 +15,7 @@ import com.storeroom.modules.storeroom3d.service.ThirdApiService; |
|
|
|
import com.storeroom.modules.storeroom3d.service.dto.AlarmLogCriteria; |
|
|
|
import com.storeroom.modules.storeroom3d.service.dto.GetCurAlarmDto; |
|
|
|
import com.storeroom.modules.storeroom3d.service.impl.mapstruct.GetCurAlarmMapper; |
|
|
|
import com.storeroom.utils.FileUtil; |
|
|
|
import com.storeroom.utils.NanoIdUtils; |
|
|
|
import com.storeroom.utils.PageUtil; |
|
|
|
import com.storeroom.utils.QueryHelp; |
|
|
@ -26,10 +27,8 @@ import org.springframework.data.domain.Sort; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Objects; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
@ -170,9 +169,27 @@ public class AlarmInfoServiceImpl implements AlarmInfoService { |
|
|
|
public void addRemark(AlarmLog alarmLog) { |
|
|
|
AlarmLog alarmLog1 = alarmLogRepository.findById(alarmLog.getId()).orElseGet(AlarmLog::new); |
|
|
|
alarmLog1.setRemark(alarmLog.getRemark()); |
|
|
|
alarmLog1.setState(alarmLog.getState()); |
|
|
|
alarmLogRepository.save(alarmLog1); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void dowload(List<AlarmLog> queryAll, HttpServletResponse response) throws Exception { |
|
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
|
for (AlarmLog alarmLog : queryAll) { |
|
|
|
Map<String, Object> map = new LinkedHashMap<>(); |
|
|
|
map.put("库房名称", alarmLog.getStoreroomName()); |
|
|
|
map.put("设备名称", alarmLog.getDeviceName()); |
|
|
|
map.put("警情描述", alarmLog.getContent()); |
|
|
|
map.put("说明", alarmLog.getRemark()); |
|
|
|
map.put("报警时间", alarmLog.getCreateBy()); |
|
|
|
map.put("处理时间", alarmLog.getUpdateTime()); |
|
|
|
list.add(map); |
|
|
|
} |
|
|
|
FileUtil.downloadExcel(list,response); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 修改报警状态 |
|
|
|
* |
|
|
|