Merge remote-tracking branch 'origin/master'

master
wanglei 2 years ago
commit 8cc5630eac

@ -3,6 +3,8 @@ package com.da.dangan.controller;
import com.da.common.annotation.Log;
import com.da.common.core.controller.BaseController;
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.utils.poi.ExcelUtil;
@ -38,6 +40,13 @@ public class DaBirthDjController extends BaseController
@GetMapping("/list")
public TableDataInfo list(DaBirthDj daBirthDj)
{
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daBirthDj.setUserId(getUserId());
}
startPage();
List<DaBirthDj> list = daBirthDjService.selectDaBirthDjList(daBirthDj);
return getDataTable(list);

@ -54,8 +54,10 @@ public class DaCatalogController extends BaseController
@GetMapping(value = "/userMenuTreeselect/{userId}")
public AjaxResult roleMenuTreeselect(@PathVariable("userId") Long userId)
{
//根据用户查询对应列表
List<DaCatalog> catalogs = daCatalogService.selectDaCatalogList(new DaCatalog(), getLoginUser());
//查询所有目录列表
List<DaCatalog> catalogs = daCatalogService.selectAllDaCatalogList(new DaCatalog());
//查询当前用户权限内的目录
// List<DaCatalog> catalogs = daCatalogService.selectDaCatalogList(new DaCatalog(), getLoginUser());
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", daCatalogService.selectCatalogIdsByUserId(userId));
ajax.put("catalogs", daCatalogService.buildCatalogTreeSelect(catalogs));

@ -3,6 +3,8 @@ package com.da.dangan.controller;
import com.da.common.annotation.Log;
import com.da.common.core.controller.BaseController;
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.utils.poi.ExcelUtil;
@ -19,25 +21,31 @@ import java.util.List;
/**
* Controller
*
*
* @author hs
* @date 2024-05-08
*/
@RestController
@RequestMapping("/dangan/czrkdj")
public class DaCzrkdjController extends BaseController
{
public class DaCzrkdjController extends BaseController {
@Autowired
private IDaCzrkdjService daCzrkdjService;
@Autowired
private IDaPicturesRecardService daPicturesRecardService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:list')")
@GetMapping("/list")
public TableDataInfo list(DaCzrkdj daCzrkdj)
{
public TableDataInfo list(DaCzrkdj daCzrkdj) {
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daCzrkdj.setUserId(getUserId());
}
startPage();
List<DaCzrkdj> list = daCzrkdjService.selectDaCzrkdjList1(daCzrkdj);
return getDataTable(list);
@ -49,8 +57,7 @@ public class DaCzrkdjController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:export')")
@Log(title = "常住人口登记", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DaCzrkdj daCzrkdj)
{
public void export(HttpServletResponse response, DaCzrkdj daCzrkdj) {
List<DaCzrkdj> list = daCzrkdjService.selectDaCzrkdjList(daCzrkdj);
ExcelUtil<DaCzrkdj> util = new ExcelUtil<DaCzrkdj>(DaCzrkdj.class);
util.exportExcel(response, list, "常住人口登记数据");
@ -61,12 +68,11 @@ public class DaCzrkdjController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(daCzrkdjService.selectDaCzrkdjById(id));
}
/* *//**
/* *//**
*
*//*
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:add')")
@ -83,11 +89,10 @@ public class DaCzrkdjController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:add')")
@Log(title = "常住人口登记", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DaCzrkdj daCzrkdj)
{
public AjaxResult add(@RequestBody DaCzrkdj daCzrkdj) {
String[] picIds = daCzrkdj.getPicIds().split(",");
if(picIds!=null&&picIds.length>0){
for(String picid:picIds){
if (picIds != null && picIds.length > 0) {
for (String picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid));
picRecard.setRecognize("1");
@ -103,8 +108,7 @@ public class DaCzrkdjController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:edit')")
@Log(title = "常住人口登记", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DaCzrkdj daCzrkdj)
{
public AjaxResult edit(@RequestBody DaCzrkdj daCzrkdj) {
return toAjax(daCzrkdjService.updateDaCzrkdj(daCzrkdj));
}
@ -113,9 +117,8 @@ public class DaCzrkdjController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:czrkdj:remove')")
@Log(title = "常住人口登记", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(daCzrkdjService.deleteDaCzrkdjByIds(ids));
}
}

@ -4,6 +4,8 @@ import cn.hutool.core.util.URLUtil;
import com.da.common.annotation.Log;
import com.da.common.core.controller.BaseController;
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.utils.poi.ExcelUtil;
@ -22,7 +24,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.List;
import java.util.concurrent.*;
import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@ -48,6 +50,13 @@ public class DaPicturesRecardController extends BaseController
@GetMapping("/list")
public TableDataInfo list(DaPicturesRecard daPicturesRecard)
{
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daPicturesRecard.setUserId(getUserId());
}
startPage();
List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardList(daPicturesRecard);
return getDataTable(list);

@ -1,36 +1,31 @@
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.core.controller.BaseController;
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.utils.poi.ExcelUtil;
import com.da.dangan.domain.DaQyz;
import com.da.dangan.service.IDaQyzService;
import com.da.common.utils.poi.ExcelUtil;
import com.da.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
*
* @author hs
* @date 2024-06-14
*/
@RestController
@RequestMapping("/dangan/qyz")
public class DaQyzController extends BaseController
{
public class DaQyzController extends BaseController {
@Autowired
private IDaQyzService daQyzService;
@ -39,8 +34,14 @@ public class DaQyzController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:qyz:list')")
@GetMapping("/list")
public TableDataInfo list(DaQyz daQyz)
{
public TableDataInfo list(DaQyz daQyz) {
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daQyz.setUserId(getUserId());
}
startPage();
List<DaQyz> list = daQyzService.selectDaQyzList(daQyz);
return getDataTable(list);
@ -52,8 +53,7 @@ public class DaQyzController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:qyz:export')")
@Log(title = "迁移证", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DaQyz daQyz)
{
public void export(HttpServletResponse response, DaQyz daQyz) {
List<DaQyz> list = daQyzService.selectDaQyzList(daQyz);
ExcelUtil<DaQyz> util = new ExcelUtil<DaQyz>(DaQyz.class);
util.exportExcel(response, list, "迁移证数据");
@ -64,8 +64,7 @@ public class DaQyzController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:qyz:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(daQyzService.selectDaQyzById(id));
}
@ -75,8 +74,7 @@ public class DaQyzController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:qyz:add')")
@Log(title = "迁移证", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DaQyz daQyz)
{
public AjaxResult add(@RequestBody DaQyz daQyz) {
return toAjax(daQyzService.insertDaQyz(daQyz));
}
@ -86,8 +84,7 @@ public class DaQyzController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:qyz:edit')")
@Log(title = "迁移证", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DaQyz daQyz)
{
public AjaxResult edit(@RequestBody DaQyz daQyz) {
return toAjax(daQyzService.updateDaQyz(daQyz));
}
@ -96,9 +93,8 @@ public class DaQyzController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:qyz:remove')")
@Log(title = "迁移证", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(daQyzService.deleteDaQyzByIds(ids));
}
}

@ -3,6 +3,8 @@ package com.da.dangan.controller;
import com.da.common.annotation.Log;
import com.da.common.core.controller.BaseController;
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.utils.poi.ExcelUtil;
@ -35,6 +37,13 @@ public class DaTaskController extends BaseController
@GetMapping("/list")
public TableDataInfo list(DaTask daTask)
{
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daTask.setUserId(getUserId());
}
startPage();
List<DaTask> list = daTaskService.selectDaTaskList(daTask);
return getDataTable(list);

@ -79,13 +79,13 @@ public class DaUserCatalogController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('dangan:userMuRelation:edit')")
/* @PreAuthorize("@ss.hasPermi('dangan:userMuRelation:edit')")
@Log(title = "用户目录关联", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DaUserCatalog daUserCatalog)
{
return toAjax(daUserCatalogService.updateDaUserCatalog(daUserCatalog));
}
}*/
/**
*
@ -101,7 +101,7 @@ public class DaUserCatalogController extends BaseController
{
try {
//根据userId删除数据
int result = daUserCatalogService.deleteDaUserCatalogByUserId(daUserCatalog.getUserId());
daUserCatalogService.deleteDaUserCatalogByUserId(daUserCatalog.getUserId());
//根据userId添加数据
for(Long muId: muIds){
daUserCatalog.setMuId(muId);

@ -3,6 +3,8 @@ package com.da.dangan.controller;
import com.da.common.annotation.Log;
import com.da.common.core.controller.BaseController;
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.utils.poi.ExcelUtil;
@ -17,14 +19,13 @@ import java.util.List;
/**
* Controller
*
*
* @author hs
* @date 2024-06-14
*/
@RestController
@RequestMapping("/dangan/ytzm")
public class DaYtzmController extends BaseController
{
public class DaYtzmController extends BaseController {
@Autowired
private IDaYtzmService daYtzmService;
@ -33,8 +34,14 @@ public class DaYtzmController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:ytzm:list')")
@GetMapping("/list")
public TableDataInfo list(DaYtzm daYtzm)
{
public TableDataInfo list(DaYtzm daYtzm) {
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daYtzm.setUserId(getUserId());
}
startPage();
List<DaYtzm> list = daYtzmService.selectDaYtzmList(daYtzm);
return getDataTable(list);
@ -46,8 +53,7 @@ public class DaYtzmController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:ytzm:export')")
@Log(title = "一胎证明", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DaYtzm daYtzm)
{
public void export(HttpServletResponse response, DaYtzm daYtzm) {
List<DaYtzm> list = daYtzmService.selectDaYtzmList(daYtzm);
ExcelUtil<DaYtzm> util = new ExcelUtil<DaYtzm>(DaYtzm.class);
util.exportExcel(response, list, "一胎证明数据");
@ -58,8 +64,7 @@ public class DaYtzmController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:ytzm:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(daYtzmService.selectDaYtzmById(id));
}
@ -69,8 +74,7 @@ public class DaYtzmController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:ytzm:add')")
@Log(title = "一胎证明", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DaYtzm daYtzm)
{
public AjaxResult add(@RequestBody DaYtzm daYtzm) {
return toAjax(daYtzmService.insertDaYtzm(daYtzm));
}
@ -80,8 +84,7 @@ public class DaYtzmController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:ytzm:edit')")
@Log(title = "一胎证明", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DaYtzm daYtzm)
{
public AjaxResult edit(@RequestBody DaYtzm daYtzm) {
return toAjax(daYtzmService.updateDaYtzm(daYtzm));
}
@ -90,9 +93,8 @@ public class DaYtzmController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:ytzm:remove')")
@Log(title = "一胎证明", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(daYtzmService.deleteDaYtzmByIds(ids));
}
}

@ -1,36 +1,31 @@
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.core.controller.BaseController;
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.utils.poi.ExcelUtil;
import com.da.dangan.domain.DaZfnyhkcg;
import com.da.dangan.service.IDaZfnyhkcgService;
import com.da.common.utils.poi.ExcelUtil;
import com.da.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
*
* @author hs
* @date 2024-06-14
*/
@RestController
@RequestMapping("/dangan/zfnyhkcg")
public class DaZfnyhkcgController extends BaseController
{
public class DaZfnyhkcgController extends BaseController {
@Autowired
private IDaZfnyhkcgService daZfnyhkcgService;
@ -39,8 +34,14 @@ public class DaZfnyhkcgController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg: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();
List<DaZfnyhkcg> list = daZfnyhkcgService.selectDaZfnyhkcgList(daZfnyhkcg);
return getDataTable(list);
@ -52,8 +53,7 @@ public class DaZfnyhkcgController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:export')")
@Log(title = "转非农业人口批复存根", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DaZfnyhkcg daZfnyhkcg)
{
public void export(HttpServletResponse response, DaZfnyhkcg daZfnyhkcg) {
List<DaZfnyhkcg> list = daZfnyhkcgService.selectDaZfnyhkcgList(daZfnyhkcg);
ExcelUtil<DaZfnyhkcg> util = new ExcelUtil<DaZfnyhkcg>(DaZfnyhkcg.class);
util.exportExcel(response, list, "转非农业人口批复存根数据");
@ -64,8 +64,7 @@ public class DaZfnyhkcgController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(daZfnyhkcgService.selectDaZfnyhkcgById(id));
}
@ -75,8 +74,7 @@ public class DaZfnyhkcgController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:add')")
@Log(title = "转非农业人口批复存根", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DaZfnyhkcg daZfnyhkcg)
{
public AjaxResult add(@RequestBody DaZfnyhkcg daZfnyhkcg) {
return toAjax(daZfnyhkcgService.insertDaZfnyhkcg(daZfnyhkcg));
}
@ -86,8 +84,7 @@ public class DaZfnyhkcgController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:edit')")
@Log(title = "转非农业人口批复存根", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DaZfnyhkcg daZfnyhkcg)
{
public AjaxResult edit(@RequestBody DaZfnyhkcg daZfnyhkcg) {
return toAjax(daZfnyhkcgService.updateDaZfnyhkcg(daZfnyhkcg));
}
@ -96,9 +93,8 @@ public class DaZfnyhkcgController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:zfnyhkcg:remove')")
@Log(title = "转非农业人口批复存根", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(daZfnyhkcgService.deleteDaZfnyhkcgByIds(ids));
}
}

@ -1,36 +1,31 @@
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.core.controller.BaseController;
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.utils.poi.ExcelUtil;
import com.da.dangan.domain.DaZqz;
import com.da.dangan.service.IDaZqzService;
import com.da.common.utils.poi.ExcelUtil;
import com.da.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
*
* @author hs
* @date 2024-06-14
*/
@RestController
@RequestMapping("/dangan/zqz")
public class DaZqzController extends BaseController
{
public class DaZqzController extends BaseController {
@Autowired
private IDaZqzService daZqzService;
@ -39,8 +34,14 @@ public class DaZqzController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:zqz:list')")
@GetMapping("/list")
public TableDataInfo list(DaZqz daZqz)
{
public TableDataInfo list(DaZqz daZqz) {
// 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{
daZqz.setUserId(getUserId());
}
startPage();
List<DaZqz> list = daZqzService.selectDaZqzList(daZqz);
return getDataTable(list);
@ -52,8 +53,7 @@ public class DaZqzController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:zqz:export')")
@Log(title = "准迁证", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DaZqz daZqz)
{
public void export(HttpServletResponse response, DaZqz daZqz) {
List<DaZqz> list = daZqzService.selectDaZqzList(daZqz);
ExcelUtil<DaZqz> util = new ExcelUtil<DaZqz>(DaZqz.class);
util.exportExcel(response, list, "准迁证数据");
@ -64,8 +64,7 @@ public class DaZqzController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:zqz:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(daZqzService.selectDaZqzById(id));
}
@ -75,8 +74,7 @@ public class DaZqzController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:zqz:add')")
@Log(title = "准迁证", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DaZqz daZqz)
{
public AjaxResult add(@RequestBody DaZqz daZqz) {
return toAjax(daZqzService.insertDaZqz(daZqz));
}
@ -86,8 +84,7 @@ public class DaZqzController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:zqz:edit')")
@Log(title = "准迁证", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DaZqz daZqz)
{
public AjaxResult edit(@RequestBody DaZqz daZqz) {
return toAjax(daZqzService.updateDaZqz(daZqz));
}
@ -96,9 +93,8 @@ public class DaZqzController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dangan:zqz:remove')")
@Log(title = "准迁证", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(daZqzService.deleteDaZqzByIds(ids));
}
}

@ -219,6 +219,19 @@ public class DaBirthDj extends BaseEntity {
@Excel(name = "审核原由")
private String auditReason;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id) {
this.id = id;
}

@ -300,6 +300,18 @@ public class DaCzrkdj extends BaseEntity {
@Excel(name = "审核原由")
private String auditReason;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id) {
this.id = id;
}

@ -58,6 +58,19 @@ public class DaPicturesRecard extends BaseEntity
@Excel(name = "是否纠错(字典0否1是)")
private String errorCorrect;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getErrorCorrect() {
return errorCorrect;
}

@ -219,6 +219,19 @@ public class DaQyz extends BaseEntity {
@Excel(name = "审核原由")
private String auditReason;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id) {
this.id = id;
}

@ -11,156 +11,178 @@ import com.da.common.core.domain.BaseEntity;
* @author hs
* @date 2024-06-20
*/
public class DaTask extends BaseEntity
{
public class DaTask extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 任务id */
/**
* id
*/
private Long id;
/** 目录id */
/**
* id
*/
@Excel(name = "目录id")
private Long muId;
/** 业务类型 */
/**
*
*/
@Excel(name = "业务类型")
private String ywType;
/** 任务图片ids */
/**
* ids
*/
@Excel(name = "任务图片ids")
private String picIds;
/** 任务数量 */
/**
*
*/
@Excel(name = "任务数量")
private Long num;
/** 档案目录路径 */
/**
*
*/
@Excel(name = "档案目录路径")
private String muPath;
/** 任务状态(字典) */
/**
* ()
*/
@Excel(name = "任务状态(字典)")
private String status;
/** 成功 */
/**
*
*/
@Excel(name = "成功")
private Long successNum;
/** 任务图片ids */
/**
* ids
*/
@Excel(name = "任务图片ids")
private String successIds;
/** 失败 */
/**
*
*/
@Excel(name = "失败")
private Long failNum;
/** 任务图片ids */
/**
* ids
*/
@Excel(name = "任务图片ids")
private String failIds;
public void setId(Long id)
{
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id) {
this.id = id;
}
public Long getId()
{
public Long getId() {
return id;
}
public void setMuId(Long muId)
{
public void setMuId(Long muId) {
this.muId = muId;
}
public Long getMuId()
{
public Long getMuId() {
return muId;
}
public void setYwType(String ywType)
{
public void setYwType(String ywType) {
this.ywType = ywType;
}
public String getYwType()
{
public String getYwType() {
return ywType;
}
public void setPicIds(String picIds)
{
public void setPicIds(String picIds) {
this.picIds = picIds;
}
public String getPicIds()
{
public String getPicIds() {
return picIds;
}
public void setNum(Long num)
{
public void setNum(Long num) {
this.num = num;
}
public Long getNum()
{
public Long getNum() {
return num;
}
public void setMuPath(String muPath)
{
public void setMuPath(String muPath) {
this.muPath = muPath;
}
public String getMuPath()
{
public String getMuPath() {
return muPath;
}
public void setStatus(String status)
{
public void setStatus(String status) {
this.status = status;
}
public String getStatus()
{
public String getStatus() {
return status;
}
public void setSuccessNum(Long successNum)
{
public void setSuccessNum(Long successNum) {
this.successNum = successNum;
}
public Long getSuccessNum()
{
public Long getSuccessNum() {
return successNum;
}
public void setSuccessIds(String successIds)
{
public void setSuccessIds(String successIds) {
this.successIds = successIds;
}
public String getSuccessIds()
{
public String getSuccessIds() {
return successIds;
}
public void setFailNum(Long failNum)
{
public void setFailNum(Long failNum) {
this.failNum = failNum;
}
public Long getFailNum()
{
public Long getFailNum() {
return failNum;
}
public void setFailIds(String failIds)
{
public void setFailIds(String failIds) {
this.failIds = failIds;
}
public String getFailIds()
{
public String getFailIds() {
return failIds;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("muId", getMuId())
.append("ywType", getYwType())

@ -195,6 +195,19 @@ public class DaYtzm extends BaseEntity {
@Excel(name = "审核原由")
private String auditReason;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id) {
this.id = id;
}

@ -231,6 +231,19 @@ public class DaZfnyhkcg extends BaseEntity {
@Excel(name = "审核原由")
private String auditReason;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id) {
this.id = id;
}

@ -198,6 +198,19 @@ public class DaZqz extends BaseEntity
@Excel(name = "审核原由")
private String auditReason;
/**
* id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public void setId(Long id)
{
this.id = id;

@ -101,8 +101,8 @@ public class DaCatalogServiceImpl implements IDaCatalogService
@Override
public List<DaCatalog> selectDaCatalogList(DaCatalog daCatalog, LoginUser loginUser)
{
List<DaCatalog> catalogList = null;
// 超管及管理员显示所有目录信息
List<DaCatalog> catalogList;
// 超管及角色为管理员显示所有目录信息
if (SysUser.isAdmin(loginUser.getUserId())||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin")))
{

@ -49,10 +49,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDaBirthDjList" parameterType="DaBirthDj" resultMap="DaBirthDjResult">
<include refid="selectDaBirthDjVo"/>
<where>
select distinct b.* from da_birth_dj b
left join da_user_catalog uc on b.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and b.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="birthNum != null and birthNum != ''"> and birth_num = #{birthNum}</if>
<if test="name != null and name != ''">

@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by c.pid, c.order_num
</select>
<!--用户所包含权限的id的集合-->
<!--用户所包含权限的id的集合-->
<select id="selectCatalogIdsByUserId" resultType="Long">
select c.id
from da_catalog c

@ -63,10 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDaCzrkdjList" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult">
<include refid="selectDaCzrkdjVo"/>
select distinct c.* from da_czrkdj c
left join da_user_catalog uc on c.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="relation != null and relation != ''"> and relation = #{relation}</if>
<if test="name != null and name != ''">
@ -121,10 +123,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDaCzrkdjList1" parameterType="DaCzrkdj" resultMap="DaCzrkdjResult">
<include refid="selectDaCzrkdjVo"/>
select distinct c.* from da_czrkdj c
left join da_user_catalog uc on c.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%')

@ -28,13 +28,15 @@
</sql>
<select id="selectDaPicturesRecardList" parameterType="DaPicturesRecard" resultMap="DaPicturesRecardResult">
<include refid="selectDaPicturesRecardVo"/>
select p.* from da_pictures_recard p
left join da_user_catalog uc on p.mu_id = uc.mu_id
<where>
<if test="userId != null"> and uc.user_id = #{userId}</if>
<if test="picName != null and picName != ''"> and pic_name like concat('%', #{picName}, '%')</if>
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl}</if>
<if test="wlsjId != null "> and wlsj_id = #{wlsjId}</if>
<if test="wlsjPath != null and wlsjPath != ''"> and wlsj_path = #{wlsjPath}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and p.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="daJlId != null "> and da_jl_id = #{daJlId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>

@ -50,10 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult">
<include refid="selectDaQyzVo"/>
<where>
select distinct q.* from da_qyz q
left join da_user_catalog uc on q.mu_id = uc.mu_id
<where>
<if test="userId != null"> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and q.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="fwUnit != null and fwUnit != ''"> and fw_unit = #{fwUnit}</if>
<if test="wjXh != null and wjXh != ''"> and wj_xh = #{wjXh}</if>

@ -28,9 +28,11 @@
</sql>
<select id="selectDaTaskList" parameterType="DaTask" resultMap="DaTaskResult">
<include refid="selectDaTaskVo"/>
select distinct t.* from da_task t
left join da_user_catalog uc on t.mu_id = uc.mu_id
<where>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="userId != null"> and uc.user_id = #{userId}</if>
<if test="muId != null "> and t.mu_id = #{muId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
<if test="num != null "> and num = #{num}</if>

@ -46,10 +46,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDaYtzmList" parameterType="DaYtzm" resultMap="DaYtzmResult">
<include refid="selectDaYtzmVo"/>
<where>
select distinct y.* from da_ytzm y
left join da_user_catalog uc on y.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and y.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="xh != null and xh != ''"> and xh = #{xh}</if>

@ -52,10 +52,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDaZfnyhkcgList" parameterType="DaZfnyhkcg" resultMap="DaZfnyhkcgResult">
<include refid="selectDaZfnyhkcgVo"/>
<where>
select distinct z.* from da_zfnyhkcg z
left join da_user_catalog uc on z.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and z.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="num != null and num != ''"> and num = #{num}</if>
<if test="name != null and name != ''">

@ -61,10 +61,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDaZqzList" parameterType="DaZqz" resultMap="DaZqzResult">
<include refid="selectDaZqzVo"/>
<where>
select distinct z.* from da_zqz z
left join da_user_catalog uc on z.mu_id = uc.mu_id
<where>
<if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if>
<if test="muId != null "> and z.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="num != null and num != ''"> and num = #{num}</if>
<if test="name != null and name != ''">

Loading…
Cancel
Save