bug修改

This commit is contained in:
mashuai 2024-10-09 14:30:10 +08:00
parent 70d5cb8b67
commit a8970bb5c5
1 changed files with 5 additions and 0 deletions

View File

@ -178,6 +178,11 @@ public class TbPeopleServiceImpl implements TbPeopleService {
*/
@Override
public AjaxResult deleteById(Long id) {
//通过id查询人员是否绑定班组绑定则不能删除
TbPeople tbPeople = tbPeopleDao.queryById(id);
if (tbPeople.getTeamId() != null) {
return AjaxResult.error("该人员还绑定相关班组,无法删除");
}
int result = tbPeopleDao.deleteById(id);
if (result > 0) {
return AjaxResult.success(ExceptionEnum.SUCCESS.getMsg(), result);