|
@@ -22,7 +22,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import io.swagger.annotations.*;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+
|
|
|
import javax.validation.Valid;
|
|
|
+
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
@@ -350,11 +352,11 @@ public class ContractInfoController extends BladeController {
|
|
|
@ApiOperationSupport(order = 14)
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入当前列表用户的记录ids")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public R removeUsersByIds(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
+ public R removeUsersByIds(@ApiParam(value = "主键id集合", required = true) @RequestParam String ids) {
|
|
|
if (StringUtils.isEmpty(ids)) {
|
|
|
throw new ServiceException("请选择要删除的用户");
|
|
|
}
|
|
|
- if (Func.toLongList(ids).size() > 1) {//批量删除
|
|
|
+ if (Func.toLongList(ids).size() > 1) {//批量删除-合同段分配人员的全部删除按钮
|
|
|
List<Long> idsList = Func.toLongList(ids);
|
|
|
return R.status(saveUserInfoByProjectService.deleteBatchByIdsList(idsList));
|
|
|
} else {//单删除
|
|
@@ -367,11 +369,29 @@ public class ContractInfoController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 项目分配用户逻辑删除当前项目下所有合同段角色信息
|
|
|
+ */
|
|
|
+ @PostMapping("/removeUserProjectInfoAndRoleById")
|
|
|
+ @ApiOperationSupport(order = 14)
|
|
|
+ @ApiOperation(value = "逻辑删除当前项目下所有合同段角色信息", notes = "传入dataInfo内的id")
|
|
|
+ public R removeUserProjectInfoAndRoleById(@ApiParam(value = "主键id", required = true) @RequestParam String id) {
|
|
|
+ if (StringUtils.isEmpty(id)) {
|
|
|
+ throw new ServiceException("请选择要删除的数据");
|
|
|
+ }
|
|
|
+ boolean b = saveUserInfoByProjectService.removeUserProjectInfoAndRoleById(id);
|
|
|
+ if (b) {
|
|
|
+ return R.success("删除成功");
|
|
|
+ }
|
|
|
+ return R.fail(200, "删除失败");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 重置密码
|
|
|
*/
|
|
|
@PostMapping("/resetPasswordByUserId")
|
|
|
- @ApiOperationSupport(order = 15)
|
|
|
+ @ApiOperationSupport(order = 16)
|
|
|
@ApiOperation(value = "重置密码", notes = "传入当前用户的userId,默认重置密码123456")
|
|
|
public R updatePasswordByUserId(@ApiParam(value = "用户userId", required = true) @RequestParam String userId) {
|
|
|
if (StringUtils.isNotEmpty(userId)) {
|
|
@@ -385,7 +405,7 @@ public class ContractInfoController extends BladeController {
|
|
|
* 分配合同段wbs节点树保存或者修改
|
|
|
*/
|
|
|
@PostMapping("/submitWbsTreeInContract")
|
|
|
- @ApiOperationSupport(order = 16)
|
|
|
+ @ApiOperationSupport(order = 17)
|
|
|
@ApiOperation(value = "分配合同段wbs节点树保存或修改", notes = "传入ids,wbsId,项目id,合同段id")
|
|
|
public R submitWbsTreeInContract(@RequestBody WbsTreeContractDTO wbsTreeContractDTO) {
|
|
|
boolean b = wbsTreeContractService.submitWbsTreeInContract(wbsTreeContractDTO);
|
|
@@ -399,7 +419,7 @@ public class ContractInfoController extends BladeController {
|
|
|
* 查询合同段私有Wbs节点树形结构
|
|
|
*/
|
|
|
@GetMapping("/tree")
|
|
|
- @ApiOperationSupport(order = 17)
|
|
|
+ @ApiOperationSupport(order = 18)
|
|
|
@ApiOperation(value = "查询合同段私有Wbs节点树形结构", notes = "传入wbsId,项目id,合同段id")
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "wbsId", value = "wbsId", required = true),
|
|
@@ -419,7 +439,7 @@ public class ContractInfoController extends BladeController {
|
|
|
* 查询所有施工合同wbs树根节点(新建监理或业主合同段时,加载当前项目下的施工WBS树,分配时使用)
|
|
|
*/
|
|
|
@GetMapping("/treeAllConstruction")
|
|
|
- @ApiOperationSupport(order = 18)
|
|
|
+ @ApiOperationSupport(order = 19)
|
|
|
@ApiOperation(value = "查询所有施工合同wbs树根节点", notes = "传入wbsId,项目id")
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "项目id", value = "projectId", required = true)
|
|
@@ -437,7 +457,7 @@ public class ContractInfoController extends BladeController {
|
|
|
* 懒加载合同wbs节点树形结构
|
|
|
*/
|
|
|
@GetMapping("/lazy-tree")
|
|
|
- @ApiOperationSupport(order = 19)
|
|
|
+ @ApiOperationSupport(order = 20)
|
|
|
@ApiOperation(value = "懒加载合同段wbs节点树形结构", notes = "传入wbsId,parentId,请求头token")
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "parentId", value = "父级parentId = primaryKeyId , 根节点=0", required = true),
|
|
@@ -456,4 +476,5 @@ public class ContractInfoController extends BladeController {
|
|
|
return R.fail(200, "未查询到信息");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|