|
|
@ -26,6 +26,7 @@ import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.CustomerAgencyConstant; |
|
|
|
import com.epmet.constant.RoleKeyConstants; |
|
|
|
import com.epmet.dao.CustomerAgencyDao; |
|
|
|
import com.epmet.dao.CustomerGridDao; |
|
|
|
import com.epmet.dto.CustomerAgencyDTO; |
|
|
|
import com.epmet.dto.GovStaffRoleDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
@ -64,6 +65,8 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private StaffServiceImpl staffServiceImpl; |
|
|
|
@Autowired |
|
|
|
private CustomerGridDao customerGridDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
@ -188,7 +191,14 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
|
result.setMsg(EpmetErrorCode.NOT_DEL_AGENCY_PER.getMsg()); |
|
|
|
return result; |
|
|
|
} |
|
|
|
//3:删除当前机关组织(逻辑删)
|
|
|
|
//3:组织下有网格,不允许删除
|
|
|
|
int gridCount = customerGridDao.selectGridCountByAgencyId(formDTO.getAgencyId()); |
|
|
|
if (gridCount > NumConstant.ZERO) { |
|
|
|
result.setCode(EpmetErrorCode.NOT_DEL_AGENCY_GRID.getCode()); |
|
|
|
result.setMsg(EpmetErrorCode.NOT_DEL_AGENCY_GRID.getMsg()); |
|
|
|
return result; |
|
|
|
} |
|
|
|
//4:删除当前机关组织(逻辑删)
|
|
|
|
if (customerAgencyDao.deleteById(formDTO.getAgencyId()) < NumConstant.ONE) { |
|
|
|
log.error(CustomerAgencyConstant.DEL_EXCEPTION); |
|
|
|
throw new RenException(CustomerAgencyConstant.DEL_EXCEPTION); |
|
|
|