大屏bug

This commit is contained in:
sxu 2025-01-07 19:04:01 +08:00
parent e1df8bf961
commit ff0a813807
4 changed files with 14 additions and 0 deletions

View File

@ -123,8 +123,10 @@ public class LargeScreenController {
OrderData orderData = new OrderData();
Integer leaseNum = leaseInfoMapper.getLeaseCount();
Integer leaseOrderNum = leaseInfoMapper.getLeaseOrderCount();
Integer maTypeCountFromLease = leaseInfoMapper.getMaTypeCountFromLease();
String topPopularTypeName = leaseInfoMapper.getTopPopularTypeName();
orderData.setLeaseNum(leaseNum);
orderData.setMaTypeCountFromLease(maTypeCountFromLease);
orderData.setLeaseOrderRatio(MathUtil.calculatePercentage(leaseOrderNum, leaseNum));
orderData.setTopPopularTypeName(topPopularTypeName);
return AjaxResult.success(orderData);

View File

@ -82,6 +82,9 @@ public class OrderData {
@ApiModelProperty(value = "最需装备")
private String topPopularTypeName;
@ApiModelProperty(value = "类型总需求数")
private Integer maTypeCountFromLease;
@ApiModelProperty(value = "装备统计列表")
private List<DevInfo> devInfos;
}

View File

@ -120,6 +120,8 @@ public interface MaLeaseInfoMapper {
Integer getLeaseOrderCount();
Integer getMaTypeCountFromLease();
String getTopPopularTypeName();
Integer getTodayLeaseOrderCount();

View File

@ -444,10 +444,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
lease_status in (1,3)
</select>
<select id="getMaTypeCountFromLease" resultType="Integer">
SELECT distinct(type_id)
FROM ma_lease_details
where type_id is not null
</select>
<select id="getTopPopularTypeName" resultType="java.lang.String">
select mt.type_name from (
SELECT type_id
FROM ma_lease_details
where type_id is not null
group by type_id
order by count(type_id) desc limit 1
) a