各模块实体类增加字段说明
台站运行管理新增根据探测器id及时间查询样品数据方法 台站运行管理新增根据台站id,探测器id及时间查询状态数据方法 台站运行管理新增根据台站id及时间查询气象数据方法 实现台站运行管理查询台站下各探测器查询探测器对应的样品数据,状态数据,气象数据历史记录信息接口
This commit is contained in:
parent
c618e6957f
commit
8cc7d138f2
|
@ -16,37 +16,67 @@ import java.util.List;
|
|||
@TableName(value = "alarm_contact_group")
|
||||
public class AlarmContactGroup implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 联系人组名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 联系人组描述
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 联系人组关联的用户id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
List<String> userIds;
|
||||
|
||||
/**
|
||||
* 联系人组关联的用户集合
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
List<SysUser> users;
|
||||
|
||||
/**
|
||||
* 当前联系人组人员数量
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
Integer personNumber;
|
||||
|
||||
|
|
|
@ -12,12 +12,21 @@ import java.io.Serializable;
|
|||
@TableName(value = "alarm_contact_group_member")
|
||||
public class AlarmContactGroupMember implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 联系人组id
|
||||
*/
|
||||
@TableField(value = "group_id")
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
|
||||
|
|
|
@ -9,15 +9,30 @@ import java.util.Date;
|
|||
@Data
|
||||
public class AlarmHistory {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date alarmStartDate;
|
||||
|
||||
/**
|
||||
* 报警详情
|
||||
*/
|
||||
private String alarmInfo;
|
||||
|
||||
/**
|
||||
* 规则信息
|
||||
*/
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 来源类型
|
||||
*/
|
||||
private String sourceType;
|
||||
}
|
||||
|
|
|
@ -15,17 +15,29 @@ import java.util.Date;
|
|||
@TableName(value = "alarm_log")
|
||||
public class AlarmLog implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 规则id
|
||||
*/
|
||||
@TableField(value = "rule_id")
|
||||
private String ruleId;
|
||||
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
@TableField(value = "alarm_start_date")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date alarmStartDate;
|
||||
|
||||
/**
|
||||
* 报警详情
|
||||
*/
|
||||
@TableField(value = "alarm_info")
|
||||
private String alarmInfo;
|
||||
|
||||
|
|
|
@ -15,46 +15,85 @@ import java.util.Date;
|
|||
@TableName(value = "alarm_rule")
|
||||
public class AlarmRule implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 规则信息
|
||||
*/
|
||||
@TableField(value = "operator")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 沉默周期,单位为秒
|
||||
*/
|
||||
@TableField(value = "silence_cycle")
|
||||
private Integer silenceCycle;
|
||||
|
||||
/**
|
||||
* 报警通知方式,如短信、邮件等
|
||||
*/
|
||||
@TableField(value = "notification")
|
||||
private String notification;
|
||||
|
||||
/**
|
||||
* 是否启用该报警规则(0-未启用,1-启用)
|
||||
*/
|
||||
@TableField(value = "enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 报警联系人组id
|
||||
*/
|
||||
@TableField(value = "contact_id")
|
||||
private String contactId;
|
||||
|
||||
/**
|
||||
* 资源id
|
||||
*/
|
||||
@TableField(value = "source_id")
|
||||
private String sourceId;
|
||||
|
||||
/**
|
||||
* 资源类型
|
||||
*/
|
||||
@TableField(value = "source_type")
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
|
|
|
@ -15,43 +15,79 @@ import java.util.Date;
|
|||
@TableName(value = "sys_database")
|
||||
public class SysDatabase implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 状态(0-断开连接,1-连接成功)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
@TableField(value = "ip_address")
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
@TableField(value = "port")
|
||||
private String port;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@TableField(value = "username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@TableField(value = "password")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 数据库类型
|
||||
*/
|
||||
@TableField(value = "type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
|
|
|
@ -15,31 +15,55 @@ import java.util.Date;
|
|||
@TableName(value = "sys_server")
|
||||
public class SysServer implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 状态(0-停机,1-正常,2-故障)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* ip地址
|
||||
*/
|
||||
@TableField(value = "ip_address")
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.Map;
|
|||
@FeignClient(value = "jeecg-system")
|
||||
public interface IAlarmSysUserService {
|
||||
|
||||
@RequestMapping("/alarmSysUser/findUserMap")
|
||||
@RequestMapping("/sys/user/findUserMap")
|
||||
Map<String, SysUser> findUserMap();
|
||||
|
||||
}
|
||||
|
|
|
@ -5,12 +5,24 @@ import lombok.Data;
|
|||
@Data
|
||||
public class FileInfo {
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 文件大小
|
||||
*/
|
||||
private String fileSize;
|
||||
|
||||
/**
|
||||
* 文件日期
|
||||
*/
|
||||
private String fileDate;
|
||||
|
||||
}
|
||||
|
|
|
@ -8,18 +8,39 @@ import java.util.List;
|
|||
@Data
|
||||
public class LogManage {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 排序编号
|
||||
*/
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 父级编号
|
||||
*/
|
||||
private Integer parentNum;
|
||||
|
||||
/**
|
||||
* 是否有父级
|
||||
*/
|
||||
private boolean hashParent;
|
||||
|
||||
/**
|
||||
* 是否有子级
|
||||
*/
|
||||
private boolean hashChild;
|
||||
|
||||
/**
|
||||
* 子级数组
|
||||
*/
|
||||
private List<LogManage> children;
|
||||
|
||||
public void initChildren(){
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DataInfoVo implements Serializable {
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Double beginTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Double endTime;
|
||||
|
||||
/**
|
||||
* 时间间隔
|
||||
*/
|
||||
private Double spanTime;
|
||||
|
||||
/**
|
||||
* 比率
|
||||
*/
|
||||
private Double rate;
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DetectorData implements Serializable {
|
||||
|
||||
/**
|
||||
* 探测器id
|
||||
*/
|
||||
private Integer detectorId;
|
||||
|
||||
/**
|
||||
* 探测器编码
|
||||
*/
|
||||
private String detectorCode;
|
||||
|
||||
/**
|
||||
* 数据集合
|
||||
*/
|
||||
private List<DataInfoVo> dataList;
|
||||
|
||||
}
|
|
@ -7,16 +7,34 @@ import java.io.Serializable;
|
|||
@Data
|
||||
public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* 台站名称
|
||||
*/
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 核设施名称
|
||||
*/
|
||||
private String nuclearFacilityName;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String lon;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 半径
|
||||
*/
|
||||
private String radius;
|
||||
|
||||
/**
|
||||
* 核设施id
|
||||
*/
|
||||
private String nuclearFacilityId;
|
||||
|
||||
}
|
||||
|
|
|
@ -7,8 +7,14 @@ import java.util.List;
|
|||
@Data
|
||||
public class PointVo {
|
||||
|
||||
/**
|
||||
* 台站id集合
|
||||
*/
|
||||
private List<String> stationIds;
|
||||
|
||||
/**
|
||||
* 半径
|
||||
*/
|
||||
private Double radius;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import org.jeecg.modules.system.entity.GardsDetectors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class StationData implements Serializable {
|
||||
|
||||
/**
|
||||
* 台站id
|
||||
*/
|
||||
private String stationId;
|
||||
|
||||
/**
|
||||
* 台站编码
|
||||
*/
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 探测器数据集合
|
||||
*/
|
||||
private Map<String, List<Map<String, DetectorData>>> detectors;
|
||||
|
||||
}
|
|
@ -8,10 +8,19 @@ import java.util.List;
|
|||
@Data
|
||||
public class StationTree {
|
||||
|
||||
/**
|
||||
* 台站id
|
||||
*/
|
||||
private Integer stationId;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 子数据集合
|
||||
*/
|
||||
List<Object> children;
|
||||
|
||||
}
|
||||
|
|
|
@ -18,30 +18,54 @@ import java.util.Date;
|
|||
@TableName("sys_user_focus_station")
|
||||
public class SysUserFocusStation implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@NotBlank(message = "不能为空", groups = UpdateGroup.class)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 台站id
|
||||
*/
|
||||
@TableField(value = "station_id")
|
||||
@NotBlank(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private String stationId;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField(value = "type")
|
||||
@NotBlank(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Double lon;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Double lat;
|
||||
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.base.entity.GardsMetData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@DS("ori")
|
||||
public interface StationMetDataMapper extends BaseMapper<GardsMetData> {
|
||||
|
||||
List<GardsMetData> findMetDataList(@Param("stationIds") List<String> stationIds, @Param("startDate") String startDate);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@DS("ori")
|
||||
public interface StationSampleDataMapper extends BaseMapper<GardsSampleData> {
|
||||
|
||||
List<GardsSampleData> findSampleDataList(@Param("detectorIds") List<Integer> detectorIds, @Param("startDate") String startDate);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.base.entity.GardsSohData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@DS("ori")
|
||||
public interface StationSohDataMapper extends BaseMapper<GardsSohData> {
|
||||
|
||||
List<GardsSohData> findSohDataList(@Param("stationId") String stationId, @Param("detectorIds") List<Integer> detectorIds, @Param("startDate") String startDate);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?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="org.jeecg.modules.mapper.StationMetDataMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
|
@ -1,7 +0,0 @@
|
|||
<?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="org.jeecg.modules.mapper.StationSampleDataMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
|
@ -1,7 +0,0 @@
|
|||
<?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="org.jeecg.modules.mapper.StationSohDataMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,23 @@
|
|||
<?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="org.jeecg.modules.mapper.StationMetDataMapper">
|
||||
|
||||
<select id="findMetDataList" resultType="org.jeecg.modules.base.entity.GardsMetData">
|
||||
select
|
||||
START_TIME,
|
||||
END_TIME
|
||||
from ORIGINAL.GARDS_MET_DATA
|
||||
<where>
|
||||
<if test=" startDate!=null and startDate!='' ">
|
||||
MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
|
||||
</if>
|
||||
<if test=" stationIds!=null and stationIds.size()>0 ">
|
||||
AND STATION_ID in
|
||||
<foreach collection="stationIds" item="stationId" separator="," open="(" close=")">
|
||||
#{stationId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,28 @@
|
|||
<?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="org.jeecg.modules.mapper.StationSampleDataMapper">
|
||||
|
||||
<select id="findSampleDataList" resultType="org.jeecg.modules.base.entity.GardsSampleData">
|
||||
select
|
||||
DATA_TYPE,
|
||||
SPECTRAL_QUALIFIE,
|
||||
COLLECT_START,
|
||||
COLLECT_STOP,
|
||||
ACQUISITION_START,
|
||||
ACQUISITION_STOP
|
||||
from ORIGINAL.GARDS_SAMPLE_DATA
|
||||
<where>
|
||||
<if test="detectorIds != null and detectorIds.size()>0">
|
||||
DETECTOR_ID in
|
||||
<foreach collection="detectorIds" item="detectorId" open="(" close=")" separator=",">
|
||||
#{detectorId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test=" startDate!=null and startDate!='' ">
|
||||
and MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
|
||||
</if>
|
||||
ORDER BY ACQUISITION_STOP
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,27 @@
|
|||
<?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="org.jeecg.modules.mapper.StationSohDataMapper">
|
||||
|
||||
<select id="findSohDataList" resultType="org.jeecg.modules.base.entity.GardsSohData">
|
||||
select
|
||||
START_TIME,
|
||||
TIME
|
||||
FROM ORIGINAL.GARDS_SOH_DATA
|
||||
<where>
|
||||
<if test="detectorIds != null and detectorIds.size()>0">
|
||||
and DETECTOR_ID in
|
||||
<foreach collection="detectorIds" item="detectorId" open="(" close=")" separator=",">
|
||||
#{detectorId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test=" stationId != null and stationId!='' ">
|
||||
and STATION_ID = #{stationId}
|
||||
</if>
|
||||
<if test=" startDate!=null and startDate!='' ">
|
||||
and MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
|
||||
</if>
|
||||
ORDER BY ACQUISITION_STOP
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -12,10 +12,10 @@ import java.util.Map;
|
|||
@FeignClient(value = "jeecg-system")
|
||||
public interface ICacheTimeService {
|
||||
|
||||
@RequestMapping("/alarmSysUser/findCacheTime")
|
||||
@RequestMapping("/sys/dictItem/findCacheTime")
|
||||
List<Map<String, String>> findCacheTime();
|
||||
|
||||
@RequestMapping("/alarmSysUser/findStationDetectors")
|
||||
@RequestMapping("/gardsDetectors/findStationDetectors")
|
||||
Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,46 +1,49 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.spatial4j.core.context.SpatialContext;
|
||||
import com.spatial4j.core.distance.DistanceUtils;
|
||||
import com.spatial4j.core.shape.Rectangle;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.jeecg.common.CacheName;
|
||||
import org.jeecg.common.PointUtil;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.entity.Point;
|
||||
import org.jeecg.modules.entity.PointVo;
|
||||
import org.jeecg.modules.entity.StationTree;
|
||||
import org.jeecg.modules.base.entity.GardsMetData;
|
||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||
import org.jeecg.modules.base.entity.GardsSohData;
|
||||
import org.jeecg.modules.entity.*;
|
||||
import org.jeecg.modules.mapper.StationMetDataMapper;
|
||||
import org.jeecg.modules.mapper.StationSampleDataMapper;
|
||||
import org.jeecg.modules.mapper.StationSohDataMapper;
|
||||
import org.jeecg.modules.service.ICacheTimeService;
|
||||
import org.jeecg.modules.system.entity.GardsDetectors;
|
||||
import org.jeecg.modules.system.entity.GardsNuclearfacility;
|
||||
import org.jeecg.modules.system.entity.GardsStations;
|
||||
import org.jeecg.modules.entity.StationOperation;
|
||||
import org.jeecg.modules.mapper.StationOperationMapper;
|
||||
import org.jeecg.modules.service.IStationOperationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service("stationOperationService")
|
||||
@DS("ori")
|
||||
public class StationOperationServiceImpl extends ServiceImpl<StationOperationMapper, StationOperation> implements IStationOperationService {
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private ICacheTimeService cacheTimeService;
|
||||
@Autowired
|
||||
private StationSampleDataMapper stationSampleDataMapper;
|
||||
@Autowired
|
||||
private StationSohDataMapper stationSohDataMapper;
|
||||
@Autowired
|
||||
private StationMetDataMapper stationMetDataMapper;
|
||||
|
||||
private final SpatialContext spatialContext = SpatialContext.GEO;
|
||||
|
||||
|
@ -282,35 +285,157 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
|
||||
@Override
|
||||
public Result getDataReceivingStatus(List<String> stationIds) {
|
||||
Result result = new Result();
|
||||
//获取四项缓存数据的对应内容
|
||||
List<Map<String, String>> cacheList = cacheTimeService.findCacheTime();
|
||||
//缓存时间
|
||||
String cacheTime = "";
|
||||
String scaleInterval = "";
|
||||
String timelineLength = "";
|
||||
String updateIntervalTime = "";
|
||||
for (int i=0; i< cacheList.size(); i++){
|
||||
if ( StringUtils.isNotBlank(cacheList.get(i).get(CacheName.cacheTime)) ){
|
||||
cacheTime = cacheList.get(i).get(CacheName.cacheTime);
|
||||
}else if ( StringUtils.isNotBlank(cacheList.get(i).get(CacheName.scaleInterval)) ){
|
||||
scaleInterval = cacheList.get(i).get(CacheName.scaleInterval);
|
||||
}else if ( StringUtils.isNotBlank(cacheList.get(i).get(CacheName.timelineLength)) ){
|
||||
timelineLength = cacheList.get(i).get(CacheName.timelineLength);
|
||||
}else if ( StringUtils.isNotBlank(cacheList.get(i).get(CacheName.updateIntervalTime)) ){
|
||||
updateIntervalTime = cacheList.get(i).get(CacheName.updateIntervalTime);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(cacheTime)){
|
||||
result.error500("缓存时间不能为空");
|
||||
return result;
|
||||
}
|
||||
//从redis中获取台站信息
|
||||
Map<Integer, String> stationInfoMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||
//从redis中获取探测器信息
|
||||
Map<Integer, String> detectorInfoMap = (Map<Integer, String>)redisUtil.get("detectorsMap");
|
||||
//遍历台站id
|
||||
if (CollectionUtils.isNotEmpty(stationIds)){
|
||||
//获取当前日期时间 作为结束查询时间
|
||||
LocalDate endDate = LocalDate.now();
|
||||
LocalDateTime endDate = LocalDateTime.now();
|
||||
//根据缓存日期 得到开始查询时间
|
||||
LocalDate startDate = endDate.minusDays(Integer.valueOf(cacheTime));
|
||||
LocalDateTime startDate = endDate.minusDays(Integer.valueOf(cacheTime));
|
||||
String startDateTime = startDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
//根据台站id,开始时间查询出台站下的气象数据
|
||||
List<GardsMetData> metDataList = stationMetDataMapper.findMetDataList(stationIds, startDateTime);
|
||||
//根据台站id查询出当前台站下处于运行状态的数据
|
||||
Map<String, List<GardsDetectors>> stationDetectors = cacheTimeService.findStationDetectors(stationIds);
|
||||
|
||||
|
||||
//声明存储所有台站id对应的数据信息的集合
|
||||
List<StationData> stationDataList = new LinkedList<>();
|
||||
//遍历台站id 获取台站下的探测器数据
|
||||
if (CollectionUtils.isNotEmpty(stationDetectors)){
|
||||
for (String stationId:stationIds) {
|
||||
Map<String, List<Map<String, DetectorData>>> stationMap = new HashMap<>();
|
||||
//获取台站下对应的探测器数据
|
||||
List<GardsDetectors> detectors = stationDetectors.get(stationId);
|
||||
if (CollectionUtils.isNotEmpty(detectors)){
|
||||
StationData stationData = new StationData();
|
||||
//stream流获取探测器id
|
||||
List<Integer> detectorIds = detectors.stream().map(GardsDetectors::getDetectorId).collect(Collectors.toList());
|
||||
//根据探测器id 开始时间查询样品基础数据
|
||||
List<GardsSampleData> sampleDataList = stationSampleDataMapper.findSampleDataList(detectorIds, startDateTime);
|
||||
//根据台站id,探测器id,开始时间
|
||||
List<GardsSohData> sohDataList = stationSohDataMapper.findSohDataList(stationId, detectorIds, startDateTime);
|
||||
//用于接收当前台站下所有探测器及探测器所有的样品数据,气体数据,状态数据集合
|
||||
List<Map<String, DetectorData>> detectorDataList = new LinkedList<>();
|
||||
for (Integer detectorId:detectorIds) {
|
||||
Map<String, DetectorData> detectorMap = new HashMap<>();
|
||||
DetectorData detectorData = new DetectorData();
|
||||
detectorData.setDetectorId(detectorId);
|
||||
//声明数据实体实体类 根据参数存储 样品基础数据对应的数据 气体数据 状态数据
|
||||
List<DataInfoVo> dataInfoList = new LinkedList<>();
|
||||
if (CollectionUtils.isNotEmpty(sampleDataList)){
|
||||
//根据探测器id过滤出对应的样品数据 并进行遍历封装进dataInfo
|
||||
List<GardsSampleData> dataListSample = sampleDataList.stream().filter(item -> item.getDetectorId().equals(detectorId)).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(dataListSample)){
|
||||
for (GardsSampleData sampleData:dataListSample) {
|
||||
DataInfoVo dataInfo = new DataInfoVo();
|
||||
//根据样品数据类型判断 数据类型 根据不同的样品数据状态
|
||||
if (sampleData.getDataType().equals("S")){
|
||||
dataInfo.setType("PHD");
|
||||
if(sampleData.getStatus() == "PREL") {
|
||||
dataInfo.setStatus("SPREL");
|
||||
} else {
|
||||
dataInfo.setStatus("SFULL");
|
||||
}
|
||||
} else if (sampleData.getDataType().equals("Q")){
|
||||
dataInfo.setType("QC");
|
||||
dataInfo.setStatus("QC");
|
||||
} else if (sampleData.getDataType().equals("G")){
|
||||
dataInfo.setType("PHD");
|
||||
if(sampleData.getStatus() == "PREL") {
|
||||
dataInfo.setStatus("GPREL");
|
||||
} else {
|
||||
dataInfo.setStatus("GFULL");
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
//处理开始时间
|
||||
Date acquisitionStart = sampleData.getAcquisitionStart();
|
||||
dataInfo.setBeginTime(Double.valueOf(acquisitionStart.getTime()/1000));
|
||||
//处理结束时间
|
||||
Date acquisitionStop = sampleData.getAcquisitionStop();
|
||||
dataInfo.setEndTime(Double.valueOf(acquisitionStop.getTime()/1000));
|
||||
//时间间隔
|
||||
Double span = Double.valueOf(acquisitionStop.getTime()/1000) - Double.valueOf(acquisitionStart.getTime()/1000);
|
||||
dataInfo.setSpanTime(span);
|
||||
dataInfoList.add(dataInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(sohDataList)){
|
||||
List<GardsSohData> dataListSoh = sohDataList.stream().filter(item -> item.getDetectorId().equals(detectorId)).collect(Collectors.toList());
|
||||
//根据探测器id 台站id 开始时间查询状态数据
|
||||
if (CollectionUtils.isNotEmpty(dataListSoh)){
|
||||
for (GardsSohData sohData:dataListSoh) {
|
||||
DataInfoVo dataInfo = new DataInfoVo();
|
||||
dataInfo.setType("SOH");
|
||||
dataInfo.setStatus("SOH");
|
||||
Date startTime = sohData.getStartTime();
|
||||
dataInfo.setBeginTime(Double.valueOf(startTime.getTime()/1000));
|
||||
dataInfo.setSpanTime(Double.valueOf(sohData.getTime()));
|
||||
dataInfoList.add(dataInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(metDataList)){
|
||||
List<GardsMetData> dataListMet = metDataList.stream().filter(item -> item.getStationId().equals(stationId)).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(dataListMet)){
|
||||
for (GardsMetData metData:dataListMet) {
|
||||
DataInfoVo dataInfo = new DataInfoVo();
|
||||
dataInfo.setType("MET");
|
||||
dataInfo.setStatus("MET");
|
||||
Date startTime = metData.getStartTime();
|
||||
dataInfo.setBeginTime(Double.valueOf(startTime.getTime()/1000));
|
||||
Date endTime = metData.getEndTime();
|
||||
dataInfo.setEndTime(Double.valueOf(endTime.getTime()/1000));
|
||||
Double span = Double.valueOf(startTime.getTime() / 1000) - Double.valueOf(endTime.getTime() / 1000);
|
||||
dataInfo.setSpanTime(span);
|
||||
dataInfoList.add(dataInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
detectorData.setDataList(dataInfoList);
|
||||
if (CollectionUtils.isNotEmpty(detectorInfoMap)){
|
||||
if (detectorInfoMap.containsKey(detectorId)){
|
||||
detectorData.setDetectorCode(detectorInfoMap.get(detectorId));
|
||||
}
|
||||
}
|
||||
detectorMap.put(String.valueOf(detectorId), detectorData);
|
||||
detectorDataList.add(detectorMap);
|
||||
}
|
||||
stationMap.put(stationId, detectorDataList);
|
||||
stationData.setStationId(stationId);
|
||||
if (CollectionUtils.isNotEmpty(stationInfoMap)){
|
||||
if (stationInfoMap.containsKey(stationId)){
|
||||
stationData.setStationCode(stationInfoMap.get(stationId));
|
||||
}
|
||||
}
|
||||
stationData.setDetectors(stationMap);
|
||||
stationDataList.add(stationData);
|
||||
}
|
||||
}
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(stationDataList);
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.jeecg.modules.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
|
@ -13,7 +15,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("gardsDetectors")
|
||||
|
@ -65,4 +70,9 @@ public class GardsDetectorsController {
|
|||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping("findStationDetectors")
|
||||
public Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds){
|
||||
return gardsDetectorsService.findStationDetectors(stationIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.jeecg.modules.system.controller;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
@ -182,5 +183,10 @@ public class SysDictItemController {
|
|||
return Result.error("该值不可用,系统中已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("findCacheTime")
|
||||
public List<Map<String, String>> findCacheTime(){
|
||||
return sysDictItemService.findCacheTime();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
@ -1759,4 +1760,10 @@ public class SysUserController {
|
|||
sysUserService.editTenantUser(sysUser,tenantId,departs,roles);
|
||||
return Result.ok("修改成功");
|
||||
}
|
||||
|
||||
@GetMapping("findUserMap")
|
||||
public Map<String, SysUser> findUserMap(){
|
||||
return sysUserService.findUserMap();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,23 +17,41 @@ import java.util.Date;
|
|||
@TableName("GARDS_DETECTORS")
|
||||
public class GardsDetectors implements Serializable {
|
||||
|
||||
/**
|
||||
* 探测器id
|
||||
*/
|
||||
@TableField(value = "DETECTOR_ID")
|
||||
@NotNull(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private Integer detectorId;
|
||||
|
||||
/**
|
||||
* 探测器编码
|
||||
*/
|
||||
@TableField(value = "DETECTOR_CODE")
|
||||
@NotBlank(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private String detectorCode;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField(value = "LON")
|
||||
private Double lon;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField(value = "LAT")
|
||||
private Double lat;
|
||||
|
||||
/**
|
||||
* 探测器类型
|
||||
*/
|
||||
@TableField(value = "TYPE")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 总道数
|
||||
*/
|
||||
@TableField(value = "CHANNELS")
|
||||
private Double channels;
|
||||
|
||||
|
@ -43,33 +61,57 @@ public class GardsDetectors implements Serializable {
|
|||
@TableField(value = "RATED_RESOLUTION")
|
||||
private Double ratedResolution;
|
||||
|
||||
/**
|
||||
* 能量刻度范围(keV)
|
||||
*/
|
||||
@TableField(value = "ECAL_RANGE_MAX")
|
||||
private Double ecalRangeMax;
|
||||
|
||||
/**
|
||||
* 开始运行日期
|
||||
*/
|
||||
@TableField(value = "DATE_BEGIN")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dateBegin;
|
||||
|
||||
/**
|
||||
* 结束运行日期
|
||||
*/
|
||||
@TableField(value = "DATE_END")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dateEnd;
|
||||
|
||||
/**
|
||||
* Y:在运行,状态良好;N:停止
|
||||
*/
|
||||
@TableField(value = "STATUS")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@TableField(value = "DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@TableField(value = "MODDATE")
|
||||
@NotNull(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date moddate;
|
||||
|
||||
/**
|
||||
* 台站id
|
||||
*/
|
||||
@TableField(value = "STATION_ID")
|
||||
private Integer stationId;
|
||||
|
||||
/**
|
||||
* 台站名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String stationName;
|
||||
|
||||
|
|
|
@ -18,70 +18,127 @@ import java.util.Date;
|
|||
@TableName("GARDS_NUCLEARFACILITY")
|
||||
public class GardsNuclearfacility implements Serializable {
|
||||
|
||||
/**
|
||||
* 核设施id
|
||||
*/
|
||||
@TableField(value = "FACILITY_ID")
|
||||
@NotNull(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private Integer facilityId;
|
||||
|
||||
/**
|
||||
* 核设施名称
|
||||
*/
|
||||
@TableField(value = "FACILITY_NAME")
|
||||
@NotBlank(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private String facilityName;
|
||||
|
||||
/**
|
||||
* 核设施类型
|
||||
*/
|
||||
@TableField(value = "TYPE")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
@TableField(value = "LOCATION")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField(value = "LONGITUDE")
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField(value = "LATITUDE")
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField(value = "STATUS")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 修建时间
|
||||
*/
|
||||
@TableField(value = "BUILDDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date buildDate;
|
||||
|
||||
/**
|
||||
* 临界时间
|
||||
*/
|
||||
@TableField(value = "CRITICALITYDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date criticalityDate;
|
||||
|
||||
/**
|
||||
* 退休时间
|
||||
*/
|
||||
@TableField(value = "RETIREDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date retireDate;
|
||||
|
||||
/**
|
||||
* 网格工程日期
|
||||
*/
|
||||
@TableField(value = "GRIDCONEETIONDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gridconeetionDate;
|
||||
|
||||
/**
|
||||
* 销售公司
|
||||
*/
|
||||
@TableField(value = "VENDOR")
|
||||
private String vendor;
|
||||
|
||||
/**
|
||||
* 拥有者
|
||||
*/
|
||||
@TableField(value = "OWNER")
|
||||
private String owner;
|
||||
|
||||
/**
|
||||
* 操作人员
|
||||
*/
|
||||
@TableField(value = "OPERARTOR")
|
||||
private String operartor;
|
||||
|
||||
/**
|
||||
* 容量
|
||||
*/
|
||||
@TableField(value = "CAPACITYGROSS")
|
||||
private Integer capacitygross;
|
||||
|
||||
/**
|
||||
* 容量集
|
||||
*/
|
||||
@TableField(value = "CAPACITYNET")
|
||||
private Integer capacitynet;
|
||||
|
||||
/**
|
||||
* 热容量
|
||||
*/
|
||||
@TableField(value = "CAPACITYTHERMAL")
|
||||
private Integer capacitythermal;
|
||||
|
||||
/**
|
||||
* 活动时间
|
||||
*/
|
||||
@TableField(value = "ACTIVITY_DAY")
|
||||
private Integer activityDay;
|
||||
|
||||
/**
|
||||
* 活动年份
|
||||
*/
|
||||
@TableField(value = "ACTIVITY_YEAR")
|
||||
private Integer activityYear;
|
||||
|
||||
|
|
|
@ -13,77 +13,147 @@ import java.util.Date;
|
|||
@TableName("GARDS_SAMPLE_DATA")
|
||||
public class GardsSampleData implements Serializable {
|
||||
|
||||
/**
|
||||
* 探测器编码
|
||||
*/
|
||||
@TableField(value = "SITE_DET_CODE")
|
||||
private String siteDetCode;
|
||||
|
||||
/**
|
||||
* 样品id
|
||||
*/
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
* 台站id
|
||||
*/
|
||||
@TableField(value = "STATION_ID")
|
||||
private Integer stationId;
|
||||
|
||||
/**
|
||||
* 探测器id
|
||||
*/
|
||||
@TableField(value = "DETECTOR_ID")
|
||||
private Integer detectorId;
|
||||
|
||||
/**
|
||||
* 导入文件名称
|
||||
*/
|
||||
@TableField(value = "INPUT_FILE_NAME")
|
||||
private String inputFileName;
|
||||
|
||||
/**
|
||||
* 系统类型(P : particulate; B :gas with 3-D β-γ coincidence detection; G :all other gas systems (high-resolution
|
||||
* γ-spectrometry or 2-D β-γ coincidence
|
||||
* detection))
|
||||
*/
|
||||
@TableField(value = "SAMPLE_TYPE")
|
||||
private String sampleType;
|
||||
|
||||
/**
|
||||
* 数据类型(S:SAMPLEPHD
|
||||
* B:BLANKPHD
|
||||
* D:DETBKPHD
|
||||
* G:GASBKPHD
|
||||
* C:CALIBPHD
|
||||
* Q:QCPHD)
|
||||
*/
|
||||
@TableField(value = "DATA_TYPE")
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 几何尺寸
|
||||
*/
|
||||
@TableField(value = "GEOMETRY")
|
||||
private String geometry;
|
||||
|
||||
/**
|
||||
* 能谱限定符: 过程谱(PREL) 和 全谱(FULL)
|
||||
*/
|
||||
@TableField(value = "SPECTRAL_QUALIFIE")
|
||||
private String spectralQualifie;
|
||||
|
||||
/**
|
||||
* 报文发送日期
|
||||
*/
|
||||
@TableField(value = "TRANSMIT_DTG")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date transmitDtg;
|
||||
|
||||
/**
|
||||
* 样品采集开始时间
|
||||
*/
|
||||
@TableField(value = "COLLECT_START")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date collectStart;
|
||||
|
||||
/**
|
||||
* 样品采集结束时间
|
||||
*/
|
||||
@TableField(value = "COLLECT_STOP")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date collectStop;
|
||||
|
||||
/**
|
||||
* 样品测量开始时间
|
||||
*/
|
||||
@TableField(value = "ACQUISITION_START")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date acquisitionStart;
|
||||
|
||||
/**
|
||||
* 样品测量结束时间
|
||||
*/
|
||||
@TableField(value = "ACQUISITION_STOP")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date acquisitionStop;
|
||||
|
||||
/**
|
||||
* 能谱获取实时间
|
||||
*/
|
||||
@TableField(value = "ACQUISITION_REAL_SEC")
|
||||
private Double acquisitionRealSec;
|
||||
|
||||
/**
|
||||
* 能谱获取活时间
|
||||
*/
|
||||
@TableField(value = "ACQUISITION_LIVE_SEC")
|
||||
private Double acquisitionLiveSec;
|
||||
|
||||
/**
|
||||
* 采样量(立方米)
|
||||
*/
|
||||
@TableField(value = "QUANTITY")
|
||||
private Double quantity;
|
||||
|
||||
/**
|
||||
* 样品处理状态
|
||||
*/
|
||||
@TableField(value = "STATUS")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@TableField(value = "MODDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date moddate;
|
||||
|
||||
/**
|
||||
* 台站名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 探测器名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String detectorsName;
|
||||
|
||||
|
|
|
@ -20,45 +20,81 @@ import java.util.Date;
|
|||
@TableName(value = "GARDS_STATIONS")
|
||||
public class GardsStations implements Serializable {
|
||||
|
||||
/**
|
||||
* 台站id
|
||||
*/
|
||||
@TableField(value = "STATION_ID")
|
||||
@NotNull(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private Integer stationId;
|
||||
|
||||
/**
|
||||
* 台站编码
|
||||
*/
|
||||
@TableField(value = "STATION_CODE")
|
||||
@NotBlank(message = "不能为空", groups = {InsertGroup.class, UpdateGroup.class})
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
@TableField(value = "COUNTRY_CODE")
|
||||
private String countryCode;
|
||||
|
||||
/**
|
||||
* 台站类型
|
||||
*/
|
||||
@TableField(value = "TYPE")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField(value = "LON")
|
||||
private Double lon;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField(value = "LAT")
|
||||
private Double lat;
|
||||
|
||||
/**
|
||||
* 海拔
|
||||
*/
|
||||
@TableField(value = "ELEVATION")
|
||||
private Double elevation;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField(value = "DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 开始运行日期
|
||||
*/
|
||||
@TableField(value = "DATE_BEGIN")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dateBegin;
|
||||
|
||||
/**
|
||||
* 运行终止日期
|
||||
*/
|
||||
@TableField(value = "DATE_END")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dateEnd;
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
@TableField(value = "STATUS")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@TableField(value = "MODDATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date moddate;
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.jeecg.common.api.vo.Result;
|
|||
import org.jeecg.modules.system.entity.GardsDetectors;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IGardsDetectorsService extends IService<GardsDetectors> {
|
||||
|
||||
|
@ -57,4 +58,11 @@ public interface IGardsDetectorsService extends IService<GardsDetectors> {
|
|||
*/
|
||||
void findDetectors();
|
||||
|
||||
/**
|
||||
* 根据台站id查询对应的探测器数据信息
|
||||
* @param stationIds
|
||||
* @return
|
||||
*/
|
||||
Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds);
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import org.jeecg.modules.system.entity.SysDictItem;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -21,4 +22,11 @@ public interface ISysDictItemService extends IService<SysDictItem> {
|
|||
* @return
|
||||
*/
|
||||
public List<SysDictItem> selectItemsByMainId(String mainId);
|
||||
|
||||
/**
|
||||
* 查询缓存时间等信息
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, String>> findCacheTime();
|
||||
|
||||
}
|
||||
|
|
|
@ -397,4 +397,11 @@ public interface ISysUserService extends IService<SysUser> {
|
|||
* @param departs
|
||||
*/
|
||||
void editTenantUser(SysUser sysUser, String tenantId, String departs, String roles);
|
||||
|
||||
/**
|
||||
* 查询用户map
|
||||
* @return
|
||||
*/
|
||||
Map<String, SysUser> findUserMap();
|
||||
|
||||
}
|
||||
|
|
|
@ -148,4 +148,19 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
|
|||
Map<Integer, String> detectorsMap = gardsDetectors.stream().collect(Collectors.toMap(GardsDetectors::getDetectorId, GardsDetectors::getDetectorCode));
|
||||
redisUtil.set("detectorsMap",detectorsMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds) {
|
||||
Map<String, List<GardsDetectors>> map = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(stationIds)){
|
||||
LambdaQueryWrapper<GardsDetectors> queryWrapper = new LambdaQueryWrapper<>();
|
||||
List<GardsDetectors> detectorsList = this.baseMapper.selectList(queryWrapper);
|
||||
for (String stationId:stationIds) {
|
||||
List<GardsDetectors> detectors = detectorsList.stream().filter(item -> item.getStationId().equals(stationId) && item.getStatus().equals("Operating")).collect(Collectors.toList());
|
||||
map.put(stationId, detectors);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import org.jeecg.modules.system.entity.SysDictItem;
|
||||
import org.jeecg.modules.system.mapper.SysDictItemMapper;
|
||||
import org.jeecg.modules.system.service.ISysDictItemService;
|
||||
|
@ -7,7 +9,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -27,4 +32,37 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
|||
public List<SysDictItem> selectItemsByMainId(String mainId) {
|
||||
return sysDictItemMapper.selectItemsByMainId(mainId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> findCacheTime() {
|
||||
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysDictItem> sysDictItems = sysDictItemMapper.selectList(queryWrapper);
|
||||
List<Map<String, String>> result = new LinkedList<>();
|
||||
//获取缓存时间对应的值
|
||||
List<SysDictItem> cacheTime = sysDictItems.stream().filter(item -> item.getItemText().equals("Cache time")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(cacheTime)){
|
||||
Map<String, String> cacheTimeMap = cacheTime.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(cacheTimeMap);
|
||||
}
|
||||
//获取实际分度值
|
||||
List<SysDictItem> scaleInterval = sysDictItems.stream().filter(item -> item.getItemText().equals("Scale interval")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(scaleInterval)){
|
||||
Map<String, String> scaleIntervalMap = scaleInterval.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(scaleIntervalMap);
|
||||
}
|
||||
//获取时间线长度
|
||||
List<SysDictItem> timelineLength = sysDictItems.stream().filter(item -> item.getItemText().equals("Timeline length")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(timelineLength)){
|
||||
Map<String, String> timelineLengthMap = timelineLength.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(timelineLengthMap);
|
||||
}
|
||||
//获取更新间隔时间
|
||||
List<SysDictItem> updateIntervalTime = sysDictItems.stream().filter(item -> item.getItemText().equals("Update interval time")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(updateIntervalTime)){
|
||||
Map<String, String> updateIntervalTimeMap = updateIntervalTime.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(updateIntervalTimeMap);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1297,6 +1297,38 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
this.updateTenantDepart(user, tenantId, departs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, SysUser> findUserMap() {
|
||||
Map<String ,SysUser> map = new HashMap<>();
|
||||
LambdaQueryWrapper<SysUser> userQueryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysUser> sysUsers = this.baseMapper.selectList(userQueryWrapper);
|
||||
LambdaQueryWrapper<SysUserRole> userRoleQueryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectList(userRoleQueryWrapper);
|
||||
LambdaQueryWrapper<SysRole> roleQueryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysRole> sysRoles = sysRoleMapper.selectList(roleQueryWrapper);
|
||||
List<SysRole> roles = new LinkedList<>();
|
||||
//遍历所有用户信息
|
||||
if (CollectionUtils.isNotEmpty(sysUsers)){
|
||||
for (SysUser sysUser:sysUsers) {
|
||||
if (CollectionUtils.isNotEmpty(sysUserRoles)){
|
||||
//获取各用户匹配的权限集合
|
||||
List<SysUserRole> userRoles = sysUserRoles.stream().filter(item -> item.getUserId().equals(sysUser.getId())).collect(Collectors.toList());
|
||||
List<String> roleIds = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(sysRoles)){
|
||||
for (SysRole role:sysRoles) {
|
||||
if (roleIds.contains(role.getId())){
|
||||
roles.add(role);
|
||||
}
|
||||
}
|
||||
}
|
||||
sysUser.setRoles(roles);
|
||||
}
|
||||
map.put(sysUser.getId(), sysUser);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租户下的部门
|
||||
* @param departs
|
||||
|
|
|
@ -11,66 +11,129 @@ import java.util.Date;
|
|||
@TableName(value = "gards_analyses")
|
||||
public class GardsAnalyses implements Serializable {
|
||||
|
||||
/**
|
||||
* 分析ID号
|
||||
*/
|
||||
@TableField(value = "IDANALYSIS")
|
||||
private Integer idAnalysis;
|
||||
|
||||
/**
|
||||
* 样品id
|
||||
*/
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
* 分析开始时间
|
||||
*/
|
||||
@TableField(value = "ANALYSISBEGIN")
|
||||
private Date analysisBegin;
|
||||
|
||||
/**
|
||||
* 分析结束时间
|
||||
*/
|
||||
@TableField(value = "ANALYSISEND")
|
||||
private Date analysisEnd;
|
||||
|
||||
/**
|
||||
* Reviewed:交互;
|
||||
*/
|
||||
@TableField(value = "TYPE")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 使用的软件名称
|
||||
*/
|
||||
@TableField(value = "SOFTWARE")
|
||||
private String software;
|
||||
|
||||
/**
|
||||
* 软件版本号
|
||||
*/
|
||||
@TableField(value = "SWVERSION")
|
||||
private String swVersion;
|
||||
|
||||
/**
|
||||
* 分析员名称
|
||||
*/
|
||||
@TableField(value = "ANALYST")
|
||||
private String analyst;
|
||||
|
||||
/**
|
||||
* 基线计数方法描述
|
||||
*/
|
||||
@TableField(value = "BASELINEMETHOD")
|
||||
private String baseLineMethod;
|
||||
|
||||
/**
|
||||
* 寻峰方法描述
|
||||
*/
|
||||
@TableField(value = "PEAKSMETHOD")
|
||||
private String peaksMethod;
|
||||
|
||||
/**
|
||||
* 核素识别方法描述
|
||||
*/
|
||||
@TableField(value = "NUCLIDEMETHOD")
|
||||
private String nuclideMethod;
|
||||
|
||||
/**
|
||||
* 不确定度计算描述
|
||||
*/
|
||||
@TableField(value = "UNCCALCMETHOD")
|
||||
private String unccalcMethod;
|
||||
|
||||
/**
|
||||
* Lc计算方法描述
|
||||
*/
|
||||
@TableField(value = "LCMETHOD")
|
||||
private String lcMethod;
|
||||
|
||||
/**
|
||||
* 寻峰起始道
|
||||
*/
|
||||
@TableField(value = "SEARCHSTARTCHANNEL")
|
||||
private Integer searchStartChannel;
|
||||
|
||||
/**
|
||||
* 寻峰结束道
|
||||
*/
|
||||
@TableField(value = "SEARCHENDCHANNEL")
|
||||
private Integer searchEndChannel;
|
||||
|
||||
/**
|
||||
* 寻峰阈值(能窗宽度)
|
||||
*/
|
||||
@TableField(value = "SEARCHTHRESHOLD")
|
||||
private Double searchThreshold;
|
||||
|
||||
/**
|
||||
* 峰数目
|
||||
*/
|
||||
@TableField(value = "NUMBEROFPEAKS")
|
||||
private Integer numberOfPeaks;
|
||||
|
||||
/**
|
||||
* 总计数
|
||||
*/
|
||||
@TableField(value = "TOTALCOUNTS")
|
||||
private Double totalCounts;
|
||||
|
||||
/**
|
||||
* 分级结果
|
||||
*/
|
||||
@TableField(value = "CATEGORY")
|
||||
private Integer cateGory;
|
||||
|
||||
/**
|
||||
* 注释
|
||||
*/
|
||||
@TableField(value = "COMMENTS")
|
||||
private String comments;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@TableField(value = "MODDATE")
|
||||
private Date moddate;
|
||||
|
||||
|
|
|
@ -10,30 +10,58 @@ import java.io.Serializable;
|
|||
@TableName(value = "gards_calibration_pairs_orig")
|
||||
public class GardsCalibrationPairsOrig implements Serializable {
|
||||
|
||||
/**
|
||||
* 样品ID号
|
||||
*/
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
* 系统类型 G:gamma探测器的数据,#g_;B:beta探测器的数据,#b_
|
||||
*/
|
||||
@TableField(value = "SAMPLE_TYPE")
|
||||
private String sampleType;
|
||||
|
||||
/**
|
||||
* 刻度类型 energy:能量刻度;efficiency:效率刻度;
|
||||
* Resolution:分辨率刻度
|
||||
*/
|
||||
@TableField(value = "CALTYPE")
|
||||
private String caltype;
|
||||
|
||||
/**
|
||||
* 来源 PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
||||
*/
|
||||
@TableField(value = "INPUT")
|
||||
private String input;
|
||||
|
||||
/**
|
||||
* 刻度点ID号
|
||||
*/
|
||||
@TableField(value = "IDCALPOINT")
|
||||
private Integer idcalpoint;
|
||||
|
||||
/**
|
||||
* x轴数值
|
||||
*/
|
||||
@TableField(value = "XVALUE")
|
||||
private Double xvalue;
|
||||
|
||||
/**
|
||||
* y轴数值
|
||||
*/
|
||||
@TableField(value = "YVALUE")
|
||||
private Double yvalue;
|
||||
|
||||
/**
|
||||
* y值不确定度
|
||||
*/
|
||||
@TableField(value = "UNCYVALUE")
|
||||
private Double uncyvalue;
|
||||
|
||||
/**
|
||||
* 衰变模式
|
||||
*/
|
||||
@TableField(value = "DECAY_MODE")
|
||||
private String decayMode;
|
||||
|
||||
|
|
|
@ -11,45 +11,87 @@ import java.util.Date;
|
|||
@TableName(value = "gards_sample_aux")
|
||||
public class GardsSampleAux implements Serializable {
|
||||
|
||||
/**
|
||||
* 样品ID号
|
||||
*/
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
* 样品参考ID
|
||||
*/
|
||||
@TableField(value = "SAMPLE_REF_ID")
|
||||
private String sampleRefId;
|
||||
|
||||
/**
|
||||
* 样品测量ID
|
||||
*/
|
||||
@TableField(value = "MEASUREMENT_ID")
|
||||
private String measurementId;
|
||||
|
||||
/**
|
||||
* 探测器本底测量ID
|
||||
*/
|
||||
@TableField(value = "BKGD_MEASUREMENT_ID")
|
||||
private String bkgdMeasurementId;
|
||||
|
||||
/**
|
||||
* 气体本底测量ID
|
||||
*/
|
||||
@TableField(value = "GAS_BKGD_MEASUREMENT_ID")
|
||||
private String gasBkgdMeasurementId;
|
||||
|
||||
/**
|
||||
* 样品的几何尺寸,#Sample数据块 dimension2
|
||||
*/
|
||||
@TableField(value = "SAMPLE_HEIGHT")
|
||||
private Double sampleHeight;
|
||||
|
||||
/**
|
||||
* 样品的几何尺寸,#Sample数据块 dimension1
|
||||
*/
|
||||
@TableField(value = "SAMPLE_DIAMETER")
|
||||
private Double sampleDiameter;
|
||||
|
||||
/**
|
||||
* #calibration数据块
|
||||
*/
|
||||
@TableField(value = "CALIBRATION_DTG")
|
||||
private Date calibrationDtg;
|
||||
|
||||
/**
|
||||
* 报文ID号
|
||||
*/
|
||||
@TableField(value = "MSG_ID")
|
||||
private String msgId;
|
||||
|
||||
/**
|
||||
* 归档瓶ID号
|
||||
*/
|
||||
@TableField(value = "ARCHIVE_BOTTLE_ID")
|
||||
private String archiveBottleId;
|
||||
|
||||
/**
|
||||
* 氙体积
|
||||
*/
|
||||
@TableField(value = "XE_VOLUME")
|
||||
private Double xeVolume;
|
||||
|
||||
/**
|
||||
* 氙体积不确定度
|
||||
*/
|
||||
@TableField(value = "XE_VOLUME_UNCER")
|
||||
private Double xeVolumeUncer;
|
||||
|
||||
/**
|
||||
* 氙收集效率
|
||||
*/
|
||||
@TableField(value = "XE_COLLECTION_YIED")
|
||||
private Double xeCollectionYied;
|
||||
|
||||
/**
|
||||
* 氙收集效率不确定度
|
||||
*/
|
||||
@TableField(value = "XE_COLLECTION_YIED_UNCER")
|
||||
private Double xeCollectionYiedUncer;
|
||||
|
||||
|
|
|
@ -11,15 +11,27 @@ import java.util.Date;
|
|||
@TableName(value = "gards_sample_cert")
|
||||
public class GardsSampleCert implements Serializable {
|
||||
|
||||
/**
|
||||
* 台站ID号
|
||||
*/
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
* 刻度源活度(Bq)total_source_activity
|
||||
*/
|
||||
@TableField(value = "QUANTITY")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 鉴定日期
|
||||
*/
|
||||
@TableField(value = "ASSAY_DATE")
|
||||
private Date assayDate;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@TableField(value = "UNIT")
|
||||
private String unit;
|
||||
|
||||
|
|
|
@ -10,36 +10,69 @@ import java.io.Serializable;
|
|||
@TableName(value = "gards_sample_cert_line")
|
||||
public class GardsSampleCertLine implements Serializable {
|
||||
|
||||
/**
|
||||
* 台站ID号
|
||||
*/
|
||||
@TableField(value = "SAMPLE_ID")
|
||||
private Integer sampleId;
|
||||
|
||||
/**
|
||||
* 核素名称
|
||||
*/
|
||||
@TableField(value = "NUCL_NAME")
|
||||
private String nuclName;
|
||||
|
||||
/**
|
||||
* 半衰期(秒S、小时H、天D、年Y)
|
||||
*/
|
||||
@TableField(value = "HALFLIFE")
|
||||
private String halflife;
|
||||
|
||||
/**
|
||||
* γ能量(keV)
|
||||
*/
|
||||
@TableField(value = "ENERGY")
|
||||
private Integer energy;
|
||||
|
||||
/**
|
||||
* 核素活度(Bq)
|
||||
*/
|
||||
@TableField(value = "ACTIVITY")
|
||||
private Integer activity;
|
||||
|
||||
/**
|
||||
* 核素活度不确定度(%)
|
||||
*/
|
||||
@TableField(value = "ERROR")
|
||||
private Integer error;
|
||||
|
||||
/**
|
||||
* γ射线强度(%)
|
||||
*/
|
||||
@TableField(value = "ABUNDANCE")
|
||||
private Integer abundance;
|
||||
|
||||
/**
|
||||
* β射线强度(%)
|
||||
*/
|
||||
@TableField(value = "B_ABUNDANCE")
|
||||
private Integer bAbundance;
|
||||
|
||||
/**
|
||||
* β能量
|
||||
*/
|
||||
@TableField(value = "B_ENERGY")
|
||||
private Integer bEnergy;
|
||||
|
||||
/**
|
||||
* 衰变模式:
|
||||
*/
|
||||
@TableField(value = "DECAY_MODE")
|
||||
private String decayMode;
|
||||
|
||||
/**
|
||||
* 半衰期单位
|
||||
*/
|
||||
@TableField(value = "HALFLIFT_UNIT")
|
||||
private String halfliftUnit;
|
||||
|
||||
|
|
|
@ -33,86 +33,7 @@ public class AlarmSysUserController {
|
|||
@Resource
|
||||
private GardsDetectorsMapper gardsDetectorsMapper;
|
||||
|
||||
@GetMapping("findUserMap")
|
||||
public Map<String, SysUser> findUserMap(){
|
||||
Map<String ,SysUser> map = new HashMap<>();
|
||||
LambdaQueryWrapper<SysUser> userQueryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysUser> sysUsers = sysUserMapper.selectList(userQueryWrapper);
|
||||
LambdaQueryWrapper<SysUserRole> userRoleQueryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectList(userRoleQueryWrapper);
|
||||
LambdaQueryWrapper<SysRole> roleQueryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysRole> sysRoles = sysRoleMapper.selectList(roleQueryWrapper);
|
||||
List<SysRole> roles = new LinkedList<>();
|
||||
//遍历所有用户信息
|
||||
if (CollectionUtils.isNotEmpty(sysUsers)){
|
||||
for (SysUser sysUser:sysUsers) {
|
||||
if (CollectionUtils.isNotEmpty(sysUserRoles)){
|
||||
//获取各用户匹配的权限集合
|
||||
List<SysUserRole> userRoles = sysUserRoles.stream().filter(item -> item.getUserId().equals(sysUser.getId())).collect(Collectors.toList());
|
||||
List<String> roleIds = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(sysRoles)){
|
||||
for (SysRole role:sysRoles) {
|
||||
if (roleIds.contains(role.getId())){
|
||||
roles.add(role);
|
||||
}
|
||||
}
|
||||
}
|
||||
sysUser.setRoles(roles);
|
||||
}
|
||||
map.put(sysUser.getId(), sysUser);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping("findCacheTime")
|
||||
public List<Map<String, String>> findCacheTime(){
|
||||
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<>();
|
||||
List<SysDictItem> sysDictItems = sysDictItemMapper.selectList(queryWrapper);
|
||||
List<Map<String, String>> result = new LinkedList<>();
|
||||
//获取缓存时间对应的值
|
||||
List<SysDictItem> cacheTime = sysDictItems.stream().filter(item -> item.getItemText().equals("Cache time")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(cacheTime)){
|
||||
Map<String, String> cacheTimeMap = cacheTime.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(cacheTimeMap);
|
||||
}
|
||||
//获取实际分度值
|
||||
List<SysDictItem> scaleInterval = sysDictItems.stream().filter(item -> item.getItemText().equals("Scale interval")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(scaleInterval)){
|
||||
Map<String, String> scaleIntervalMap = scaleInterval.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(scaleIntervalMap);
|
||||
}
|
||||
//获取时间线长度
|
||||
List<SysDictItem> timelineLength = sysDictItems.stream().filter(item -> item.getItemText().equals("Timeline length")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(timelineLength)){
|
||||
Map<String, String> timelineLengthMap = timelineLength.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(timelineLengthMap);
|
||||
}
|
||||
//获取更新间隔时间
|
||||
List<SysDictItem> updateIntervalTime = sysDictItems.stream().filter(item -> item.getItemText().equals("Update interval time")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(updateIntervalTime)){
|
||||
Map<String, String> updateIntervalTimeMap = updateIntervalTime.stream().collect(Collectors.toMap(SysDictItem::getItemText, SysDictItem::getItemValue));
|
||||
result.add(updateIntervalTimeMap);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("findStationDetectors")
|
||||
@DS("ora")
|
||||
public Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds){
|
||||
Map<String, List<GardsDetectors>> map = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(stationIds)){
|
||||
LambdaQueryWrapper<GardsDetectors> queryWrapper = new LambdaQueryWrapper<>();
|
||||
List<GardsDetectors> detectorsList = gardsDetectorsMapper.selectList(queryWrapper);
|
||||
for (String stationId:stationIds) {
|
||||
List<GardsDetectors> detectors = detectorsList.stream().filter(item -> item.getStationId().equals(stationId) && item.getStatus().equals("Operating")).collect(Collectors.toList());
|
||||
map.put(stationId, detectors);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user