fix: 首页统计和进展条数

This commit is contained in:
caiyuchao
2025-09-04 18:22:27 +08:00
parent 8bcd0744f5
commit f544f4f618
2 changed files with 7 additions and 4 deletions

View File

@@ -26,8 +26,10 @@ import org.springframework.validation.annotation.Validated;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import static org.agt.framework.common.exception.util.ServiceExceptionUtil.exception; import static org.agt.framework.common.exception.util.ServiceExceptionUtil.exception;
import static org.agt.module.license.enums.ErrorCodeConstants.CUSTOMER_CODE_DUPLICATE; import static org.agt.module.license.enums.ErrorCodeConstants.CUSTOMER_CODE_DUPLICATE;
@@ -56,9 +58,10 @@ public class CustomerServiceImpl implements CustomerService {
@Override @Override
public DashboardRespVO dashboard() { public DashboardRespVO dashboard() {
Long customerCount = customerMapper.selectCount(Wrappers.<CustomerDO>lambdaQuery().ne(CustomerDO::getName, "AGT")); Long customerCount = customerMapper.selectCount(Wrappers.<CustomerDO>lambdaQuery().notIn(CustomerDO::getName, Arrays.asList("AGT", "BA", "Blue Arcus")));
CustomerDO customerDO = customerMapper.selectOne(Wrappers.<CustomerDO>lambdaQuery().eq(CustomerDO::getName, "AGT"), false); List<CustomerDO> customerDOS = customerMapper.selectList(Wrappers.<CustomerDO>lambdaQuery().in(CustomerDO::getName, Arrays.asList("AGT", "BA", "Blue Arcus")));
Long projectCount = projectMapper.selectCount(Wrappers.<ProjectDO>lambdaQuery().ne(customerDO != null, ProjectDO::getCustomerId, customerDO.getId())); List<Long> customerIds = customerDOS.stream().map(CustomerDO::getId).collect(Collectors.toList());
Long projectCount = projectMapper.selectCount(Wrappers.<ProjectDO>lambdaQuery().notIn(CollUtil.isNotEmpty(customerIds), ProjectDO::getCustomerId, customerIds));
Long contractCount = projectMapper.selectCount(Wrappers.<ProjectDO>lambdaQuery().ne(ProjectDO::getContractCode, "0")); Long contractCount = projectMapper.selectCount(Wrappers.<ProjectDO>lambdaQuery().ne(ProjectDO::getContractCode, "0"));
Long licenseCount = licenseMapper.selectCount(); Long licenseCount = licenseMapper.selectCount();
DashboardRespVO dashboardRespVO = new DashboardRespVO(); DashboardRespVO dashboardRespVO = new DashboardRespVO();

View File

@@ -65,9 +65,9 @@
LEFT JOIN system_users u3 ON p.technical_owner_a = u3.id LEFT JOIN system_users u3 ON p.technical_owner_a = u3.id
AND u3.deleted = 0 AND u3.deleted = 0
where p.deleted = 0 where p.deleted = 0
and c.update_time >= DATE_SUB(CURDATE(), INTERVAL 1 WEEK)
ORDER BY ORDER BY
c.update_time DESC c.update_time DESC
LIMIT 10
</select> </select>
</mapper> </mapper>