|
@@ -1,19 +1,3 @@
|
|
-/*
|
|
|
|
- * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
|
|
- *
|
|
|
|
- * Redistribution and use in source and binary forms, with or without
|
|
|
|
- * modification, are permitted provided that the following conditions are met:
|
|
|
|
- *
|
|
|
|
- * Redistributions of source code must retain the above copyright notice,
|
|
|
|
- * this list of conditions and the following disclaimer.
|
|
|
|
- * Redistributions in binary form must reproduce the above copyright
|
|
|
|
- * notice, this list of conditions and the following disclaimer in the
|
|
|
|
- * documentation and/or other materials provided with the distribution.
|
|
|
|
- * Neither the name of the dreamlu.net developer nor the names of its
|
|
|
|
- * contributors may be used to endorse or promote products derived from
|
|
|
|
- * this software without specific prior written permission.
|
|
|
|
- * Author: Chill 庄骞 (smallchill@163.com)
|
|
|
|
- */
|
|
|
|
package org.springblade.manager.controller;
|
|
package org.springblade.manager.controller;
|
|
|
|
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
@@ -44,13 +28,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * wbs表单元素 控制器
|
|
|
|
- *
|
|
|
|
- * @author liuyc
|
|
|
|
- * @since 2022-04-27
|
|
|
|
- */
|
|
|
|
@RestController
|
|
@RestController
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
@RequestMapping("/wbsFormElement")
|
|
@RequestMapping("/wbsFormElement")
|
|
@@ -78,7 +55,7 @@ public class WbsFormElementController extends BladeController {
|
|
* 新增或同步 wbs表单元素
|
|
* 新增或同步 wbs表单元素
|
|
*/
|
|
*/
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
- @ApiOperationSupport(order = 1)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
@ApiOperation(value = "新增", notes = "传入wbsFormElement")
|
|
@ApiOperation(value = "新增", notes = "传入wbsFormElement")
|
|
public R save(@Valid @RequestBody WbsFormElementDTO wbsFormElement) {
|
|
public R save(@Valid @RequestBody WbsFormElementDTO wbsFormElement) {
|
|
return wbsFormElementService.saveAndSyn(wbsFormElement, wbsFormElement.getInitTableName());
|
|
return wbsFormElementService.saveAndSyn(wbsFormElement, wbsFormElement.getInitTableName());
|
|
@@ -89,7 +66,7 @@ public class WbsFormElementController extends BladeController {
|
|
* 修改 wbs表单元素
|
|
* 修改 wbs表单元素
|
|
*/
|
|
*/
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
- @ApiOperationSupport(order = 2)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
@ApiOperation(value = "修改", notes = "传入wbsFormElement")
|
|
@ApiOperation(value = "修改", notes = "传入wbsFormElement")
|
|
public R update(@Valid @RequestBody WbsFormElement wbsFormElement) {
|
|
public R update(@Valid @RequestBody WbsFormElement wbsFormElement) {
|
|
return R.status(wbsFormElementService.updateById(wbsFormElement));
|
|
return R.status(wbsFormElementService.updateById(wbsFormElement));
|
|
@@ -100,7 +77,7 @@ public class WbsFormElementController extends BladeController {
|
|
* 新增或修改 wbs表单元素
|
|
* 新增或修改 wbs表单元素
|
|
*/
|
|
*/
|
|
@PostMapping("/submit")
|
|
@PostMapping("/submit")
|
|
- @ApiOperationSupport(order = 3)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 4)
|
|
@ApiOperation(value = "新增或修改", notes = "传入wbsFormElement")
|
|
@ApiOperation(value = "新增或修改", notes = "传入wbsFormElement")
|
|
public R submit(@Valid @RequestBody WbsFormElement wbsFormElement) {
|
|
public R submit(@Valid @RequestBody WbsFormElement wbsFormElement) {
|
|
return R.status(wbsFormElementService.saveOrUpdate(wbsFormElement));
|
|
return R.status(wbsFormElementService.saveOrUpdate(wbsFormElement));
|
|
@@ -110,7 +87,7 @@ public class WbsFormElementController extends BladeController {
|
|
* 批量新增wbs元素 同步实体表
|
|
* 批量新增wbs元素 同步实体表
|
|
*/
|
|
*/
|
|
@PostMapping("/submitBatch")
|
|
@PostMapping("/submitBatch")
|
|
- @ApiOperationSupport(order = 3)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 5)
|
|
@ApiOperation(value = "批量新增wbs元素", notes = "传入wbsFormElementList")
|
|
@ApiOperation(value = "批量新增wbs元素", notes = "传入wbsFormElementList")
|
|
public R submitBatch(@RequestBody WbsFormElementVO2 wbsFormElementVO2) {
|
|
public R submitBatch(@RequestBody WbsFormElementVO2 wbsFormElementVO2) {
|
|
boolean b = wbsFormElementService.submitBatch(wbsFormElementVO2);
|
|
boolean b = wbsFormElementService.submitBatch(wbsFormElementVO2);
|
|
@@ -122,7 +99,7 @@ public class WbsFormElementController extends BladeController {
|
|
* 删除 wbs表单元素 同步删除实体表字段
|
|
* 删除 wbs表单元素 同步删除实体表字段
|
|
*/
|
|
*/
|
|
@PostMapping("/remove")
|
|
@PostMapping("/remove")
|
|
- @ApiOperationSupport(order = 4)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 6)
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids")
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids")
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam("ids") String ids,
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam("ids") String ids,
|
|
@RequestParam("eKey") String eKey, @RequestParam("initTableName") String initTableName) {
|
|
@RequestParam("eKey") String eKey, @RequestParam("initTableName") String initTableName) {
|
|
@@ -137,7 +114,7 @@ public class WbsFormElementController extends BladeController {
|
|
* 导出Wbs元素模板
|
|
* 导出Wbs元素模板
|
|
*/
|
|
*/
|
|
@GetMapping("/export-template")
|
|
@GetMapping("/export-template")
|
|
- @ApiOperationSupport(order = 5)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 7)
|
|
@ApiOperation(value = "导出WBS元素模板")
|
|
@ApiOperation(value = "导出WBS元素模板")
|
|
public void exportWbsTree(HttpServletResponse response) {
|
|
public void exportWbsTree(HttpServletResponse response) {
|
|
List<WbsFormElementExcel> list = new ArrayList<>();
|
|
List<WbsFormElementExcel> list = new ArrayList<>();
|
|
@@ -148,14 +125,14 @@ public class WbsFormElementController extends BladeController {
|
|
* 导入Wbs元素
|
|
* 导入Wbs元素
|
|
*/
|
|
*/
|
|
@PostMapping("/import-wbsElement")
|
|
@PostMapping("/import-wbsElement")
|
|
- @ApiOperationSupport(order = 6)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
@ApiOperation(value = "导入WBS元素数据", notes = "传入excel")
|
|
@ApiOperation(value = "导入WBS元素数据", notes = "传入excel")
|
|
public R importRegion(MultipartFile file) {
|
|
public R importRegion(MultipartFile file) {
|
|
List<WbsFormElementExcel> list = ExcelUtil.read(file, WbsFormElementExcel.class);
|
|
List<WbsFormElementExcel> list = ExcelUtil.read(file, WbsFormElementExcel.class);
|
|
for (WbsFormElementExcel wbsFE : list) {
|
|
for (WbsFormElementExcel wbsFE : list) {
|
|
if (("字符串").equals(wbsFE.getElementType()) || ("string").equals(wbsFE.getElementType())) {
|
|
if (("字符串").equals(wbsFE.getElementType()) || ("string").equals(wbsFE.getElementType())) {
|
|
wbsFE.setElementType("1");
|
|
wbsFE.setElementType("1");
|
|
- wbsFE.setElementLength("1000");
|
|
|
|
|
|
+ wbsFE.setElementLength("800");
|
|
} else if (("整数").equals(wbsFE.getElementType()) || ("bigint").equals(wbsFE.getElementType())) {
|
|
} else if (("整数").equals(wbsFE.getElementType()) || ("bigint").equals(wbsFE.getElementType())) {
|
|
wbsFE.setElementType("2");
|
|
wbsFE.setElementType("2");
|
|
wbsFE.setElementLength("20");
|
|
wbsFE.setElementLength("20");
|
|
@@ -170,13 +147,13 @@ public class WbsFormElementController extends BladeController {
|
|
wbsFE.setElementLength("20");
|
|
wbsFE.setElementLength("20");
|
|
} else if (("签名").equals(wbsFE.getElementType())) {
|
|
} else if (("签名").equals(wbsFE.getElementType())) {
|
|
wbsFE.setElementType("1");
|
|
wbsFE.setElementType("1");
|
|
- wbsFE.setElementLength("1000");
|
|
|
|
|
|
+ wbsFE.setElementLength("800");
|
|
} else if (("文件").equals(wbsFE.getElementType())) {
|
|
} else if (("文件").equals(wbsFE.getElementType())) {
|
|
wbsFE.setElementType("1");
|
|
wbsFE.setElementType("1");
|
|
- wbsFE.setElementLength("1000");
|
|
|
|
|
|
+ wbsFE.setElementLength("800");
|
|
} else {
|
|
} else {
|
|
wbsFE.setElementType("1");
|
|
wbsFE.setElementType("1");
|
|
- wbsFE.setElementLength("1000");
|
|
|
|
|
|
+ wbsFE.setElementLength("800");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return R.data(list, "操作成功");
|
|
return R.data(list, "操作成功");
|
|
@@ -185,7 +162,7 @@ public class WbsFormElementController extends BladeController {
|
|
/**
|
|
/**
|
|
* 查询当前节点下所有表单
|
|
* 查询当前节点下所有表单
|
|
*/
|
|
*/
|
|
- @ApiOperationSupport(order = 7)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 9)
|
|
@ApiOperation(value = "查询当前节点下所有表单", notes = "传入该节点id")
|
|
@ApiOperation(value = "查询当前节点下所有表单", notes = "传入该节点id")
|
|
@RequestMapping(value = "/findWbsTreeTableSameLevel", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/findWbsTreeTableSameLevel", method = RequestMethod.GET)
|
|
public R<List<WbsFormElementDTO2>> findWbsTreeTableSameLevel(@RequestParam("id") String id) {
|
|
public R<List<WbsFormElementDTO2>> findWbsTreeTableSameLevel(@RequestParam("id") String id) {
|
|
@@ -196,7 +173,7 @@ public class WbsFormElementController extends BladeController {
|
|
/**
|
|
/**
|
|
* wbs树节点手动排序
|
|
* wbs树节点手动排序
|
|
*/
|
|
*/
|
|
- @ApiOperationSupport(order = 8)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 10)
|
|
@ApiOperation(value = "wbs树节点手动排序", notes = "WbsFormElementDTO2集合,id=表单id")
|
|
@ApiOperation(value = "wbs树节点手动排序", notes = "WbsFormElementDTO2集合,id=表单id")
|
|
@RequestMapping(value = "/wbsTreeTableSort", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/wbsTreeTableSort", method = RequestMethod.POST)
|
|
public R wbsTreeTableSort(@RequestBody List<WbsFormElementDTO2> wbsTreeDTO) {
|
|
public R wbsTreeTableSort(@RequestBody List<WbsFormElementDTO2> wbsTreeDTO) {
|
|
@@ -208,7 +185,7 @@ public class WbsFormElementController extends BladeController {
|
|
/**
|
|
/**
|
|
* 提交清表关联公有Wbs树并创建元素
|
|
* 提交清表关联公有Wbs树并创建元素
|
|
*/
|
|
*/
|
|
- @ApiOperationSupport(order = 9)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 11)
|
|
@ApiOperation(value = "提交清表关联公有Wbs树并创建元素", notes = "节点id、表名、元素DTO")
|
|
@ApiOperation(value = "提交清表关联公有Wbs树并创建元素", notes = "节点id、表名、元素DTO")
|
|
@RequestMapping(value = "/submitExcelRelationWbsTreeAndElement", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/submitExcelRelationWbsTreeAndElement", method = RequestMethod.POST)
|
|
public R submitExcelRelationWbsTreeAndElement(@RequestBody FormElementDTO2 formElementDTO) {
|
|
public R submitExcelRelationWbsTreeAndElement(@RequestBody FormElementDTO2 formElementDTO) {
|
|
@@ -218,7 +195,7 @@ public class WbsFormElementController extends BladeController {
|
|
/**
|
|
/**
|
|
* 元素识别取消关联公有wbs表
|
|
* 元素识别取消关联公有wbs表
|
|
*/
|
|
*/
|
|
- @ApiOperationSupport(order = 10)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 12)
|
|
@ApiOperation(value = "元素识别取消关联公有wbs表", notes = "传入表id、清表id")
|
|
@ApiOperation(value = "元素识别取消关联公有wbs表", notes = "传入表id、清表id")
|
|
@RequestMapping(value = "/cancelRelation", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/cancelRelation", method = RequestMethod.GET)
|
|
public R cancelRelation(String id,String excelTabId) {
|
|
public R cancelRelation(String id,String excelTabId) {
|
|
@@ -231,7 +208,7 @@ public class WbsFormElementController extends BladeController {
|
|
/**
|
|
/**
|
|
* 元素识别关联公共WBS模板-查询节点下已关联的所有表单
|
|
* 元素识别关联公共WBS模板-查询节点下已关联的所有表单
|
|
*/
|
|
*/
|
|
- @ApiOperationSupport(order = 11)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 13)
|
|
@ApiOperation(value = "元素识别关联公共WBS模板-查询节点下已关联的所有表单", notes = "传入节点id、清表id")
|
|
@ApiOperation(value = "元素识别关联公共WBS模板-查询节点下已关联的所有表单", notes = "传入节点id、清表id")
|
|
@RequestMapping(value = "/searchNodeTables", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/searchNodeTables", method = RequestMethod.GET)
|
|
public R<List<WbsNodeTableVO>> searchNodeTables(String nodeId, String excelTabId) {
|
|
public R<List<WbsNodeTableVO>> searchNodeTables(String nodeId, String excelTabId) {
|
|
@@ -245,7 +222,7 @@ public class WbsFormElementController extends BladeController {
|
|
/**
|
|
/**
|
|
* 元素识别关联公共WBS模板-关联Wbs元素表
|
|
* 元素识别关联公共WBS模板-关联Wbs元素表
|
|
*/
|
|
*/
|
|
- @ApiOperationSupport(order = 12)
|
|
|
|
|
|
+ @ApiOperationSupport(order = 14)
|
|
@ApiOperation(value = "元素识别关联公共WBS模板-关联Wbs元素表", notes = "传入FormElementDTO2")
|
|
@ApiOperation(value = "元素识别关联公共WBS模板-关联Wbs元素表", notes = "传入FormElementDTO2")
|
|
@RequestMapping(value = "/saveRelation", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/saveRelation", method = RequestMethod.POST)
|
|
public R relationWbsTab(@RequestBody FormElementDTO2 formElementDTO) {
|
|
public R relationWbsTab(@RequestBody FormElementDTO2 formElementDTO) {
|