大屏接口修改与ws接口修改
This commit is contained in:
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.bigscreen.domain.dto.ProjectUpdateDto;
|
||||
import org.dromara.bigscreen.domain.dto.TanchuangInfoReq;
|
||||
import org.dromara.bigscreen.domain.dto.Ys7DeviceUpdateReq;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
||||
@ -402,6 +403,15 @@ public class ProjectBigScreenController extends BaseController {
|
||||
return R.ok(projectService.getProjectMapList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询地图项目分类
|
||||
*/
|
||||
@SaCheckPermission("project:big:screen")
|
||||
@PostMapping("/updatePosition")
|
||||
public R<Void> updatePosition(@RequestBody ProjectUpdateDto dto) {
|
||||
return toAjax(projectService.updatePosition(dto));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询项目地域分散图
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package org.dromara.bigscreen.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ProjectUpdateDto implements Serializable {
|
||||
|
||||
|
||||
private Long projectId; // 项目id
|
||||
|
||||
private String position; // 图片
|
||||
|
||||
}
|
||||
@ -80,12 +80,12 @@ public class RedisMessageListener implements MessageListener {
|
||||
private String buildPushMessage(String key, String message, Long projectId) {
|
||||
JSONObject messageObj = new JSONObject();
|
||||
messageObj.put("type", "wrj_DATA_UPDATE");
|
||||
messageObj.put("projectId",projectId);
|
||||
messageObj.put("projectId",projectId.toString());
|
||||
messageObj.put("clientId",key);
|
||||
// 位置信息
|
||||
JSONObject locationObj = new JSONObject();
|
||||
locationObj.put("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude")); // 纬度
|
||||
locationObj.put("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude")); // 经度
|
||||
locationObj.put("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude").toString()); // 纬度
|
||||
locationObj.put("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude").toString()); // 经度
|
||||
messageObj.put("location", locationObj);
|
||||
return messageObj.toString();
|
||||
}
|
||||
|
||||
@ -272,14 +272,14 @@ public class GpsEquipmentServiceImpl extends ServiceImpl<GpsEquipmentMapper, Gps
|
||||
JSONObject messageObj = new JSONObject();
|
||||
messageObj.put("type", "GPS_DATA_UPDATE"); // 消息类型
|
||||
messageObj.put("clientId", sonBo.getClientId()); // 设备唯一标识
|
||||
messageObj.put("projectId", sonBo.getProjectId()); // 项目ID
|
||||
messageObj.put("userId", sonBo.getUserId()); // 关联用户ID
|
||||
messageObj.put("projectId", sonBo.getProjectId().toString()); // 项目ID
|
||||
messageObj.put("userId", sonBo.getUserId().toString()); // 关联用户ID
|
||||
|
||||
// 位置信息
|
||||
JSONObject locationObj = new JSONObject();
|
||||
locationObj.put("latitude", sonBo.getLocLatitude()); // 纬度
|
||||
locationObj.put("longitude", sonBo.getLocLongitude()); // 经度
|
||||
locationObj.put("altitude", sonBo.getLocAltitude()); // 海拔
|
||||
locationObj.put("latitude", sonBo.getLocLatitude().toString()); // 纬度
|
||||
locationObj.put("longitude", sonBo.getLocLongitude().toString()); // 经度
|
||||
locationObj.put("altitude", sonBo.getLocAltitude().toString()); // 海拔
|
||||
messageObj.put("location", locationObj);
|
||||
|
||||
// 转换为String类型返回
|
||||
|
||||
@ -162,4 +162,10 @@ public class BusProject extends BaseEntity {
|
||||
*/
|
||||
private String province;
|
||||
|
||||
|
||||
/**
|
||||
* 位置信息
|
||||
*/
|
||||
private String position;
|
||||
|
||||
}
|
||||
|
||||
@ -129,4 +129,9 @@ public class BusProjectCreateReq implements Serializable {
|
||||
* 省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 位置信息
|
||||
*/
|
||||
private String position;
|
||||
}
|
||||
|
||||
@ -147,4 +147,9 @@ public class BusProjectUpdateReq implements Serializable {
|
||||
*/
|
||||
private List<Punchrange> punchrangeList;
|
||||
|
||||
/**
|
||||
* 位置信息
|
||||
*/
|
||||
private String position;
|
||||
|
||||
}
|
||||
|
||||
@ -209,4 +209,7 @@ public class BusProjectVo implements Serializable {
|
||||
*/
|
||||
private String projectGeneralize;
|
||||
|
||||
|
||||
private String position;
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package org.dromara.project.service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.bigscreen.domain.dto.ProjectUpdateDto;
|
||||
import org.dromara.bigscreen.domain.dto.TanchuangInfoReq;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -239,4 +240,6 @@ public interface IBusProjectService extends IService<BusProject> {
|
||||
Map<String, Map<String, String>> getProjectCapacity();
|
||||
|
||||
Map<String, Map<String, Object>> getInfoData(TanchuangInfoReq req);
|
||||
|
||||
Boolean updatePosition(ProjectUpdateDto dto);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import cn.hutool.core.util.PhoneUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -14,6 +15,7 @@ import com.github.benmanes.caffeine.cache.Cache;
|
||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.bigscreen.domain.dto.ProjectUpdateDto;
|
||||
import org.dromara.bigscreen.domain.dto.TanchuangInfoReq;
|
||||
import org.dromara.common.core.constant.CacheNames;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
@ -1184,6 +1186,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
Map<String, String> map2 = new HashMap<>();
|
||||
map2.put("lng", project.getLng());
|
||||
map2.put("lat", project.getLat());
|
||||
map2.put("position",project.getPosition());
|
||||
map2.put("projectId", project.getId().toString());
|
||||
map1.put(project.getProjectName(), map2);
|
||||
//当满足条件时删除该元素
|
||||
@ -1240,6 +1243,14 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updatePosition(ProjectUpdateDto dto) {
|
||||
if (dto.getProjectId() == null || dto.getPosition() == null) {
|
||||
throw new ServiceException("传递参数不能为空!");
|
||||
}
|
||||
return baseMapper.update(new LambdaUpdateWrapper<BusProject>().set(BusProject::getPosition, dto.getPosition()).eq(BusProject::getId, dto.getProjectId())) >0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造分项工程树
|
||||
*/
|
||||
|
||||
@ -280,4 +280,6 @@ public interface ISysUserService {
|
||||
List<SysUser> selectUserByRoleIdAndProjectId(Long roleId,Long projectId);
|
||||
|
||||
List<SysUser> selectUserByRoleIdsAndProjectId(List<Long> roleIds,Long projectId);
|
||||
|
||||
String queryNameById(Long id);
|
||||
}
|
||||
|
||||
@ -1272,6 +1272,12 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryNameById(Long id) {
|
||||
SysUserVo sysUserVo = baseMapper.selectVoById(id);
|
||||
return sysUserVo != null ? sysUserVo.getNickName() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDTO selectUser(Long userId) {
|
||||
|
||||
|
||||
@ -69,4 +69,6 @@ public interface IXzdPurchaseContractInformationService extends IService<XzdPurc
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
String queryCodeById(Long id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user