|
@@ -6,6 +6,7 @@ import io.swagger.annotations.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
import org.springblade.core.cache.utils.CacheUtil;
|
|
import org.springblade.core.cache.utils.CacheUtil;
|
|
|
|
+import org.springblade.core.log.exception.ServiceException;
|
|
import org.springblade.core.mp.support.Condition;
|
|
import org.springblade.core.mp.support.Condition;
|
|
import org.springblade.core.secure.BladeUser;
|
|
import org.springblade.core.secure.BladeUser;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
@@ -105,7 +106,7 @@ public class WbsTreePrivateController extends BladeController {
|
|
@RequestParam("wbsId") String wbsId,
|
|
@RequestParam("wbsId") String wbsId,
|
|
@RequestParam("projectId") String projectId) {
|
|
@RequestParam("projectId") String projectId) {
|
|
List<WbsNodeTableVO> rs = wbsTreePrivateService.selectByNodeTable(parentId, wbsId, projectId);
|
|
List<WbsNodeTableVO> rs = wbsTreePrivateService.selectByNodeTable(parentId, wbsId, projectId);
|
|
- if (!("").equals(rs) && rs.size() > 0) {
|
|
|
|
|
|
+ if (rs.size() > 0) {
|
|
return R.data(rs);
|
|
return R.data(rs);
|
|
}
|
|
}
|
|
return R.fail(200, "未查询到数据");
|
|
return R.fail(200, "未查询到数据");
|
|
@@ -118,6 +119,14 @@ public class WbsTreePrivateController extends BladeController {
|
|
public R removeTableByCondition(@RequestParam("id") String id,
|
|
public R removeTableByCondition(@RequestParam("id") String id,
|
|
@RequestParam("wbsId") String wbsId,
|
|
@RequestParam("wbsId") String wbsId,
|
|
@RequestParam("projectId") String projectId) {
|
|
@RequestParam("projectId") String projectId) {
|
|
|
|
+ List<WbsTreeContract> wbsTreeContracts = wbsTreeContractMapper.selectList(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
|
+ .eq(WbsTreeContract::getProjectId, projectId)
|
|
|
|
+ .eq(WbsTreeContract::getWbsId, wbsId)
|
|
|
|
+ .eq(WbsTreeContract::getId, id)
|
|
|
|
+ );
|
|
|
|
+ if (wbsTreeContracts.size() > 0) {
|
|
|
|
+ throw new ServiceException("当前表单被合同段引用中,删除失败");
|
|
|
|
+ }
|
|
boolean result = wbsTreePrivateService.removeTableByCondition(id, wbsId, projectId);
|
|
boolean result = wbsTreePrivateService.removeTableByCondition(id, wbsId, projectId);
|
|
if (result) {
|
|
if (result) {
|
|
return R.success("删除成功");
|
|
return R.success("删除成功");
|
|
@@ -175,8 +184,7 @@ public class WbsTreePrivateController extends BladeController {
|
|
public R<List<WbsTreePrivateDTO2>> findWbsTreePrivateSameLevel(@RequestParam("projectId") String projectId,
|
|
public R<List<WbsTreePrivateDTO2>> findWbsTreePrivateSameLevel(@RequestParam("projectId") String projectId,
|
|
@RequestParam("parentId") String parentId,
|
|
@RequestParam("parentId") String parentId,
|
|
@RequestParam("wbsId") String wbsId) {
|
|
@RequestParam("wbsId") String wbsId) {
|
|
- List<WbsTreePrivateDTO2> trees = wbsTreePrivateService.findWbsTreePrivateSameLevel(projectId, parentId, wbsId);
|
|
|
|
- return R.data(trees);
|
|
|
|
|
|
+ return R.data(wbsTreePrivateService.findWbsTreePrivateSameLevel(projectId, parentId, wbsId));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -186,8 +194,7 @@ public class WbsTreePrivateController extends BladeController {
|
|
@ApiOperation(value = "wbs私有树节点手动排序", notes = "WbsTreeDTO2集合,pKeyId=节点pKeyId")
|
|
@ApiOperation(value = "wbs私有树节点手动排序", notes = "WbsTreeDTO2集合,pKeyId=节点pKeyId")
|
|
@RequestMapping(value = "/wbsTreePrivateSort", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/wbsTreePrivateSort", method = RequestMethod.POST)
|
|
public R wbsTreePrivateSort(@RequestBody List<WbsTreePrivateDTO2> wbsTreeDTO) {
|
|
public R wbsTreePrivateSort(@RequestBody List<WbsTreePrivateDTO2> wbsTreeDTO) {
|
|
- boolean b = wbsTreePrivateService.wbsTreePrivateSort(wbsTreeDTO);
|
|
|
|
- return R.status(b);
|
|
|
|
|
|
+ return R.status(wbsTreePrivateService.wbsTreePrivateSort(wbsTreeDTO));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -198,8 +205,7 @@ public class WbsTreePrivateController extends BladeController {
|
|
@ApiOperation(value = "wbs私有树表单手动排序", notes = "WbsTreeDTO2集合,pKeyId=表单pKeyId")
|
|
@ApiOperation(value = "wbs私有树表单手动排序", notes = "WbsTreeDTO2集合,pKeyId=表单pKeyId")
|
|
@RequestMapping(value = "/wbsTreePrivateTableSort", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/wbsTreePrivateTableSort", method = RequestMethod.POST)
|
|
public R wbsTreePrivateTableSort(@RequestBody List<WbsTreePrivateDTO2> wbsTreeDTO) {
|
|
public R wbsTreePrivateTableSort(@RequestBody List<WbsTreePrivateDTO2> wbsTreeDTO) {
|
|
- boolean b = wbsTreePrivateService.wbsTreePrivateTableSort(wbsTreeDTO);
|
|
|
|
- return R.status(b);
|
|
|
|
|
|
+ return R.status(wbsTreePrivateService.wbsTreePrivateTableSort(wbsTreeDTO));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -212,5 +218,15 @@ public class WbsTreePrivateController extends BladeController {
|
|
return R.status(wbsTreePrivateService.updateBatchByPid(wbsTreePrivates));
|
|
return R.status(wbsTreePrivateService.updateBatchByPid(wbsTreePrivates));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 隐藏/启用表单
|
|
|
|
+ */
|
|
|
|
+ @ApiOperationSupport(order = 11)
|
|
|
|
+ @ApiOperation(value = "隐藏/启用表单", notes = "传入pKeyId")
|
|
|
|
+ @RequestMapping(value = "/updateStatus", method = RequestMethod.GET)
|
|
|
|
+ public R updateStatus(@RequestParam String pKeyId) {
|
|
|
|
+ return R.status(wbsTreePrivateService.updateStatus(pKeyId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|