项目管理

This commit is contained in:
liang.chao 2025-09-11 11:29:53 +08:00
parent 088b8833fc
commit e422008325
1 changed files with 21 additions and 14 deletions

View File

@ -8,6 +8,7 @@ import com.bonus.web.mapper.ProjectMapper;
import com.bonus.web.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -34,21 +35,27 @@ public class ProjectServiceImpl implements ProjectService {
}
@Override
@Transactional
public AjaxResult updateContentsName(ProjectDto projectDto) {
Integer num = projectMapper.updateContentsName(projectDto);
if (num > 0) {
// 档案管理中新增一条目录
DaKyProFilesContents dakyProFilesContents = new DaKyProFilesContents();
dakyProFilesContents.setProId(projectDto.getId());
dakyProFilesContents.setContentName(projectDto.getContentsName());
dakyProFilesContents.setLevel("1");
dakyProFilesContents.setSort(0L);
dakyProFilesContents.setCreateUserId(getLoginUser().getUserId());
dakyProFilesContents.setCreateUserName(getLoginUser().getUsername());
projectMapper.insertDakyProFilesContents(dakyProFilesContents);
return AjaxResult.success("配置成功");
} else {
return AjaxResult.error("配置失败");
try {
Integer num = projectMapper.updateContentsName(projectDto);
if (num > 0) {
// 档案管理中新增一条目录
DaKyProFilesContents dakyProFilesContents = new DaKyProFilesContents();
dakyProFilesContents.setProId(projectDto.getId());
dakyProFilesContents.setContentName(projectDto.getContentsName());
dakyProFilesContents.setLevel("1");
dakyProFilesContents.setSort(0L);
dakyProFilesContents.setCreateUserId(getLoginUser().getUserId());
dakyProFilesContents.setCreateUserName(getLoginUser().getUsername());
projectMapper.insertDakyProFilesContents(dakyProFilesContents);
return AjaxResult.success("配置成功");
} else {
return AjaxResult.error("配置失败");
}
} catch (Exception e) {
return AjaxResult.error("接口异常");
}
}
}