1.批量修改已分配员工数据功能

This commit is contained in:
2025-07-07 14:29:07 +08:00
parent 693d7c704c
commit 21466e5f86
3 changed files with 22 additions and 2 deletions

View File

@@ -114,9 +114,18 @@ public class EmployeeBigBrotherController {
@GetMapping("/self_page")
@Operation(summary = "获得大哥数据员工业务分页")
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:query')")
public CommonResult<PageResult<EmployeeBigBrotherRespVO>> getEmployeeBigBrotherPagewithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO) {
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:selfquery')")
public CommonResult<PageResult<EmployeeBigBrotherRespVO>> getEmployeeBigBrotherPageWithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO) {
PageResult<EmployeeBigBrotherDO> pageResult = employeeBigBrotherService.getEmployeeBigBrotherPageWithSelf(pageReqVO);
return success(BeanUtils.toBean(pageResult, EmployeeBigBrotherRespVO.class));
}
@PutMapping("/batch_update")
@Operation(summary = "批量更新大哥数据员工业务")
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:batchupdate')")
public CommonResult<Boolean> batchupdateEmployeeBigBrother(@Valid @RequestBody List<EmployeeBigBrotherSaveReqVO> updateReqVO) {
employeeBigBrotherService.batchUpdateEmployeeBigBrother(updateReqVO);
return success(true);
}
}

View File

@@ -63,4 +63,6 @@ public interface EmployeeBigBrotherService {
Boolean allocationEmployeeBigBrother(@Valid List<EmployeeBigBrotherSaveReqVO> createReqVO);
PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPageWithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO);
void batchUpdateEmployeeBigBrother(@Valid List<EmployeeBigBrotherSaveReqVO> updateReqVO);
}

View File

@@ -124,4 +124,13 @@ public class EmployeeBigBrotherServiceImpl implements EmployeeBigBrotherService
}
}
@Override
public void batchUpdateEmployeeBigBrother(List<EmployeeBigBrotherSaveReqVO> updateReqVO) {
ArrayList<EmployeeBigBrotherDO> employeeBigBrotherDOS = new ArrayList<>();
for (EmployeeBigBrotherSaveReqVO employeeBigBrotherSaveReqVO : updateReqVO) {
employeeBigBrotherDOS.add(BeanUtils.toBean(employeeBigBrotherSaveReqVO, EmployeeBigBrotherDO.class));
}
employeeBigBrotherMapper.updateBatch(employeeBigBrotherDOS);
}
}