| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sun.xml.bind.v2.TODO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.mdc.entity.MdcShift; |
| | | import org.jeecg.modules.mdc.mapper.MdcShiftMapper; |
| | | import org.jeecg.modules.mdc.service.IMdcShiftService; |
| | | import org.jeecg.modules.mdc.service.IMdcShiftSubService; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean changeDefaultShift(String id) { |
| | | MdcShift mdcShift = this.baseMapper.selectOne(new LambdaQueryWrapper<MdcShift>().eq(MdcShift::getDefaultShift, "true")); |
| | | mdcShift.setDefaultShift("false"); |
| | | this.baseMapper.updateById(mdcShift); |
| | | if (mdcShift != null) { |
| | | mdcShift.setDefaultShift("false"); |
| | | this.baseMapper.updateById(mdcShift); |
| | | } |
| | | MdcShift defaultShift = this.baseMapper.selectById(id); |
| | | defaultShift.setDefaultShift("true"); |
| | | this.baseMapper.updateById(defaultShift); |