|
|
@@ -512,63 +512,6 @@ public class WbsTreePrivateController extends BladeController {
|
|
|
return R.fail(200, "未查询到数据");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 查询当前节点下所有表单(根据节点ID查询当前表单)
|
|
|
- */
|
|
|
- @GetMapping("/get-group-node-tables")
|
|
|
- @ApiOperationSupport(order = 3)
|
|
|
- @ApiOperation(value = "查询当前节点下所有元素表并分类", notes = "传入父节点id、wbsId、projectId")
|
|
|
- public R<List<WbsTreePrivateTableVO>> findAndGroupNodeTableByCondition(@RequestParam("parentId") String parentId,
|
|
|
- @RequestParam("wbsId") String wbsId,
|
|
|
- @RequestParam("projectId") String projectId) {
|
|
|
- R<List<WbsNodeTableVO>> r = findNodeTableByCondition(parentId, wbsId, projectId);
|
|
|
- List<WbsNodeTableVO> data = r.getData();
|
|
|
- List<WbsTreePrivateTableVO> list = new ArrayList<>();
|
|
|
- if (data != null && !data.isEmpty()) {
|
|
|
- Integer wbsType = data.get(0).getWbsType();
|
|
|
- Map<Integer, List<WbsNodeTableVO>> groupMap;
|
|
|
- if (wbsType != null && wbsType == 1) {
|
|
|
- groupMap = data.stream().collect(Collectors.groupingBy(vo -> {
|
|
|
- String tableOwner = vo.getTableOwner();
|
|
|
- if (StringUtil.isNumeric(tableOwner)) {
|
|
|
- int i = Integer.parseInt(tableOwner);
|
|
|
- if (i > 0 && i <= 3) {
|
|
|
- return 1;
|
|
|
- } else if (i > 3 && i <= 6) {
|
|
|
- return 2;
|
|
|
- }
|
|
|
- }
|
|
|
- return 3;
|
|
|
- }));
|
|
|
- } else if (wbsType != null && wbsType == 2) {
|
|
|
- groupMap = data.stream().collect(Collectors.groupingBy(vo -> {
|
|
|
- String tableType = vo.getTableType();
|
|
|
- if (StringUtil.isNumeric(tableType)) {
|
|
|
- int i = Integer.parseInt(tableType);
|
|
|
- if (i == 1 ) {
|
|
|
- return 2;
|
|
|
- } else if (i == 2 ) {
|
|
|
- return 1;
|
|
|
- }
|
|
|
- }
|
|
|
- return 3;
|
|
|
- }));
|
|
|
- } else {
|
|
|
- list.add(new WbsTreePrivateTableVO("", data));
|
|
|
- return R.data(list);
|
|
|
- }
|
|
|
- String[][] titles = {{"施工方", "监理方", "其他"}, {"报告表", "记录表", "其他"}};
|
|
|
- for (int i = 1; i <= 3; i++) {
|
|
|
- List<WbsNodeTableVO> wbsNodeTableVOS = groupMap.get(i);
|
|
|
- if (wbsNodeTableVOS != null && !wbsNodeTableVOS.isEmpty()) {
|
|
|
- list.add(new WbsTreePrivateTableVO(titles[wbsType - 1][i - 1], wbsNodeTableVOS));
|
|
|
- }
|
|
|
- }
|
|
|
- return R.data(list);
|
|
|
- }
|
|
|
- return R.fail(200, "未查询到数据");
|
|
|
- }
|
|
|
-
|
|
|
@GetMapping("/remove-table")
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "删除节点下的元素表", notes = "传入表单id、wbsId、projectId")
|