| | |
| | | package com.ruoyi.web.controller.zhang; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.ZCertificate; |
| | | import com.ruoyi.domain.ZfEvent; |
| | | import com.ruoyi.domain.ZfFamily; |
| | | import com.ruoyi.domain.dto.UserInfoDto; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | | import com.ruoyi.service.ZfFamilyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.parameters.P; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | |
| | | public class ZfFamilyController { |
| | | @Resource |
| | | ZfFamilyService zfFamilyService; |
| | | |
| | | @Autowired |
| | | ZInfoUserService zInfoUserService; |
| | | |
| | | @GetMapping("/all") |
| | | public AjaxResult getAllFamily(ZfFamily zfFamily){ |
| | |
| | | @Log(title = "家庭大事件记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<ZfFamily> list = zfFamilyService.list(); |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | Long userId = user.getUserId(); |
| | | |
| | | Integer clanId = user.getClanId(); |
| | | LambdaQueryWrapper<ZfFamily> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(ZfFamily::getClanId,clanId); |
| | | List<ZfFamily> list = zfFamilyService.list(lqw); |
| | | //.list(); |
| | | |
| | | |
| | | System.out.println("------------------"); |
| | | ExcelUtil<ZfFamily> util = new ExcelUtil<>(ZfFamily.class); |
| | | util.exportExcel(response, list, "家庭大事件记录数据"); |
| | | util.exportExcel(response, list, "家庭号数据"); |
| | | |
| | | } |
| | | |