权限管理

This commit is contained in:
马三炮 2025-09-05 18:37:08 +08:00
parent ae64f508cb
commit 380fabe2bb
2 changed files with 6 additions and 2 deletions

View File

@ -103,8 +103,10 @@ public class PmAttDeviceController extends BaseController {
int res = pmAttDeviceService.delPmAttDevice(pmAttDevice);
if (res>0){
return toAjax(res);
}else if (res==0){
return error("考勤机已绑定工程,请勿删除");
}else {
return error("考勤机操作失败");
return error("操作异常");
}
} catch (Exception e) {

View File

@ -5,7 +5,6 @@ import com.bonus.bmw.domain.vo.PmAttDeviceVo;
import com.bonus.bmw.mapper.PmAttDeviceMapper;
import com.bonus.bmw.service.PmAttDeviceService;
import com.bonus.bmw.service.UrkSendService;
import com.bonus.common.core.constant.SecurityConstants;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.redis.service.RedisService;
import com.bonus.common.security.utils.SecurityUtils;
@ -92,6 +91,9 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
public int delPmAttDevice(PmAttDevice pmAttDevice) throws Exception {
int res = pmAttDeviceMapper.delPmAttDevice(pmAttDevice);
PmAttDevice pmAttDeviceOld = pmAttDeviceMapper.getPmAttDeviceByCoode(pmAttDevice);
if (StringUtils.isNotNull(pmAttDeviceOld.getProId())){
return 0;
}
//考勤机解绑
uakSendService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDeviceOld.getProId()==null?-1:pmAttDeviceOld.getProId());
return res;