Gitea 1 year ago
parent 9a0b7b5157
commit 1feab42ac5
  1. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requiremententity/controller/RequirementEntityController.java

@ -230,18 +230,23 @@ public class RequirementEntityController extends JeecgController<RequirementEnti
@ApiOperation(value="合并", notes="合并")
@DeleteMapping(value = "/hb")
public Result<?> hb(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="id",required=true) String id) {
List<String> listids = Arrays.asList(ids.split(","));
for (int i = 0 ; i < listids.size(); i++){
if(!id.equals(listids.get(i))){
RequirementEntity requirementEntity = requirementEntityService.getById(listids.get(i));
requirementEntity.setEntityStatus(9);
requirementEntityService.updateById(requirementEntity);
}
}
RequirementEntity requirementEntity1 = requirementEntityService.getById(id);
requirementEntity1.setEntityStatus(2);
requirementEntityService.updateById(requirementEntity1);
return Result.OK("成功");
if(requirementEntity1.getEntityStatus()==9){
return Result.error("该实体已废弃,需撤回废弃后再保留");
}else{
List<String> listids = Arrays.asList(ids.split(","));
for (int i = 0 ; i < listids.size(); i++){
if(!id.equals(listids.get(i))){
RequirementEntity requirementEntity = requirementEntityService.getById(listids.get(i));
requirementEntity.setEntityStatus(9);
requirementEntityService.updateById(requirementEntity);
}
}
requirementEntity1.setEntityStatus(2);
requirementEntityService.updateById(requirementEntity1);
return Result.OK("成功");
}
}
/**

Loading…
Cancel
Save