mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +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())));
|
||||
}
|
||||
|
||||
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),
|
||||
LocalDateTime.of(LocalDate.now(), LocalTime.of(23, 59, 59)))));
|
||||
}
|
||||
/**
|
||||
* 查询今天创建的组织
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
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),
|
||||
LocalDateTime.of(LocalDate.now(), LocalTime.of(23, 59, 59)))));
|
||||
}
|
||||
/**
|
||||
* 查询今天被删除的组织
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Integer selectOrgCountDel(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
|
||||
|
||||
Integer selectOrgSilentCount(@Param("dateTime")LocalDateTime dateTime);
|
||||
|
||||
|
||||
+7
-2
@@ -83,7 +83,9 @@ import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -587,12 +589,15 @@ public class OrganServiceImpl implements OrganService {
|
||||
public ManageOrgTotalStatisticRespVO getOrgTotal() {
|
||||
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.setOrgAdd(organMapper.selectOrgCountAdd());
|
||||
respVO.setOrgAdd(organMapper.selectOrgCountAdd(todayStart, todayEnd));
|
||||
// 当日状态-删除
|
||||
respVO.setOrgDel(organMapper.selectOrgCountDel());
|
||||
respVO.setOrgDel(organMapper.selectOrgCountDel(todayStart, todayEnd));
|
||||
// 当日沉寂数 (组织中所有用户30天未登录)
|
||||
// 获得30天前的时间,赋值时间为0:00:00
|
||||
Date date = DateUtil.offsetDay(new Date(), -30);
|
||||
|
||||
@@ -13,7 +13,16 @@
|
||||
AND ul.id IS NULL;
|
||||
</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">
|
||||
|
||||
Reference in New Issue
Block a user