|
|
|
@ -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("添加成功!"); |
|
|
|
|
} |
|
|
|
|