Commit e27c569b authored by 李丛阳's avatar 李丛阳

删除教师

parent daa195a0
package org.rcisoft.business.brooms.service.impl; package org.rcisoft.business.brooms.service.impl;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.rcisoft.business.barrange.dao.BArrangeRepository; import org.rcisoft.business.barrange.dao.BArrangeRepository;
import org.rcisoft.business.brooms.utils.Upload2DataBase; import org.rcisoft.business.brooms.dao.BRoomsRepository;
import org.rcisoft.business.brooms.entity.BRooms;
import org.rcisoft.business.brooms.service.BRoomsService;
import org.rcisoft.business.bslschedule.dao.BSlScheduleRepository; import org.rcisoft.business.bslschedule.dao.BSlScheduleRepository;
import org.rcisoft.business.bslschedule.entity.BSlSchedule; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.exception.ServiceException; import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.Result; import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.ResultServiceEnums; import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.ExcelUtil; import org.rcisoft.core.util.ExcelUtil;
import org.rcisoft.core.util.UserUtil; import org.rcisoft.core.util.UserUtil;
import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.business.brooms.dao.BRoomsRepository;
import org.rcisoft.business.brooms.entity.BRooms;
import org.rcisoft.business.brooms.service.BRoomsService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
/** /**
* Created by on 2018-4-23 9:26:21. * Created by on 2018-4-23 9:26:21.
...@@ -82,9 +73,7 @@ public class BRoomsServiceImpl implements BRoomsService { ...@@ -82,9 +73,7 @@ public class BRoomsServiceImpl implements BRoomsService {
|| bSlScheduleRepository.countThisRoomNum(bRooms.getBusinessId()) != 0){ || bSlScheduleRepository.countThisRoomNum(bRooms.getBusinessId()) != 0){
throw new ServiceException(ResultServiceEnums.ROOM_HAS_USED); throw new ServiceException(ResultServiceEnums.ROOM_HAS_USED);
}else{ }else{
UserUtil.setCurrentMergeOperation(bRooms); int line = bRoomsRepository.deleteByPrimaryKey(bRooms.getBusinessId());
bRooms.setDeleted();
int line = bRoomsRepository.logicalDelete(bRooms);
log.info(UserUtil.getUserInfoProp(bRooms.getToken(),UserUtil.USER_USERNAME)+"逻辑删除了ID为"+ log.info(UserUtil.getUserInfoProp(bRooms.getToken(),UserUtil.USER_USERNAME)+"逻辑删除了ID为"+
bRooms.getBusinessId()+"的信息"); bRooms.getBusinessId()+"的信息");
return new PersistModel(line); return new PersistModel(line);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment