|
|
|
@ -1,25 +1,21 @@
|
|
|
|
package com.da.dangan.controller;
|
|
|
|
package com.da.dangan.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import com.da.common.annotation.Log;
|
|
|
|
import com.da.common.annotation.Log;
|
|
|
|
import com.da.common.core.controller.BaseController;
|
|
|
|
import com.da.common.core.controller.BaseController;
|
|
|
|
import com.da.common.core.domain.AjaxResult;
|
|
|
|
import com.da.common.core.domain.AjaxResult;
|
|
|
|
|
|
|
|
import com.da.common.core.domain.entity.SysUser;
|
|
|
|
|
|
|
|
import com.da.common.core.domain.model.LoginUser;
|
|
|
|
|
|
|
|
import com.da.common.core.page.TableDataInfo;
|
|
|
|
import com.da.common.enums.BusinessType;
|
|
|
|
import com.da.common.enums.BusinessType;
|
|
|
|
|
|
|
|
import com.da.common.utils.poi.ExcelUtil;
|
|
|
|
import com.da.dangan.domain.DaZfnyhkcg;
|
|
|
|
import com.da.dangan.domain.DaZfnyhkcg;
|
|
|
|
import com.da.dangan.service.IDaZfnyhkcgService;
|
|
|
|
import com.da.dangan.service.IDaZfnyhkcgService;
|
|
|
|
import com.da.common.utils.poi.ExcelUtil;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import com.da.common.core.page.TableDataInfo;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 转非农业人口批复存根Controller
|
|
|
|
* 转非农业人口批复存根Controller
|
|
|
|
@ -29,8 +25,7 @@ import com.da.common.core.page.TableDataInfo;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/dangan/zfnyhkcg")
|
|
|
|
@RequestMapping("/dangan/zfnyhkcg")
|
|
|
|
public class DaZfnyhkcgController extends BaseController
|
|
|
|
public class DaZfnyhkcgController extends BaseController {
|
|
|
|
{
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IDaZfnyhkcgService daZfnyhkcgService;
|
|
|
|
private IDaZfnyhkcgService daZfnyhkcgService;
|
|
|
|
|
|
|
|
|
|
|
|
@ -39,8 +34,14 @@ public class DaZfnyhkcgController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:list')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:list')")
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(DaZfnyhkcg daZfnyhkcg)
|
|
|
|
public TableDataInfo list(DaZfnyhkcg daZfnyhkcg) {
|
|
|
|
{
|
|
|
|
// 超管及角色为管理员显示所有目录信息
|
|
|
|
|
|
|
|
LoginUser loginUser = getLoginUser();
|
|
|
|
|
|
|
|
if (SysUser.isAdmin(getUserId()) ||
|
|
|
|
|
|
|
|
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
daZfnyhkcg.setUserId(getUserId());
|
|
|
|
|
|
|
|
}
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
List<DaZfnyhkcg> list = daZfnyhkcgService.selectDaZfnyhkcgList(daZfnyhkcg);
|
|
|
|
List<DaZfnyhkcg> list = daZfnyhkcgService.selectDaZfnyhkcgList(daZfnyhkcg);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|
@ -52,8 +53,7 @@ public class DaZfnyhkcgController extends BaseController
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:export')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:export')")
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.EXPORT)
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, DaZfnyhkcg daZfnyhkcg)
|
|
|
|
public void export(HttpServletResponse response, DaZfnyhkcg daZfnyhkcg) {
|
|
|
|
{
|
|
|
|
|
|
|
|
List<DaZfnyhkcg> list = daZfnyhkcgService.selectDaZfnyhkcgList(daZfnyhkcg);
|
|
|
|
List<DaZfnyhkcg> list = daZfnyhkcgService.selectDaZfnyhkcgList(daZfnyhkcg);
|
|
|
|
ExcelUtil<DaZfnyhkcg> util = new ExcelUtil<DaZfnyhkcg>(DaZfnyhkcg.class);
|
|
|
|
ExcelUtil<DaZfnyhkcg> util = new ExcelUtil<DaZfnyhkcg>(DaZfnyhkcg.class);
|
|
|
|
util.exportExcel(response, list, "转非农业人口批复存根数据");
|
|
|
|
util.exportExcel(response, list, "转非农业人口批复存根数据");
|
|
|
|
@ -64,8 +64,7 @@ public class DaZfnyhkcgController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:query')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:query')")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return success(daZfnyhkcgService.selectDaZfnyhkcgById(id));
|
|
|
|
return success(daZfnyhkcgService.selectDaZfnyhkcgById(id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -75,8 +74,7 @@ public class DaZfnyhkcgController extends BaseController
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:add')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:add')")
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody DaZfnyhkcg daZfnyhkcg)
|
|
|
|
public AjaxResult add(@RequestBody DaZfnyhkcg daZfnyhkcg) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(daZfnyhkcgService.insertDaZfnyhkcg(daZfnyhkcg));
|
|
|
|
return toAjax(daZfnyhkcgService.insertDaZfnyhkcg(daZfnyhkcg));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -86,8 +84,7 @@ public class DaZfnyhkcgController extends BaseController
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:edit')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:edit')")
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody DaZfnyhkcg daZfnyhkcg)
|
|
|
|
public AjaxResult edit(@RequestBody DaZfnyhkcg daZfnyhkcg) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(daZfnyhkcgService.updateDaZfnyhkcg(daZfnyhkcg));
|
|
|
|
return toAjax(daZfnyhkcgService.updateDaZfnyhkcg(daZfnyhkcg));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -97,8 +94,7 @@ public class DaZfnyhkcgController extends BaseController
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:remove')")
|
|
|
|
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:remove')")
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.DELETE)
|
|
|
|
@Log(title = "转非农业人口批复存根", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(daZfnyhkcgService.deleteDaZfnyhkcgByIds(ids));
|
|
|
|
return toAjax(daZfnyhkcgService.deleteDaZfnyhkcgByIds(ids));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|