| | |
| | | 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 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; |
| | | |
| | | /** |
| | |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:property:remove')") |
| | | @Log(title = "婚姻状况记录", businessType = BusinessType.DELETE) |
| | | @DeleteMapping() |
| | | public AjaxResult remove(String id) |
| | | @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,"婚姻信息"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |