| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.*; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbNorspiMapper; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbVerspiMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbNorspiServiceImpl |
| | |
| | | setUpdateLog(oldList,newList); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(oldList,newList); |
| | | |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | List<TbAttResRsbNorspi> updateList = Stream.concat(oldList.stream(),newList.stream()) |
| | | .collect(Collectors.toMap(TbAttResRsbNorspi::getGuid, Function.identity(),(oldValue, newValue) -> { |
| | | oldValue.setCheckState(newValue.getCheckState()); |
| | | return oldValue; |
| | | } |
| | | )) |
| | | .values() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(updateList); |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |