screen-api
实时界面对数据进行保留小数位并且取整
6 files added
18 files modified
| | |
| | | } |
| | | |
| | | /** |
| | | * @param mac 设备mac |
| | | * @return 返回请求成功后的对象信息 |
| | | */ |
| | | @GetMapping("getDates") |
| | | @ApiOperation(value = "获取有走航数据的日期", notes = "获取有走航数据的日期") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"), |
| | | @ApiImplicitParam(name = "mac", value = "设备mac", required = true, paramType = "query", dataType = "String") |
| | | }) |
| | | public ResultMessage getDates(String mac) { |
| | | if (ObjectUtils.isEmpty(mac)) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | List<String> response = specialDeviceService.getDatesByMac(mac); |
| | | return ResultMessage.ok(response); |
| | | } |
| | | |
| | | /** |
| | | * @param request 请求信息 |
| | | * @return 返回请求成功后的对象信息 |
| | | */ |
New file |
| | |
| | | package com.moral.api.entity; |
| | | |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName HistoryHourly |
| | | * @Description TODO |
| | | * @Author 陈凯裕 |
| | | * @Date 2021/9/14 8:53 |
| | | * @Version TODO |
| | | **/ |
| | | @Data |
| | | public class HistoryHourly extends Model<HistoryHourly> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 设备mac |
| | | */ |
| | | private String mac; |
| | | |
| | | /** |
| | | * 时间 |
| | | */ |
| | | private Date time; |
| | | |
| | | /** |
| | | * 数据 |
| | | */ |
| | | private String value; |
| | | |
| | | /* |
| | | * 版本号 |
| | | * */ |
| | | private Integer version; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.moral.api.entity; |
| | | |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 走航车秒数据表 |
| | | * </p> |
| | | * |
| | | * @author moral |
| | | * @since 2021-09-13 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class HistorySecondCruiser extends Model<HistorySecondCruiser> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 设备mac |
| | | */ |
| | | private String mac; |
| | | |
| | | /** |
| | | * 数据时间 |
| | | */ |
| | | private Date time; |
| | | |
| | | /** |
| | | * 数据 |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * 此数据所属组织id |
| | | */ |
| | | private Integer organizationId; |
| | | |
| | | /** |
| | | * 数据批次 |
| | | */ |
| | | private Date batch; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.moral.api.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.moral.api.entity.HistoryHourly; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | * @author moral |
| | | * @since 2021-07-14 |
| | | */ |
| | | public interface HistoryHourlyMapper{ |
| | | public interface HistoryHourlyMapper extends BaseMapper<HistoryHourly> { |
| | | |
| | | String selectHourlyData(Map<String,Object> params); |
| | | |
New file |
| | |
| | | package com.moral.api.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.moral.api.entity.HistorySecondCruiser; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 走航车秒数据表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author moral |
| | | * @since 2021-09-13 |
| | | */ |
| | | public interface HistorySecondCruiserMapper extends BaseMapper<HistorySecondCruiser> { |
| | | |
| | | List<String> getDates(Map<String,Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.moral.api.service; |
| | | |
| | | import com.moral.api.entity.HistorySecondCruiser; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 走航车秒数据表 服务类 |
| | | * </p> |
| | | * |
| | | * @author moral |
| | | * @since 2021-09-13 |
| | | */ |
| | | public interface HistorySecondCruiserService extends IService<HistorySecondCruiser> { |
| | | |
| | | } |
| | |
| | | */ |
| | | SpecialDevice getSpecialDeviceMapByMac(String mac); |
| | | |
| | | /** |
| | | * @Description: 根据mac号获取无人机对象 |
| | | * @Param: [mac] |
| | | * @return: com.moral.api.entity.SpecialDevice |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/9/8 |
| | | */ |
| | | SpecialDevice getSpecialDeviceByMac(String mac); |
| | | |
| | | //获取半年内有数据的走航日期 |
| | | List<String> getDatesByMac(String mac); |
| | | |
| | | } |
New file |
| | |
| | | package com.moral.api.service.impl; |
| | | |
| | | import com.moral.api.entity.HistorySecondCruiser; |
| | | import com.moral.api.mapper.HistorySecondCruiserMapper; |
| | | import com.moral.api.service.HistorySecondCruiserService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 走航车秒数据表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author moral |
| | | * @since 2021-09-13 |
| | | */ |
| | | @Service |
| | | public class HistorySecondCruiserServiceImpl extends ServiceImpl<HistorySecondCruiserMapper, HistorySecondCruiser> implements HistorySecondCruiserService { |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.moral.api.entity.HistorySecondSpecial; |
| | | import com.moral.api.entity.Organization; |
| | | import com.moral.api.entity.SpecialDevice; |
| | | import com.moral.api.entity.SpecialDeviceHistory; |
| | | import com.moral.api.mapper.HistorySecondCruiserMapper; |
| | | import com.moral.api.mapper.HistorySecondSpecialMapper; |
| | | import com.moral.api.mapper.SpecialDeviceMapper; |
| | | import com.moral.api.service.OrganizationService; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.constant.Constants; |
| | | import com.moral.constant.RedisConstants; |
| | | import com.moral.util.DateUtils; |
| | | import com.moral.util.GeodesyUtils; |
| | | import com.moral.util.TokenUtils; |
| | | |
| | |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | SpecialDeviceMapper specialDeviceMapper; |
| | | |
| | | @Autowired |
| | | private HistorySecondCruiserMapper historySecondCruiserMapper; |
| | | |
| | | @Autowired |
| | | RedisTemplate redisTemplate; |
| | | |
| | |
| | | return filterData(data); |
| | | } |
| | | |
| | | @Override |
| | | |
| | | public SpecialDevice getSpecialDeviceMapByMac(String mac) { |
| | | //从缓存中获取 |
| | | QueryWrapper<SpecialDevice> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("mac",mac); |
| | | wrapper.eq("is_delete",Constants.NOT_DELETE); |
| | | return specialDeviceMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public SpecialDevice getSpecialDeviceByMac(String mac) { |
| | | QueryWrapper<SpecialDevice> queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("mac",mac); |
| | | queryWrapper.eq("is_delete",Constants.NOT_DELETE); |
| | | SpecialDevice specialDevice = specialDeviceMapper.selectOne(queryWrapper); |
| | | return specialDevice; |
| | | public List<String> getDatesByMac(String mac) { |
| | | Map<String, Object> userInfo = (Map) TokenUtils.getUserInfo(); |
| | | Map<String, Object> orgInfo = (Map) userInfo.get("organization"); |
| | | Integer orgId = (Integer) orgInfo.get("id"); |
| | | |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("orgId", orgId); |
| | | params.put("mac", mac); |
| | | Date start = DateUtils.addMonths(new Date(), -6); |
| | | params.put("start", DateUtils.dateToDateString(start)); |
| | | return historySecondCruiserMapper.getDates(params); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.moral.api.mapper.HistorySecondCruiserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.moral.api.entity.HistorySecondCruiser"> |
| | | <result column="mac" property="mac"/> |
| | | <result column="time" property="time"/> |
| | | <result column="value" property="value"/> |
| | | <result column="organization_id" property="organizationId"/> |
| | | <result column="batch" property="batch"/> |
| | | </resultMap> |
| | | |
| | | <select id="getDates" resultType="java.lang.String"> |
| | | SELECT DISTINCT DATE_FORMAT(`time`,'%Y-%m-%d') `time` |
| | | FROM history_second_cruiser |
| | | WHERE mac = #{mac} |
| | | AND organization_id = #{orgId} |
| | | AND `time` <![CDATA[>=]]> #{start} |
| | | ORDER BY `time` |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | String mac = device.getMac(); |
| | | Integer monitorPointId = device.getMonitorPointId(); |
| | | Integer versionId = device.getDeviceVersionId(); |
| | | if (name == null || mac == null || monitorPointId == null || versionId == null) { |
| | | if (ObjectUtils.isEmpty(name) || ObjectUtils.isEmpty(mac) || ObjectUtils.isEmpty(monitorPointId) || ObjectUtils.isEmpty(versionId)) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), |
| | | ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.constant.ResultMessage; |
| | | import com.moral.util.WebUtils; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | govMonitorPointService.delete(id); |
| | | return ResultMessage.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取该区域下所有国控/省控/县控站点", notes = "获取该区域下所有国控/省控/县控站点") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String") |
| | | }) |
| | | @GetMapping("govMonitorPoints") |
| | | public ResultMessage selectGovMonitorPoints(String regionCode) { |
| | | List<Map<String, Object>> response = govMonitorPointService.selectGovMonitorPoints(regionCode); |
| | | return ResultMessage.ok(response); |
| | | } |
| | | } |
| | |
| | | package com.moral.api.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.moral.api.entity.Sensor; |
| | | import com.moral.api.entity.SysDictData; |
| | | import com.moral.api.entity.Test; |
| | | import com.moral.api.entity.UnitConversion; |
| | | import com.moral.api.mapper.SysDictDataMapper; |
| | | import com.moral.api.service.SensorService; |
| | | import com.moral.api.service.SysDictDataService; |
| | | import com.moral.api.service.TestService; |
| | | import com.moral.api.service.impl.SensorServiceImpl; |
| | | import com.moral.api.util.CacheUtils; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.kafka.core.KafkaTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.io.*; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | |
| | | @Slf4j |
| | |
| | | |
| | | @Autowired |
| | | RedisTemplate redisTemplate; |
| | | |
| | | |
| | | /** |
| | | * name 姓名 |
| | |
| | | @RequestMapping(value = "search/{page}/{size}", method = RequestMethod.GET) |
| | | public ResultMessage findBypage(@PathVariable("page") Integer page, @PathVariable("size") Integer size) { |
| | | |
| | | log.info("page is:" + page + " size is:" + size); |
| | | //log.info("page is:" + page + " size is:" + size); |
| | | //根据条件分页查询 |
| | | Page<Test> userPage = testService.selectByPage(null, page, size); |
| | | //封装分页返回对象 |
| | |
| | | |
| | | @Autowired |
| | | private SensorService sensorService; |
| | | @Autowired |
| | | SysDictDataMapper sysDictDataMapper; |
| | | |
| | | @ApiOperation(value = "因子测试", notes = "因子测试") |
| | | @ApiImplicitParams({ |
| | |
| | | } |
| | | |
| | | @GetMapping("test") |
| | | public void test(){ |
| | | List<UnitConversion> range = redisTemplate.opsForList().range(RedisConstants.UNIT_CONVERSION, 0, -1); |
| | | System.out.println(range); |
| | | public void test() throws IOException { |
| | | BufferedReader br = new BufferedReader(new FileReader(new File("C:\\Users\\cdl\\Desktop\\alarmLevels.json"))); |
| | | StringBuilder sb = new StringBuilder(); |
| | | String line = br.readLine(); |
| | | while (line != null) { |
| | | sb.append(line + "\r\n"); |
| | | line = br.readLine(); |
| | | } |
| | | |
| | | Map map = JSON.parseObject(sb.toString(), Map.class); |
| | | System.out.println(map); |
| | | |
| | | Map<String,Object> sensorMap = (Map<String, Object>) map.get("alarmLevels"); |
| | | |
| | | Set<String> sets = sensorMap.keySet(); |
| | | |
| | | Map<String,String> alarmLevels = new HashMap<>(); |
| | | for (String set : sets) { |
| | | Map<String,Object> map2 = (Map<String, Object>) sensorMap.get(set); |
| | | String increment = map2.get("increment").toString(); |
| | | alarmLevels.put(set,increment); |
| | | } |
| | | alarmLevels.remove("AQI"); |
| | | Map<String,Object> resultMap = new HashMap<>(); |
| | | Map<String, String> ecodeMap = testService.getMap(); |
| | | |
| | | alarmLevels.forEach((key,value)->{ |
| | | resultMap.put(ecodeMap.get(key),value); |
| | | }); |
| | | |
| | | resultMap.forEach((key,value)->{ |
| | | SysDictData sysDictData = new SysDictData(); |
| | | sysDictData.setDataKey(key); |
| | | sysDictData.setDataValue(value.toString()); |
| | | sysDictData.setDictTypeId(25); |
| | | sysDictDataMapper.insert(sysDictData); |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | private Integer organizationId; |
| | | |
| | | /** |
| | | * 国控站/省控站/县控站标示,与gov_monitor_point中guid对应 |
| | | */ |
| | | private String guid; |
| | | |
| | | /** |
| | | * 设备型号id |
| | | */ |
| | | private Integer deviceVersionId; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.time.LocalDateTime; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | |
| | | private String mac; |
| | | |
| | | /** |
| | | * 政府站点id |
| | | */ |
| | | private String guid; |
| | | |
| | | /** |
| | | * 维护人id,多个逗号隔开,来源于manage_account |
| | | */ |
| | | private String operateIds; |
| | |
| | | private String mac; |
| | | |
| | | /** |
| | | * 政府站点id |
| | | */ |
| | | private String guid; |
| | | |
| | | /** |
| | | * 维护人id,多个逗号隔开,来源于manage_account |
| | | */ |
| | | private String operateIds; |
| | |
| | | import java.util.List; |
| | | |
| | | import com.moral.api.entity.Device; |
| | | import com.moral.api.entity.GovMonitorPoint; |
| | | import com.moral.api.entity.ManageAccount; |
| | | import com.moral.api.entity.MonitorPoint; |
| | | import com.moral.api.entity.Organization; |
| | |
| | | private MonitorPoint monitorPoint; |
| | | |
| | | /* |
| | | * 国控站点 |
| | | * */ |
| | | private GovMonitorPoint govMonitorPoint; |
| | | |
| | | /* |
| | | * 维护人 |
| | | * */ |
| | | private List<ManageAccount> operators; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | **/ |
| | | GovMonitorPoint selectGovMonitorPointInfoById(int id); |
| | | |
| | | //获取区域下政府站点列表 |
| | | List<Map<String, Object>> selectGovMonitorPoints(String regionCode); |
| | | |
| | | } |
| | |
| | | import com.moral.api.service.DeviceService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.moral.api.service.GovMonitorPointService; |
| | | import com.moral.api.service.SysDictDataService; |
| | | import com.moral.api.util.CacheUtils; |
| | | import com.moral.api.util.AdjustDataUtils; |
| | |
| | | mpInfo.put("provinceCode", monitorPoint.getProvinceCode()); |
| | | deviceInfo.put("monitorPoint", mpInfo); |
| | | |
| | | //国控站点 |
| | | Map<String, Object> govMpInfo = new LinkedHashMap<>(); |
| | | |
| | | govMpInfo.put("guid", null); |
| | | govMpInfo.put("name", null); |
| | | if (device.getGovMonitorPoint() != null) { |
| | | govMpInfo.put("guid", device.getGovMonitorPoint().getGuid()); |
| | | govMpInfo.put("name", device.getGovMonitorPoint().getName()); |
| | | } |
| | | deviceInfo.put("govMonitorPoint", govMpInfo); |
| | | setDeviceInfoToRedis(mac, deviceInfo); |
| | | return deviceInfo; |
| | | } |
| | |
| | | import com.moral.constant.Constants; |
| | | import com.moral.constant.RedisConstants; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.util.RegionCodeUtils; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.lang.reflect.Field; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | |
| | | GovMonitorPoint govMonitorPoint = govMonitorPointMapper.selectById(id); |
| | | return govMonitorPoint; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectGovMonitorPoints(String regionCode) { |
| | | QueryWrapper<GovMonitorPoint> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("guid", "name").eq("is_delete", Constants.NOT_DELETE); |
| | | if (!ObjectUtils.isEmpty(regionCode)) { |
| | | String regionName = RegionCodeUtils.regionCodeConvertToName(Integer.parseInt(regionCode)); |
| | | queryWrapper.eq(regionName, regionCode); |
| | | } |
| | | return govMonitorPointMapper.selectMaps(queryWrapper); |
| | | } |
| | | } |
| | |
| | | @Autowired(required = false) |
| | | private VersionSensorUnitMapper versionSensorUnitMapper; |
| | | |
| | | @Autowired(required = false) |
| | | private GovMonitorPointMapper govMonitorPointMapper; |
| | | |
| | | @Autowired |
| | | private LogUtils logUtils; |
| | | |
| | |
| | | String updateTime = SDF.format(specialDevice.getUpdateTime()); |
| | | specialDeviceMap.put("createTime",createTime); |
| | | specialDeviceMap.put("updateTime",updateTime); |
| | | Map<String,Object> govMonitorPointMap = new HashMap<>(); |
| | | if (!ObjectUtils.isEmpty(specialDevice.getGuid()) && specialDevice.getGuid()!=null && !"".equals(specialDevice.getGuid())){ |
| | | String guid = specialDevice.getGuid().toString(); |
| | | QueryWrapper<GovMonitorPoint> wapper_govMonitorPoint = new QueryWrapper<>(); |
| | | wapper_govMonitorPoint.eq("is_delete",Constants.NOT_DELETE); |
| | | wapper_govMonitorPoint.eq("guid",guid); |
| | | GovMonitorPoint govMonitorPoint = govMonitorPointMapper.selectOne(wapper_govMonitorPoint); |
| | | if (!ObjectUtils.isEmpty(govMonitorPoint)){ |
| | | govMonitorPointMap.put("id",govMonitorPoint.getId()); |
| | | govMonitorPointMap.put("guid",govMonitorPoint.getGuid()); |
| | | govMonitorPointMap.put("name",govMonitorPoint.getName()); |
| | | } |
| | | } |
| | | specialDeviceMap.put("govMonitorPoint",govMonitorPointMap); |
| | | List<Map<String,Object>> operateList = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(specialDevice.getOperateIds()) && specialDevice.getOperateIds()!=null){ |
| | | String operateIds = specialDevice.getOperateIds(); |
| | |
| | | specialDeviceInfo.put("name", specialDevice.getName()); |
| | | specialDeviceInfo.put("mac", specialDevice.getMac()); |
| | | specialDeviceInfo.put("createTime", DateUtils.dateToDateString(specialDevice.getCreateTime())); |
| | | specialDeviceInfo.put("guid", specialDevice.getGuid()); |
| | | |
| | | //扩展字段 |
| | | //specialDeviceInfo.put("extend", device.getExtend()); |
| | |
| | | <result column="operate_ids" property="operateIds"/> |
| | | <result column="monitor_point_id" property="monitorPointId"/> |
| | | <result column="organization_id" property="organizationId"/> |
| | | <result column="guid" property="guid"/> |
| | | <result column="device_version_id" property="deviceVersionId"/> |
| | | <result column="profession" property="profession"/> |
| | | <result column="tech" property="tech"/> |
| | |
| | | <result column="mp_area_code" property="areaCode"/> |
| | | <result column="mp_city_code" property="cityCode"/> |
| | | <result column="mp_province_code" property="provinceCode"/> |
| | | </association> |
| | | |
| | | <!--国控站点--> |
| | | <association property="govMonitorPoint" javaType="com.moral.api.entity.GovMonitorPoint"> |
| | | <result column="gmp_guid" property="guid"/> |
| | | <result column="gmp_name" property="name"/> |
| | | </association> |
| | | |
| | | <!--型号--> |
| | |
| | | mp.area_code mp_area_code, |
| | | mp.city_code mp_city_code, |
| | | mp.province_code mp_province_code, |
| | | gmp.guid gmp_guid, |
| | | gmp.name gmp_name, |
| | | ma.id operate_id, |
| | | v.id version_id, |
| | | v.`name` version_name, |
| | |
| | | ON d.organization_id = o.id |
| | | LEFT JOIN `monitor_point` mp |
| | | ON mp.id = d.monitor_point_id |
| | | LEFT JOIN `gov_monitor_point` gmp |
| | | ON gmp.guid = d.guid |
| | | LEFT JOIN `manage_account` ma |
| | | ON FIND_IN_SET |
| | | ( |