Merge branch 'main' of https://git.jsspisoft.com/ry-das
This commit is contained in:
commit
8aaa0588ab
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -41,7 +41,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
dir("$WORKSPACE/ui/dasadmin") {
|
dir("$WORKSPACE/ui/dasadmin") {
|
||||||
sh "sudo rsync -av --delete dist/ root@192.168.109.195:/das/ui/"
|
sh "sudo rsync -av --delete dist/ root@192.168.109.187:/das/app/ui/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,8 +51,8 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
dir("$WORKSPACE/das") {
|
dir("$WORKSPACE/das") {
|
||||||
sh 'sudo rsync -av target/das-1.0.0-release.jar root@192.168.109.195:/das/app/'
|
sh 'sudo rsync -av target/das-1.0.0-release.jar root@192.168.109.187:/das/app/das/'
|
||||||
sh 'sudo ssh -t root@192.168.109.195 systemctl restart das'
|
sh 'sudo ssh -t root@192.168.109.187 systemctl restart das'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,14 @@ public interface ProtocolTypeIds {
|
|||||||
* MODBUS RTU 串口主协议
|
* MODBUS RTU 串口主协议
|
||||||
*/
|
*/
|
||||||
Integer MODBUS_RTU_MASTER = 12;
|
Integer MODBUS_RTU_MASTER = 12;
|
||||||
|
|
||||||
|
Integer MODBUS_BECKHOFF = 80;
|
||||||
|
|
||||||
|
Integer ADS_BECKHOFF = 81;
|
||||||
/**
|
/**
|
||||||
* MODBUS TCP 主协议
|
* MODBUS TCP 主协议
|
||||||
*/
|
*/
|
||||||
Integer MODBUS_TCP_MASTER = 16;
|
Integer MODBUS_TCP_MASTER = 16;
|
||||||
|
|
||||||
|
Integer MODBUS_TCP_SLAVER = 17;
|
||||||
}
|
}
|
||||||
|
@ -46,4 +46,6 @@ public class SysFaultRecordingDesc {
|
|||||||
@TableField("updated_time")
|
@TableField("updated_time")
|
||||||
private Date updatedTime;
|
private Date updatedTime;
|
||||||
|
|
||||||
|
@TableField("unit")
|
||||||
|
private String unit;
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,9 @@ public class SysFaultRecordingExcel implements Serializable {
|
|||||||
@ExcelProperty(value = "中文描述",index = 1)
|
@ExcelProperty(value = "中文描述",index = 1)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单位",index = 2)
|
||||||
|
private String unit;
|
||||||
}
|
}
|
||||||
|
@ -101,6 +101,7 @@ public class FaultRecorderServiceImpl implements FaultRecorderService {
|
|||||||
SheetInfoBean sheetDTO = new SheetInfoBean();
|
SheetInfoBean sheetDTO = new SheetInfoBean();
|
||||||
map.put("variable", "英文名称");
|
map.put("variable", "英文名称");
|
||||||
map.put("description", "中文描述");
|
map.put("description", "中文描述");
|
||||||
|
map.put("unit","单位");
|
||||||
sheetDTO.setSheetName(theoreticalPowerCurve.getMadeinfactory());
|
sheetDTO.setSheetName(theoreticalPowerCurve.getMadeinfactory());
|
||||||
sheetDTO.setFieldAndAlias(map);
|
sheetDTO.setFieldAndAlias(map);
|
||||||
sheetDTO.setCollection(sysFaultRecordingDescList);
|
sheetDTO.setCollection(sysFaultRecordingDescList);
|
||||||
|
@ -146,10 +146,11 @@ public class SysNodeController {
|
|||||||
@PostMapping("/protocol/type")
|
@PostMapping("/protocol/type")
|
||||||
public R<?> queryProtocolTypeList() {
|
public R<?> queryProtocolTypeList() {
|
||||||
List<ProtocolTypeVo> typeVoList= new ArrayList<>();
|
List<ProtocolTypeVo> typeVoList= new ArrayList<>();
|
||||||
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.IEC_104_MASTER,"IEC104主"));
|
//typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.IEC_104_MASTER,"IEC104主"));
|
||||||
|
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.MODBUS_BECKHOFF,"MODBUS"));
|
||||||
|
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.ADS_BECKHOFF,"ADS"));
|
||||||
|
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.MODBUS_TCP_SLAVER,"MODBUS TCP从"));
|
||||||
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.IEC_104_SLAVER,"IEC104从"));
|
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.IEC_104_SLAVER,"IEC104从"));
|
||||||
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.MODBUS_RTU_MASTER,"MODBUS RTU主"));
|
|
||||||
typeVoList.add(new ProtocolTypeVo(ProtocolTypeIds.MODBUS_TCP_MASTER,"MODBUS TCP主"));
|
|
||||||
|
|
||||||
return R.success(typeVoList);
|
return R.success(typeVoList);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.das.modules.auth.mapper.BaseMapperPlus;
|
|||||||
import com.das.modules.node.domain.vo.EquipmentVo;
|
import com.das.modules.node.domain.vo.EquipmentVo;
|
||||||
import com.das.modules.node.domain.vo.SysTabMappingVo;
|
import com.das.modules.node.domain.vo.SysTabMappingVo;
|
||||||
import com.das.modules.node.entity.SysTabMapping;
|
import com.das.modules.node.entity.SysTabMapping;
|
||||||
|
import com.das.modules.page.domian.dto.TemperatureLimitDto;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@ -48,8 +49,8 @@ public interface SysImpTabMappingMapper extends BaseMapperPlus<SysTabMapping, Sy
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据设备id获取温度测点映射表
|
* 根据设备id获取温度测点映射表
|
||||||
* @param deviceId 设备id
|
* @param temperatureLimitDto 设备id,设备所属物模型中的属性列表
|
||||||
* @return SysTabMappingVo
|
* @return SysTabMappingVo
|
||||||
*/
|
*/
|
||||||
List<SysTabMapping> getTemperatureMappingListByDeviceId(@Param("deviceId") Long deviceId);
|
List<SysTabMapping> getTemperatureMappingListByDeviceId(@Param("info") TemperatureLimitDto temperatureLimitDto);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
package com.das.modules.page.controller;
|
package com.das.modules.page.controller;
|
||||||
|
|
||||||
import com.das.common.result.R;
|
import com.das.common.result.R;
|
||||||
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
import com.das.modules.page.domian.dto.TemperatureLimitDto;
|
||||||
import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
||||||
import com.das.modules.page.service.TemperatureDashboardService;
|
import com.das.modules.page.service.TemperatureDashboardService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
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.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -19,12 +22,12 @@ public class TemperatureDashboardController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据设备id获取温度限制设置
|
* 根据设备id获取温度限制设置
|
||||||
* @param device 设备{id:XXX} 只用到id即可
|
* @param temperatureLimitDto 设备{id:XXX} ,attributes["测点"]
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getTemperatureLimitByDeviceId")
|
@PostMapping("/getTemperatureLimitByDeviceId")
|
||||||
public R<List<TemperatureLimitVo>> getTemperatureLimitByDeviceId(@RequestBody SysEquipmentDto device){
|
public R<List<TemperatureLimitVo>> getTemperatureLimitByDeviceId(@RequestBody TemperatureLimitDto temperatureLimitDto){
|
||||||
List<TemperatureLimitVo> windTurbinesPageVos = service.getTemperatureLimitByDeviceId(device.getId());
|
List<TemperatureLimitVo> windTurbinesPageVos = service.getTemperatureLimitByDeviceId(temperatureLimitDto);
|
||||||
return R.success(windTurbinesPageVos);
|
return R.success(windTurbinesPageVos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.das.modules.page.domian.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TemperatureLimitDto {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备所属物模型中的属性列表
|
||||||
|
*/
|
||||||
|
private List<String> attributes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
private Long deviceId;
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.das.modules.page.service;
|
package com.das.modules.page.service;
|
||||||
|
|
||||||
|
import com.das.modules.page.domian.dto.TemperatureLimitDto;
|
||||||
import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,5 +14,5 @@ public interface TemperatureDashboardService {
|
|||||||
* @param deviceId 设备id
|
* @param deviceId 设备id
|
||||||
* @return 限制配置列表(如果限制未设置 则不返回对应测点信息)
|
* @return 限制配置列表(如果限制未设置 则不返回对应测点信息)
|
||||||
*/
|
*/
|
||||||
List<TemperatureLimitVo> getTemperatureLimitByDeviceId(Long deviceId);
|
List<TemperatureLimitVo> getTemperatureLimitByDeviceId(TemperatureLimitDto temperatureLimitDto);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.das.modules.page.service.impl;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.das.modules.node.entity.SysTabMapping;
|
import com.das.modules.node.entity.SysTabMapping;
|
||||||
import com.das.modules.node.mapper.SysImpTabMappingMapper;
|
import com.das.modules.node.mapper.SysImpTabMappingMapper;
|
||||||
|
import com.das.modules.page.domian.dto.TemperatureLimitDto;
|
||||||
import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
import com.das.modules.page.domian.vo.TemperatureLimitVo;
|
||||||
import com.das.modules.page.service.TemperatureDashboardService;
|
import com.das.modules.page.service.TemperatureDashboardService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -20,10 +21,10 @@ public class TemperatureDashboardServiceImpl implements TemperatureDashboardServ
|
|||||||
SysImpTabMappingMapper impTabMappingMapper;
|
SysImpTabMappingMapper impTabMappingMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TemperatureLimitVo> getTemperatureLimitByDeviceId(Long deviceId) {
|
public List<TemperatureLimitVo> getTemperatureLimitByDeviceId(TemperatureLimitDto temperatureLimitDto) {
|
||||||
Map<String,TemperatureLimitVo> map = new HashMap<>();
|
Map<String,TemperatureLimitVo> map = new HashMap<>();
|
||||||
|
|
||||||
List<SysTabMapping> mappings = impTabMappingMapper.getTemperatureMappingListByDeviceId(deviceId);
|
List<SysTabMapping> mappings = impTabMappingMapper.getTemperatureMappingListByDeviceId(temperatureLimitDto);
|
||||||
if (mappings != null && !mappings.isEmpty()) {
|
if (mappings != null && !mappings.isEmpty()) {
|
||||||
mappings.forEach(mapping -> {
|
mappings.forEach(mapping -> {
|
||||||
String params = mapping.getParams();
|
String params = mapping.getParams();
|
||||||
|
@ -20,4 +20,9 @@ public class SysRunLogExcel implements Serializable {
|
|||||||
@ExcelProperty(value = "中文描述",index = 1)
|
@ExcelProperty(value = "中文描述",index = 1)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单位",index = 2)
|
||||||
|
private String unit;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.das.modules.plc.domain;
|
package com.das.modules.plc.domain;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
@ -46,4 +47,9 @@ public class SysRunLogDesc {
|
|||||||
@TableField("updated_time")
|
@TableField("updated_time")
|
||||||
private Date updatedTime;
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@TableField("unit")
|
||||||
|
private String unit;
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,7 @@ public class PlcLogsServiceImpl implements PlcLogService {
|
|||||||
SheetInfoBean sheetDTO = new SheetInfoBean();
|
SheetInfoBean sheetDTO = new SheetInfoBean();
|
||||||
map.put("variable", "英文名称");
|
map.put("variable", "英文名称");
|
||||||
map.put("description", "中文描述");
|
map.put("description", "中文描述");
|
||||||
|
map.put("unit","单位");
|
||||||
sheetDTO.setSheetName(theoreticalPowerCurve.getMadeinfactory());
|
sheetDTO.setSheetName(theoreticalPowerCurve.getMadeinfactory());
|
||||||
sheetDTO.setFieldAndAlias(map);
|
sheetDTO.setFieldAndAlias(map);
|
||||||
sheetDTO.setCollection(sysFaultRecordingDescList);
|
sheetDTO.setCollection(sysFaultRecordingDescList);
|
||||||
|
@ -128,6 +128,12 @@
|
|||||||
and t3.id = t4.iot_model_id
|
and t3.id = t4.iot_model_id
|
||||||
and t1.meas_point_code = t4.attribute_code
|
and t1.meas_point_code = t4.attribute_code
|
||||||
and t4.attribute_type = 138 and t4.attribute_name like '%温度%'
|
and t4.attribute_type = 138 and t4.attribute_name like '%温度%'
|
||||||
and t2.id = #{deviceId}
|
and t2.id = #{info.deviceId}
|
||||||
|
<if test="info.attributes !=null and info.attributes.size() > 0">
|
||||||
|
and t1.meas_point_code in
|
||||||
|
<foreach collection="info.attributes" item="attribute" open="(" close=")" separator=",">
|
||||||
|
#{attribute}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -65,8 +65,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tabsPart">
|
<div class="tabsPart">
|
||||||
<el-table :data="faultRecordingpageData" class="tablePart">
|
<el-table :data="faultRecordingpageData" class="tablePart">
|
||||||
<el-table-column prop="variable" label="列路" align="center"> </el-table-column>
|
<el-table-column prop="variable" label="变量" align="center"> </el-table-column>
|
||||||
<el-table-column prop="description" label="中文" align="center"> </el-table-column>
|
<el-table-column prop="description" label="中文" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="unit" label="单位" align="center"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="mainFooter">
|
<div class="mainFooter">
|
||||||
@ -76,7 +77,7 @@
|
|||||||
:total="paginationOptions1.total"
|
:total="paginationOptions1.total"
|
||||||
:page-sizes="paginationOptions1.pageSizes"
|
:page-sizes="paginationOptions1.pageSizes"
|
||||||
background
|
background
|
||||||
:pager-count="7"
|
:pager-count="5"
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
@size-change="handleSizeChange1"
|
@size-change="handleSizeChange1"
|
||||||
@current-change="handleCurrentChange1"
|
@current-change="handleCurrentChange1"
|
||||||
@ -99,8 +100,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tabsPart">
|
<div class="tabsPart">
|
||||||
<el-table :data="runLogpageData" class="tablePart">
|
<el-table :data="runLogpageData" class="tablePart">
|
||||||
<el-table-column prop="variable" label="列路" align="center"> </el-table-column>
|
<el-table-column prop="variable" label="变量" align="center"> </el-table-column>
|
||||||
<el-table-column prop="description" label="中文" align="center"> </el-table-column>
|
<el-table-column prop="description" label="中文" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="unit" label="单位" align="center"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="mainFooter">
|
<div class="mainFooter">
|
||||||
@ -110,7 +112,7 @@
|
|||||||
:total="paginationOptions2.total"
|
:total="paginationOptions2.total"
|
||||||
:page-sizes="paginationOptions2.pageSizes"
|
:page-sizes="paginationOptions2.pageSizes"
|
||||||
background
|
background
|
||||||
:pager-count="7"
|
:pager-count="5"
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
@size-change="handleSizeChange2"
|
@size-change="handleSizeChange2"
|
||||||
@current-change="handleCurrentChange2"
|
@current-change="handleCurrentChange2"
|
||||||
@ -608,14 +610,14 @@ onMounted(() => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$headerHeight: 60px;
|
$headerHeight: 60px;
|
||||||
// $defaultBackgroundColor: #fff;
|
$defaultBackgroundColor: #fff;
|
||||||
$defaultAsideWidth: 260px;
|
$defaultAsideWidth: 260px;
|
||||||
$paginationHeight: 32px;
|
$paginationHeight: 32px;
|
||||||
.theoreticalpowerCurve {
|
.theoreticalpowerCurve {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: transparent;
|
// background: transparent;
|
||||||
.mainContainer {
|
.mainContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -720,15 +722,15 @@ $paginationHeight: 32px;
|
|||||||
.bottom-left {
|
.bottom-left {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
.tabsPart {
|
||||||
|
height: 240px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
:deep(.el-table .cell) {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
.box-card3 {
|
.box-card3 {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
.tabsPart {
|
|
||||||
height: 240px;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
:deep(el-table .cel) {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user