补卡审核

This commit is contained in:
zt
2025-03-06 16:50:44 +08:00
parent c286edf99f
commit 8d566adaa6
2 changed files with 101 additions and 73 deletions

View File

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.bgt;
import com.ruoyi.bgt.domain.BgtMessage;
import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO;
import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO;
import com.ruoyi.bgt.domain.vo.BgtMessageCountVO;
@ -13,9 +14,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* 消息Controller
@ -49,5 +48,14 @@ public class AppBgtMessageController extends BaseController {
return iBgtMessageService.queryDetailPageList(dto);
}
@ApiOperation("已读")
@PutMapping("/read/{id}")
public AjaxResult<Boolean> read(@PathVariable(value = "id") Long id) {
BgtMessage bgtMessage = new BgtMessage();
bgtMessage.setId(id);
bgtMessage.setReadStatus("1");
return AjaxResult.success(iBgtMessageService.updateById(bgtMessage));
}
}

View File

@ -78,7 +78,6 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
}
@Override
public TableDataInfo<WgzReissueacard> queryPageList(WgzReissueacardQueryBo bo) {
Page<WgzReissueacard> result = page(PageUtils.buildPage(), buildQueryWrapper(bo));
@ -241,6 +240,27 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
WgzReissueacard byId = getById(dto.getId());
BeanUtil.copyProperties(dto, byId);
boolean b = updateById(byId);
//修改考勤标记
WgzAttendance attendance = iWgzAttendanceService.getById(byId.getAttendanceId());
String exceptionType = attendance.getExceptionType();
if ("0".equals(byId.getType())) { //上班补卡
exceptionType = exceptionType.replace("\\b1\\b", "5");
exceptionType = exceptionType.replace("\\b3\\b", "5");
attendance.setExceptionType(exceptionType);
attendance.setLate(1);
attendance.setMissedIn(1);
} else {
exceptionType = exceptionType.replace("\\b2\\b", "6");
exceptionType = exceptionType.replace("\\b4\\b", "6");
attendance.setExceptionType(exceptionType);
attendance.setEarlyLeave(1);
attendance.setMissedOut(1);
}
iWgzAttendanceService.updateById(attendance);
//发消息
HashMap<String, String> mp = new HashMap<>();
mp.put("projectName", iBgtProjectRecruitService.getById(byId.getRecruitId()).getRecruitName());