666
whywhyo
2023-07-16 2039385fa4b4ac688907134ee7c7025fb2aea1fb
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java
@@ -42,7 +42,7 @@
    public AjaxResult  listAll(ZfProperty zfProperty){
        Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
        return zfPropertyService.selectPropertyList(zfProperty, pageNum, pageSize);
        return zfPropertyService.selectDataList(zfProperty, pageNum, pageSize);
    }
    /**
@@ -55,30 +55,29 @@
        util.exportExcel(response,list,"家庭资产导入模板");
    }
    /**
     * 导出家庭资产记录列表
     */
//    @PreAuthorize("@ss.hasPermi('system:property:export')")
    @Log(title = "家庭资产记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response,ZfProperty zfProperty)
    {
        List<ZfProperty> list = zfPropertyService.selectByCondition(zfProperty);
        log.info("导出记录为:{}",list);
        ExcelUtil<ZfProperty> util = new ExcelUtil<>(ZfProperty.class);
        util.exportExcel(response, list, "家庭资产记录数据");
    }
//    /**
//     * 导出家庭资产记录列表
//     */
////    @PreAuthorize("@ss.hasPermi('system:property:export')")
//    @Log(title = "家庭资产记录", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response,ZfProperty zfProperty)
//    {
//        List<ZfProperty> list = zfPropertyService.selectByCondition(zfProperty);
//        log.info("导出记录为:{}",list);
//        ExcelUtil<ZfProperty> util = new ExcelUtil<>(ZfProperty.class);
//        util.exportExcel(response, list, "家庭资产记录数据");
//    }
    /**
     * 导出家庭资产记录列表
     */
    @Log(title = "家庭大事件记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export1/{ids}")
    @PostMapping("/export/{ids}")
    public void export1(HttpServletResponse response, @PathVariable Long[] ids) {
        List<ZfProperty> list = zfPropertyService.selectByIds(ids);
        log.info("导出记录为:{}", list);
        ExcelUtil<ZfProperty> util = new ExcelUtil<ZfProperty>(ZfProperty.class);
        util.exportExcel(response, list, "家庭大事件记录数据");
        util.exportExcel(response, list, "家庭资产记录数据");
    }
//
@@ -110,7 +109,7 @@
    @PostMapping
    public AjaxResult add(@RequestBody ZfProperty zfProperty)
    {
        return zfPropertyService.addData2(zfProperty);
        return zfPropertyService.addData(zfProperty);
    }
    /**
@@ -121,7 +120,7 @@
    @PutMapping
    public AjaxResult edit(@RequestBody ZfProperty zfProperty)
    {
        return toAjax(zfPropertyService.updateById(zfProperty));
        return zfPropertyService.updateData(zfProperty);
    }
//
    /**
@@ -132,6 +131,6 @@
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(zfPropertyService.removeByIds(Arrays.asList(ids)));
        return zfPropertyService.deleteData(ids);
    }
}