heheng
2026-02-02 8bda5d156d97a6f86da6ee068447643a2fff8c4f
multi-system/src/main/java/com/gkhy/exam/system/service/impl/AnnualMaintenanceEvaluateServiceImpl.java
@@ -3,18 +3,18 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.common.api.CommonPage;
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.common.constant.UserConstant;
import com.gkhy.exam.common.exception.ApiException;
import com.gkhy.exam.common.utils.PageUtils;
import com.gkhy.exam.common.utils.SecurityUtils;
import com.gkhy.exam.system.domain.AnnualMaintenanceEvaluate;
import com.gkhy.exam.system.domain.AnnualMaintenanceEvaluateDevice;
import com.gkhy.exam.system.domain.AnnualMaintenanceRecord;
import com.gkhy.exam.system.mapper.AnnualMaintenanceEvaluateDeviceMapper;
import com.gkhy.exam.system.mapper.AnnualMaintenanceEvaluateMapper;
import com.gkhy.exam.system.service.AnnualMaintenanceEvaluateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -22,7 +22,6 @@
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
 * <p>
@@ -83,7 +82,7 @@
                            .in(AnnualMaintenanceEvaluateDevice::getId, evaluateDeviceIds)
            );
            if (update <= 0){
                throw new RuntimeException("保存年度基础设施维护计划设备失败");
                throw new ApiException("保存年度基础设施维护计划设备失败");
            }
        }
@@ -96,7 +95,7 @@
            });
            int insert = annualMaintenanceEvaluateDeviceMapper.batchInsert(addData);
            if (insert <= 0){
                throw new RuntimeException("保存年度基础设施维护计划设备失败");
                throw new ApiException("保存年度基础设施维护计划设备失败");
            }
        }
@@ -108,7 +107,7 @@
            });
            int update = annualMaintenanceEvaluateDeviceMapper.batchUpdate(updateData);
            if (update <= 0){
                throw new RuntimeException("保存年度基础设施维护计划设备失败");
                throw new ApiException("保存年度基础设施维护计划设备失败");
            }
        }
    }
@@ -145,7 +144,7 @@
                            .set(AnnualMaintenanceEvaluateDevice::getUpdateTime, LocalDateTime.now())
                            .set(AnnualMaintenanceEvaluateDevice::getUpdateBy, SecurityUtils.getUsername()));
            if (update1 <= 0){
                throw new RuntimeException("删除年度基础设施维护计划设备失败");
                throw new ApiException("删除年度基础设施维护计划设备失败");
            }
            return CommonResult.success("删除成功");
        }