mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
禅道bug#1685修复
This commit is contained in:
+12
-12
@@ -80,19 +80,19 @@ public interface OrganMapper extends BaseMapperX<OrganizationDO> {
|
|||||||
.eq(OrganizationDO::getDeleted, OrderDeletedEnum.NOT_DELETED.getStatus())));
|
.eq(OrganizationDO::getDeleted, OrderDeletedEnum.NOT_DELETED.getStatus())));
|
||||||
}
|
}
|
||||||
|
|
||||||
default Integer selectOrgCountAdd() {
|
/**
|
||||||
return Math.toIntExact(selectCount(new LambdaQueryWrapperX<OrganizationDO>()
|
* 查询今天创建的组织
|
||||||
.eq(OrganizationDO::getDeleted, OrderDeletedEnum.NOT_DELETED.getStatus())
|
*
|
||||||
.between(OrganizationDO::getCreateTime, LocalDateTime.of(LocalDate.now(), LocalTime.MIDNIGHT),
|
* @return
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.of(23, 59, 59)))));
|
*/
|
||||||
}
|
Integer selectOrgCountAdd(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
|
||||||
|
|
||||||
default Integer selectOrgCountDel() {
|
/**
|
||||||
return Math.toIntExact(selectCount(new LambdaQueryWrapperX<OrganizationDO>()
|
* 查询今天被删除的组织
|
||||||
.eq(OrganizationDO::getDeleted, OrderDeletedEnum.DELETED.getStatus())
|
*
|
||||||
.between(OrganizationDO::getUpdateTime, LocalDateTime.of(LocalDate.now(), LocalTime.MIDNIGHT),
|
* @return
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.of(23, 59, 59)))));
|
*/
|
||||||
}
|
Integer selectOrgCountDel(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
|
||||||
|
|
||||||
Integer selectOrgSilentCount(@Param("dateTime")LocalDateTime dateTime);
|
Integer selectOrgSilentCount(@Param("dateTime")LocalDateTime dateTime);
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -83,7 +83,9 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -587,12 +589,15 @@ public class OrganServiceImpl implements OrganService {
|
|||||||
public ManageOrgTotalStatisticRespVO getOrgTotal() {
|
public ManageOrgTotalStatisticRespVO getOrgTotal() {
|
||||||
ManageOrgTotalStatisticRespVO respVO = new ManageOrgTotalStatisticRespVO();
|
ManageOrgTotalStatisticRespVO respVO = new ManageOrgTotalStatisticRespVO();
|
||||||
|
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
LocalDateTime todayStart = LocalDateTime.of(now, LocalTime.MIDNIGHT);
|
||||||
|
LocalDateTime todayEnd = LocalDateTime.of(now, LocalTime.of(23, 59, 59));
|
||||||
// 组织总数
|
// 组织总数
|
||||||
respVO.setOrgTotal(organMapper.selectOrgCount());
|
respVO.setOrgTotal(organMapper.selectOrgCount());
|
||||||
// 当日新增数
|
// 当日新增数
|
||||||
respVO.setOrgAdd(organMapper.selectOrgCountAdd());
|
respVO.setOrgAdd(organMapper.selectOrgCountAdd(todayStart, todayEnd));
|
||||||
// 当日状态-删除
|
// 当日状态-删除
|
||||||
respVO.setOrgDel(organMapper.selectOrgCountDel());
|
respVO.setOrgDel(organMapper.selectOrgCountDel(todayStart, todayEnd));
|
||||||
// 当日沉寂数 (组织中所有用户30天未登录)
|
// 当日沉寂数 (组织中所有用户30天未登录)
|
||||||
// 获得30天前的时间,赋值时间为0:00:00
|
// 获得30天前的时间,赋值时间为0:00:00
|
||||||
Date date = DateUtil.offsetDay(new Date(), -30);
|
Date date = DateUtil.offsetDay(new Date(), -30);
|
||||||
|
|||||||
@@ -13,7 +13,16 @@
|
|||||||
AND ul.id IS NULL;
|
AND ul.id IS NULL;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOrgCountAdd">
|
||||||
|
select count(*) from system_organization
|
||||||
|
WHERE create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOrgCountDel">
|
||||||
|
select count(*) from system_organization
|
||||||
|
WHERE deleted = true
|
||||||
|
AND update_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectOrganDataSource" resultType="java.util.Map">
|
<select id="selectOrganDataSource" resultType="java.util.Map">
|
||||||
|
|||||||
Reference in New Issue
Block a user