|
@@ -32,6 +32,7 @@ import org.springblade.core.tool.support.Kv;
|
|
|
import org.springblade.core.tool.utils.DateUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.dto.FormElementDTO;
|
|
|
+import org.springblade.manager.dto.WbsFormElementDTO;
|
|
|
import org.springblade.manager.dto.WbsTreeDTO;
|
|
|
import org.springblade.manager.entity.WbsFormElement;
|
|
|
import org.springblade.manager.entity.WbsTree;
|
|
@@ -197,7 +198,7 @@ public class WbsTreeController extends BladeController {
|
|
|
* 根据表单id查询所有元素
|
|
|
*/
|
|
|
@GetMapping("/selectFormElements")
|
|
|
- @ApiOperationSupport(order = 7)
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
@ApiOperation(value = "根据表单id查询所有元素", notes = "传入表单id")
|
|
|
@ApiImplicitParam(name = "id", value = "表单id", required = true)
|
|
|
public R<List<WbsFormElement>> selectFormElements(@RequestParam("id") String id) {
|
|
@@ -216,17 +217,28 @@ public class WbsTreeController extends BladeController {
|
|
|
* 新增表单与元素
|
|
|
*/
|
|
|
@PostMapping("/saveFormAndElement")
|
|
|
- @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperationSupport(order = 9)
|
|
|
@ApiOperation(value = "表单与元素新增", notes = "传入FormElementDTO")
|
|
|
public R saveFormElement(@RequestBody FormElementDTO formElementDTO) {
|
|
|
return wbsTreeService.saveFormElement(formElementDTO);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增元素同步到实体表
|
|
|
+ */
|
|
|
+ @PostMapping("/saveEntityTableField")
|
|
|
+ @ApiOperationSupport(order = 10)
|
|
|
+ @ApiOperation(value = "新增元素同步到实体表", notes = "传入FormElementDTO")
|
|
|
+ public R saveEntityTableField(@RequestBody WbsFormElementDTO wbsFormElementDTO) {
|
|
|
+ return wbsTreeService.saveEntityTableField(wbsFormElementDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 编辑表单元素批量修改
|
|
|
*/
|
|
|
@PostMapping("/updateBatchElements")
|
|
|
- @ApiOperationSupport(order = 9)
|
|
|
+ @ApiOperationSupport(order = 11)
|
|
|
@ApiOperation(value = "编辑表单元素批量修改", notes = "传入WbsFormElement")
|
|
|
@ApiImplicitParam(name = "ids", value = "元素的id集合", required = true)
|
|
|
public R updateBatchElements(@RequestBody List<WbsFormElement> wbsFormElementList) {
|
|
@@ -242,7 +254,7 @@ public class WbsTreeController extends BladeController {
|
|
|
* 导出Wbs树模板
|
|
|
*/
|
|
|
@GetMapping("/export-template")
|
|
|
- @ApiOperationSupport(order = 10)
|
|
|
+ @ApiOperationSupport(order = 12)
|
|
|
@ApiOperation(value = "导出WBS树节点模板")
|
|
|
public void exportWbsTree(HttpServletResponse response) {
|
|
|
List<WbsTreeExcel> list = new ArrayList<>();
|
|
@@ -253,12 +265,12 @@ public class WbsTreeController extends BladeController {
|
|
|
/**
|
|
|
* 导入Wbs模板树
|
|
|
*/
|
|
|
- @ApiOperationSupport(order = 11)
|
|
|
+ @ApiOperationSupport(order = 13)
|
|
|
@ApiOperation(value = "导入WBS树节点", notes = "传入excel文件")
|
|
|
@RequestMapping(value = "/import-wbsTree", method = RequestMethod.POST)
|
|
|
public R importWbsTree(@RequestPart("excelFile") MultipartFile excelFile,
|
|
|
@RequestPart("wbsTreeFu") WbsTree wbsTreeFu) throws IOException {
|
|
|
- /*查询创建的二级工程节点是否已导入相同excel模板,判断是否是导入节点ProjectNodeId字段是否相同,如果是返回false*/
|
|
|
+ /*二级节点是否已导入相同excel模板*/
|
|
|
Long parentId = wbsTreeFu.getParentId();
|
|
|
WbsTree wbsTree1 = wbsTreeService.getById(parentId);
|
|
|
if (wbsTree1.getProjectNodeId().equals(parentId)) {
|