| | |
| | | entity.setUsedStatus(ProjectConstant.PASS); |
| | | } |
| | | if(!checkProjectNameAndIdIsUnique(entity,null)){ |
| | | return Result.error("项目重复,项目名称、项目码已存在"); |
| | | throw new RuntimeException("项目重复,项目名称、项目码已存在"); |
| | | } |
| | | baseMapper.insert(entity); |
| | | addPlan(entity.getId()); //添加计划表 |
| | |
| | | entity.setUsedStatus(ProjectConstant.PASS); |
| | | } |
| | | if(!checkProjectNameAndIdIsUnique(entity,form.getId())){ |
| | | return Result.error("项目重复,项目名称、项目码已存在"); |
| | | throw new RuntimeException("项目重复,项目名称、项目码已存在"); |
| | | } |
| | | //更新项目信息 |
| | | baseMapper.updateById(entity); |
| | |
| | | |
| | | if (ObjectUtil.isNull(form.getProjectInfoForm().getId())) { |
| | | //新增 |
| | | return ((ProjectInfoServiceImpl) AopContext.currentProxy()).add(form.getProjectInfoForm()); |
| | | |
| | | ((ProjectInfoServiceImpl) AopContext.currentProxy()).add(form.getProjectInfoForm()); |
| | | } else { |
| | | //更新 |
| | | return ((ProjectInfoServiceImpl) AopContext.currentProxy()).update(form.getProjectInfoForm()); |
| | | ((ProjectInfoServiceImpl) AopContext.currentProxy()).update(form.getProjectInfoForm()); |
| | | } |
| | | } |
| | | if (ObjectUtil.isNotNull(form.getProjectInvestmentInfoForm())) { |