项目提交、审核日志 功能添加 11.5

master
zhc077 3 weeks ago
parent e54d78d940
commit 5625906666
  1. 87
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java
  2. 3
      jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue

@ -39,7 +39,6 @@ import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
import org.jeecg.modules.system.util.SecurityUtil;
import org.jeewx.api.core.util.DateUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -168,7 +167,7 @@ public class ProjectController extends JeecgController<Project, IProjectService>
BeanUtils.copyProperties(userExt, basicInfoDto);
BeanUtils.copyProperties(project, basicInfoDto);
basicInfoDto.setRealName(sysUser.getRealname());
basicInfoDto.setProjectTime(DateUtils.formatDate(project.getStartTime()) +"——"+DateUtils.formatDate(project.getEndTime()));
basicInfoDto.setProjectTime(DateUtils.formatDate(project.getStartTime()) + "——" + DateUtils.formatDate(project.getEndTime()));
return Result.OK(basicInfoDto);
}
@ -204,17 +203,17 @@ public class ProjectController extends JeecgController<Project, IProjectService>
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
dto.setAnnualName(projectType.getAnnualName());
List<DictModel> dictModels = sysBaseApi.queryDictItemsByCode("depart_type");
if(ObjectUtil.isNotEmpty(dictModels)){
dictModels.forEach(e->{
if(e.getValue().equals(dto.getType())){
if (ObjectUtil.isNotEmpty(dictModels)) {
dictModels.forEach(e -> {
if (e.getValue().equals(dto.getType())) {
dto.setType(e.getText());
}
});
}
List<DictModel> dictModels2 = sysBaseApi.queryDictItemsByCode("depart_category");
if(ObjectUtil.isNotEmpty(dictModels2)){
dictModels2.forEach(d->{
if(d.getValue().equals(dto.getOrgCategory())){
if (ObjectUtil.isNotEmpty(dictModels2)) {
dictModels2.forEach(d -> {
if (d.getValue().equals(dto.getOrgCategory())) {
dto.setOrgCategory(d.getText());
}
});
@ -240,17 +239,17 @@ public class ProjectController extends JeecgController<Project, IProjectService>
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
dto.setAnnualName(projectType.getAnnualName());
List<DictModel> dictModels = sysBaseApi.queryDictItemsByCode("depart_type");
if(ObjectUtil.isNotEmpty(dictModels)){
dictModels.forEach(e->{
if(e.getValue().equals(dto.getType())){
if (ObjectUtil.isNotEmpty(dictModels)) {
dictModels.forEach(e -> {
if (e.getValue().equals(dto.getType())) {
dto.setType(e.getText());
}
});
}
List<DictModel> dictModels2 = sysBaseApi.queryDictItemsByCode("depart_category");
if(ObjectUtil.isNotEmpty(dictModels2)){
dictModels2.forEach(d->{
if(d.getValue().equals(dto.getOrgCategory())){
if (ObjectUtil.isNotEmpty(dictModels2)) {
dictModels2.forEach(d -> {
if (d.getValue().equals(dto.getOrgCategory())) {
dto.setOrgCategory(d.getText());
}
});
@ -280,8 +279,8 @@ public class ProjectController extends JeecgController<Project, IProjectService>
* @author: z.h.c
* @date: 24/11/4 16:12
*/
@AutoLog(value = "项目表-提交项目")
@ApiOperation(value = "项目表-提交项目", notes = "项目表-提交项目")
@AutoLog(value = "项目表-上级管理员审核通过")
@ApiOperation(value = "项目表-审核通过", notes = "项目表-审核通过")
@PostMapping(value = "/submitApply")
public Result<String> submitApply(@RequestBody Project project) {
//('科技主管部门待提交', '1');
@ -293,28 +292,50 @@ public class ProjectController extends JeecgController<Project, IProjectService>
//('市科技局待提交', '7');
//('市科技局已提交', '8');
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
project.setProjectStatus("6");
/*申请人待提交,1
预算书不存在,10
申请单位待提交,2
申请主管部门待提交,3
申请主管部门待审核,4
申请主管部门审核通过,5
申请主管部门审核不通过,6
申请主管部门已提交,7
已受理,8
不需要,9*/
//预算书和项目书用同一种状态
project.setBudgetStatus("6");
//申报人提交,并向上级提交->申请单位待提交
if ("shenbaoren_role".equals(loginUser.getRoleCode())) {
project.setProjectStatus("6");
//预算书和项目书用同一种状态
project.setBudgetStatus("6");
}
//申请单位审核通过,并向上级提交->科技主管部门待提交(区/县管理员)
if ("faren_admin".equals(loginUser.getRoleCode())) {
project.setProjectStatus("1");
//预算书和项目书用同一种状态
project.setBudgetStatus("1");
}
//区/县管理员审核通过,并向上级提交->市科技局处理
if ("quxian_admin".equals(loginUser.getRoleCode())) {
project.setProjectStatus("7");
//预算书和项目书用同一种状态
project.setBudgetStatus("7");
}
//市科技局通过-》财政管理员处理
if ("kejiju_admin".equals(loginUser.getRoleCode())) {
project.setProjectStatus("8");
//预算书和项目书用同一种状态
project.setBudgetStatus("8");
}
//市科技局通过-》财政管理员处理
if ("caizheng_admin".equals(loginUser.getRoleCode())) {
// project.setProjectStatus("10");
//预算书和项目书用同一种状态
project.setBudgetStatus("10");
}
project.setUpdateTime(new Date());
project.setUpdateBy(loginUser.getRealname());
projectService.updateById(project);
return Result.OK("提交成功!");
}
@AutoLog(value = "项目表-取回项目")
/**
* @description: (申请单位待提交)状态申报人可以取回项目
* @param: [project]
* @return: org.jeecg.common.api.vo.Result<java.lang.String>
* @author: z.h.c
* @date: 24/11/5 11:00
*/
@AutoLog(value = "项目表-申报人取回项目")
@ApiOperation(value = "项目表-提交项目", notes = "项目表-取回项目")
@PostMapping(value = "/rollbackProject")
public Result<String> rollbackProject(@RequestBody Project project) {
@ -341,7 +362,7 @@ public class ProjectController extends JeecgController<Project, IProjectService>
不需要,9*/
//预算书和项目书用同一种状态
project.setBudgetStatus("5");
project.setBudgetStatus("1");
project.setUpdateTime(new Date());
project.setUpdateBy(loginUser.getRealname());
projectService.updateById(project);

@ -261,7 +261,8 @@ function getTableAction(record){
//('', '6');
//('', '7');
//('', '8');
if (record.projectStatus !=5 && record.projectStatus != 2 && record.projectStatus != 8) {
if (record.projectStatus ==6) {
// console.log("jjjjjjjjj",JSON.stringify(userStore.getUserInfo.roles))
actions.unshift({
label: '取回项目',
onClick: handleRollbackOne.bind(null, record),

Loading…
Cancel
Save