first commit

This commit is contained in:
陈现府
2025-11-20 10:45:16 +08:00
commit 8355431361
2643 changed files with 291314 additions and 0 deletions
@@ -0,0 +1,53 @@
package com.mhd.user.domain.driverCurrentPosition.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.mhd.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.mhd.common.core.web.domain.BaseVOEntity;
import java.math.BigDecimal;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* 司机当前位置信息对象 driver_current_position
*
* @author gen
* @date 2024-01-04
*/
@Data
public class DriverCurrentPosition extends BaseVOEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty("司机位置id")
@TableId(type = IdType.AUTO)
private Long driverCurrentPositionId;
@ApiModelProperty("用户表ID")
@Excel(name = "用户表ID")
private Long userId;
@ApiModelProperty("经度")
@Excel(name = "经度")
private String longitude;
@ApiModelProperty("纬度")
@Excel(name = "纬度")
private String latitude;
@ApiModelProperty("位置信息")
@Excel(name = "位置信息")
private String address;
@ApiModelProperty("车牌号")
@Excel(name = "车牌号")
private String licensePlate;
@ApiModelProperty("行进方向")
@Excel(name = "行进方向")
private String drivingDirection;
}
@@ -0,0 +1,54 @@
package com.mhd.user.domain.driverCurrentPosition.repository.facade;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mhd.user.domain.driverCurrentPosition.entity.DriverCurrentPosition;
import com.mhd.common.core.domain.DriverCurrentPositionPO;
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
import java.util.Date;
import java.util.List;
/**
* 司机当前位置信息Service接口
*
* @author gen
* @date 2024-01-04
*/
public interface IDriverCurrentPositionService extends IService<DriverCurrentPosition>
{
/**
* 分页查询司机当前位置信息列表
*/
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO);
/**
* 新增司机当前位置信息
*/
public Boolean insert(DriverCurrentPositionDO driverCurrentPositionDO);
/**
* 修改司机当前位置信息
*/
public Boolean update(DriverCurrentPositionDO driverCurrentPositionDO);
/**
* 批量删除司机当前位置信息
*/
public Boolean delete(Long[] driverCurrentPositionIds);
/**
* 查询司机当前位置信息
*/
public DriverCurrentPositionPO getInfo(Long driverCurrentPositionId);
DriverCurrentPositionPO getDriverLatestLocation(Long userId);
List<Long> getOnlineDriver(Date time);
List<DriverCurrentPositionPO> getOnlineVehicle(Date time);
List<DriverCurrentPositionPO> getOfflineVehicle(Date time);
DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate);
}
@@ -0,0 +1,33 @@
package com.mhd.user.domain.driverCurrentPosition.repository.mapper;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mhd.user.domain.driverCurrentPosition.entity.DriverCurrentPosition;
import com.mhd.common.core.domain.DriverCurrentPositionPO;
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
import org.apache.ibatis.annotations.Param;
/**
* 司机当前位置信息Mapper接口
*
* @author gen
* @date 2024-01-04
*/
public interface DriverCurrentPositionMapper extends BaseMapper<DriverCurrentPosition>
{
/**
* 查询司机当前位置信息列表
*/
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO);
DriverCurrentPositionPO getDriverLatestLocation(@Param("userId") Long userId);
List<Long> getOnlineDriver(@Param("time") Date time);
List<DriverCurrentPositionPO> getOnlineVehicle(@Param("time") Date time);
List<DriverCurrentPositionPO> getOfflineVehicle(@Param("time") Date time);
DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate);
}
@@ -0,0 +1,107 @@
package com.mhd.user.domain.driverCurrentPosition.repository.persistence;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mhd.user.domain.driverCurrentPosition.entity.DriverCurrentPosition;
import com.mhd.user.domain.driverCurrentPosition.repository.facade.IDriverCurrentPositionService;
import com.mhd.user.domain.driverCurrentPosition.repository.mapper.DriverCurrentPositionMapper;
import com.mhd.common.core.domain.DriverCurrentPositionPO;
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 司机当前位置信息Service业务层处理
*
* @author gen
* @date 2024-01-04
*/
@Service
public class DriverCurrentPositionImpl extends ServiceImpl<DriverCurrentPositionMapper, DriverCurrentPosition> implements IDriverCurrentPositionService{
@Autowired
private DriverCurrentPositionMapper driverCurrentPositionMapper;
/**
* 查询司机当前位置信息列表
*/
@Override
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO)
{
return driverCurrentPositionMapper.queryList(driverCurrentPositionDO);
}
/**
* 新增司机当前位置信息
*/
@Override
public Boolean insert(DriverCurrentPositionDO driverCurrentPositionDO) {
DriverCurrentPosition driverCurrentPosition = new DriverCurrentPosition();
BeanUtils.copyProperties(driverCurrentPositionDO,driverCurrentPosition);
return this.save(driverCurrentPosition);
}
/**
* 修改司机当前位置信息
*/
@Override
public Boolean update(DriverCurrentPositionDO driverCurrentPositionDO) {
DriverCurrentPosition driverCurrentPosition = new DriverCurrentPosition();
BeanUtils.copyProperties(driverCurrentPositionDO,driverCurrentPosition);
return this.updateById(driverCurrentPosition);
}
/**
* 批量删除司机当前位置信息
*/
@Override
public Boolean delete(Long[] driverCurrentPositionIds ) {
List<DriverCurrentPosition> list = new ArrayList<>();
for (Long id : driverCurrentPositionIds) {
DriverCurrentPosition driverCurrentPosition = new DriverCurrentPosition();
driverCurrentPosition.setDriverCurrentPositionId(id);
driverCurrentPosition.setDelFlag(2);
list.add(driverCurrentPosition);
}
return this.updateBatchById(list);
}
/**
* 修改司机当前位置信息
*/
@Override
public DriverCurrentPositionPO getInfo(Long driverCurrentPositionId) {
DriverCurrentPosition driverCurrentPosition = this.getById(driverCurrentPositionId);
DriverCurrentPositionPO driverCurrentPositionPO = new DriverCurrentPositionPO();
BeanUtils.copyProperties(driverCurrentPosition,driverCurrentPositionPO);
return driverCurrentPositionPO;
}
@Override
public DriverCurrentPositionPO getDriverLatestLocation(Long userId) {
return driverCurrentPositionMapper.getDriverLatestLocation(userId);
}
@Override
public List<Long> getOnlineDriver(Date time) {
return driverCurrentPositionMapper.getOnlineDriver(time);
}
@Override
public List<DriverCurrentPositionPO> getOnlineVehicle(Date time) {
return driverCurrentPositionMapper.getOnlineVehicle(time);
}
@Override
public List<DriverCurrentPositionPO> getOfflineVehicle(Date time) {
return driverCurrentPositionMapper.getOfflineVehicle(time);
}
@Override
public DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate) {
return driverCurrentPositionMapper.getVehicleLatestLocation(licensePlate);
}
}
@@ -0,0 +1,57 @@
package com.mhd.user.domain.driverCurrentPosition.repository.todo;
import com.mhd.common.core.annotation.Excel;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
import com.mhd.common.core.web.domain.BaseVOEntity;
import java.util.List;
/**
* 司机当前位置信息对象 driver_current_position
*
* @author gen
* @date 2024-01-04
*/
@Data
public class DriverCurrentPositionDO extends BaseVOEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty("司机位置id")
private Long driverCurrentPositionId;
@ApiModelProperty("用户表ID")
@Excel(name = "用户表ID")
private Long userId;
@ApiModelProperty("经度")
@Excel(name = "经度")
private String longitude;
@ApiModelProperty("纬度")
@Excel(name = "纬度")
private String latitude;
@ApiModelProperty("位置信息")
@Excel(name = "位置信息")
private String address;
@ApiModelProperty("车牌号")
@Excel(name = "车牌号")
private String licensePlate;
@ApiModelProperty("行进方向")
@Excel(name = "行进方向")
private String drivingDirection;
@ApiModelProperty(name = "组织ID集合")
private List<Long> organizationIdList;
@ApiModelProperty(name = "权限菜单ID")
private Long permissionMenuId;
}
@@ -0,0 +1,84 @@
package com.mhd.user.domain.driverCurrentPosition.service;
import com.mhd.user.domain.driverCurrentPosition.repository.facade.IDriverCurrentPositionService;
import com.mhd.common.core.domain.DriverCurrentPositionPO;
import com.mhd.user.domain.driverCurrentPosition.repository.todo.DriverCurrentPositionDO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* 司机当前位置信息
*
* @author gen
* @date 2024-01-04
*/
@Service
@Slf4j
public class DriverCurrentPositionDomainService {
@Autowired
private IDriverCurrentPositionService driverCurrentPositionService;
/**
* 分页查询司机当前位置信息列表
*/
public List<DriverCurrentPositionPO> queryList(DriverCurrentPositionDO driverCurrentPositionDO) {
return driverCurrentPositionService.queryList(driverCurrentPositionDO);
}
/**
* 新增司机当前位置信息
*/
public Boolean insert(DriverCurrentPositionDO driverCurrentPositionDO) {
return driverCurrentPositionService.insert(driverCurrentPositionDO);
}
/**
* 修改司机当前位置信息
*/
public Boolean update(DriverCurrentPositionDO driverCurrentPositionDO) {
return driverCurrentPositionService.update(driverCurrentPositionDO);
}
/**
* 批量删除司机当前位置信息
*/
public Boolean delete(Long[] driverCurrentPositionIds) {
return driverCurrentPositionService.delete(driverCurrentPositionIds);
}
/**
* 获取司机当前位置信息详细信息
*/
public DriverCurrentPositionPO getInfo(Long driverCurrentPositionId)
{
return driverCurrentPositionService.getInfo(driverCurrentPositionId);
}
public DriverCurrentPositionPO getDriverLatestLocation(Long userId) {
return driverCurrentPositionService.getDriverLatestLocation(userId);
}
public List<Long> getOnlineDriver(Date time) {
return driverCurrentPositionService.getOnlineDriver(time);
}
public List<DriverCurrentPositionPO> getOnlineVehicle(Date time) {
return driverCurrentPositionService.getOnlineVehicle(time);
}
public List<DriverCurrentPositionPO> getOfflineVehicle(Date time) {
return driverCurrentPositionService.getOfflineVehicle(time);
}
public DriverCurrentPositionPO getVehicleLatestLocation(String licensePlate) {
return driverCurrentPositionService.getVehicleLatestLocation(licensePlate);
}
}