1.一些导出加上权限
This commit is contained in:
parent
1fa9c39bfa
commit
29e5b8e475
|
|
@ -16,7 +16,6 @@ import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.common.security.annotation.InnerAuth;
|
import com.bonus.common.security.annotation.InnerAuth;
|
||||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||||
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
|
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
|
||||||
import org.apache.commons.beanutils.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -268,9 +267,6 @@ public class PmWorkerController extends BaseController {
|
||||||
// 处理异常(如磁盘满、权限不足等)
|
// 处理异常(如磁盘满、权限不足等)
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return AjaxResult.error("人脸检测失败:"+e.getMessage());
|
return AjaxResult.error("人脸检测失败:"+e.getMessage());
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return AjaxResult.error("人脸检测失败:"+e.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,6 +278,11 @@ public class PmWorkerController extends BaseController {
|
||||||
@SysLog(title = "人员信息导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->入场管理", details = "人员信息导出")
|
@SysLog(title = "人员信息导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->入场管理", details = "人员信息导出")
|
||||||
public void export(HttpServletResponse response, PmWorkerDto o) {
|
public void export(HttpServletResponse response, PmWorkerDto o) {
|
||||||
try {
|
try {
|
||||||
|
Map<String,String> map = dealWithPermission();
|
||||||
|
if(!map.isEmpty()){
|
||||||
|
// 3. 将 map 中的值复制到 o 对象中
|
||||||
|
org.apache.commons.beanutils.BeanUtils.populate(o, map);
|
||||||
|
}
|
||||||
List<PmWorker> list = service.selectWorkList(o);
|
List<PmWorker> list = service.selectWorkList(o);
|
||||||
ExcelUtil<PmWorker> util = new ExcelUtil<>(PmWorker.class);
|
ExcelUtil<PmWorker> util = new ExcelUtil<>(PmWorker.class);
|
||||||
util.exportExcel(response, list, "人员入场信息导出");
|
util.exportExcel(response, list, "人员入场信息导出");
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,30 @@ public class PmWorkerExitController extends BaseController {
|
||||||
return getDataTableError(new ArrayList<>());
|
return getDataTableError(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工程出场历史列表
|
||||||
|
* @param o
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false), requiresPermissions = @RequiresPermissions("worker:exit:list"))
|
||||||
|
@GetMapping("/workerProList")
|
||||||
|
@SysLog(title = "人员出场管理", businessType = OperaType.QUERY, logType = 0, module = "施工人员->出入场管理->查询工程出场历史列表", details = "查询工程出场历史列表")
|
||||||
|
public TableDataInfo workerProList(PmWorkerDto o) {
|
||||||
|
try {
|
||||||
|
Map<String,String> map = dealWithPermission();
|
||||||
|
if(!map.isEmpty()){
|
||||||
|
// 3. 将 map 中的值复制到 o 对象中
|
||||||
|
org.apache.commons.beanutils.BeanUtils.populate(o, map);
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
List<PmWorker> list = service.selectWorkListByProId(o);
|
||||||
|
return getDataTable(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.toString(), e);
|
||||||
|
}
|
||||||
|
return getDataTableError(new ArrayList<>());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员离场信息导出
|
* 人员离场信息导出
|
||||||
*/
|
*/
|
||||||
|
|
@ -169,6 +193,11 @@ public class PmWorkerExitController extends BaseController {
|
||||||
@SysLog(title = "人员离场信息导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->离场管理", details = "人员离场信息导出")
|
@SysLog(title = "人员离场信息导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->离场管理", details = "人员离场信息导出")
|
||||||
public void export(HttpServletResponse response, PmWorkerDto o) {
|
public void export(HttpServletResponse response, PmWorkerDto o) {
|
||||||
try {
|
try {
|
||||||
|
Map<String,String> map = dealWithPermission();
|
||||||
|
if(!map.isEmpty()){
|
||||||
|
// 3. 将 map 中的值复制到 o 对象中
|
||||||
|
org.apache.commons.beanutils.BeanUtils.populate(o, map);
|
||||||
|
}
|
||||||
List<PmWorker> list = service.selectWorkList(o);
|
List<PmWorker> list = service.selectWorkList(o);
|
||||||
List<PmWorkerExitExport> exportList = list.stream()
|
List<PmWorkerExitExport> exportList = list.stream()
|
||||||
.map(worker -> {
|
.map(worker -> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue