| | |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.ZfRelation; |
| | | import com.ruoyi.domain.dto.EmpowerDto; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.websocket.server.PathParam; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.regex.Pattern; |
| | |
| | | /** |
| | | * 查询家庭主要成员及关系 |
| | | */ |
| | | |
| | | @GetMapping("/relation") |
| | | public AjaxResult listMyRelation() { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | |
| | | return zInfoUserService.searchMyRelation(userId); |
| | | } |
| | | |
| | | @PostMapping("/relation") |
| | | public AjaxResult addRelation(@RequestBody ZfRelation zfRelation){ |
| | | return zInfoUserService.addRelation(zfRelation); |
| | | |
| | | } |
| | | |
| | | @PutMapping("/relation") |
| | | public AjaxResult updateRelation(@RequestBody ZfRelation zfRelation){ |
| | | return zInfoUserService.updateRelation(zfRelation); |
| | | } |
| | | |
| | | @DeleteMapping("/relation/{ids}") |
| | | public AjaxResult deleteRelation(@PathVariable Long[] ids){ |
| | | return zInfoUserService.deleteRelation(ids); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 授权 |
| | | */ |
| | | @PostMapping("/empower") |
| | | public AjaxResult empower(@RequestBody EmpowerDto empowerDto){ |
| | | |
| | | return zInfoUserService.empower(empowerDto); |
| | | } |
| | | |
| | | /** |
| | | * 家根网 |
| | | */ |
| | | @GetMapping("/root") |
| | | public AjaxResult listAllPeopleWithTree(){ |
| | | return zInfoUserService.listWithTree(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 找到所有的成员 |
| | | */ |
| | | @GetMapping("/all") |
| | | public AjaxResult listAllPeople(){ |
| | | return zInfoUserService.listAllExceptAdmin(); |
| | | } |
| | | |
| | | /** |
| | | * 新增、修改父子关系 |
| | | */ |
| | | |
| | | @PutMapping("/setParent") |
| | | public AjaxResult addParent(@PathParam("fatherId")Long fatherId,@PathParam("motherId")Long motherId){ |
| | | return zInfoUserService.addParent(fatherId,motherId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |