feat: 请假

This commit is contained in:
李京通 2025-06-09 21:42:38 +08:00
parent 43129b0bca
commit c770cacd0a
1 changed files with 7 additions and 7 deletions

View File

@ -62,16 +62,16 @@ public class ApprovalProcessController extends BaseController {
for (ApprovalProcess process : list) { for (ApprovalProcess process : list) {
if (process.getMatterType() == 2){ if (process.getMatterType() == 2) {
gwglLog one = gwglLogService.lambdaQuery() gwglLog one = gwglLogService.lambdaQuery()
.eq(gwglLog::getUuid, process.getUuid()) .eq(gwglLog::getUuid, process.getUuid())
.orderByDesc(gwglLog::getCreateTime) .orderByDesc(gwglLog::getCreateTime)
.last("LIMIT 1") .last("LIMIT 1")
.one(); .one();
if (one != null){ if (one != null) {
if (one.getCheckState() == 0) { if (one.getCheckState() == 0) {
process.setApprovalStatus(0); process.setApprovalStatus(0);
}else { } else {
process.setApprovalStatus(1); process.setApprovalStatus(1);
} }
} }
@ -125,9 +125,9 @@ public class ApprovalProcessController extends BaseController {
} }
public static void main(String[] args) { public static void main(String[] args) {
Long createTime = 1749279303395L; Long createTime = System.currentTimeMillis();
Instant instant = Instant.ofEpochMilli(createTime); Instant instant = Instant.ofEpochMilli(createTime);
Long time = createTime - 24 * 60 * 60 * 1000 * 3;
// 2. 转换为本地时区如北京时间 UTC+8 // 2. 转换为本地时区如北京时间 UTC+8
LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.of("Asia/Shanghai")); LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.of("Asia/Shanghai"));
@ -136,7 +136,7 @@ public class ApprovalProcessController extends BaseController {
// 4. 格式化为字符串 // 4. 格式化为字符串
String formattedTime = localDateTime.format(formatter); String formattedTime = localDateTime.format(formatter);
System.out.println(formattedTime); System.out.println(time);
} }
@ApiOperation("根据编号查") @ApiOperation("根据编号查")
@ -231,7 +231,7 @@ public class ApprovalProcessController extends BaseController {
String[] split = togUserIds.split(","); String[] split = togUserIds.split(",");
for (String s : split) { for (String s : split) {
s = s.trim(); s = s.trim();
System.out.println("拆分的字:"+s);// 移除首尾空格 System.out.println("拆分的字:" + s);// 移除首尾空格
if (!s.isEmpty()) { if (!s.isEmpty()) {
SysUser user = sysUserService.selectUserById(Long.parseLong(s)); SysUser user = sysUserService.selectUserById(Long.parseLong(s));
userList.add(user); userList.add(user);