Commit 14c16f87 authored by hkl's avatar hkl

feat: 1.设备病例本

parent 30d38214
......@@ -559,7 +559,11 @@ public class AnalysisAlgorithm {
}
// String allowValue = Convert.toBigDecimal(movementOverReport.getPeakValue()).subtract(Convert.toBigDecimal(movementOverReport.getDataDifference())).toString();
// zontalSpeedTransfinite.setAllowValue();
zontalSpeedTransfinite.setEkId(additiveInfo.getMovementMasterId());
zontalSpeedTransfinite.setEkType(4);
zontalSpeedTransfinite.setEkItemId(additiveInfo.getId());
zontalSpeedTransfinite.setMeasurePointValue(additiveInfo.getVerticalSpeed().toString());
addInstrumentTransfiniteList.add(zontalSpeedTransfinite);
}
......@@ -584,6 +588,9 @@ public class AnalysisAlgorithm {
}
// String allowValue = Convert.toBigDecimal(movementOverReport.getPeakValue()).subtract(Convert.toBigDecimal(movementOverReport.getDataDifference())).toString();
// zontalSpeedTransfinite.setAllowValue();
verticalSpeedTransfinite.setEkId(additiveInfo.getMovementMasterId());
verticalSpeedTransfinite.setEkType(4);
verticalSpeedTransfinite.setEkItemId(additiveInfo.getId());
verticalSpeedTransfinite.setMeasurePointValue(additiveInfo.getVerticalSpeed().toString());
addInstrumentTransfiniteList.add(verticalSpeedTransfinite);
}
......@@ -870,6 +877,9 @@ public class AnalysisAlgorithm {
}
String allowValue = Convert.toBigDecimal(movementOverReport.getPeakValue()).subtract(Convert.toBigDecimal(movementOverReport.getDataDifference())).toString();
transfinite.setAllowValue(allowValue);
transfinite.setEkId(movementOverReport.getMovementMasterId());
transfinite.setEkType(3);
transfinite.setEkItemId(movementOverReport.getId());
transfinite.setMeasurePointValue(movementOverReport.getPeakValue());
railVehicleTransfiniteList.add(transfinite);
......@@ -1248,8 +1258,7 @@ public class AnalysisAlgorithm {
unitDevice.put("railVehicleTqiScore", tqiScore);
// 判断tqi指标是否派工
// 判断tqi是否超限没写
break;
}
......@@ -1636,6 +1645,9 @@ public class AnalysisAlgorithm {
record.setTransfiniteGradeName(reasonLabel);
record.setTransfiniteType(transfiniteType);
record.setAllowValue(allowValueSave);
record.setEkId(movementCourseInfo.getRailInspectionEquipmentId());
record.setEkType(2);
record.setEkItemId(movementCourseInfo.getRailInspectionEquipmentItemId());
record.setMeasurePointValue(measurePointValue);
record.setIsWork(isWork);
return record;
......@@ -2156,6 +2168,9 @@ public class AnalysisAlgorithm {
record.setTransfiniteGradeName(reasonLabel);
record.setTransfiniteType(transfiniteType);
record.setAllowValue(allowValueSave);
record.setEkId(movementCourseInfo.getMovementMasterId());
record.setEkType(1);
record.setEkItemId(movementCourseInfo.getMovementCourseId());
record.setMeasurePointValue(measurePointValue);
record.setIsWork(isWork);
return record;
......
......@@ -13,11 +13,13 @@ import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.dynamicStaticAnalysis.face.AnalysisBatchUnitDeviceFace;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -36,6 +38,7 @@ import java.util.stream.Collectors;
@Api(tags = "动静态分析-分析批次")
public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAnalysisBatchService> {
@AutoLog(value = "动静态分析-分析批次-获取检查数据")
@ApiOperation(value = "动静态分析-分析批次-获取检查数据", notes = "动静态分析-分析批次-获取检查数据")
@GetMapping(value = "/getCheckData")
......@@ -119,4 +122,7 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
return Result.OK("批量删除成功!");
}
}
......@@ -4,20 +4,21 @@ package org.jeecg.modules.dynamicStaticAnalysis.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
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.entity.AnalysisBatchUnitDeviceTransfinite;
import org.jeecg.modules.dynamicStaticAnalysis.face.AnalysisBatchUnitDeviceFace;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceTransfiniteService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataDetailVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
......@@ -33,6 +34,9 @@ import java.util.List;
public class AnalysisBatchUnitDeviceController extends JeecgController<AnalysisBatchUnitDevice, IAnalysisBatchUnitDeviceService> {
@Resource
private AnalysisBatchUnitDeviceFace analysisBatchUnitDeviceFace;
@AutoLog(value = "动静态分析-分析批次-单元设备-获取列表数据")
@ApiOperation(value = "动静态分析-分析批次-单元设备-获取列表数据", notes = "动静态分析-分析批次-单元设备-获取列表数据")
@PostMapping(value = "/listRecord")
......@@ -45,4 +49,15 @@ public class AnalysisBatchUnitDeviceController extends JeecgController<AnalysisB
}
@AutoLog(value = "动静态分析-分析批次-单元设备-检查数据")
@ApiOperation(value = "动静态分析-分析批次-单元设备-检查数据", notes = "动静态分析-分析批次-单元设备-检查数据")
@GetMapping(value = "/checkData")
public Result<CaseReportCheckDataDetailVO> checkData(String id) {
CaseReportCheckDataDetailVO vo = analysisBatchUnitDeviceFace.checkData(id);
return Result.OK(vo);
}
}
......@@ -92,6 +92,18 @@ public class AnalysisBatchUnitDeviceTransfinite implements Serializable {
@TableField("allow_value")
private String allowValue;
@ApiModelProperty("检查id")
@TableField("ek_id")
private String ekId;
@ApiModelProperty("检查类型 检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
@TableField("ek_type")
private Integer ekType;
@ApiModelProperty("检查项目id(如果是人工和轨检查仪器就是检查项目id)")
@TableField("ek_item_id")
private String ekItemId;
@ApiModelProperty("测点值")
@TableField("measure_point_value")
private String measurePointValue;
......
package org.jeecg.modules.dynamicStaticAnalysis.face;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataDetailVO;
import java.util.List;
public interface AnalysisBatchUnitDeviceFace {
CaseReportCheckDataDetailVO checkData(String id);
}
package org.jeecg.modules.dynamicStaticAnalysis.face.impl;
import org.jeecg.modules.dynamicStaticAnalysis.face.AnalysisBatchUnitDeviceFace;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import org.jeecg.modules.unitDevice.vo.*;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Service
public class AnalysisBatchUnitDeviceFaceImpl implements AnalysisBatchUnitDeviceFace {
@Resource
private IAnalysisBatchUnitDeviceService analysisBatchUnitDeviceService;
@Override
public CaseReportCheckDataDetailVO checkData(String id) {
CaseReportCheckDataDetailVO vo = new CaseReportCheckDataDetailVO();
// 静态数据
List<StaticCheckVO> staticCheckVOS = analysisBatchUnitDeviceService.getUnitDeviceStaticData(id);
List<StaticCheckVO> labourCheckVOList = new ArrayList<>();
List<StaticCheckVO> railDeviceCheckVOList = new ArrayList<>();
for (StaticCheckVO staticCheckVO : staticCheckVOS) {
if (staticCheckVO.getCheckType() == 1) {
labourCheckVOList.add(staticCheckVO);
} else {
railDeviceCheckVOList.add(staticCheckVO);
}
}
vo.setLabourCheckVOList(labourCheckVOList);
vo.setRailDeviceCheckVOList(railDeviceCheckVOList);
// 轨检车数据
List<RailVehicleCheckVO> railVehicleCheckVOList = analysisBatchUnitDeviceService.getUnitDeviceOverReport(id);
vo.setRailVehicleCheckVOList(railVehicleCheckVOList);
List<RailVehicleTqiVO> railVehicleTqiVOList = analysisBatchUnitDeviceService.getUnitDeviceTqi(id);
vo.setRailVehicleTqiVOList(railVehicleTqiVOList);
// 添乘以
List<RailAddInstrumentCheckVO> railAddInstrumentCheckVOList = analysisBatchUnitDeviceService.getUnitDeviceAdditiveInfo(id);
vo.setRailAddInstrumentCheckVOList(railAddInstrumentCheckVOList);
return vo;
}
}
......@@ -5,6 +5,12 @@ 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;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
import org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO;
import org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO;
import org.jeecg.modules.unitDevice.vo.StaticCheckVO;
import java.util.List;
/**
* <p>
......@@ -17,4 +23,12 @@ import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
public interface AnalysisBatchUnitDeviceMapper extends BaseMapper<AnalysisBatchUnitDevice> {
Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto);
List<StaticCheckVO> getUnitDeviceStaticData(String id);
List<RailVehicleCheckVO> getUnitDeviceOverReport(String id);
List<RailVehicleTqiVO> getUnitDeviceTqi(String id);
List<RailAddInstrumentCheckVO> getUnitDeviceAdditiveInfo(String id);
}
......@@ -55,7 +55,7 @@
</if>
<if test="dto.isTransfinite != null">
AND analysis.is_transfinite = 1
AND analysis.is_transfinite > 0
</if>
<if test="dto.unitStartingMileage != null">
AND analysis.unit_starting_mileage >= #{dto.unitStartingMileage }
......@@ -71,4 +71,146 @@
</if>
order by unit_starting_mileage
</select>
<select id="getUnitDeviceStaticData" resultType="org.jeecg.modules.unitDevice.vo.StaticCheckVO">
SELECT
t2.id,
t2.unit_id,
t2.unit_code,
t2.unit_type,
t2.unit_type_name,
t2.unit_starting_mileage,
t2.unit_center_mileage,
t2.unit_end_mileage,
t2.check_type,
t2.check_id,
t3.ek_code check_code,
t2.check_item_id,
t2.check_item_starting_mileage,
t2.check_item_end_mileage,
t2.check_item_text,
t2.check_detail_id,
t2.check_detail_starting_mileage,
t2.check_detail_end_mileage,
t2.measure_point,
t2.track_gauge,
t2.LEVEL,
t2.triangular_pit,
t2.direction,
t2.height,
t2.structure,
t2.rectification,
t2.remark
FROM
t_dsa_analysis_batch_unit_device_transfinite t1
LEFT JOIN t_djt_movement_check_data_unit_device_map t2 ON t1.unit_id = t2.unit_id AND t1.unit_type = t2.unit_type AND t1.check_id = t2.check_id
LEFT JOIN t_djt_movement_records_master t3 ON t2.check_id = t3.id
WHERE
t1.analysis_batch_unit_device_id = #{id}
AND t1.check_type in (1,2)
ORDER BY
t3.ek_code ASC
</select>
<select id="getUnitDeviceOverReport" resultType="org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO">
SELECT t2.id,
t2.unit_id,
t2.unit_code,
t2.unit_type,
t2.unit_type_name,
t2.unit_starting_mileage,
t2.unit_center_mileage,
t2.unit_end_mileage,
t2.check_id,
t3.ek_code checkCode,
t2.check_type,
t2.over_report_id,
t2.over_report_mileage,
t2.over_type,
t2.over_level,
t2.peak_value,
t2.longitude,
t2.data_difference,
t2.xianxing,
t2.standard,
t2.spend,
t2.remark
FROM t_dsa_analysis_batch_unit_device_transfinite t1
LEFT JOIN t_djt_movement_over_report_unit_device_map t2 ON t1.unit_id = t2.unit_id AND t1.unit_type = t2.unit_type AND t1.check_id = t2.check_id
LEFT JOIN t_djt_movement_records_master t3 ON t2.check_id = t3.id
WHERE t1.analysis_batch_unit_device_id = #{id}
AND t1.check_type = 3
GROUP BY t2.id
ORDER BY t3.ek_code ASC
</select>
<select id="getUnitDeviceTqi" resultType="org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO">
SELECT t2.id,
t2.create_by,
t2.create_time,
t2.update_by,
t2.update_time,
t2.check_id,
t2.check_type,
t2.unit_id,
t2.unit_code,
t2.unit_type,
t2.unit_type_name,
t2.unit_starting_mileage,
t2.unit_center_mileage,
t2.unit_end_mileage,
t2.tqi_report_id,
t2.start_mileage,
t2.end_mileage,
t2.section_name,
t2.high_low_left,
t2.high_low_right,
t2.track_left,
t2.track_right,
t2.level,
t2.track_gauge,
t2.triangular_pit,
t2.tqi_come_upon,
t2.tqi_above_standard,
t2.deduct,
t2.standard,
t2.spend
FROM t_dsa_analysis_batch_unit_device_transfinite t1
LEFT JOIN t_djt_movement_tqi_report_unit_device_map t2 ON t1.unit_id = t2.unit_id AND t1.unit_type = t2.unit_type AND t1.check_id = t2.check_id
LEFT JOIN t_djt_movement_records_master t3 ON t2.check_id = t3.id
WHERE t1.analysis_batch_unit_device_id = #{id}
AND t1.check_type = 3
GROUP BY t2.id
ORDER BY t3.ek_code ASC
</select>
<select id="getUnitDeviceAdditiveInfo"
resultType="org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO">
SELECT t2.id,
t2.movement_master_id checkId,
t3.ek_code checkCode,
t2.unit_id,
t2.unit_code,
t2.unit_device_code,
t2.unit_type,
t2.unit_type_name,
t2.unit_start_mileage,
t2.unit_center_mileage,
t2.unit_end_mileage,
t2.point_mileage,
t2.zontal_speed,
t2.zontal_speed_level,
t2.vertical_speed,
t2.vertical_speed_level,
t2.speed,
t2.mark,
t2.del_flag,
t2.info_sort
FROM t_dsa_analysis_batch_unit_device_transfinite t1
LEFT JOIN t_djt_movement_additive_info_unit_device_map t2 ON t1.unit_id = t2.unit_id
AND t1.unit_type = t2.unit_type
AND t1.check_id = t2.movement_master_id
LEFT JOIN t_djt_movement_records_master t3 ON t2.movement_master_id = t3.id
WHERE t1.analysis_batch_unit_device_id = #{id}
AND t1.check_type = 4
ORDER BY t3.ek_code ASC
</select>
</mapper>
......@@ -5,6 +5,12 @@ 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;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
import org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO;
import org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO;
import org.jeecg.modules.unitDevice.vo.StaticCheckVO;
import java.util.List;
/**
* <p>
......@@ -17,4 +23,12 @@ import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
public interface IAnalysisBatchUnitDeviceService extends IService<AnalysisBatchUnitDevice> {
Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto);
List<StaticCheckVO> getUnitDeviceStaticData(String id);
List<RailVehicleCheckVO> getUnitDeviceOverReport(String id);
List<RailVehicleTqiVO> getUnitDeviceTqi(String id);
List<RailAddInstrumentCheckVO> getUnitDeviceAdditiveInfo(String id);
}
......@@ -9,6 +9,10 @@ import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceS
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceTransfiniteVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
import org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO;
import org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO;
import org.jeecg.modules.unitDevice.vo.StaticCheckVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -39,4 +43,25 @@ public class AnalysisBatchUnitDeviceServiceImpl extends ServiceImpl<AnalysisBatc
return page;
}
@Override
public List<StaticCheckVO> getUnitDeviceStaticData(String id) {
return this.baseMapper.getUnitDeviceStaticData(id);
}
@Override
public List<RailVehicleCheckVO> getUnitDeviceOverReport(String id) {
return this.baseMapper.getUnitDeviceOverReport(id);
}
@Override
public List<RailVehicleTqiVO> getUnitDeviceTqi(String id) {
return this.baseMapper.getUnitDeviceTqi(id);
}
@Override
public List<RailAddInstrumentCheckVO> getUnitDeviceAdditiveInfo(String id) {
return this.baseMapper.getUnitDeviceAdditiveInfo(id);
}
}
package org.jeecg.modules.unitDevice.vo;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
......@@ -2,4 +2,4 @@ spring:
application:
name: jeecg-system
profiles:
active: hkl
active: test
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