| | |
| | | // @PreAuthorize("@ss.hasPermi('system:property:export')") |
| | | @Log(title = "家庭大事件记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ZfEvent zfEvent) { |
| | | List<ZfEvent> list = zfEventService.selectByCondition(zfEvent); |
| | | public void export(HttpServletResponse response, @PathVariable Long[] ids) { |
| | | List<ZfEvent> list = zfEventService.selectByIds(ids); |
| | | log.info("导出记录为:{}", list); |
| | | ExcelUtil<ZfEvent> util = new ExcelUtil<>(ZfEvent.class); |
| | | util.exportExcel(response, list, "家庭大事件记录数据"); |
| | |
| | | AjaxResult selectDataList(ZfEvent zfEvent, Integer pageNum, Integer pageSize); |
| | | |
| | | List<ZfEvent> selectByCondition(ZfEvent zfEvent); |
| | | List<ZfEvent> selectByIds(Long[] ids); |
| | | |
| | | AjaxResult addData(ZfEvent zfEvent); |
| | | |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | return markOwnData(familyIds, beanRecords); |
| | | } |
| | | |
| | | @Override |
| | | public List<ZfEvent> selectByIds(Long[] ids) { |
| | | List<ZfEvent> list = new ArrayList<>(); |
| | | if(ids.length!=0) |
| | | list = listByIds(Arrays.asList(ids)); |
| | | else |
| | | list = list(); |
| | | return list; |
| | | } |
| | | |
| | | private static List<ZfEvent> markOwnData(String familyIds, List<ZfEvent> beanRecords) { |
| | | return beanRecords.stream().peek(record -> { |
| | | String recordFamilyId = record.getFamilyId(); |