项目管理

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