提交代码
parent
503101b20b
commit
ff10ce3e8c
|
@ -1,18 +1,20 @@
|
||||||
package com.ruoyi.iot.api;
|
package com.ruoyi.iot.api;
|
||||||
|
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.iot.domain.IotDeviceInfo;
|
||||||
|
import com.ruoyi.iot.domain.IotPower;
|
||||||
import com.ruoyi.iot.domain.TowerReqVo;
|
import com.ruoyi.iot.domain.TowerReqVo;
|
||||||
import com.ruoyi.iot.enums.TowerTypeEnums;
|
import com.ruoyi.iot.enums.TowerTypeEnums;
|
||||||
|
import com.ruoyi.iot.service.IIotDeviceInfoService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -39,6 +41,10 @@ public class TowerCraneApiController {
|
||||||
{
|
{
|
||||||
cacheMap = new HashMap<>();
|
cacheMap = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIotDeviceInfoService iIotDeviceInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 塔吊监测++
|
* 塔吊监测++
|
||||||
* 限流规则[60秒内最多请求10次,限流策略IP]
|
* 限流规则[60秒内最多请求10次,限流策略IP]
|
||||||
|
@ -48,6 +54,7 @@ public class TowerCraneApiController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("/v1/push")
|
@PostMapping("/v1/push")
|
||||||
public AjaxResult pushData(@Validated @RequestBody TowerReqVo req) {
|
public AjaxResult pushData(@Validated @RequestBody TowerReqVo req) {
|
||||||
|
log.info("/towerCrane/v1/push...{}",JSON.toJSONString(req));
|
||||||
if(req.getType() == TowerTypeEnums.BASE.getCode()){
|
if(req.getType() == TowerTypeEnums.BASE.getCode()){
|
||||||
this.pushConfigData(req);
|
this.pushConfigData(req);
|
||||||
}else if(req.getType() == TowerTypeEnums.RUN.getCode()){
|
}else if(req.getType() == TowerTypeEnums.RUN.getCode()){
|
||||||
|
@ -64,6 +71,30 @@ public class TowerCraneApiController {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 塔吊监测++
|
||||||
|
* 限流规则[60秒内最多请求10次,限流策略IP]
|
||||||
|
* @author JiangYuQi
|
||||||
|
* @date 2024-01-13
|
||||||
|
*/
|
||||||
|
@GetMapping("/v99/pushIotPower")
|
||||||
|
public AjaxResult pushIotPower() {
|
||||||
|
IotDeviceInfo iotDeviceInfo = new IotDeviceInfo();
|
||||||
|
iotDeviceInfo.setDeviceId("A3gVjYga");
|
||||||
|
iotDeviceInfo.setDeviceName("配电箱");
|
||||||
|
iotDeviceInfo.setState(1);
|
||||||
|
iotDeviceInfo.setProjectId(229L);
|
||||||
|
iotDeviceInfo.setPoints(1L);
|
||||||
|
iotDeviceInfo.setTypeName("配电箱");
|
||||||
|
iotDeviceInfo.setHzTenantId("2RrXaxJ8");
|
||||||
|
iotDeviceInfo.setHzProjectId("8NgaaNgY");
|
||||||
|
iotDeviceInfo.setFactoryName("萨达");
|
||||||
|
iotDeviceInfo.setCompanyName("中铁一局建安公司");
|
||||||
|
iotDeviceInfo.setProjectName("西建中国西电集团智慧产业园");
|
||||||
|
iIotDeviceInfoService.insertIotDeviceInfo(iotDeviceInfo);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 塔机上报基本信息
|
* 塔机上报基本信息
|
||||||
* @param req
|
* @param req
|
||||||
|
|
|
@ -30,7 +30,6 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.beans.Transient;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -85,9 +84,9 @@ public class GainHzDataTask {
|
||||||
|
|
||||||
IotDeviceInfo iotDeviceInfo = new IotDeviceInfo();
|
IotDeviceInfo iotDeviceInfo = new IotDeviceInfo();
|
||||||
iotDeviceInfo.setDeviceName("配电箱");
|
iotDeviceInfo.setDeviceName("配电箱");
|
||||||
iotDeviceInfo.setFactoryName("华筑");
|
|
||||||
List<IotDeviceInfo> iotDeviceInfos = iIotDeviceInfoService.selectIotDeviceInfoList(iotDeviceInfo);
|
List<IotDeviceInfo> iotDeviceInfos = iIotDeviceInfoService.selectIotDeviceInfoList(iotDeviceInfo);
|
||||||
iotDeviceInfos.forEach(item -> {
|
iotDeviceInfos.forEach(item -> {
|
||||||
|
if(Objects.isNull(item.getFactoryName()) || !Objects.equals("萨达",item.getFactoryName())){
|
||||||
if(item.getHzTenantId() != null && item.getHzProjectId() != null) {
|
if(item.getHzTenantId() != null && item.getHzProjectId() != null) {
|
||||||
JSONObject body = new JSONObject();
|
JSONObject body = new JSONObject();
|
||||||
body.put("tenantId", item.getHzTenantId());
|
body.put("tenantId", item.getHzTenantId());
|
||||||
|
@ -169,6 +168,7 @@ public class GainHzDataTask {
|
||||||
iotWarningInfoService.batchInsertWarning(iotWarningInfos);
|
iotWarningInfoService.batchInsertWarning(iotWarningInfos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="typeName != null">type_name,</if>
|
<if test="typeName != null">type_name,</if>
|
||||||
<if test="hzTenantId != null">hz_tenant_id,</if>
|
<if test="hzTenantId != null">hz_tenant_id,</if>
|
||||||
<if test="hzProjectId != null">hz_project_id,</if>
|
<if test="hzProjectId != null">hz_project_id,</if>
|
||||||
|
<if test="factoryName != null">factory_name,</if>
|
||||||
|
<if test="companyName != null">company_name,</if>
|
||||||
|
<if test="projectName != null">project_name,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||||
|
@ -62,6 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="typeName != null">#{typeName},</if>
|
<if test="typeName != null">#{typeName},</if>
|
||||||
<if test="hzTenantId != null">#{hzTenantId},</if>
|
<if test="hzTenantId != null">#{hzTenantId},</if>
|
||||||
<if test="hzProjectId != null">#{hzProjectId},</if>
|
<if test="hzProjectId != null">#{hzProjectId},</if>
|
||||||
|
<if test="factoryName != null">#{factoryName},</if>
|
||||||
|
<if test="companyName != null">#{companyName},</if>
|
||||||
|
<if test="projectName != null">#{projectName},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak="></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5M76qMCiVjSG7bGOTcYmZdg0MQinsKve"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
||||||
<script src="/js/jquery-3.0.0.min.js"></script>
|
<script src="/js/jquery-3.0.0.min.js"></script>
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak="></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5M76qMCiVjSG7bGOTcYmZdg0MQinsKve"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
||||||
<script src="/js/jquery-3.0.0.min.js"></script>
|
<script src="/js/jquery-3.0.0.min.js"></script>
|
||||||
|
|
|
@ -555,7 +555,7 @@
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak="></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5M76qMCiVjSG7bGOTcYmZdg0MQinsKve"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
||||||
<script src="/js/jquery-3.0.0.min.js"></script>
|
<script src="/js/jquery-3.0.0.min.js"></script>
|
||||||
|
|
|
@ -390,7 +390,7 @@
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak="></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5M76qMCiVjSG7bGOTcYmZdg0MQinsKve"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
||||||
<script src="/js/echarts.js"></script>
|
<script src="/js/echarts.js"></script>
|
||||||
|
|
|
@ -328,7 +328,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak="></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5M76qMCiVjSG7bGOTcYmZdg0MQinsKve"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
||||||
<script src="/js/jquery-3.0.0.min.js"></script>
|
<script src="/js/jquery-3.0.0.min.js"></script>
|
||||||
|
|
|
@ -823,7 +823,7 @@
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script src="https://cdn.makalu.cc/js/moment/2.24.0/moment.min.js"></script>
|
<script src="https://cdn.makalu.cc/js/moment/2.24.0/moment.min.js"></script>
|
||||||
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak="></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5M76qMCiVjSG7bGOTcYmZdg0MQinsKve"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/moment/2.24.0/moment.min.js"></script>
|
<script src="https://cdn.makalu.cc/js/moment/2.24.0/moment.min.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
<script src="https://cdn.makalu.cc/js/vue/vue.js"></script>
|
||||||
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
<script src="https://cdn.makalu.cc/js/element-ui/index.js"></script>
|
||||||
|
|
|
@ -6,9 +6,33 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://62.234.3.186:3306/mkl_cas2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://rm-wz91cyo73auob3500o.mysql.rds.aliyuncs.com:3306/mkl_cas_demonstration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: weihu
|
||||||
|
# password: mkl!2021
|
||||||
|
url: jdbc:mysql://10.4.9.233:3306/mkl_cas_v1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: Sxyanzhu@cf123
|
password: Makalu2024
|
||||||
|
# url: jdbc:mysql://rm-wz91cyo73auob3500o.mysql.rds.aliyuncs.com:3306/mkl_cas_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: weihu
|
||||||
|
# password: mkl!2021
|
||||||
|
# url: jdbc:mysql://192.168.31.130:3306/mkl_cas_v1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
# url: jdbc:mysql://rm-wz91cyo73auob3500o.mysql.rds.aliyuncs.com:3306/mkl_aqsc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: weihu
|
||||||
|
# password: mkl!2021
|
||||||
|
# url: jdbc:mysql://rm-wz91cyo73auob3500o.mysql.rds.aliyuncs.com:3306/mkl_cas_v1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: weihu
|
||||||
|
# password: mkl!2021
|
||||||
|
# url: jdbc:mysql://127.0.0.1:3306/mkl_aqsc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
#中铁三局数字三局
|
||||||
|
# url: jdbc:mysql://rm-wz91s59439vhza70ho.mysql.rds.aliyuncs.com/mkl_cas_ztsj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
|
||||||
|
# username: weihu
|
||||||
|
# password: mkl!2021
|
||||||
|
|
||||||
|
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
@ -11,8 +11,10 @@ ruoyi:
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
#中铁一局建安公司
|
#中铁一局建安公司
|
||||||
profile: /mnt/data/typt/uploadPath
|
profile: /mnt/data/typt/uploadPath
|
||||||
|
# 安全生产、数字三局
|
||||||
|
# profile: /mnt/typt/uploadPath
|
||||||
# 本地
|
# 本地
|
||||||
# profile: D://mnt/typt/uploadPath
|
# profile: D://mnt/typt/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: true
|
addressEnabled: true
|
||||||
|
|
||||||
|
@ -142,17 +144,43 @@ swagger:
|
||||||
# cas配置
|
# cas配置
|
||||||
cas:
|
cas:
|
||||||
client-name: CasClientTYPT
|
client-name: CasClientTYPT
|
||||||
|
# client-name: CasClientTYPTSJ
|
||||||
|
# client-name: aqscClient
|
||||||
server:
|
server:
|
||||||
url: http://62.234.3.186/cas
|
# url: https://cas-ty.makalu.cc/cas
|
||||||
|
# url: https://cas-sj.makalu.cc/cas
|
||||||
|
url: https://jaszpt-cas.crfeb.com.cn/cas
|
||||||
|
# url: http://localhost:8080/cas
|
||||||
project:
|
project:
|
||||||
url: http://127.0.0.1:9004
|
# url: http://typt-t.makalu.cc
|
||||||
|
# url: https://typt-t1.makalu.cc
|
||||||
|
# url: https://szh.makalu.cc
|
||||||
|
# url: https://aqsc.makalu.cc
|
||||||
|
# url: http://127.0.0.1:9004
|
||||||
|
url: https://jaszpt.crfeb.com.cn
|
||||||
|
# url:https://sz-test.makalu.cc/
|
||||||
|
# url: https://ztsj.makalu.cc/
|
||||||
|
# url: https://szsj.makalu.cc/
|
||||||
|
user-center:
|
||||||
|
# url: https://user-center-sj.makalu.cc
|
||||||
|
url: https://jaszpt-usercenter.crfeb.com.cn
|
||||||
|
# url: https://user-center.makalu.cc
|
||||||
|
# url: 127.0.0.1:8099
|
||||||
# helmet文件下载路径路径配置
|
# helmet文件下载路径路径配置
|
||||||
helmet:
|
helmet:
|
||||||
#建安公司数字化集成管控平台
|
#建安公司数字化集成管控平台
|
||||||
localFilePath: /mnt/data/aqm/
|
localFilePath: /mnt/data/aqm/
|
||||||
downloadFileHost: http://127.0.0.1:9004/typt/
|
downloadFileHost: https://jaszpt.crfeb.com.cn/typt/
|
||||||
downloadWritePath: /mnt/data/typt/
|
downloadWritePath: /mnt/data/typt/
|
||||||
templateFilePath: /mnt/data/temporary/
|
templateFilePath: /mnt/data/temporary/
|
||||||
|
|
||||||
|
#一局三公司安全生产 、数字三局
|
||||||
|
# localFilePath: /mnt/aqm/
|
||||||
|
# downloadFileHost: https://filedown.makalu.cc/
|
||||||
|
# downloadWritePath: /mnt/typt/
|
||||||
|
# templateFilePath: /mnt/temporary/
|
||||||
|
|
||||||
|
|
||||||
#本地
|
#本地
|
||||||
# localFilePath: D:/aqm/
|
# localFilePath: D:/aqm/
|
||||||
# downloadFileHost: D:/mnt/typt/
|
# downloadFileHost: D:/mnt/typt/
|
||||||
|
|
Loading…
Reference in New Issue