|
|
@ -21,16 +21,16 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.CustomerDepartmentConstant; |
|
|
|
import com.epmet.dao.CustomerAgencyDao; |
|
|
|
import com.epmet.dao.CustomerDepartmentDao; |
|
|
|
import com.epmet.dao.CustomerStaffDepartmentDao; |
|
|
|
import com.epmet.dto.CustomerIdDTO; |
|
|
|
import com.epmet.dto.CustomerDepartmentDTO; |
|
|
|
import com.epmet.dto.CustomerIdDTO; |
|
|
|
import com.epmet.dto.CustomerStaffDepartmentDTO; |
|
|
|
import com.epmet.dto.StaffRoleDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.CustomerAgencyEntity; |
|
|
@ -49,7 +49,6 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
@ -73,7 +72,8 @@ public class DepartmentServiceImpl implements DepartmentService { |
|
|
|
private CustomerStaffDepartmentService customerStaffDepartmentService; |
|
|
|
@Autowired |
|
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
|
* @return |
|
|
@ -139,7 +139,7 @@ public class DepartmentServiceImpl implements DepartmentService { |
|
|
|
return result; |
|
|
|
} |
|
|
|
//2:删除部门信息(逻辑删)
|
|
|
|
if (customerDepartmentDao.deleteById(formDTO.getDepartmentId()) < NumConstant.ONE) { |
|
|
|
if (customerDepartmentDao.delDeptById(formDTO.getDepartmentId(),loginUserUtil.getLoginUserId()) < NumConstant.ONE) { |
|
|
|
log.error(CustomerDepartmentConstant.DEL_EXCEPTION); |
|
|
|
throw new RenException(CustomerDepartmentConstant.DEL_EXCEPTION); |
|
|
|
} |
|
|
|