Merge branch 'dev' of http://47.97.8.94:19527/yj/zn-cloud into frx
This commit is contained in:
commit
a7621a5117
@ -38,14 +38,12 @@ public class CommonlyUsedController {
|
|||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建用户常用应用配置")
|
@Operation(summary = "创建用户常用应用配置")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:create')")
|
|
||||||
public CommonResult<Long> createCommonlyUsed(@Valid @RequestBody CommonlyUsedSaveReqVO createReqVO) {
|
public CommonResult<Long> createCommonlyUsed(@Valid @RequestBody CommonlyUsedSaveReqVO createReqVO) {
|
||||||
return success(commonlyUsedService.createCommonlyUsed(createReqVO));
|
return success(commonlyUsedService.createCommonlyUsed(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/batchCreateOrEditOrDel")
|
@PostMapping("/batchCreateOrEditOrDel")
|
||||||
@Operation(summary = "批量创建编辑删除用户常用应用配置")
|
@Operation(summary = "批量创建编辑删除用户常用应用配置")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:create')")
|
|
||||||
public CommonResult<?> batchCreateOrEditOrDel(@Valid @RequestBody List<CommonlyUsedSaveReqVO> list) {
|
public CommonResult<?> batchCreateOrEditOrDel(@Valid @RequestBody List<CommonlyUsedSaveReqVO> list) {
|
||||||
commonlyUsedService.batchCreateOrEditOrDel(list);
|
commonlyUsedService.batchCreateOrEditOrDel(list);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -53,7 +51,6 @@ public class CommonlyUsedController {
|
|||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新用户常用应用配置")
|
@Operation(summary = "更新用户常用应用配置")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:update')")
|
|
||||||
public CommonResult<Boolean> updateCommonlyUsed(@Valid @RequestBody CommonlyUsedSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateCommonlyUsed(@Valid @RequestBody CommonlyUsedSaveReqVO updateReqVO) {
|
||||||
commonlyUsedService.updateCommonlyUsed(updateReqVO);
|
commonlyUsedService.updateCommonlyUsed(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -61,7 +58,6 @@ public class CommonlyUsedController {
|
|||||||
|
|
||||||
@PutMapping("/batchUpdate")
|
@PutMapping("/batchUpdate")
|
||||||
@Operation(summary = "批量更新用户常用应用配置")
|
@Operation(summary = "批量更新用户常用应用配置")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:update')")
|
|
||||||
public CommonResult<Boolean> batchUpdate(@Valid @RequestBody List<CommonlyUsedSaveReqVO> list) {
|
public CommonResult<Boolean> batchUpdate(@Valid @RequestBody List<CommonlyUsedSaveReqVO> list) {
|
||||||
commonlyUsedService.batchUpdate(list);
|
commonlyUsedService.batchUpdate(list);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -70,7 +66,6 @@ public class CommonlyUsedController {
|
|||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除用户常用应用配置")
|
@Operation(summary = "删除用户常用应用配置")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:delete')")
|
|
||||||
public CommonResult<Boolean> deleteCommonlyUsed(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteCommonlyUsed(@RequestParam("id") Long id) {
|
||||||
commonlyUsedService.deleteCommonlyUsed(id);
|
commonlyUsedService.deleteCommonlyUsed(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -78,7 +73,6 @@ public class CommonlyUsedController {
|
|||||||
|
|
||||||
@DeleteMapping("/batchDelete")
|
@DeleteMapping("/batchDelete")
|
||||||
@Operation(summary = "批量删除用户常用应用配置")
|
@Operation(summary = "批量删除用户常用应用配置")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:delete')")
|
|
||||||
public CommonResult<Boolean> batchDelete(@RequestBody List<Long> ids) {
|
public CommonResult<Boolean> batchDelete(@RequestBody List<Long> ids) {
|
||||||
commonlyUsedService.batchDelete(ids);
|
commonlyUsedService.batchDelete(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -87,7 +81,6 @@ public class CommonlyUsedController {
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得用户常用应用配置")
|
@Operation(summary = "获得用户常用应用配置")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:query')")
|
|
||||||
public CommonResult<CommonlyUsedRespVO> getCommonlyUsed(@RequestParam("id") Long id) {
|
public CommonResult<CommonlyUsedRespVO> getCommonlyUsed(@RequestParam("id") Long id) {
|
||||||
CommonlyUsedDO commonlyUsed = commonlyUsedService.getCommonlyUsed(id);
|
CommonlyUsedDO commonlyUsed = commonlyUsedService.getCommonlyUsed(id);
|
||||||
return success(BeanUtils.toBean(commonlyUsed, CommonlyUsedRespVO.class));
|
return success(BeanUtils.toBean(commonlyUsed, CommonlyUsedRespVO.class));
|
||||||
@ -95,7 +88,6 @@ public class CommonlyUsedController {
|
|||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "获得用户常用应用配置列表")
|
@Operation(summary = "获得用户常用应用配置列表")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:query')")
|
|
||||||
public CommonResult<CommonlyUsedVO> getCommonlyUsedList() {
|
public CommonResult<CommonlyUsedVO> getCommonlyUsedList() {
|
||||||
CommonlyUsedVO vo = commonlyUsedService.getCommonlyUsedList();
|
CommonlyUsedVO vo = commonlyUsedService.getCommonlyUsedList();
|
||||||
return success(vo);
|
return success(vo);
|
||||||
@ -103,7 +95,6 @@ public class CommonlyUsedController {
|
|||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出用户常用应用配置 Excel")
|
@Operation(summary = "导出用户常用应用配置 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('system:commonly-used:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
@OperateLog(type = EXPORT)
|
||||||
public void exportCommonlyUsedExcel(@Valid CommonlyUsedPageReqVO pageReqVO,
|
public void exportCommonlyUsedExcel(@Valid CommonlyUsedPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
@ -1025,14 +1025,23 @@ public class AttendanceServiceImpl implements AttendanceService {
|
|||||||
//先减去补卡次数
|
//先减去补卡次数
|
||||||
this.useReplacementCardNum(userId);
|
this.useReplacementCardNum(userId);
|
||||||
try {
|
try {
|
||||||
int update = attendancePunchRecordMapper.update(new AttendancePunchRecordDO().setStatus(AttendanceOnTheDayDTO.REPLACEMENT_CARD),
|
// -- 找到这条缺卡记录
|
||||||
new LambdaQueryWrapper<AttendancePunchRecordDO>()
|
LambdaQueryWrapper<AttendancePunchRecordDO> lambdaQueryWrapper = new LambdaQueryWrapper<AttendancePunchRecordDO>()
|
||||||
.eq(AttendancePunchRecordDO::getUserId, userId)
|
.eq(AttendancePunchRecordDO::getUserId, userId)
|
||||||
.eq(AttendancePunchRecordDO::getAttendanceGroupShiftItemId, dto.getAttendanceGroupShiftItemId())
|
.eq(AttendancePunchRecordDO::getAttendanceGroupShiftItemId, dto.getAttendanceGroupShiftItemId())
|
||||||
.eq(AttendancePunchRecordDO::getWorkType, dto.getWorkType())
|
.eq(AttendancePunchRecordDO::getWorkType, dto.getWorkType())
|
||||||
.eq(AttendancePunchRecordDO::getActualDayTime, dto.getActualDayTime())
|
.eq(AttendancePunchRecordDO::getActualDayTime, dto.getActualDayTime())
|
||||||
.eq(AttendancePunchRecordDO::getStatus, AttendanceOnTheDayDTO.PUNCH_STATUS_MISS));
|
.eq(AttendancePunchRecordDO::getStatus, AttendanceOnTheDayDTO.PUNCH_STATUS_MISS);
|
||||||
if (update <= 0) {
|
|
||||||
|
List<AttendancePunchRecordDO> list = attendancePunchRecordMapper.selectList(lambdaQueryWrapper);
|
||||||
|
int update = 0;
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
AttendancePunchRecordDO attendancePunchRecordDO = list.get(0);
|
||||||
|
attendancePunchRecordDO.setStatus(AttendanceOnTheDayDTO.REPLACEMENT_CARD);
|
||||||
|
attendancePunchRecordDO.setPunchTime(attendancePunchRecordDO.getShouldPunchTime());
|
||||||
|
update = attendancePunchRecordMapper.updateById(attendancePunchRecordDO);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isEmpty(list) || update <= 0) {
|
||||||
throw exception(CANNOT_FIND_THE_RECORD_THAT_NEEDS_TO_BE_REPLACED);
|
throw exception(CANNOT_FIND_THE_RECORD_THAT_NEEDS_TO_BE_REPLACED);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -118,7 +118,7 @@ public class CommonlyUsedServiceImpl implements CommonlyUsedService {
|
|||||||
List<CommonlyUsedDO> menus = map.get("2" + "_" + menuDO.getId());
|
List<CommonlyUsedDO> menus = map.get("2" + "_" + menuDO.getId());
|
||||||
CommonlyUsedDO commonlyUsedDO = menus.get(0);
|
CommonlyUsedDO commonlyUsedDO = menus.get(0);
|
||||||
CommonlyUsedRespVO commonlyUsedRespVO = BeanUtil.copyProperties(commonlyUsedDO, CommonlyUsedRespVO.class);
|
CommonlyUsedRespVO commonlyUsedRespVO = BeanUtil.copyProperties(commonlyUsedDO, CommonlyUsedRespVO.class);
|
||||||
commonlyUsedRespVO.setImg(menuDO.getIcon());
|
commonlyUsedRespVO.setImg(menuDO.getImg());
|
||||||
commonlyUsedRespVO.setName(menuDO.getName());
|
commonlyUsedRespVO.setName(menuDO.getName());
|
||||||
// -- 这里的路由需要拼接
|
// -- 这里的路由需要拼接
|
||||||
List<String> routingList = new ArrayList<>();
|
List<String> routingList = new ArrayList<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user