项目书-基本信息 功能添加 10.24

master
zhc077 4 weeks ago
parent ca66b7bce2
commit e887e4414e
  1. 7
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java
  2. 2
      jeecgboot-vue3/src/views/projectApplication/project/ProjectList.vue

@ -7,14 +7,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.departext.entity.DepartExt;
import org.jeecg.modules.demo.departext.service.IDepartExtService;
import org.jeecg.modules.demo.project.dto.DepartExtDto;
@ -159,6 +158,10 @@ public class ProjectController extends JeecgController<Project, IProjectService>
@ApiOperation(value = "新增项目审报", notes = "新增项目审报")
@PostMapping(value = "/save4shenbao")
public Result<String> save4shenbao(@RequestBody ProjectShenBaoDto dto) {
long count = projectService.count(new LambdaQueryWrapper<Project>().eq(Project::getProjectTypeid, dto.getProjectTypeid()));
if (count > 0) {
throw new JeecgBootException("该项目类型,当年已填报,不能重复填报!");
}
projectService.save4shenbao(dto);
return Result.OK("添加成功!");
}

@ -4,7 +4,7 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>-->
<!-- <a-button type="primary" @click="go_xinjianshenbao" preIcon="ant-design:plus-outlined"> 新建审报书</a-button>-->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<!-- <j-upload-button type="primary" v-auth="'project:project:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->

Loading…
Cancel
Save