| | |
| | | package com.ruoyi.web.controller.zhang; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | 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.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 org.springframework.web.bind.annotation.RestController; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/zMarry") |
| | | public class ZMarryController { |
| | | @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() |
| | | public AjaxResult remove(String id) |
| | | { |
| | | return zMarryService.deleteOld(id); |
| | | } |
| | | |
| | | |
| | | } |
| | | |