大屏bug
This commit is contained in:
parent
e1df8bf961
commit
ff0a813807
|
|
@ -123,8 +123,10 @@ public class LargeScreenController {
|
||||||
OrderData orderData = new OrderData();
|
OrderData orderData = new OrderData();
|
||||||
Integer leaseNum = leaseInfoMapper.getLeaseCount();
|
Integer leaseNum = leaseInfoMapper.getLeaseCount();
|
||||||
Integer leaseOrderNum = leaseInfoMapper.getLeaseOrderCount();
|
Integer leaseOrderNum = leaseInfoMapper.getLeaseOrderCount();
|
||||||
|
Integer maTypeCountFromLease = leaseInfoMapper.getMaTypeCountFromLease();
|
||||||
String topPopularTypeName = leaseInfoMapper.getTopPopularTypeName();
|
String topPopularTypeName = leaseInfoMapper.getTopPopularTypeName();
|
||||||
orderData.setLeaseNum(leaseNum);
|
orderData.setLeaseNum(leaseNum);
|
||||||
|
orderData.setMaTypeCountFromLease(maTypeCountFromLease);
|
||||||
orderData.setLeaseOrderRatio(MathUtil.calculatePercentage(leaseOrderNum, leaseNum));
|
orderData.setLeaseOrderRatio(MathUtil.calculatePercentage(leaseOrderNum, leaseNum));
|
||||||
orderData.setTopPopularTypeName(topPopularTypeName);
|
orderData.setTopPopularTypeName(topPopularTypeName);
|
||||||
return AjaxResult.success(orderData);
|
return AjaxResult.success(orderData);
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,9 @@ public class OrderData {
|
||||||
@ApiModelProperty(value = "最需装备")
|
@ApiModelProperty(value = "最需装备")
|
||||||
private String topPopularTypeName;
|
private String topPopularTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型总需求数")
|
||||||
|
private Integer maTypeCountFromLease;
|
||||||
|
|
||||||
@ApiModelProperty(value = "装备统计列表")
|
@ApiModelProperty(value = "装备统计列表")
|
||||||
private List<DevInfo> devInfos;
|
private List<DevInfo> devInfos;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,8 @@ public interface MaLeaseInfoMapper {
|
||||||
|
|
||||||
Integer getLeaseOrderCount();
|
Integer getLeaseOrderCount();
|
||||||
|
|
||||||
|
Integer getMaTypeCountFromLease();
|
||||||
|
|
||||||
String getTopPopularTypeName();
|
String getTopPopularTypeName();
|
||||||
|
|
||||||
Integer getTodayLeaseOrderCount();
|
Integer getTodayLeaseOrderCount();
|
||||||
|
|
|
||||||
|
|
@ -444,10 +444,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
lease_status in (1,3)
|
lease_status in (1,3)
|
||||||
</select>
|
</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 id="getTopPopularTypeName" resultType="java.lang.String">
|
||||||
select mt.type_name from (
|
select mt.type_name from (
|
||||||
SELECT type_id
|
SELECT type_id
|
||||||
FROM ma_lease_details
|
FROM ma_lease_details
|
||||||
|
where type_id is not null
|
||||||
group by type_id
|
group by type_id
|
||||||
order by count(type_id) desc limit 1
|
order by count(type_id) desc limit 1
|
||||||
) a
|
) a
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue