Commit 27ead316 authored by hkl's avatar hkl

feat:1.首页代码提交

parent 88028080
...@@ -7,6 +7,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch; ...@@ -7,6 +7,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.dto.DiseaseDTO;
import org.jeecg.modules.homePage.vo.DiseaseVO; import org.jeecg.modules.homePage.vo.DiseaseVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
......
...@@ -154,9 +154,9 @@ ...@@ -154,9 +154,9 @@
t2.transfinite_type diseaseTypeName, t2.transfinite_type diseaseTypeName,
t2.transfinite_grade overrunLevel, t2.transfinite_grade overrunLevel,
t2.transfinite_grade_name, t2.transfinite_grade_name,
t2.allow_value peakValue, IFNULL(t2.allow_value,'') peakValue,
t2.measure_point_value longitude, t2.measure_point_value longitude,
t2.measure_point_value - t2.allow_value dataDifference t2.ek_type
FROM FROM
( (
SELECT SELECT
...@@ -184,7 +184,6 @@ ...@@ -184,7 +184,6 @@
t1.analysis_batch_id = #{analysisBatchCode} t1.analysis_batch_id = #{analysisBatchCode}
) analysis ) analysis
LEFT JOIN t_dsa_analysis_batch_unit_device_transfinite t2 ON t2.analysis_batch_unit_device_id = analysis.id LEFT JOIN t_dsa_analysis_batch_unit_device_transfinite t2 ON t2.analysis_batch_unit_device_id = analysis.id
WHERE WHERE
1 = 1 1 = 1
AND analysis.unit_score_level = 3 AND analysis.unit_score_level = 3
......
...@@ -8,6 +8,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch; ...@@ -8,6 +8,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.dto.DiseaseDTO;
import org.jeecg.modules.homePage.vo.DiseaseVO; import org.jeecg.modules.homePage.vo.DiseaseVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
...@@ -42,6 +43,7 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> { ...@@ -42,6 +43,7 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> {
/** /**
* 病害列表 * 病害列表
*
* @param analysisBatchCode * @param analysisBatchCode
* @return * @return
*/ */
......
...@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil; import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.homePage.dto.DiseaseDTO;
import org.jeecg.modules.homePage.vo.DiseaseVO; import org.jeecg.modules.homePage.vo.DiseaseVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import org.jeecg.modules.utils.BeanCopyUtil; import org.jeecg.modules.utils.BeanCopyUtil;
......
...@@ -5,22 +5,23 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,22 +5,23 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import java.util.Set;
@Data @Data
@ApiModel(value = "DiseaseDTO对象", description = "首页-病害DTO") @ApiModel(value = "DiseaseDTO对象", description = "首页-病害DTO")
public class DiseaseDTO { public class DiseaseDTO {
@ApiModelProperty("超限类型") @ApiModelProperty("超限类型 1-人工检查数据 2-轨检仪检查数据")
private List<String> overType; private Set<Integer> overType;
@ApiModelProperty("轨检车超限") @ApiModelProperty("轨检车超限 1-1级超限 2-2级超限 3-3级超限 4-4级超限")
private List<String> overCard; private Set<Integer> overCard;
@ApiModelProperty("水加") @ApiModelProperty("水加")
private List<String> h; private Set<Integer> h;
@ApiModelProperty("垂加") @ApiModelProperty("垂加")
private List<String> v; private Set<Integer> v;
} }
package org.jeecg.modules.homePage.face.impl; package org.jeecg.modules.homePage.face.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import io.swagger.models.auth.In;
import org.jeecg.modules.checkData.service.IMovementRecordsMasterService; import org.jeecg.modules.checkData.service.IMovementRecordsMasterService;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch; import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService; import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService;
...@@ -14,8 +17,10 @@ import org.jeecg.modules.subwayNetwork.vo.SectionStationNode; ...@@ -14,8 +17,10 @@ import org.jeecg.modules.subwayNetwork.vo.SectionStationNode;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.math.BigDecimal;
import java.util.List; import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
@Service @Service
public class HomePageFaceImpl implements HomePageFace { public class HomePageFaceImpl implements HomePageFace {
...@@ -69,6 +74,7 @@ public class HomePageFaceImpl implements HomePageFace { ...@@ -69,6 +74,7 @@ public class HomePageFaceImpl implements HomePageFace {
.last("limit 1") .last("limit 1")
.one(); .one();
List<DiseaseVO> records = analysisBatchService.diseaseList(one.getId()); List<DiseaseVO> records = analysisBatchService.diseaseList(one.getId());
for (DiseaseVO record : records) { for (DiseaseVO record : records) {
record.setLineAliasId(one.getLineAliasId()); record.setLineAliasId(one.getLineAliasId());
...@@ -78,31 +84,74 @@ public class HomePageFaceImpl implements HomePageFace { ...@@ -78,31 +84,74 @@ public class HomePageFaceImpl implements HomePageFace {
record.setLineAliasCode("XDK"); record.setLineAliasCode("XDK");
} }
} }
//
// // 病害里程,取分 if (ObjectUtil.isNotEmpty(records)) {
// List<DiseaseVO> records = new ArrayList<>(); records = conditionalFilter(records, dto);
// }
// DiseaseVO vo = new DiseaseVO();
// vo.setId("1682308697792339970");
// vo.setLineAliasCode("SDK"); // 单独处理管理数据差字段
// vo.setMileage("21556"); for (DiseaseVO record : records) {
// vo.setOverrunType("左轨向"); // 峰值是否全是数字
// vo.setOverrunLevel("1"); String dataDifference;
// vo.setLongitude("2"); if (record.getPeakValue().matches("\\d+(\\.\\d+)?")) {
// vo.setPeakValue("-10.44"); BigDecimal peakValue = Convert.toBigDecimal(record.getPeakValue());
// vo.setDataDifference("-0.44"); BigDecimal longitude = Convert.toBigDecimal(record.getLongitude());
// records.add(vo); BigDecimal difference = peakValue.subtract(longitude);
// dataDifference = difference.toString();
// DiseaseVO vo2 = new DiseaseVO(); } else {
// vo2.setId("1682308697792339970"); dataDifference = record.getLongitude();
// vo2.setLineAliasCode("SDK"); }
// vo2.setMileage("21556"); record.setDataDifference(dataDifference);
// vo2.setOverrunType("左轨向");
// vo2.setOverrunLevel("1"); }
// vo2.setLongitude("2");
// vo2.setPeakValue("-10.44");
// vo2.setDataDifference("-0.44"); return records;
// records.add(vo2); }
/**
* 条件过滤
*
* @param records
* @param dto
*/
private List<DiseaseVO> conditionalFilter(List<DiseaseVO> records, DiseaseDTO dto) {
Set<Integer> overTypeSet = dto.getOverType();
overTypeSet.add(3);// 3-轨检车检查
overTypeSet.add(4);// 4-添乘仪检查
// 1. 过滤检查类型
if (ObjectUtil.isNotEmpty(records)) {
records = records.stream()
.filter(v -> overTypeSet.contains(v.getEkType()))
.collect(Collectors.toList());
}
// 轨检车超限
Set<Integer> overCardSet = dto.getOverCard();
// 2.过滤轨检车相关数据
if (ObjectUtil.isNotEmpty(records)) {
records = records.stream().filter(v -> v.getEkType() != 3 || overCardSet.contains(v.getOverrunLevel()))
.collect(Collectors.toList());
}
// 添乘仪-水平超限
Set<Integer> hSet = dto.getH();
if (ObjectUtil.isNotEmpty(records)) {
records = records.stream()
.filter(v -> v.getEkType() != 4 || (v.getDiseaseTypeName().equals("水平超限") && hSet.contains(v.getOverrunLevel())))
.collect(Collectors.toList());
}
// 添乘仪-垂直超限
Set<Integer> vSet = dto.getV();
if (ObjectUtil.isNotEmpty(records)) {
records = records.stream()
.filter(v -> v.getEkType() != 4 || (v.getDiseaseTypeName().equals("垂直超限") && vSet.contains(v.getOverrunLevel())))
.collect(Collectors.toList());
}
return records; return records;
} }
......
...@@ -23,9 +23,9 @@ public class DiseaseVO { ...@@ -23,9 +23,9 @@ public class DiseaseVO {
private String overrunType; private String overrunType;
@ApiModelProperty("超限等级") @ApiModelProperty("超限等级")
private String overrunLevel; private Integer overrunLevel;
@ApiModelProperty("长度") @ApiModelProperty("测点值")
private String longitude; private String longitude;
@ApiModelProperty("峰值") @ApiModelProperty("峰值")
...@@ -39,4 +39,7 @@ public class DiseaseVO { ...@@ -39,4 +39,7 @@ public class DiseaseVO {
@ApiModelProperty("病害类型名称") @ApiModelProperty("病害类型名称")
private String diseaseTypeName; private String diseaseTypeName;
@ApiModelProperty("检查类型 检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
private Integer ekType;
} }
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
t.section_starting_mileage startMileage, t.section_starting_mileage startMileage,
TRUNCATE((t.section_end_mileage + t.section_starting_mileage) / 2, 3) centerMileage, TRUNCATE((t.section_end_mileage + t.section_starting_mileage) / 2, 3) centerMileage,
t.section_end_mileage endMileage, t.section_end_mileage endMileage,
true isLeaf true isLeaf,
0 isStation
FROM t_sn_subway_section t FROM t_sn_subway_section t
LEFT JOIN t_sn_light_rail t2 ON t.light_rail_id = t2.id LEFT JOIN t_sn_light_rail t2 ON t.light_rail_id = t2.id
LEFT JOIN t_sn_line_alias t3 ON t.line_alias_id = t3.id LEFT JOIN t_sn_line_alias t3 ON t.line_alias_id = t3.id
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
t1.starting_mileage startMileage, t1.starting_mileage startMileage,
t1.center_mileage centerMileage, t1.center_mileage centerMileage,
t1.end_mileage endMileage, t1.end_mileage endMileage,
true isLeaf true isLeaf,
1 isStation
FROM t_sn_train_station t1 FROM t_sn_train_station t1
LEFT JOIN t_sn_light_rail t3 on t1.light_rail_id = t3.id LEFT JOIN t_sn_light_rail t3 on t1.light_rail_id = t3.id
LEFT JOIN t_sn_line_alias t4 ON t1.line_alias_id = t4.id LEFT JOIN t_sn_line_alias t4 ON t1.line_alias_id = t4.id
......
...@@ -41,6 +41,9 @@ public class SectionStationNode { ...@@ -41,6 +41,9 @@ public class SectionStationNode {
@ApiModelProperty(value = "是否是叶子节点") @ApiModelProperty(value = "是否是叶子节点")
private Boolean isLeaf; private Boolean isLeaf;
@ApiModelProperty(value = "是否车站 1-是 0-否")
private Integer isStation = 0;
@ApiModelProperty(value = "孩子节点") @ApiModelProperty(value = "孩子节点")
private List<SectionStationNode> children; private List<SectionStationNode> children;
......
server: server:
port: 8080 port: 8081
tomcat: tomcat:
max-swallow-size: -1 max-swallow-size: -1
error: error:
...@@ -131,7 +131,7 @@ spring: ...@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://47.94.207.62:3306/hzsomms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://47.94.207.62:3306/hzgw_test?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root username: root
password: superAdmin&321 password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment