二级页面

This commit is contained in:
马三炮 2025-03-18 13:14:38 +08:00
parent 56ce9e8f12
commit 62bad35573
5 changed files with 188 additions and 2 deletions

View File

@ -299,4 +299,10 @@ public class DevInfo extends BaseEntity {
@ApiModelProperty(value = "使用率小于30")
private Integer idle30;
@ApiModelProperty(value = "承租方")
private String lessee;
@ApiModelProperty(value = "承租方联系人")
private String lesseePerson;
}

View File

@ -8,6 +8,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -170,5 +171,7 @@ public class DevInfoVo extends DevInfo {
private Long orderId;
@ApiModelProperty(value = "订单金额")
private BigDecimal cost;
}

View File

@ -250,5 +250,17 @@ public interface DevInfoMapper {
* @return
*/
DevInfoVo selectDevTypeByName(String typeName);
List<DevInfoVo> getDevNumList(DevInfoVo devInfoVo);
List<DevInfoVo> getDevUpNumList(DevInfoVo devInfoVo);
List<DevInfoVo> getDevTypeNumList(DevInfoVo devInfoVo);
List<DevInfoVo> getDevQcWarningNumList(DevInfoVo devInfoVo);
List<DevInfoVo> getMaTypeLeasingNumList(DevInfoVo devInfoVo);
List<DevInfoVo> getDevLeasingNumList(DevInfoVo devInfoVo);
}

View File

@ -35,6 +35,8 @@ import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
import static com.bonus.common.core.utils.PageUtils.startPage;
/**
* @Authorliang.chao
* @Date2024/12/24 - 15:46
@ -219,6 +221,54 @@ public class LargeScreenController extends BaseController {
return AjaxResult.success(infoVos);
}
@ApiOperation("入住装备数二级页面")
@GetMapping("/getDevNum")
public AjaxResult getDevNum(DevInfoVo devInfoVo) {
startPage();
List<DevInfoVo> list = devInfoMapper.getDevNumList(devInfoVo);
return AjaxResult.success(list);
}
@ApiOperation("上架装备数二级页面")
@GetMapping("/getDevUpNum")
public AjaxResult getDevUpNum(DevInfoVo devInfoVo) {
startPage();
List<DevInfoVo> list = devInfoMapper.getDevUpNumList(devInfoVo);
return AjaxResult.success(list);
}
@ApiOperation("装备总类型数二级页面")
@GetMapping("/getDevTypeNum")
public AjaxResult getDevTypeNum(DevInfoVo devInfoVo) {
startPage();
List<DevInfoVo> list = devInfoMapper.getDevTypeNumList(devInfoVo);
return AjaxResult.success(list);
}
@ApiOperation("保养告警二级页面")
@GetMapping("/getDevQcWarningNum")
public AjaxResult getDevQcWarningNum(DevInfoVo devInfoVo) {
startPage();
List<DevInfoVo> list = devInfoMapper.getDevQcWarningNumList(devInfoVo);
return AjaxResult.success(list);
}
@ApiOperation("在租赁种类二级页面")
@GetMapping("/getMaTypeLeasingNum")
public AjaxResult getMaTypeLeasingNum(DevInfoVo devInfoVo) {
startPage();
List<DevInfoVo> list = devInfoMapper.getMaTypeLeasingNumList(devInfoVo);
return AjaxResult.success(list);
}
@ApiOperation("在租赁装备数二级页面")
@GetMapping("/getDevLeasingNum")
public AjaxResult getDevLeasingNum(DevInfoVo devInfoVo) {
startPage();
List<DevInfoVo> list = devInfoMapper.getDevLeasingNumList(devInfoVo);
return AjaxResult.success(list);
}
// @ApiOperation("订单数据")
// @GetMapping("/orderData")
// public AjaxResult getOrderData() {

View File

@ -986,8 +986,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
COUNT(1)
FROM
ma_dev_qc mdc
left join ma_dev_info mdi on mdi.ma_id = mdc.ma_id
left join sys_dept sd on mdc.qc_com = sd.dept_id
where mdc.next_check_time &lt; now()
</select>
@ -1209,4 +1207,121 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND `level` = '4'
AND del_flag = '0'
</select>
<select id="getDevNumList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT
mt.type_name as modelName , mdi.device_name as deviceName ,mt2.type_name as typeName,mdi.identify_code as identifyCode,
mdi.ma_status as maStatus,mdi.create_time as createTime,sd.dept_name as comName
FROM
ma_dev_info mdi
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN sys_dept sd ON mdi.own_co = sd.dept_id
WHERE
is_active = '1'
AND ma_status != 0
<if test="keyWord != null and keyWord != ''">
AND (
mdi.device_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%')
)
</if>
</select>
<select id="getDevUpNumList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT
mt.type_name as modelName ,mdi.device_name as deviceName,mt2.type_name as typeName,mdi.identify_code as identifyCode,
mdi.ma_status as maStatus,mdi.create_time as createTime,sd.dept_name as comName
FROM
ma_dev_info mdi
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN sys_dept sd ON mdi.own_co = sd.dept_id
WHERE
is_active = '1'
AND ma_status = '2'
<if test="keyWord != null and keyWord != ''">
AND (
mdi.device_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%')
)
</if>
</select>
<select id="getDevTypeNumList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT
count(mdi.type_id) as deviceCount, mt.type_name as typeName,mdi.device_name as deviceName,mt.type_name as modelName
FROM
ma_dev_info mdi
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
WHERE
is_active = '1'
AND ma_status != 0
GROUP BY mdi.type_id
<if test="keyWord != null and keyWord != ''">
AND (
mdi.device_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%')
)
</if>
</select>
<select id="getDevQcWarningNumList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT
mdc.*,mt.type_name as modelName,mdi.device_name as deviceName,mt2.type_name as typeName ,
mdi.identify_code as identifyCode, mdc.next_check_time as nextCheckDate
FROM
ma_dev_qc mdc
LEFT JOIN ma_dev_info mdi ON mdi.ma_id = mdc.ma_id
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
where mdc.next_check_time &lt; now()
<if test="keyWord != null and keyWord != ''">
AND (
mdi.device_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%')
)
</if>
</select>
<select id="getMaTypeLeasingNumList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT
mdi.device_name as deviceName,mt.type_name as modelName,
mdi.day_lease_price as dayLeasePrice,
count(DISTINCT(mrd.ma_id)) as rentNum
FROM
ma_order_details mrd
LEFT JOIN ma_dev_info mdi on mdi.ma_id = mrd.ma_id
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
WHERE
mdi.is_active = '1'
AND mdi.ma_status = '3'
GROUP BY mrd.ma_id
<if test="keyWord != null and keyWord != ''">
AND (
mdi.device_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%')
)
</if>
</select>
<select id="getDevLeasingNumList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT
mdi.device_name as deviceName,mt.type_name as modelName,mdi.identify_code as identifyCode,
md.order_id as orderId,sd.dept_name as comName,mdi.person as person,sd2.dept_name as lessee,
su.user_name as lesseePerson,moi.create_time as startTime ,moi.end_time as endTime ,moi.cost as cost
FROM
ma_dev_info mdi
LEFT JOIN ma_order_details md on mdi.ma_id = md.ma_id
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
LEFT JOIN sys_dept sd on sd.dept_id = mdi.own_co
LEFT JOIN ma_order_info moi on moi.order_id = md.order_id
LEFT JOIN sys_dept sd2 on moi.buyer_company = sd2.dept_id
LEFT JOIN sys_user su on moi.buyer_id = su.user_id
WHERE
mdi.is_active = '1'
AND mdi.ma_status = '3'
</select>
</mapper>