大屏二级页面
This commit is contained in:
parent
266bd0f4ce
commit
56ce9e8f12
|
|
@ -9,6 +9,7 @@ import com.bonus.material.device.domain.DevInfo;
|
||||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||||
import com.bonus.material.device.mapper.DevInfoMapper;
|
import com.bonus.material.device.mapper.DevInfoMapper;
|
||||||
import com.bonus.material.device.service.DevInfoService;
|
import com.bonus.material.device.service.DevInfoService;
|
||||||
|
import com.bonus.material.largeScreen.entity.MaDevRateInfo;
|
||||||
import com.bonus.material.largeScreen.entity.MaLeaseAnswerInfo;
|
import com.bonus.material.largeScreen.entity.MaLeaseAnswerInfo;
|
||||||
import com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo;
|
import com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo;
|
||||||
import com.bonus.material.largeScreen.entity.OrderData;
|
import com.bonus.material.largeScreen.entity.OrderData;
|
||||||
|
|
@ -374,4 +375,30 @@ public class LargeScreenController extends BaseController {
|
||||||
.atZone(ZoneId.systemDefault())
|
.atZone(ZoneId.systemDefault())
|
||||||
.toLocalDate();
|
.toLocalDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备利用率
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("装备利用率")
|
||||||
|
@GetMapping("/getDevRate")
|
||||||
|
public AjaxResult getDevRate(MaDevRateInfo dto) {
|
||||||
|
startPage();
|
||||||
|
List<MaDevRateInfo> list = leaseInfoMapper.getDevRate(dto);
|
||||||
|
return AjaxResult.success(getDataTable(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租装备
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("退租装备")
|
||||||
|
@GetMapping("/getReturnDev")
|
||||||
|
public AjaxResult getReturnDev(MaDevRateInfo dto) {
|
||||||
|
startPage();
|
||||||
|
List<MaDevRateInfo> list = leaseInfoMapper.getReturnDev(dto);
|
||||||
|
return AjaxResult.success(getDataTable(list));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.bonus.material.largeScreen.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备利用率
|
||||||
|
* @Author ma_sh
|
||||||
|
* @create 2025/3/18 11:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MaDevRateInfo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备类型
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备规格型号
|
||||||
|
*/
|
||||||
|
private String modelCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备上架时长
|
||||||
|
*/
|
||||||
|
private Integer upTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备租赁时长
|
||||||
|
*/
|
||||||
|
private Integer leaseTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 利用率
|
||||||
|
*/
|
||||||
|
private String rate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字
|
||||||
|
*/
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "唯一标识符")
|
||||||
|
private String identifyCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租人
|
||||||
|
*/
|
||||||
|
private String returnUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date returnTime;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.material.lease.mapper;
|
package com.bonus.material.lease.mapper;
|
||||||
|
|
||||||
|
import com.bonus.material.largeScreen.entity.MaDevRateInfo;
|
||||||
import com.bonus.material.largeScreen.entity.MaLeaseAnswerInfo;
|
import com.bonus.material.largeScreen.entity.MaLeaseAnswerInfo;
|
||||||
import com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo;
|
import com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo;
|
||||||
import com.bonus.material.lease.domain.MaLease;
|
import com.bonus.material.lease.domain.MaLease;
|
||||||
|
|
@ -168,4 +169,18 @@ public interface MaLeaseInfoMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MaLeaseOnlyInfo> getLeaseTypeList(MaLeaseOnlyInfo dto);
|
List<MaLeaseOnlyInfo> getLeaseTypeList(MaLeaseOnlyInfo dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装备利用率
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MaDevRateInfo> getDevRate(MaDevRateInfo dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租装备
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MaDevRateInfo> getReturnDev(MaDevRateInfo dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -591,6 +591,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
ml.id
|
ml.id
|
||||||
|
ORDER BY
|
||||||
|
ml.start_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeaseTypeList" resultType="com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo">
|
<select id="getLeaseTypeList" resultType="com.bonus.material.largeScreen.entity.MaLeaseOnlyInfo">
|
||||||
|
|
@ -606,4 +608,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
GROUP BY
|
GROUP BY
|
||||||
ml.id
|
ml.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getDevRate" resultType="com.bonus.material.largeScreen.entity.MaDevRateInfo">
|
||||||
|
SELECT
|
||||||
|
mt1.type_name AS typeName,
|
||||||
|
md.device_name AS deviceName,
|
||||||
|
mt.type_name AS modelCode,
|
||||||
|
md.total_up_day AS upTotal,
|
||||||
|
md.total_lease_day AS leaseTotal,
|
||||||
|
CASE
|
||||||
|
|
||||||
|
WHEN ( md.total_lease_day + md.total_up_day ) = 0 THEN
|
||||||
|
NULL ELSE ROUND(( md.total_lease_day / ( md.total_lease_day + md.total_up_day )) * 100, 2 )
|
||||||
|
END AS rate
|
||||||
|
FROM
|
||||||
|
ma_dev_info md
|
||||||
|
LEFT JOIN ma_type mt ON md.type_id = mt.type_id
|
||||||
|
AND mt.`level` = '4'
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
|
AND mt1.`level` = '3'
|
||||||
|
WHERE 1 =1
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and mt1.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
md.device_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt.type_name like concat('%', #{keyWord}, '%')
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
md.device_name
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getReturnDev" resultType="com.bonus.material.largeScreen.entity.MaDevRateInfo">
|
||||||
|
SELECT
|
||||||
|
mdi.device_name AS deviceName,
|
||||||
|
mt.type_name AS modelCode,
|
||||||
|
mdi.identify_code AS identifyCode,
|
||||||
|
mi.`code` AS orderCode,
|
||||||
|
md.rent_over_user AS returnUser,
|
||||||
|
md.rent_over_time AS returnTime
|
||||||
|
FROM
|
||||||
|
ma_order_details md
|
||||||
|
LEFT JOIN ma_dev_info mdi ON md.ma_id = mdi.ma_id
|
||||||
|
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_order_info mi ON md.order_id = mi.order_id
|
||||||
|
AND mt.`level` = '4'
|
||||||
|
WHERE
|
||||||
|
md.order_status = '5'
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and mdi.device_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mdi.identify_code like concat('%', #{keyWord}, '%') or
|
||||||
|
mi.`code` like concat('%', #{keyWord}, '%') or
|
||||||
|
md.rent_over_user like concat('%', #{keyWord}, '%')
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
md.ma_id
|
||||||
|
ORDER BY
|
||||||
|
md.rent_over_time DESC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue