|
|
|
@ -2,12 +2,15 @@ package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.base.ISysLogService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysDashboardService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysOrganizeService;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.annotation.AnnoIgnoreLog;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysUser;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogException;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogOperate;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysDepartmentRepository;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysUserRepository;
|
|
|
|
@ -35,24 +38,22 @@ public class SysDashboardService implements ISysDashboardService {
|
|
|
|
|
private SysDepartmentRepository sysDepartmentRDao;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysOrganizeService organizeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysLogService logService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysUserRepository sysUserRDao;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@ApiOperation(value = "查询组织个数")
|
|
|
|
|
public long getSysOrganizeCount() {
|
|
|
|
|
// return logService.countSysLogOperate();
|
|
|
|
|
return 0L;
|
|
|
|
|
}
|
|
|
|
|
private static final Pager PAGER;
|
|
|
|
|
private static final SysLogOperate SYS_LOG_OPERATE = new SysLogOperate();
|
|
|
|
|
private static final SysLogException SYS_LOG_EXCEPTION = new SysLogException();
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@ApiOperation(value = "获取部门数量")
|
|
|
|
|
public long getSysDepartmentCount() {
|
|
|
|
|
return sysDepartmentRDao.listCount();
|
|
|
|
|
static {
|
|
|
|
|
PAGER = new Pager();
|
|
|
|
|
PAGER.setCurrentPage(1);
|
|
|
|
|
PAGER.setPageSize(CommonConstWords.DASHBOARD_TABLE_SIZE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -68,34 +69,15 @@ public class SysDashboardService implements ISysDashboardService {
|
|
|
|
|
@Override
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@ApiOperation(value = "查询操作日志",notes = "查询最新的几条操作日志")
|
|
|
|
|
public ListPager<SysLogOperate> findNewSysLogOperateSize(Integer size) {
|
|
|
|
|
Pager page = new Pager();
|
|
|
|
|
page.setCurrentPage(1);
|
|
|
|
|
page.setPageSize(size);
|
|
|
|
|
SysLogOperate sysLogOperate = new SysLogOperate();
|
|
|
|
|
sysLogOperate.setOrderByParam("createDatetime");
|
|
|
|
|
sysLogOperate.setAscOrDesc(CommonEnumUtil.ASC_OR_DESC.DESC.getValue());
|
|
|
|
|
return logService.queryLogOperatePager(sysLogOperate,page);
|
|
|
|
|
public List<SysLogOperate> findNewSysLogOperateSize() {
|
|
|
|
|
return logService.findLogOperateList(SYS_LOG_OPERATE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@ApiOperation(value = "查询操异常日志",notes = "查询最新的几条异常日志")
|
|
|
|
|
public ListPager<SysLogOperate> findNewSysLogExceptionSize(Integer size) {
|
|
|
|
|
Pager page = new Pager();
|
|
|
|
|
page.setCurrentPage(1);
|
|
|
|
|
page.setPageSize(size);
|
|
|
|
|
SysLogOperate sysLogOperate = new SysLogOperate();
|
|
|
|
|
sysLogOperate.setOrderByParam("createDatetime");
|
|
|
|
|
sysLogOperate.setAscOrDesc(CommonEnumUtil.ASC_OR_DESC.DESC.getValue());
|
|
|
|
|
return logService.queryLogOperatePager(sysLogOperate,page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@ApiOperation(value = "查询系统日志",notes = "查询系统日志各级别占比")
|
|
|
|
|
public Map findSysLogSystempByLevel(String startTime, String endTime) {
|
|
|
|
|
return null;
|
|
|
|
|
public List<SysLogException> findNewSysLogExceptionSize() {
|
|
|
|
|
return logService.findLogExceptionList(SYS_LOG_EXCEPTION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|