| | |
| | | package com.ruoyi.web.controller.zhang; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZfEvent; |
| | | import com.ruoyi.domain.ZfFamily; |
| | | import com.ruoyi.domain.dto.UserInfoDto; |
| | | import com.ruoyi.service.ZfFamilyService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | | |
| | | /** |
| | | * @Author Jinquan_Ou |
| | |
| | | ZfFamilyService zfFamilyService; |
| | | |
| | | @GetMapping("/all") |
| | | public AjaxResult getAllFamily(){ |
| | | return AjaxResult.success(zfFamilyService.list()); |
| | | public AjaxResult getAllFamily(ZfFamily zfFamily){ |
| | | Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return zfFamilyService.selectDataList(zfFamily, pageNo,pageSize); |
| | | } |
| | | |
| | | /** |
| | |
| | | public AjaxResult getByFamilyId(@PathVariable Long fid){ |
| | | return AjaxResult.success(zfFamilyService.getByFamilyId(fid)); |
| | | } |
| | | @GetMapping("/findByfid/{fid}") |
| | | public AjaxResult getByFId(@PathVariable("fid") Long fid){ |
| | | return AjaxResult.success(zfFamilyService.getByFid(fid)); |
| | | } |
| | | @GetMapping("/findByFname/{name}") |
| | | public AjaxResult getByFName(@PathVariable("name") String name){ |
| | | return AjaxResult.success(zfFamilyService.getByName(name)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查看当前用户当前家庭的家庭成员 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出家庭大事件记录列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:export')") |
| | | @Log(title = "家庭大事件记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<ZfFamily> list = zfFamilyService.list(); |
| | | System.out.println("------------------"); |
| | | ExcelUtil<ZfFamily> util = new ExcelUtil<>(ZfFamily.class); |
| | | util.exportExcel(response, list, "家庭大事件记录数据"); |
| | | |
| | | } |
| | | |
| | | @Log(title = "家庭大事件记录", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteFam/{ids}") |
| | | public AjaxResult deleteFamily(@PathVariable Long[] ids) { |
| | | return zfFamilyService.deleteFam(ids); |
| | | } |
| | | /** |
| | | * |
| | | * @param zfFamily |
| | | * @return |
| | |
| | | * @param zfFamily |
| | | * @return |
| | | */ |
| | | @PostMapping("/findInfo") |
| | | public AjaxResult findFamilyMember(@RequestBody ZfFamily zfFamily){ |
| | | |
| | | return AjaxResult.success(zfFamilyService.getByNameAndUser(zfFamily)); |
| | | |
| | | } |
| | | /** |
| | | * |
| | | * @param zfFamily |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateFam") |
| | | public AjaxResult updateFamily(@RequestBody ZfFamily zfFamily){ |
| | | |