大屏及首页模块代码更新
This commit is contained in:
parent
38eacc6575
commit
a89b24a956
|
|
@ -1,11 +1,8 @@
|
||||||
package com.bonus.zlpt.bigscreen.controller;
|
package com.bonus.zlpt.bigscreen.controller;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.ColtdVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.*;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.LonVo;
|
|
||||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
|
||||||
import com.bonus.zlpt.bigscreen.service.BmCompanyInfoService;
|
import com.bonus.zlpt.bigscreen.service.BmCompanyInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -83,5 +80,16 @@ public class BmCompanyInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
return success(map);
|
return success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据时间查询设备历史经纬度
|
||||||
|
* @param time
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/time-list/{time}")
|
||||||
|
public AjaxResult timeList(@PathVariable("time") String time) {
|
||||||
|
List<LatVo> list = bmCompanyInfoService.selectTimeList(time);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.zlpt.bigscreen.controller;
|
package com.bonus.zlpt.bigscreen.controller;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.MaIdVo;
|
||||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.zlpt.bigscreen.domain.MaDevInfo;
|
import com.bonus.zlpt.bigscreen.domain.MaDevInfo;
|
||||||
|
|
@ -111,5 +112,17 @@ public class MaDevInfoController extends BaseController {
|
||||||
List<CompanyInfoVo> maHotInfos = maDevInfoService.selecthotList();
|
List<CompanyInfoVo> maHotInfos = maDevInfoService.selecthotList();
|
||||||
return success(maHotInfos);
|
return success(maHotInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据设备id查询设备详情相关信息
|
||||||
|
* @param maId 设备id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list/{maId}")
|
||||||
|
public AjaxResult listById(@PathVariable("maId") String maId)
|
||||||
|
{
|
||||||
|
MaIdVo maIdVo = maDevInfoService.selectListById(maId);
|
||||||
|
return success(maIdVo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.bonus.zlpt.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经纬度返回类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LatVo {
|
||||||
|
|
||||||
|
//经度
|
||||||
|
private String lon;
|
||||||
|
|
||||||
|
//纬度
|
||||||
|
private String lat;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.bonus.zlpt.bigscreen.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备详情返回类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MaIdVo {
|
||||||
|
|
||||||
|
//设备名称
|
||||||
|
private String maName;
|
||||||
|
|
||||||
|
//设备状态
|
||||||
|
private String maStatus;
|
||||||
|
|
||||||
|
//需求租赁单位
|
||||||
|
private String needCompany;
|
||||||
|
|
||||||
|
//设备计划进场时间
|
||||||
|
private String planStartTime;
|
||||||
|
|
||||||
|
//租赁时长
|
||||||
|
private String duration;
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.bigscreen.mapper;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.LatVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -28,5 +29,11 @@ public interface BmCompanyInfoMapper {
|
||||||
*/
|
*/
|
||||||
List<ColtdTypeVo> selectColtdList();
|
List<ColtdTypeVo> selectColtdList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据时间查询设备历史经纬度
|
||||||
|
* @param time
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LatVo> selectTimeList(String time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.bigscreen.mapper;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo;
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.MaIdVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.TypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.TypeVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
@ -55,5 +56,11 @@ public interface MaDevInfoMapper {
|
||||||
*/
|
*/
|
||||||
List<CompanyInfoVo> selecthotList();
|
List<CompanyInfoVo> selecthotList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据设备id查询设备详情相关信息
|
||||||
|
* @param maId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
MaIdVo selectListById(String maId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.bigscreen.service;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.LatVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -25,5 +26,12 @@ public interface BmCompanyInfoService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ColtdTypeVo> selectColtdList();
|
List<ColtdTypeVo> selectColtdList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据时间查询设备历史经纬度
|
||||||
|
* @param time
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LatVo> selectTimeList(String time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.bigscreen.service;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo;
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.MaIdVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.TypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.TypeVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -53,5 +54,11 @@ public interface MaDevInfoService {
|
||||||
*/
|
*/
|
||||||
List<CompanyInfoVo> selecthotList();
|
List<CompanyInfoVo> selecthotList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据设备id查询设备详情相关信息
|
||||||
|
* @param maId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
MaIdVo selectListById(String maId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.bigscreen.service.impl;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.ColtdTypeVo;
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.LatVo;
|
||||||
import com.bonus.zlpt.bigscreen.mapper.BmCompanyInfoMapper;
|
import com.bonus.zlpt.bigscreen.mapper.BmCompanyInfoMapper;
|
||||||
import com.bonus.zlpt.bigscreen.service.BmCompanyInfoService;
|
import com.bonus.zlpt.bigscreen.service.BmCompanyInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -39,5 +40,15 @@ public class BmCompanyInfoServiceImpl implements BmCompanyInfoService {
|
||||||
public List<ColtdTypeVo> selectColtdList() {
|
public List<ColtdTypeVo> selectColtdList() {
|
||||||
return bmCompanyInfoMapper.selectColtdList();
|
return bmCompanyInfoMapper.selectColtdList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据时间查询设备历史经纬度
|
||||||
|
* @param time
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LatVo> selectTimeList(String time) {
|
||||||
|
return bmCompanyInfoMapper.selectTimeList(time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.bigscreen.service.impl;
|
||||||
|
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo;
|
||||||
|
import com.bonus.zlpt.bigscreen.domain.vo.MaIdVo;
|
||||||
import com.bonus.zlpt.bigscreen.domain.vo.TypeVo;
|
import com.bonus.zlpt.bigscreen.domain.vo.TypeVo;
|
||||||
import com.bonus.zlpt.bigscreen.mapper.MaDevInfoMapper;
|
import com.bonus.zlpt.bigscreen.mapper.MaDevInfoMapper;
|
||||||
import com.bonus.zlpt.bigscreen.service.MaDevInfoService;
|
import com.bonus.zlpt.bigscreen.service.MaDevInfoService;
|
||||||
|
|
@ -78,5 +79,15 @@ public class MaDevInfoServiceImpl implements MaDevInfoService {
|
||||||
public List<CompanyInfoVo> selecthotList() {
|
public List<CompanyInfoVo> selecthotList() {
|
||||||
return maDevInfoMapper.selecthotList();
|
return maDevInfoMapper.selecthotList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据设备id查询设备详情相关信息
|
||||||
|
* @param maId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MaIdVo selectListById(String maId) {
|
||||||
|
return maDevInfoMapper.selectListById(maId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTimeList" resultType="com.bonus.zlpt.bigscreen.domain.vo.LatVo">
|
||||||
|
SELECT gh.lon AS lon, gh.lat AS lat
|
||||||
|
FROM ma_dev_info md
|
||||||
|
LEFT JOIN gps_his_info gh ON md.gps_code = gh.gps_code
|
||||||
|
WHERE gh.time = STR_TO_DATE(#{time}, '%Y.%m.%d')
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -51,4 +51,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ORDER BY count DESC
|
ORDER BY count DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectListById" resultType="com.bonus.zlpt.bigscreen.domain.vo.MaIdVo">
|
||||||
|
SELECT mt.type_name AS maName,
|
||||||
|
md.ma_status AS maStatus,
|
||||||
|
mo.need_company AS needCompany,
|
||||||
|
mo.plan_start_time AS planStartTime,
|
||||||
|
mo.duration AS duration
|
||||||
|
FROM ma_dev_info md
|
||||||
|
LEFT JOIN ma_type_info mt ON md.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_order_details mo ON md.ma_id = mo.ma_id
|
||||||
|
where md.ma_id = #{maId}
|
||||||
|
GROUP BY maName,maStatus,needCompany,planStartTime,duration
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -10,6 +10,16 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>zlpt-home</artifactId>
|
<artifactId>zlpt-home</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.bonus.zlpt</groupId>
|
||||||
|
<artifactId>zlpt-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.bonus.zlpt</groupId>
|
||||||
|
<artifactId>zlpt-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
package com.bonus.zlpt;
|
|
||||||
|
|
||||||
public class Main {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println("Hello world!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.bonus.zlpt;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.bonus.zlpt.common.security.annotation.EnableRyFeignClients;
|
||||||
|
import com.bonus.zlpt.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableCustomSwagger2
|
||||||
|
@EnableRyFeignClients
|
||||||
|
@SpringBootApplication
|
||||||
|
public class ZlptHomeApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ZlptHomeApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 首页模块启动成功 ლ(´ڡ`ლ)゙ \n" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.bonus.zlpt.home.controller;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.home.service.BmCarouselSetService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图配置(BmCarouselSet)表控制层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-03 15:24:10
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("bmCarouselSet")
|
||||||
|
public class BmCarouselSetController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private BmCarouselSetService bmCarouselSetService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.bonus.zlpt.home.mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图配置(BmCarouselSet)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-03 15:24:10
|
||||||
|
*/
|
||||||
|
public interface BmCarouselSetMapper {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package pojo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图配置(BmCarouselSet)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-03 15:24:10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class BmCarouselSet {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
//轮播图名称
|
||||||
|
private String carName;
|
||||||
|
//轮播图图片地址
|
||||||
|
private String carUrl;
|
||||||
|
//配置类型(0:资讯,1跳转地址)考虑用数据字典管理配置轮播图类型
|
||||||
|
private String type;
|
||||||
|
//配置跳转地址
|
||||||
|
private String openUrl;
|
||||||
|
//是否启用(0不启用,1启用)
|
||||||
|
private String status;
|
||||||
|
//创建时间
|
||||||
|
private String createTime;
|
||||||
|
//创建人
|
||||||
|
private String creator;
|
||||||
|
//排序
|
||||||
|
private String sort;
|
||||||
|
//是否删除
|
||||||
|
private String isActive;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.bonus.zlpt.home.service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图配置(BmCarouselSet)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-03 15:24:19
|
||||||
|
*/
|
||||||
|
public interface BmCarouselSetService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.bonus.zlpt.home.service.impl;
|
||||||
|
|
||||||
|
import com.bonus.zlpt.home.service.BmCarouselSetService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图配置(BmCarouselSet)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-03 15:24:19
|
||||||
|
*/
|
||||||
|
@Service("bmCarouselSetService")
|
||||||
|
public class BmCarouselSetServiceImpl implements BmCarouselSetService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue