假期修改

This commit is contained in:
cwchen 2025-02-20 18:50:12 +08:00
parent 1f0977f71b
commit 86ab2a5f2e
1 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,8 @@ package com.bonus.boot.manager.manager.service.impl;
import com.bonus.boot.manager.manager.dao.VerifyDateDao;
import com.bonus.boot.manager.manager.entity.EvectionBean;
import com.bonus.boot.manager.manager.utils.UserUtil;
import org.apache.catalina.security.SecurityUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
@ -24,6 +26,9 @@ public class VerifyDateService {
private VerifyDateDao dao;
public String verifyDate(EvectionBean bean,int type) {
if(bean.getUserId() == null){
bean.setUserId(Long.parseLong(UserUtil.getLoginUser().getUserId()));
}
List<Map<String, Object>> list = dao.verifyDate(bean,type);
if(CollectionUtils.isNotEmpty(list)){
StringBuilder sb = new StringBuilder();
@ -35,7 +40,7 @@ public class VerifyDateService {
if(type == 1){ // 出差
sb.append("出行人:").append(userName).append("出行日期与").append(leaveType).append("存在冲突日期").append("(").append(prominentDate).append(")");
}else{ // 请假轮休外出
sb.append("当前提交的申请日期与").append(leaveType).append("存在冲突日期").append("(").append(prominentDate).append(")");
sb.append("当前提交的申请日期与").append(leaveType).append("存在冲突日期").append("").append(prominentDate).append("");
}
return sb.toString();
}else{