Commit 7eda511f authored by hkl's avatar hkl

Merge branch 'dev-hkl' into 'dev'

feat:1.动静态分析

See merge request !48
parents f3960342 042820c1
package org.jeecg.modules.checkData.equipmentCheckData.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;
import lombok.Setter;
/**
* <p>
* 动静态几何尺寸-检查数据单元映射表
* </p>
*
* @author hkl
* @since 2023-08-02
*/
@Getter
@Setter
@TableName("t_djt_movement_check_data_unit_device_map")
@ApiModel(value = "MovementCheckDataUnitDeviceMap对象", description = "动静态几何尺寸-检查数据单元映射表")
public class MovementCheckDataUnitDeviceMap implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("设备单元id")
@TableField("unit_id")
private String unitId;
@ApiModelProperty("设备单元编码")
@TableField("unit_code")
private String unitCode;
@ApiModelProperty("设备单元类型 ")
@TableField("unit_type")
private Integer unitType;
@ApiModelProperty("设备单元类型名称")
@TableField("unit_type_name")
private String unitTypeName;
@ApiModelProperty("设备单元起始里程")
@TableField("unit_starting_mileage")
private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元中心里程")
@TableField("unit_center_mileage")
private BigDecimal unitCenterMileage;
@ApiModelProperty("设备单元终点里程")
@TableField("unit_end_mileage")
private BigDecimal unitEndMileage;
@ApiModelProperty("检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
@TableField("check_type")
private Integer checkType;
@ApiModelProperty("检查主表id")
@TableField("check_id")
private String checkId;
@ApiModelProperty("检查项目id")
@TableField("check_item_id")
private String checkItemId;
@ApiModelProperty("检查开始里程")
@TableField("check_item_starting_mileage")
private BigDecimal checkItemStartingMileage;
@ApiModelProperty("检查结束里程")
@TableField("check_item_end_mileage")
private BigDecimal checkItemEndMileage;
@ApiModelProperty("检查文本")
@TableField("check_item_text")
private String checkItemText;
@ApiModelProperty("检查详情id")
@TableField("check_detail_id")
private String checkDetailId;
@ApiModelProperty("检查开始里程")
@TableField("check_detail_starting_mileage")
private BigDecimal checkDetailStartingMileage;
@ApiModelProperty("检查结束里程")
@TableField("check_detail_end_mileage")
private BigDecimal checkDetailEndMileage;
@ApiModelProperty("测点")
@TableField("measure_point")
private Integer measurePoint;
@ApiModelProperty("轨距")
@TableField("track_gauge")
private String trackGauge;
@ApiModelProperty("水平")
@TableField("level")
private String level;
@ApiModelProperty("三角坑")
@TableField("triangular_pit")
private String triangularPit;
@ApiModelProperty("方向")
@TableField("direction")
private String direction;
@ApiModelProperty("高低")
@TableField("height")
private String height;
@ApiModelProperty("结构")
@TableField("structure")
private String structure;
@ApiModelProperty("整改")
@TableField("rectification")
private String rectification;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.checkData.equipmentCheckData.mapper;
import org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCheckDataUnitDeviceMap;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态几何尺寸-检查数据单元映射表 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-02
*/
public interface MovementCheckDataUnitDeviceMapMapper extends BaseMapper<MovementCheckDataUnitDeviceMap> {
}
<?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.checkData.equipmentCheckData.mapper.MovementCheckDataUnitDeviceMapMapper">
</mapper>
package org.jeecg.modules.checkData.equipmentCheckData.service;
import org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCheckDataUnitDeviceMap;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动静态几何尺寸-检查数据单元映射表 服务类
* </p>
*
* @author hkl
* @since 2023-08-02
*/
public interface IMovementCheckDataUnitDeviceMapService extends IService<MovementCheckDataUnitDeviceMap> {
}
package org.jeecg.modules.checkData.equipmentCheckData.service.impl;
import org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCheckDataUnitDeviceMap;
import org.jeecg.modules.checkData.equipmentCheckData.mapper.MovementCheckDataUnitDeviceMapMapper;
import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCheckDataUnitDeviceMapService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态几何尺寸-检查数据单元映射表 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-02
*/
@Service
public class MovementCheckDataUnitDeviceMapServiceImpl extends ServiceImpl<MovementCheckDataUnitDeviceMapMapper, MovementCheckDataUnitDeviceMap> implements IMovementCheckDataUnitDeviceMapService {
}
package org.jeecg.modules.dynamicStaticAnalysis.algorithm;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.convert.Converter;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItem;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetail;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentItemDetailService;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentItemService;
import org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCheckDataUnitDeviceMap;
import org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCourse;
import org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCourseInfo;
import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCheckDataUnitDeviceMapService;
import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCourseInfoService;
import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCourseService;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchCheckDataMap;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchCheckDataMapService;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
......@@ -47,6 +50,10 @@ public class AnalysisAlgorithm {
private IRailInspectionEquipmentItemService railInspectionEquipmentItemService;
@Resource
private IRailInspectionEquipmentItemDetailService railInspectionEquipmentItemDetailService;
@Resource
private IMovementCheckDataUnitDeviceMapService movementCheckDataUnitDeviceMapService;
@Resource
private IAnalysisBatchUnitDeviceService analysisBatchUnitDeviceService;
/**
* 分析
......@@ -58,16 +65,19 @@ public class AnalysisAlgorithm {
List<AnalysisBatchCheckDataMap> analysisBatchCheckDataMapList = analysisBatchCheckDataMapService.lambdaQuery()
.eq(AnalysisBatchCheckDataMap::getAnalysisBatchId, analysisBatchId)
.list();
// 1.2 按公里数正序排序所有道岔,钢轨,曲线,竖曲线
// 1.2 按公里数正序排序所有1-钢轨,2-曲线,3-竖曲线,4-道岔
List<Map<String, Object>> unitDeviceList = analysisAlgorithmMapper.getUnitDevice(analysisBatch.getLightRailId(), analysisBatch.getLineAliasId());
Map<String, Map<String, Object>> unitDeviceTable = new TreeMap<>();
// 1.3 获取检查数据
for (AnalysisBatchCheckDataMap checkDataMap : analysisBatchCheckDataMapList) {
// 检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查
if (1 == checkDataMap.getEkType()) {
List<MovementCheckDataUnitDeviceMap> movementCheckDataUnitDeviceMaps = new ArrayList<>();
// 1 获取人工检查数据
List<MovementCourse> checkItemList = movementCourseService.lambdaQuery()
.eq(MovementCourse::getMovementMasterId, checkDataMap.getEkId())
......@@ -118,19 +128,53 @@ public class AnalysisAlgorithm {
// 人工检查数据
List<MovementCourseInfo> labourCheck = trackCodeMap.get(trackCode);
unitDevice.put("labourCheck", labourCheck);
unitDeviceTable.putIfAbsent(unitCode, unitDevice);
} else {
currentStartMileage = currentEndEndMileage;
currentEndEndMileage = currentEndEndMileage.add(averageDec);
// 保存单元-测点数据
for (MovementCourseInfo movementCourseInfo : labourCheck) {
MovementCheckDataUnitDeviceMap movementCheckDataUnitDeviceMap = new MovementCheckDataUnitDeviceMap();
movementCheckDataUnitDeviceMap.setId(UUIDGenerator.generate());
movementCheckDataUnitDeviceMap.setUnitType(1);
movementCheckDataUnitDeviceMap.setCheckType(1);// 人工检查
movementCheckDataUnitDeviceMap.setUnitId(Convert.toStr(unitDevice.get("id")));
movementCheckDataUnitDeviceMap.setUnitCode(Convert.toStr(unitDevice.get("unitCode")));
movementCheckDataUnitDeviceMap.setUnitType(Convert.toInt(unitDevice.get("type")));
movementCheckDataUnitDeviceMap.setUnitTypeName(Convert.toStr(unitDevice.get("typeName")));
movementCheckDataUnitDeviceMap.setUnitStartingMileage(Convert.toBigDecimal(unitDevice.get("startMileage")));
movementCheckDataUnitDeviceMap.setUnitCenterMileage(centerMileage);
movementCheckDataUnitDeviceMap.setUnitEndMileage(Convert.toBigDecimal(unitDevice.get("endMileage")));
movementCheckDataUnitDeviceMap.setCheckId(checkItem.getMovementMasterId());
movementCheckDataUnitDeviceMap.setCheckItemId(checkItem.getId());
movementCheckDataUnitDeviceMap.setCheckItemStartingMileage(checkItem.getCourseStartingMileage());
movementCheckDataUnitDeviceMap.setCheckItemEndMileage(checkItem.getCourseEndMileage());
movementCheckDataUnitDeviceMap.setCheckItemText(movementCourseInfo.getTrackCode());
movementCheckDataUnitDeviceMap.setCheckDetailId(movementCourseInfo.getId());
movementCheckDataUnitDeviceMap.setCheckDetailStartingMileage(currentStartMileage);
movementCheckDataUnitDeviceMap.setCheckDetailEndMileage(currentEndEndMileage);
movementCheckDataUnitDeviceMap.setTrackGauge(movementCourseInfo.getTrackGauge());
movementCheckDataUnitDeviceMap.setLevel(movementCourseInfo.getLevel());
movementCheckDataUnitDeviceMap.setTriangularPit(movementCourseInfo.getTriangularPit());
movementCheckDataUnitDeviceMap.setMeasurePoint(movementCourseInfo.getMeasurePoint());
movementCheckDataUnitDeviceMap.setDirection(movementCourseInfo.getDirection());
movementCheckDataUnitDeviceMap.setHeight(movementCourseInfo.getHeight());
movementCheckDataUnitDeviceMap.setStructure(movementCourseInfo.getStructure());
movementCheckDataUnitDeviceMap.setRectification(movementCourseInfo.getRectification());
movementCheckDataUnitDeviceMaps.add(movementCheckDataUnitDeviceMap);
}
}
currentStartMileage = currentEndEndMileage;
currentEndEndMileage = currentEndEndMileage.add(averageDec);
}
}
}
}
}
// 保存之前先删除
movementCheckDataUnitDeviceMapService.lambdaUpdate().eq(MovementCheckDataUnitDeviceMap::getCheckId, checkDataMap.getEkId()).remove();
movementCheckDataUnitDeviceMapService.saveBatch(movementCheckDataUnitDeviceMaps);
} else if (2 == checkDataMap.getEkType()) {
// 1 获取轨检仪静态检查
List<RailInspectionEquipmentItem> checkItemList = railInspectionEquipmentItemService.lambdaQuery()
......@@ -164,7 +208,32 @@ public class AnalysisAlgorithm {
if (checkItemStartingMileage.compareTo(centerMileage) <= 0 && checkItemEndMileage.compareTo(centerMileage) > 0) {
List<RailInspectionEquipmentItemDetail> movementCourseInfos = checkItemItemDetailMap.get(checkItem.getId());
if (ObjectUtil.isNotEmpty(movementCourseInfos)) {
// 1.处理3个格子映射问题
Map<String, List<RailInspectionEquipmentItemDetail>> trackCodeMap = movementCourseInfos.stream()
.collect(Collectors.groupingBy(RailInspectionEquipmentItemDetail::getCheckItem));
int size = trackCodeMap.size();
BigDecimal averageDec = checkItemEndMileage.subtract(checkItemStartingMileage).divide(new BigDecimal(size), 3, RoundingMode.HALF_UP);
List<String> trackCodes = trackCodeMap.keySet().stream()
.mapToInt(Integer::valueOf)
.sorted()
.mapToObj(String::valueOf)
.collect(Collectors.toList());
BigDecimal currentStartMileage = checkItemStartingMileage;
BigDecimal currentEndEndMileage = checkItemStartingMileage.add(averageDec);
for (String trackCode : trackCodes) {
// 2.命中格子
if (currentStartMileage.compareTo(centerMileage) <= 0 && currentEndEndMileage.compareTo(centerMileage) > 0) {
String unitCode = Convert.toStr(unitDevice.get("unitCode"));
// 轨检仪检查数据
List<RailInspectionEquipmentItemDetail> railDevice = trackCodeMap.get(trackCode);
unitDevice.put("railDevice", railDevice);
unitDeviceTable.putIfAbsent(unitCode, unitDevice);
}
currentStartMileage = currentEndEndMileage;
currentEndEndMileage = currentEndEndMileage.add(averageDec);
}
}
}
}
......@@ -176,12 +245,41 @@ public class AnalysisAlgorithm {
}
}
if (ObjectUtil.isNotEmpty(unitDeviceTable)) {
List<AnalysisBatchUnitDevice> analysisBatchUnitDevices = new ArrayList<>();
for (Map.Entry<String, Map<String, Object>> entry : unitDeviceTable.entrySet()) {
Map<String, Object> unitDevice = entry.getValue();
AnalysisBatchUnitDevice analysisBatchUnitDevice = new AnalysisBatchUnitDevice();
analysisBatchUnitDevice.setId(UUIDGenerator.generate());
analysisBatchUnitDevice.setAnalysisBatchId(analysisBatch.getId());
analysisBatchUnitDevice.setAnalysisBatchCode(analysisBatch.getAnalysisBatchCode());
analysisBatchUnitDevice.setUnitId(Convert.toStr(unitDevice.get("id")));
analysisBatchUnitDevice.setUnitCode(Convert.toStr(unitDevice.get("unitCode")));
analysisBatchUnitDevice.setUnitType(Convert.toInt(unitDevice.get("type")));
analysisBatchUnitDevice.setUnitTypeName(Convert.toStr(unitDevice.get("typeName")));
analysisBatchUnitDevice.setUnitStartingMileage(Convert.toBigDecimal(unitDevice.get("startMileage")));
analysisBatchUnitDevice.setUnitCenterMileage(Convert.toBigDecimal(unitDevice.get("centerMileage")));
analysisBatchUnitDevice.setUnitEndMileage(Convert.toBigDecimal(unitDevice.get("endMileage")));
Object labourCheckData = unitDevice.get("labourCheck");
if (ObjectUtil.isNotEmpty(labourCheckData)) {
analysisBatchUnitDevice.setLabourCheck(1);
} else {
analysisBatchUnitDevice.setLabourCheck(0);
}
System.out.println("JSONObject.toJSONString(unitDeviceTable) = " + JSONObject.toJSONString(unitDeviceTable));
// 1.映射单元格
Object railDeviceData = unitDevice.get("railDevice");
if (ObjectUtil.isNotEmpty(railDeviceData)) {
analysisBatchUnitDevice.setRailDeviceCheck(1);
} else {
analysisBatchUnitDevice.setRailDeviceCheck(0);
}
analysisBatchUnitDevices.add(analysisBatchUnitDevice);
}
analysisBatchUnitDeviceService.lambdaUpdate().eq(AnalysisBatchUnitDevice::getAnalysisBatchId, analysisBatchId).remove();
analysisBatchUnitDeviceService.saveBatch(analysisBatchUnitDevices);
}
// 2.评分
// 2.计算超限评分
}
}
\ No newline at end of file
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <p>
* 动静态分析-分析批次-单元设备 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-03
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/analysisBatchUnitDevice")
@Api(tags = "动静态分析-分析批次-单元设备")
public class AnalysisBatchUnitDeviceController extends JeecgController<AnalysisBatchUnitDevice, IAnalysisBatchUnitDeviceService> {
@AutoLog(value = "动静态分析-分析批次-单元设备-获取列表数据")
@ApiOperation(value = "动静态分析-分析批次-单元设备-获取列表数据", notes = "动静态分析-分析批次-单元设备-获取列表数据")
@GetMapping(value = "/listRecord")
public Result<IPage<AnalysisBatchUnitDeviceVO>> listRecord(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
AnalysisBatchUnitDeviceDTO dto) {
Page<AnalysisBatchUnitDeviceVO> pageData = new Page<>(pageNo, pageSize);
pageData = this.service.listRecord(pageData, dto);
return Result.OK(pageData);
}
}
package org.jeecg.modules.dynamicStaticAnalysis.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* 动静态分析-分析批次-单元设备
* </p>
*
* @author hkl
* @since 2023-08-03
*/
@Data
@ApiModel(value = "AnalysisBatchUnitDeviceDTO对象", description = "动静态分析-分析批次-单元设备")
public class AnalysisBatchUnitDeviceDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("分析批id")
private String analysisBatchId;
@ApiModelProperty("设备单元类型1-钢轨 2-曲线 3-竖曲线 4-道岔")
private Integer unitType;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元结束里程")
private BigDecimal unitEndMileage;
@ApiModelProperty("是否存在人工检查数据 0-不存在 1-存在")
private Integer labourCheck;
@ApiModelProperty("得分平级")
private String gradeJudge;
}
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;
import lombok.Setter;
/**
* <p>
* 动静态分析-分析批次-单元设备
* </p>
*
* @author hkl
* @since 2023-08-03
*/
@Getter
@Setter
@TableName("t_dsa_analysis_batch_unit_device")
@ApiModel(value = "AnalysisBatchUnitDevice对象", description = "动静态分析-分析批次-单元设备")
public class AnalysisBatchUnitDevice implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("分析批次号")
@TableField("analysis_batch_code")
private String analysisBatchCode;
@ApiModelProperty("分析批id")
@TableField("analysis_batch_id")
private String analysisBatchId;
@ApiModelProperty("单元设备id")
@TableField("unit_id")
private String unitId;
@ApiModelProperty("单元设备code")
@TableField("unit_code")
private String unitCode;
@ApiModelProperty("设备单元类型1-钢轨,2-曲线,3-竖曲线,4-道岔")
@TableField("unit_type")
private Integer unitType;
@ApiModelProperty("设备单元类型名称")
@TableField("unit_type_name")
private String unitTypeName;
@ApiModelProperty("设备单元起始里程")
@TableField("unit_starting_mileage")
private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元中心里程")
@TableField("unit_center_mileage")
private BigDecimal unitCenterMileage;
@ApiModelProperty("设备单元结束里程")
@TableField("unit_end_mileage")
private BigDecimal unitEndMileage;
@ApiModelProperty("是否存在人工检查数据 0-不存在 1-存在")
@TableField("labour_check")
private Integer labourCheck;
@ApiModelProperty("人工检查数据得分")
@TableField("labour_check_grade")
private BigDecimal labourCheckGrade;
@ApiModelProperty("是否存在轨检仪检查数据 0-不存在 1-存在")
@TableField("rail_device_check")
private Integer railDeviceCheck;
@ApiModelProperty("轨检仪检查数据得分")
@TableField("rail_device_check_grade")
private BigDecimal railDeviceCheckGrade;
@ApiModelProperty("是否存在轨检车查数据 0-不存在 1-存在")
@TableField("rail_vehicle_check")
private Integer railVehicleCheck;
@ApiModelProperty("轨检车查数据得分")
@TableField("rail_vehicle_check_grade")
private BigDecimal railVehicleCheckGrade;
@ApiModelProperty("是否存在添乘仪查数据 0-不存在 1-存在")
@TableField("add_device_check")
private Integer addDeviceCheck;
@ApiModelProperty("添乘仪查数据得分")
@TableField("add_device_check_grade")
private BigDecimal addDeviceCheckGrade;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
/**
* <p>
* 动静态分析-分析批次-单元设备 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-03
*/
public interface AnalysisBatchUnitDeviceMapper extends BaseMapper<AnalysisBatchUnitDevice> {
Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto);
}
......@@ -7,12 +7,14 @@
unitCode,
startMileage,
endMileage,
type
type,
typeName
FROM (SELECT t1.id,
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'钢轨' type
1 type,
'钢轨' typeName
FROM t_da_rail_management t1
WHERE t1.line_alias_id = #{lineAliasId}
AND t1.light_rail_id = #{lightRailId}
......@@ -23,7 +25,8 @@
t1.unit_code unitCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
'曲线' type
2 type,
'曲线' typeName
FROM t_da_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE t1.line_alias_id = #{lineAliasId}
......@@ -35,7 +38,8 @@
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'竖曲线' type
3 type,
'竖曲线' typeName
FROM t_da_vertical_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE t1.line_alias_id = #{lineAliasId}
......@@ -45,7 +49,8 @@
t1.unit_code unitCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
'道岔' type
4 type,
'道岔' typeName
FROM t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id
......
<?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.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper">
<select id="listRecord" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO">
SELECT
t1.id,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.analysis_batch_code,
t1.analysis_batch_id,
t1.unit_id,
t1.unit_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.labour_check,
t1.labour_check_grade,
t1.rail_device_check,
t1.rail_device_check_grade,
t1.rail_vehicle_check,
t1.rail_vehicle_check_grade,
t1.add_device_check,
t1.add_device_check_grade,
t1.remark
FROM
t_dsa_analysis_batch_unit_device t1
WHERE t1.analysis_batch_id = #{dto.analysisBatchId}
</select>
</mapper>
package org.jeecg.modules.dynamicStaticAnalysis.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
/**
* <p>
* 动静态分析-分析批次-单元设备 服务类
* </p>
*
* @author hkl
* @since 2023-08-03
*/
public interface IAnalysisBatchUnitDeviceService extends IService<AnalysisBatchUnitDevice> {
Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto);
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态分析-分析批次-单元设备 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-03
*/
@Service
public class AnalysisBatchUnitDeviceServiceImpl extends ServiceImpl<AnalysisBatchUnitDeviceMapper, AnalysisBatchUnitDevice> implements IAnalysisBatchUnitDeviceService {
@Override
public Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto) {
return this.baseMapper.listRecord(pageData,dto);
}
}
......@@ -73,8 +73,6 @@ 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) {
// 优良
ConfigGradeLimit a = new ConfigGradeLimit();
a.setId(UUIDGenerator.generate());
......@@ -92,7 +90,7 @@ public class ConfigGradeLimitServiceImpl extends ServiceImpl<ConfigGradeLimitMap
b.setDictLabel(sysDictItem.getItemText());
b.setDictValue(sysDictItem.getItemValue());
b.setDeviceType(deviceType);
b.setGradeLevel(1); //2-合格
b.setGradeLevel(2); //2-合格
b.setGradeMin(100);
b.setGradeMax(200);
result.add(b);
......
package org.jeecg.modules.dynamicStaticAnalysis.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* 动静态分析-分析批次-单元设备
* </p>
*
* @author hkl
* @since 2023-08-03
*/
@Data
@ApiModel(value = "AnalysisBatchUnitDeviceVO对象", description = "动静态分析-分析批次-单元设备")
public class AnalysisBatchUnitDeviceVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("分析批次号")
private String analysisBatchCode;
@ApiModelProperty("分析批id")
private String analysisBatchId;
@ApiModelProperty("单元设备id")
private String unitId;
@ApiModelProperty("单元设备code")
private String unitCode;
@ApiModelProperty("设备单元类型1-钢轨 2-曲线 3-竖曲线 4-道岔")
private Integer unitType;
@ApiModelProperty("设备单元类型名称")
private String unitTypeName;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
@ApiModelProperty("设备单元结束里程")
private BigDecimal unitEndMileage;
@ApiModelProperty("是否存在人工检查数据 0-不存在 1-存在")
private Integer labourCheck;
@ApiModelProperty("人工检查数据得分")
private BigDecimal labourCheckGrade;
@ApiModelProperty("是否存在轨检仪检查数据 0-不存在 1-存在")
private Integer railDeviceCheck;
@ApiModelProperty("轨检仪检查数据得分")
private BigDecimal railDeviceCheckGrade;
@ApiModelProperty("是否存在轨检车查数据 0-不存在 1-存在")
private Integer railVehicleCheck;
@ApiModelProperty("轨检车查数据得分")
private BigDecimal railVehicleCheckGrade;
@ApiModelProperty("是否存在添乘仪查数据 0-不存在 1-存在")
private Integer addDeviceCheck;
@ApiModelProperty("添乘仪查数据得分")
private BigDecimal addDeviceCheckGrade;
@ApiModelProperty("最后得分")
private BigDecimal finalGrade;
@ApiModelProperty("得分平级")
private String gradeJudge;
@ApiModelProperty("备注")
private String remark;
}
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