Commit a9f0d769 authored by wanglong's avatar wanglong

解决当一个基础资源被项目绑定时 不能在被别的项目绑定

parent 247f2613
......@@ -212,8 +212,9 @@ public class ProjectResourceController extends BaseController {
@ApiOperation(httpMethod = "POST",value = "绑定项目所用到的设备管材", notes = "绑定项目所用到的设备管材")
@PostMapping(value = "/saveId")
public ResponseModel<ResponseModel> saveId(@RequestBody JSONObject jsonObject) throws Exception {
ResponseModel responseModel = projectResourceServiceImpl.saveIds(jsonObject);
return ResponseHelper.buildResponse(projectResourceServiceImpl.saveIds(jsonObject));
return ResponseHelper.buildResponse(responseModel);
}
......
......@@ -154,7 +154,6 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
String type = jsonObject.getString("type");
LambdaQueryWrapper<ProjectResource> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ProjectResource::getResourceId, select);
wrapper.eq(ProjectResource::getProjectId, SequenceNbr);
ProjectResource projectResourceVerify = projectResourceMapper.selectOne(wrapper);
if (ValidationUtil.isEmpty(projectResourceVerify)) {
//判断资源类型并插入
......
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