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,"婚姻信息");
|
// }
|
|
|
}
|