|
|
@@ -661,7 +661,7 @@ public class WbsTreePrivateController extends BladeController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 隐藏/启用表单
|
|
|
+ * 隐藏/启用表单 隐藏后的表单客户端是看不到的
|
|
|
*/
|
|
|
@ApiOperationSupport(order = 11)
|
|
|
@ApiOperation(value = "隐藏/启用表单", notes = "传入pKeyId")
|
|
|
@@ -1299,7 +1299,7 @@ public class WbsTreePrivateController extends BladeController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 设置/取消 表单默认隐藏
|
|
|
+ * 设置/取消 表单默认隐藏 隐藏后的表单客户端是可以看到,但是为灰色状态
|
|
|
*/
|
|
|
@GetMapping("/showTable")
|
|
|
@ApiOperationSupport(order = 41)
|
|
|
@@ -1310,18 +1310,20 @@ public class WbsTreePrivateController extends BladeController {
|
|
|
if (pKeyId == null) {
|
|
|
return R.fail("参数错误");
|
|
|
}
|
|
|
- WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.selectOne(Wrappers.<WbsTreePrivate>lambdaQuery().select(WbsTreePrivate::getPKeyId, WbsTreePrivate::getDefaultConceal, WbsTreePrivate::getProjectId)
|
|
|
+ WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.selectOne(Wrappers.<WbsTreePrivate>lambdaQuery().select(WbsTreePrivate::getPKeyId, WbsTreePrivate::getIsBussShow, WbsTreePrivate::getProjectId)
|
|
|
.eq(WbsTreePrivate::getPKeyId, pKeyId).ne(WbsTreePrivate::getType, 1));
|
|
|
if (wbsTreePrivate == null) {
|
|
|
return R.fail("选择的表单不存在");
|
|
|
}
|
|
|
- int isDefaultConceal = 0;
|
|
|
- if (wbsTreePrivate.getDefaultConceal() == null || wbsTreePrivate.getDefaultConceal() == 0) {
|
|
|
- isDefaultConceal = 1;
|
|
|
+ int isBUssShow;
|
|
|
+ if(wbsTreePrivate.getIsBussShow()==null||wbsTreePrivate.getIsBussShow()==1||wbsTreePrivate.getIsBussShow()==0){
|
|
|
+ isBUssShow=2;
|
|
|
+ }else {
|
|
|
+ isBUssShow=1;
|
|
|
}
|
|
|
- boolean update = wbsTreePrivateService.update(Wrappers.<WbsTreePrivate>lambdaUpdate().eq(WbsTreePrivate::getPKeyId, pKeyId).set(WbsTreePrivate::getDefaultConceal, isDefaultConceal).set(WbsTreePrivate::getIsBussShow, isDefaultConceal + 1));
|
|
|
+ boolean update = wbsTreePrivateService.update(Wrappers.<WbsTreePrivate>lambdaUpdate().eq(WbsTreePrivate::getPKeyId, pKeyId).set(WbsTreePrivate::getIsBussShow, isBUssShow));
|
|
|
if ( update) {
|
|
|
- jdbcTemplate.execute("update m_wbs_tree_contract set is_buss_show = " + (isDefaultConceal + 1) + " where is_deleted = 0 and is_type_private_pid = " + pKeyId + " and project_id = " + wbsTreePrivate.getProjectId());
|
|
|
+ jdbcTemplate.execute("update m_wbs_tree_contract set is_buss_show = " + isBUssShow + " where is_deleted = 0 and is_type_private_pid = " + pKeyId + " and project_id = " + wbsTreePrivate.getProjectId());
|
|
|
}
|
|
|
return R.data(update);
|
|
|
}
|