Commit ac9d2d50 authored by 施翔轲's avatar 施翔轲

fix bug

parent 6ca87d02
......@@ -43,7 +43,11 @@ public class CbProjectRecordController extends BaseController {
*/
@GetMapping("/checkProjectCodeExist")
public R<Boolean> checkProjectCodeExist(@Validated CbCheckProjectCodeExistBo checkBo) {
return R.ok(dProjectService.checkProjectCodeExist(checkBo));
if (dProjectService.checkProjectCodeExist(checkBo)) {
return R.ok(true);
} else {
return R.fail("IPM项目编码无效", false);
}
}
/**
......
......@@ -297,7 +297,9 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
@Override
public CbProjectInfoVo getCbProjectInfo(Long projectId) {
CbProjectRecord projectRecord = projectRecordMapper.selectById(projectId);
Assert.isTrue(projectRecord.getIsGetProjectDetail(), "请先通过IPM项目编码获取数据,或IPM项目编码无效");
if (projectRecord.getIsGetProjectDetail()) {
return null;
}
return BeanUtil.toBean(baseMapper.selectOne(new LambdaQueryWrapper<DProject>()
.eq(DProject::getProjectCode, projectRecord.getIpmProjectNo())), CbProjectInfoVo.class);
}
......
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