package com.mes.engineerScheduling.service.impl; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.mes.engineerScheduling.entity.EngineerScheduling; import com.mes.engineerScheduling.mapper.EngineerSchedulingMapper; import com.mes.engineerScheduling.service.EngineerSchedulingService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; import java.util.List; /** *

* 服务实现类 *

* * @author wf * @since 2025-10-27 */ @Service @DS("north_glass_mes") public class EngineerSchedulingServiceImpl extends ServiceImpl implements EngineerSchedulingService { @Override public List listByState() { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lt("type", 3); return baseMapper.selectList(wrapper); } @Override public List queryByType(Integer type) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("type", type); return baseMapper.selectList(queryWrapper); } @Override public void updateState(List engineerIds) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.in("project_no", engineerIds); EngineerScheduling engineerScheduling = new EngineerScheduling(); engineerScheduling.setState(200); baseMapper.update(engineerScheduling, queryWrapper); } @Override public void updateByType(Integer type) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("type", type); EngineerScheduling engineerScheduling = new EngineerScheduling(); engineerScheduling.setState(200); baseMapper.update(engineerScheduling, queryWrapper); } }