guoshilong
2023-11-21 5b8eab81c7a5ee4180e4bae15db45620a490a582
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/service/impl/TbAttResWaterBlockServiceImpl.java
@@ -16,7 +16,9 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
 * @ClassName TbAttResWaterBlockServiceImpl
@@ -134,7 +136,16 @@
      // 更新审核日志
      setUpdateCheckLog(oldList,newList);
      // 更新数据
      boolean batch = updateBatchById(newList);
      List<TbAttResWaterBlock> updateList = Stream.concat(oldList.stream(),newList.stream())
         .collect(Collectors.toMap(TbAttResWaterBlock::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());