This commit is contained in:
zhuyy 2023-06-21 13:51:37 +08:00
parent b8651bb3b8
commit ec30d25fe1
3 changed files with 14 additions and 3 deletions

View File

@ -94,4 +94,9 @@ public class AuditController extends BaseController {
return AjaxResult.fail().msg("审批状态错误"); return AjaxResult.fail().msg("审批状态错误");
} }
@GetMapping()
public AjaxResult count(){
return auditService.counts();
}
} }

View File

@ -30,5 +30,7 @@ public interface IAuditService {
AjaxResult submitAudit(Page page); AjaxResult submitAudit(Page page);
AjaxResult waitingAudit(Page page); AjaxResult waitingAudit(Page page);
AjaxResult counts();
} }

View File

@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.query.MPJQueryWrapper;
import com.ydool.common.base.BaseService; import com.ydool.common.base.BaseService;
import com.ydool.common.cache.ConfigCache; import com.ydool.common.cache.ConfigCache;
import com.ydool.common.constant.ArgsConst; import com.ydool.common.constant.ArgsConst;
@ -19,7 +18,6 @@ import com.ydool.staff.entity.*;
import com.ydool.staff.mapper.*; import com.ydool.staff.mapper.*;
import com.ydool.staff.request.AuditRequest; import com.ydool.staff.request.AuditRequest;
import com.ydool.staff.service.IAuditService; import com.ydool.staff.service.IAuditService;
import com.ydool.staff.service.IPersonnelService;
import com.ydool.system.entity.Config; import com.ydool.system.entity.Config;
import com.ydool.system.entity.User; import com.ydool.system.entity.User;
import com.ydool.system.mapper.ConfigMapper; import com.ydool.system.mapper.ConfigMapper;
@ -27,7 +25,6 @@ import com.ydool.system.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
@ -559,5 +556,12 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
.eq(Audit::getAuditOrder, "waiting").eq(Audit::getApprover, StpUtil.getLoginIdAsString())); .eq(Audit::getAuditOrder, "waiting").eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
return AjaxResult.ok().data(selectPage); return AjaxResult.ok().data(selectPage);
} }
@Override
public AjaxResult counts() {
Integer count = auditMapper.selectCount(Wrappers.lambdaQuery(Audit.class).eq(Audit::getAuditOrder, "waiting").eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
return AjaxResult.ok().data(count);
}
} }