| | |
| | | @RequestMapping("/zMarry") |
| | | @Slf4j |
| | | public class ZMarryController extends BaseController { |
| | | @Autowired |
| | | private ZMarryService zMarryService; |
| | | |
| | | |
| | | /** |
| | | * 查询当前婚姻状况 |
| | | */ |
| | | @GetMapping("/list") |
| | | public AjaxResult getMarryStatus(){ |
| | | return zMarryService.getNow(); |
| | | } |
| | | |
| | | /** |
| | | * 新增婚姻状况记录 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:add')") |
| | | @Log(title = "婚姻状况记录", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody MarryInfoDto marryInfoDto) |
| | | { |
| | | return zMarryService.addInfo(marryInfoDto); |
| | | } |
| | | |
| | | /** |
| | | * 修改婚姻状况记录 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:edit')") |
| | | @Log(title = "婚姻状况记录", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody MarryInfoDto marryInfoDto) |
| | | { |
| | | return zMarryService.updateInfo(marryInfoDto); |
| | | } |
| | | // @Autowired |
| | | // private ZMarryService zMarryService; |
| | | // |
| | | /** |
| | | * 批量删除婚姻状况记录 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:remove')") |
| | | @Log(title = "婚姻状况记录", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{id}") |
| | | public AjaxResult remove(@PathVariable String id) |
| | | { |
| | | return zMarryService.deleteOld(id); |
| | | } |
| | | |
| | | |
| | | // |
| | | // /** |
| | | // * 导出婚姻状况 |
| | | // * 查询当前婚姻状况 |
| | | // */ |
| | | // @GetMapping("/list") |
| | | // public AjaxResult getMarryStatus(){ |
| | | // return zMarryService.getNow(); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 新增婚姻状况记录 |
| | | // */ |
| | | //// @PreAuthorize("@ss.hasPermi('system:property:add')") |
| | | // @Log(title = "婚姻状况记录", businessType = BusinessType.INSERT) |
| | | // @PostMapping |
| | | // public AjaxResult add(@RequestBody MarryInfoDto marryInfoDto) |
| | | // { |
| | | // return zMarryService.addInfo(marryInfoDto); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 修改婚姻状况记录 |
| | | // */ |
| | | //// @PreAuthorize("@ss.hasPermi('system:property:edit')") |
| | | // @Log(title = "婚姻状况记录", businessType = BusinessType.UPDATE) |
| | | // @PutMapping |
| | | // public AjaxResult edit(@RequestBody MarryInfoDto marryInfoDto) |
| | | // { |
| | | // return zMarryService.updateInfo(marryInfoDto); |
| | | // } |
| | | //// |
| | | // /** |
| | | // * 批量删除婚姻状况记录 |
| | | // */ |
| | | //// @PreAuthorize("@ss.hasPermi('system:property:remove')") |
| | | // @Log(title = "婚姻状况记录", businessType = BusinessType.DELETE) |
| | | // @DeleteMapping("/{id}") |
| | | // public AjaxResult remove(@PathVariable String id) |
| | | // { |
| | | // return zMarryService.deleteOld(id); |
| | | // } |
| | | // |
| | | // |
| | | //// /** |
| | | //// * 导出婚姻状况 |
| | | //// */ |
| | | //// @PostMapping("/export") |
| | | //// public void export(HttpServletResponse response) |
| | | //// { |
| | | //// AjaxResult marryStatus = getMarryStatus(); |
| | | //// HashMap data = (HashMap) marryStatus.get("data"); |
| | | //// |
| | | //// List<MarryUser> myInfoList = Arrays.asList((MarryUser) data.get("myInfo")); |
| | | //// ExcelUtil<MarryUser> util1 = new ExcelUtil<>(MarryUser.class); |
| | | //// util1.exportEasyExcel(response,myInfoList,"个人信息"); |
| | | //// |
| | | //// List<MarryUser> spouseInfoList = Arrays.asList((MarryUser) data.get("spouseInfo")); |
| | | //// ExcelUtil<MarryUser> util2 = new ExcelUtil<>(MarryUser.class); |
| | | //// util2.exportEasyExcel(response,spouseInfoList,"配偶信息"); |
| | | //// |
| | | //// List<ZMarry> marryInfoList = Arrays.asList((ZMarry) data.get("marryInfo")); |
| | | //// ExcelUtil<ZMarry> util3 = new ExcelUtil<>(ZMarry.class); |
| | | //// util3.exportEasyExcel(response,marryInfoList,"婚姻信息"); |
| | | //// |
| | | //// List<MarryUser> oldSpouseInfoList = (List<MarryUser>) data.get("oldSpouseInfo"); |
| | | //// ExcelUtil<MarryUser> util4 = new ExcelUtil<>(MarryUser.class); |
| | | //// util4.exportEasyExcel(response,oldSpouseInfoList,"前任信息"); |
| | | //// } |
| | | // |
| | | // |
| | | // /** |
| | | // * 导出 |
| | | // */ |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response) |
| | | // { |
| | | // public void export(HttpServletResponse response){ |
| | | // AjaxResult marryStatus = getMarryStatus(); |
| | | // HashMap data = (HashMap) marryStatus.get("data"); |
| | | // |
| | | // List<MarryUser> myInfoList = Arrays.asList((MarryUser) data.get("myInfo")); |
| | | // ExcelUtil<MarryUser> util1 = new ExcelUtil<>(MarryUser.class); |
| | | // util1.exportEasyExcel(response,myInfoList,"个人信息"); |
| | | // |
| | | // List<MarryUser> spouseInfoList = Arrays.asList((MarryUser) data.get("spouseInfo")); |
| | | // ExcelUtil<MarryUser> util2 = new ExcelUtil<>(MarryUser.class); |
| | | // util2.exportEasyExcel(response,spouseInfoList,"配偶信息"); |
| | | // |
| | | // List<ZMarry> marryInfoList = Arrays.asList((ZMarry) data.get("marryInfo")); |
| | | // ExcelUtil<ZMarry> util3 = new ExcelUtil<>(ZMarry.class); |
| | | // util3.exportEasyExcel(response,marryInfoList,"婚姻信息"); |
| | | // |
| | | // List<MarryUser> oldSpouseInfoList = (List<MarryUser>) data.get("oldSpouseInfo"); |
| | | // ExcelUtil<MarryUser> util4 = new ExcelUtil<>(MarryUser.class); |
| | | // util4.exportEasyExcel(response,oldSpouseInfoList,"前任信息"); |
| | | // MarryInfoDto data = (MarryInfoDto) marryStatus.get("data"); |
| | | // List<MarryInfoDto> list = Arrays.asList(data); |
| | | // ExcelUtil<MarryInfoDto> util1 = new ExcelUtil<>(MarryInfoDto.class); |
| | | // util1.exportExcel(response,list,"婚姻信息"); |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * 导出 |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response){ |
| | | AjaxResult marryStatus = getMarryStatus(); |
| | | MarryInfoDto data = (MarryInfoDto) marryStatus.get("data"); |
| | | List<MarryInfoDto> list = Arrays.asList(data); |
| | | ExcelUtil<MarryInfoDto> util1 = new ExcelUtil<>(MarryInfoDto.class); |
| | | util1.exportExcel(response,list,"婚姻信息"); |
| | | } |
| | | |
| | | |
| | | } |