Commit ca1acbf2 authored by zhangyingbin's avatar zhangyingbin

修改设备无法删除提示语

parent 22b81128
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderDto;
......@@ -117,7 +118,7 @@ public class EquipmentController extends BaseController {
for (Long i:sequenceNbr){
wrapper.eq(ProjectResource::getResourceId,i);
if (!projectResourceMapper.selectList(wrapper).isEmpty()){
throw new Exception("无法删除,已绑定项目");
return CommonResponseUtil.failure("无法删除,设备:"+equipmentServiceImpl.getById(i).getName()+"已绑定项目");
}
}
return ResponseHelper.buildResponse(equipmentServiceImpl.removeByIds(sequenceNbr));
......
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