|
@@ -16,7 +16,6 @@
|
|
|
*/
|
|
|
package org.springblade.manager.controller;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import io.swagger.annotations.*;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
@@ -28,9 +27,11 @@ import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
+import org.springblade.manager.dto.ProjectAssignmentWbstreeDTO;
|
|
|
import org.springblade.manager.dto.ProjectInfoDTO;
|
|
|
+import org.springblade.manager.entity.ProjectAssignmentWbstree;
|
|
|
+import org.springblade.manager.service.IProjectAssignmentWbstreeService;
|
|
|
import org.springblade.manager.vo.ContractlnfoCountVO;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springblade.manager.entity.ProjectInfo;
|
|
@@ -39,7 +40,6 @@ import org.springblade.manager.wrapper.ProjectInfoWrapper;
|
|
|
import org.springblade.manager.service.IProjectInfoService;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -55,6 +55,7 @@ import java.util.List;
|
|
|
public class ProjectInfoController extends BladeController {
|
|
|
|
|
|
private final IProjectInfoService projectInfoService;
|
|
|
+ private final IProjectAssignmentWbstreeService projectAssignmentWbstreeService;
|
|
|
|
|
|
/**
|
|
|
* 详情
|
|
@@ -89,8 +90,8 @@ public class ProjectInfoController extends BladeController {
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "自定义分页", notes = "传入projectInfo")
|
|
|
@ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(name = "current", value = "当前页", required = true),
|
|
|
- @ApiImplicitParam(name = "size", value = "每页的数量", required = true)
|
|
|
+ @ApiImplicitParam(name = "current", value = "当前页", required = true),
|
|
|
+ @ApiImplicitParam(name = "size", value = "每页的数量", required = true)
|
|
|
})
|
|
|
public R<IPage<ProjectInfoVO>> page(ProjectInfoVO projectInfo, Query query) {
|
|
|
IPage<ProjectInfoVO> pages = projectInfoService.selectProjectInfoPage(Condition.getPage(query), projectInfo);
|
|
@@ -124,8 +125,8 @@ public class ProjectInfoController extends BladeController {
|
|
|
@PostMapping("/submit")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入projectInfo")
|
|
|
- @ApiImplicitParam(value = "id",name = "id",required = true)
|
|
|
- public R submit(@Valid @RequestBody ProjectInfo projectInfo) {
|
|
|
+ @ApiImplicitParam(value = "id", name = "id", required = true)
|
|
|
+ public R submit(@Valid @RequestBody ProjectInfo projectInfo) {
|
|
|
return R.status(projectInfoService.saveOrUpdate(projectInfo));
|
|
|
}
|
|
|
|
|
@@ -146,12 +147,41 @@ public class ProjectInfoController extends BladeController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/listContractInfoCount")
|
|
|
- @ApiOperationSupport(order = 8)
|
|
|
- @ApiOperation(value = "统计合同数", notes = "null")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation(value = "统计合同数", notes = "null")
|
|
|
public List<ContractlnfoCountVO> selectContractInfoCount() {
|
|
|
List<ContractlnfoCountVO> contractlnfoCountsVO = projectInfoService.selectContractInfoCount();
|
|
|
return contractlnfoCountsVO;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 项目合同分配wbs树保存
|
|
|
+ */
|
|
|
+ @PostMapping("/saveWbsTreeInProject")
|
|
|
+ @ApiOperationSupport(order = 9)
|
|
|
+ @ApiOperation(value = "保存项目合同分配wbs树", notes = "ProjectAssignmentWbstreeDTO")
|
|
|
+ public R saveWbsTreeInProject(@RequestBody ProjectAssignmentWbstreeDTO projectAssignmentWbstreeDTO) {
|
|
|
+
|
|
|
+ Boolean b = projectAssignmentWbstreeService.saveWbsTreeInProject(projectAssignmentWbstreeDTO);
|
|
|
+ if (b){
|
|
|
+ return R.data(projectAssignmentWbstreeDTO,"操作成功");
|
|
|
+ }
|
|
|
+ return R.fail("操作失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 项目合同分配wbs树修改
|
|
|
+ */
|
|
|
+ @PostMapping("/updateWbsTreeInProject")
|
|
|
+ @ApiOperationSupport(order = 10)
|
|
|
+ @ApiOperation(value = "修改项目合同分配wbs树", notes = "ProjectAssignmentWbstreeDTO")
|
|
|
+ @ApiImplicitParam(name = "id",value = "主键id",required = true)
|
|
|
+ public R updateWbsTreeInProject(@RequestBody ProjectAssignmentWbstreeDTO projectAssignmentWbstreeDTO) {
|
|
|
+ Boolean b = projectAssignmentWbstreeService.updateWbsTreeInProject(projectAssignmentWbstreeDTO);
|
|
|
+ if (b){
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+ return R.fail("操作失败");
|
|
|
+ }
|
|
|
|
|
|
}
|