zqy
2025-07-31 bc2f38a3e86de8e19b73a4bead3c81703678ad2f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.ruoyi.web.controller.zhang;
 
 
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.MarryUser;
import com.ruoyi.domain.ZMarry;
import com.ruoyi.domain.dto.MarryInfoDto;
import com.ruoyi.service.ZMarryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ojq
 * @since 2023-03-14
 */
@RestController
@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);
//    }
////
//    /**
//     * 批量删除婚姻状况记录
//     */
////    @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){
//        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,"婚姻信息");
//    }
 
 
}