Commit e87d9c9d authored by hkl's avatar hkl

feat: 1.车站bug提交

parent 6c121853
......@@ -588,6 +588,8 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
if (measurePoint % 8 == 0) {
measurePoint = 1;
trackCode = String.valueOf(Integer.valueOf(trackCode) + 1);
} else {
measurePoint++;
}
movementCourseInfos.add(movementCourseInfo);
}
......@@ -784,7 +786,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
@AutoLog(value = "轨检车详情查询")
@ApiOperation(value = "轨检车详情查询", notes = "轨检车详情查询")
@GetMapping(value = "/getTrackInfo")
public Result<Map<String, Object>> getTrackInfo(@ApiParam(name = "动静态几何尺寸数据id") String id, @ApiParam(name = "查询类型") String type,@ApiParam(name = "轨检车->超限查询子类型") String overType) {
public Result<Map<String, Object>> getTrackInfo(@ApiParam(name = "动静态几何尺寸数据id") String id, @ApiParam(name = "查询类型") String type, @ApiParam(name = "轨检车->超限查询子类型") String overType) {
Map<String, Object> map = new HashMap<>();
if ("1".equals(type)) {
//轨检车-》轨道动态几何尺寸容许值差管理值
......@@ -907,11 +909,11 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
//处理200m区段轨道不平顺质量指数TQI管理标准(单位:mm)解析封装逻辑
int dataOne = this.uploadMovementTqiStandardManager(movementTqiStandardManagerList, i, sort, realname, rowRecords, id);
i = i + dataOne;
}else if (str.equals("TQI公里状态评定标准")) {
} else if (str.equals("TQI公里状态评定标准")) {
//处理TQI公里状态评定标准解析封装逻辑
int dataOne = this.uploadMovementTqiKilometerStandardManager(movementTqiKilometerStandardManagerList, i, sort, realname, rowRecords, id);
i = i + dataOne;
}else if (str.equals("四级缺陷记录报告表") || str.equals("三级缺陷记录报告表") || str.equals("二级缺陷记录报告表") || str.equals("一级缺陷记录报告表")) {
} else if (str.equals("四级缺陷记录报告表") || str.equals("三级缺陷记录报告表") || str.equals("二级缺陷记录报告表") || str.equals("一级缺陷记录报告表")) {
//处理超限记录报告解析封装逻辑
int dataOne = this.uploadMovementOverReport(movementOverReportList, i, sort, realname, rowRecords, id);
i = i + dataOne;
......@@ -992,7 +994,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
* @param id 主表id
*/
public int uploadMovementTqiKilometerStandardManager(List<MovementTqiKilometerStandardManager> movementTqiStandardManagerList, int i, int sort, String realname, List<List<Object>> rowRecords, String id) {
String regEx ="[^0-9 .]";
String regEx = "[^0-9 .]";
Pattern p = Pattern.compile(regEx);
int dataOne = 0;
for (int j = i + 2; j < rowRecords.size(); j++) {
......@@ -1061,6 +1063,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
}
return dataOne;
}
/**
* @param movementTqiStandardManagerList 最终的200m区段轨道不平顺质量指数TQI管理标准(单位:mm)集合
* @param i 当前行坐标
......@@ -1070,7 +1073,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
* @param id 主表id
*/
public int uploadMovementTqiStandardManager(List<MovementTqiStandardManager> movementTqiStandardManagerList, int i, int sort, String realname, List<List<Object>> rowRecords, String id) {
String regEx ="[^0-9 .]";
String regEx = "[^0-9 .]";
Pattern p = Pattern.compile(regEx);
int dataOne = 0;
for (int j = i + 3; j < rowRecords.size(); j++) {
......@@ -1323,7 +1326,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
gaugeChange = rowRecords.get(j).get(98).toString().trim();
if (ObjectUtil.isNotEmpty(gaugeChange)) {
model.setGaugeChange(gaugeChange);
}else{
} else {
model.setGaugeChange("");
}
//曲率变化率
......@@ -1331,7 +1334,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
curvatureChange = rowRecords.get(j).get(111).toString().trim();
if (ObjectUtil.isNotEmpty(curvatureChange)) {
model.setCurvatureChange(curvatureChange);
}else{
} else {
model.setCurvatureChange("");
}
//扣分标准
......@@ -1339,7 +1342,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
deductStandard = rowRecords.get(j).get(122).toString().trim();
if (ObjectUtil.isNotEmpty(deductStandard)) {
model.setDeductStandard(deductStandard);
}else{
} else {
model.setDeductStandard("");
}
movementDiferenceManagerList.add(model);
......
......@@ -3,8 +3,11 @@ package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -62,17 +65,21 @@ public class ConfigGradeLimit implements Serializable {
@TableField("dict_label")
private String dictLabel;
@ApiModelProperty("评价等级 1-优良 2-合格 3-失格 ")
@ApiModelProperty("评价等级 1-优良 2-合格 3-失格")
@TableField("grade_level")
private Integer gradeLevel;
@ApiModelProperty("评价等级中文说明")
@TableField("grade_level_str")
private String gradeLevelStr;
@ApiModelProperty("最小评分")
@TableField("grade_min")
private Integer gradeMin;
private BigDecimal gradeMin;
@ApiModelProperty("最大评分")
@TableField("grade_max")
private Integer gradeMax;
private BigDecimal gradeMax;
@ApiModelProperty("设备类型 1-钢轨 2-道岔 3-曲线 4-竖曲线")
@TableField("device_type")
......
......@@ -47,8 +47,33 @@
#{item}
</foreach>
</if>
<if test="dto.gradeJudgeList!=null and dto.gradeJudgeList.size()>0">
AND analysis.unit_score_level in
<foreach collection="dto.gradeJudgeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.unitTypeList!=null and dto.unitTypeList.size()>0">
AND analysis.unit_type in
<foreach collection="dto.unitTypeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.isTransfinite != null">
AND analysis.is_transfinite = 1
</if>
<if test="dto.unitStartingMileage != null">
AND analysis.unit_starting_mileage >= #{dto.unitStartingMileage }
</if>
<if test="dto.unitEndMileage != null">
AND analysis.unit_end_mileage <![CDATA[ <= ]]> #{dto.unitEndMileage}
</if>
<if test="dto.unitCode != null and dto.unitCode != ''">
AND analysis.unit_code like concat('%',#{dto.unitCode},'%')
</if>
<if test="dto.unitDeviceCode != null and dto.unitDeviceCode != ''">
AND analysis.unit_device_code like concat('%',#{dto.unitDeviceCode},'%')
</if>
order by unit_starting_mileage
</select>
</mapper>
......@@ -2,14 +2,14 @@ package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.constant.DictConstant;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigGradeLimit;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigGradeLimitMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigGradeLimitService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil;
import org.jeecg.modules.system.entity.SysDict;
import org.jeecg.modules.system.entity.SysDictItem;
import org.jeecg.modules.system.mapper.SysDictItemMapper;
......@@ -17,6 +17,7 @@ import org.jeecg.modules.system.mapper.SysDictMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
......@@ -73,15 +74,20 @@ public class ConfigGradeLimitServiceImpl extends ServiceImpl<ConfigGradeLimitMap
List<Integer> deviceTypeList = IntStream.range(1, 5).boxed().collect(Collectors.toList());
for (Integer deviceType : deviceTypeList) {
for (SysDictItem sysDictItem : sysDictItems) {
Integer[] speedLevels = StrUtil.getSpeedLevel(sysDictItem.getItemText());
// 优良
ConfigGradeLimit a = new ConfigGradeLimit();
a.setId(UUIDGenerator.generate());
a.setDictLabel(sysDictItem.getItemText());
a.setDictValue(sysDictItem.getItemValue());
a.setSpeedMin(speedLevels[0]);
a.setSpeedMax(speedLevels[1]);
a.setDeviceType(deviceType);
a.setGradeLevel(1); //1-优良
a.setGradeMin(0);
a.setGradeMax(100);
a.setGradeLevelStr("优良");
a.setGradeMin(new BigDecimal("0"));
a.setGradeMax(new BigDecimal("15"));
result.add(a);
// 合格
......@@ -89,10 +95,13 @@ public class ConfigGradeLimitServiceImpl extends ServiceImpl<ConfigGradeLimitMap
b.setId(UUIDGenerator.generate());
b.setDictLabel(sysDictItem.getItemText());
b.setDictValue(sysDictItem.getItemValue());
b.setSpeedMin(speedLevels[0]);
b.setSpeedMax(speedLevels[1]);
b.setDeviceType(deviceType);
b.setGradeLevel(2); //2-合格
b.setGradeMin(100);
b.setGradeMax(200);
b.setGradeLevelStr("合格");
b.setGradeMin(new BigDecimal("15"));
b.setGradeMax(new BigDecimal("20"));
result.add(b);
// 失格
......@@ -100,10 +109,13 @@ public class ConfigGradeLimitServiceImpl extends ServiceImpl<ConfigGradeLimitMap
c.setId(UUIDGenerator.generate());
c.setDictLabel(sysDictItem.getItemText());
c.setDictValue(sysDictItem.getItemValue());
c.setSpeedMin(speedLevels[0]);
c.setSpeedMax(speedLevels[1]);
c.setDeviceType(deviceType);
c.setGradeLevel(3); //3-失格
c.setGradeMin(200);
c.setGradeMax(99999);
c.setGradeLevelStr("失格");
c.setGradeMin(new BigDecimal("20"));
c.setGradeMax(new BigDecimal("99999"));
result.add(c);
}
......
......@@ -21,4 +21,8 @@ public class TrainStationQueryDTO {
@ApiModelProperty(value = "线别id")
private String lineAliasId;
@ApiModelProperty(value = "线路Id")
private String railLine;
}
......@@ -22,15 +22,16 @@
t1.remark
FROM t_sn_train_station t1
LEFT JOIN t_sn_light_rail t2 ON t1.light_rail_id = t2.id
<where>
WHERE t2.status = 1
<if test="query.stationName !=null and query.stationName!=''">
AND t1.station_name like concat('%',#{query.stationName},'%')
</if>
<if test="query.lineAliasId !=null and query.lineAliasId!=''">
AND t1.line_alias_id = #{query.lineAliasId}
</if>
AND t2.status = 1
</where>
<if test="query.railLine !=null and query.railLine!=''">
AND t1.light_rail_id = #{query.railLine}
</if>
</select>
<select id="getTreeTrainStationList" resultType="org.jeecg.modules.subwayNetwork.vo.SectionStationNode">
SELECT
......
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