Commit 1d0f6df4 authored by hkl's avatar hkl

feat: 1.设备病例本

parent fd7f86b6
......@@ -7,8 +7,11 @@ import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService;
import org.jeecg.modules.dynamicStaticAnalysis.algorithm.AnalysisAlgorithm;
import org.jeecg.modules.dynamicStaticAnalysis.algorithm.SingleConsumer;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.utils.RedisLockUtil;
import org.jeecg.modules.utils.UnitCodeUtil;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
......@@ -37,6 +40,9 @@ public class InitData implements InitializingBean {
@Resource
private AnalysisAlgorithm analysisAlgorithm;
@Resource
private RedisTemplate<String, Object> redisTemplate;
@Override
public void afterPropertiesSet() throws Exception {
UnitCodeUtil.setService(lineAliasService,
......@@ -45,6 +51,8 @@ public class InitData implements InitializingBean {
verticalCurveManagementService,
railManagementService);
RedisLockUtil.setService(redisTemplate);
SingleConsumer.setService(analysisAlgorithm);
}
}
......@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -12,7 +13,6 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.*;
import lombok.Cleanup;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
......@@ -22,6 +22,7 @@ import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.dto.MovementAdditiveInfoDTO;
import org.jeecg.modules.checkData.dto.MovementRecordsMasterDTO;
import org.jeecg.modules.checkData.entity.*;
import org.jeecg.modules.checkData.face.MovementRecordsMasterFace;
import org.jeecg.modules.checkData.service.*;
import org.jeecg.modules.checkData.vo.*;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper;
......@@ -33,13 +34,16 @@ import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.subwayNetwork.service.ISubwaySectionService;
import org.jeecg.modules.utils.BeanCopyUtil;
import org.jeecg.modules.utils.ExcelAnalysisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.transaction.Transactional;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Matcher;
......@@ -58,6 +62,10 @@ import java.util.stream.Collectors;
@RequestMapping("/movement/master")
@Api(tags = "动静态几何尺寸数据")
public class MovementRecordsMasterController extends JeecgController<MovementRecordsMaster, IMovementRecordsMasterService> {
@Resource
private MovementRecordsMasterFace movementRecordsMasterFace;
@Resource
private IMovementCourseService movementCourseService;
@Resource
......@@ -91,12 +99,12 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
private AnalysisAlgorithmMapper analysisAlgorithmMapper;
//**********************************人工静态检查******************************
//**********************************人工静态检查******************************
/**
* 动静态几何尺寸数据-分页列表查询
*
* @param pageNo
* @param pageNo 1
* @param pageSize
* @param dto
* @return
......@@ -217,29 +225,6 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
return Result.OK(resultList);
}
/**
* 根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情
*
* @param movementMasterId 动静态几何尺寸数据id
* @param movementCourseId 对应的里程相关信息id
* @return
*/
// @AutoLog(value = "根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情")
// @ApiOperation(value = "根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情", notes = "根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情")
// @GetMapping(value = "/getInfoById")
// public Result<List<MovementCourseInfoVO>> getInfoById(@ApiParam(name = "动静态几何尺寸数据id") String movementMasterId, @ApiParam(name = "检查里程相关信息id") String movementCourseId) {
// List<MovementCourseInfo> listResult = movementCourseInfoService.lambdaQuery()
// .eq(ObjectUtil.isNotEmpty(movementMasterId), MovementCourseInfo::getMovementMasterId, movementMasterId)
// .eq(ObjectUtil.isNotEmpty(movementCourseId), MovementCourseInfo::getMovementCourseId, movementCourseId)
// .eq(MovementCourseInfo::getDelFlag, "0")
// .orderByAsc(MovementCourseInfo::getInfoSort)
// .list();
// List<MovementCourseInfoVO> resultList = new ArrayList<>();
// if(listResult != null && listResult.size() > 0){
// resultList = BeanCopyUtil.copyListProperties(listResult, MovementCourseInfoVO::new);
// }
// return Result.OK(resultList);
// }
@AutoLog(value = "根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情")
@ApiOperation(value = "根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情", notes = "根据动静态几何尺寸数据id和对应的里程相关信息id查询其详情")
@GetMapping(value = "/getInfoById")
......@@ -287,7 +272,6 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
if (false == state) {
return Result.error("传递参数不完整");
}
movementRecordsMaster.setUpdateTime(new Date());
movementRecordsMaster.setDelFlag("0");
if (ObjectUtil.isEmpty(movementRecordsMaster.getId())) {
this.service.save(movementRecordsMaster);
......@@ -603,34 +587,11 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
@AutoLog(value = "人工静态检查数据-保存曲线半径信息")
@ApiOperation(value = "人工静态检查数据-保存曲线半径信息", notes = "人工静态检查数据-保存曲线半径信息")
@PostMapping(value = "/saveAdditive")
public Result<String> saveAdditive(@RequestBody MovementCourse record) {
// 保存人工项目检查表
record.setId(UUIDGenerator.generate());
record.setDelFlag("0");
movementCourseService.save(record);
// @PostMapping(value = "/saveLabourCheckItem")
public Result<String> saveLabourCheckItem(@RequestBody MovementCourse record) {
// 初始化下面的格子模板
List<MovementCourseInfo> movementCourseInfos = new ArrayList<>();
int measurePoint = 1;
String trackCode = "1";
for (int i = 0; i < 24; i++) {
MovementCourseInfo movementCourseInfo = new MovementCourseInfo();
movementCourseInfo.setMovementMasterId(record.getMovementMasterId());
movementCourseInfo.setMovementCourseId(record.getId());
movementCourseInfo.setMeasurePoint(measurePoint);
movementCourseInfo.setDelFlag("0");
movementCourseInfo.setTrackCode(trackCode);
if (measurePoint % 8 == 0) {
measurePoint = 1;
trackCode = String.valueOf(Integer.valueOf(trackCode) + 1);
} else {
measurePoint++;
}
movementCourseInfos.add(movementCourseInfo);
}
movementCourseInfoService.saveBatch(movementCourseInfos);
movementRecordsMasterFace.saveLabourCheckItem(record);
return Result.OK("操作成功");
}
......@@ -638,9 +599,10 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
@AutoLog(value = "人工静态检查数据-更新曲线半径信息")
@ApiOperation(value = "人工静态检查数据-更新曲线半径信息", notes = "人工静态检查数据-更新曲线半径信息")
@PostMapping(value = "/updateAdditive")
public Result<String> updateAdditive(@RequestBody MovementCourse record) {
// @PostMapping(value = "/updateLabourCheckItem")
public Result<String> updateLabourCheckItem(@RequestBody MovementCourse record) {
// 保存人工项目检查表
movementCourseService.updateById(record);
movementRecordsMasterFace.updateLabourCheckItem(record);
return Result.OK("操作成功");
}
......@@ -666,8 +628,33 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
@AutoLog(value = "人工静态检查数据-更新轨道信息")
@ApiOperation(value = "人工静态检查数据-更新轨道信息", notes = "人工静态检查数据-更新轨道信息")
@PostMapping(value = "/updateAdditiveDetail")
public Result<String> updateAdditiveDetail(@RequestBody MovementCourseInfo record) {
movementCourseInfoService.updateById(record);
public Result<String> updateAdditiveDetail(HttpServletRequest request) throws IOException {
// 获取参数
StringBuilder buffer = new StringBuilder();
BufferedReader reader = request.getReader();
String line;
while ((line = reader.readLine()) != null) {
buffer.append(line);
}
String requestStr = buffer.toString();
JSONObject jsonObject = JSONObject.parseObject(requestStr);
String id = String.valueOf(jsonObject.get("id"));
movementCourseInfoService.lambdaUpdate()
.set(jsonObject.containsKey("trackGauge"), MovementCourseInfo::getTrackCode, jsonObject.get("trackGauge"))
.set(jsonObject.containsKey("level"), MovementCourseInfo::getLevel, jsonObject.get("level"))
.set(jsonObject.containsKey("triangularPit"), MovementCourseInfo::getTriangularPit, jsonObject.get("triangularPit"))
.set(jsonObject.containsKey("direction"), MovementCourseInfo::getDirection, jsonObject.get("direction"))
.set(jsonObject.containsKey("height"), MovementCourseInfo::getHeight, jsonObject.get("height"))
.set(jsonObject.containsKey("structure"), MovementCourseInfo::getStructure, jsonObject.get("structure"))
.set(jsonObject.containsKey("rectification"), MovementCourseInfo::getRectification, jsonObject.get("rectification"))
.set(MovementCourseInfo::getUpdateTime, new Date())
.eq(MovementCourseInfo::getId, id)
.update();
return Result.OK("操作成功");
}
......@@ -901,7 +888,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
try {
//初始化数据模板
boolean state = this.initData(id);
if (state == false) {
if (!state) {
return Result.error("初始化数据失败");
}
InputStream in = file.getInputStream();
......
......@@ -85,6 +85,7 @@ public class MovementCheckDataUnitDeviceMap implements Serializable {
@TableField("check_id")
private String checkId;
@ApiModelProperty("检查项目id[注:轨检车是tqi的id]")
@TableField("check_item_id")
private String checkItemId;
......
......@@ -57,24 +57,32 @@ public class MovementTqiReportUnitDeviceMap implements Serializable {
@TableField("check_type")
private Integer checkType;
@ApiModelProperty("设备单元id")
@TableField("unit_id")
private String unitId;
@ApiModelProperty("设备单元编码")
@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;
......
package org.jeecg.modules.checkData.face;
import org.jeecg.modules.checkData.entity.MovementCourse;
public interface MovementRecordsMasterFace {
/**
* 保存人工检查项目
*
* @param record
*/
void saveLabourCheckItem(MovementCourse record);
/**
* 更新人工检查项目
*
* @param record
*/
void updateLabourCheckItem(MovementCourse record);
}
package org.jeecg.modules.checkData.face.impl;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.entity.MovementCourse;
import org.jeecg.modules.checkData.entity.MovementCourseInfo;
import org.jeecg.modules.checkData.face.MovementRecordsMasterFace;
import org.jeecg.modules.checkData.service.IMovementCourseInfoService;
import org.jeecg.modules.checkData.service.IMovementCourseService;
import org.jeecg.modules.utils.RedisLockUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
@Service
public class MovementRecordsMasterFaceImpl implements MovementRecordsMasterFace {
@Resource
private IMovementCourseService movementCourseService;
@Resource
private IMovementCourseInfoService movementCourseInfoService;
@Override
public void saveLabourCheckItem(MovementCourse record) {
// 保存人工项目检查表
record.setId(UUIDGenerator.generate());
record.setDelFlag("0");
movementCourseService.save(record);
// 初始化下面的格子模板
List<MovementCourseInfo> movementCourseInfos = new ArrayList<>();
int measurePoint = 1;
String trackCode = "1";
for (int i = 0; i < 24; i++) {
MovementCourseInfo movementCourseInfo = new MovementCourseInfo();
movementCourseInfo.setMovementMasterId(record.getMovementMasterId());
movementCourseInfo.setMovementCourseId(record.getId());
movementCourseInfo.setMeasurePoint(measurePoint);
movementCourseInfo.setInfoSort(i + 1);
movementCourseInfo.setDelFlag("0");
movementCourseInfo.setTrackCode(trackCode);
if (measurePoint % 8 == 0) {
measurePoint = 1;
trackCode = String.valueOf(Integer.valueOf(trackCode) + 1);
} else {
measurePoint++;
}
movementCourseInfos.add(movementCourseInfo);
}
movementCourseInfoService.saveBatch(movementCourseInfos);
/**
* 人工检查数据排序
*/
labourCheckItemSort(record.getMovementMasterId());
/**
* 人工检查数据单元设备映射
*/
labourCheckMappingUnitDevice(record.getMovementMasterId());
}
@Override
public void updateLabourCheckItem(MovementCourse record) {
}
/**
* 人工检查数据映射单元设备
*
* @param movementMasterId
*/
private void labourCheckMappingUnitDevice(String movementMasterId) {
}
/**
* 人工检查数据
*
* @param movementMasterId
*/
private void labourCheckItemSort(String movementMasterId) {
// 检查项目list
List<MovementCourse> movementCourseList = movementCourseService.lambdaQuery()
.eq(MovementCourse::getMovementMasterId, movementMasterId)
.orderByAsc(MovementCourse::getCourseStartingMileage)
.list();
// 检查项目明细list
List<MovementCourseInfo> movementCourseInfoList = movementCourseInfoService.lambdaQuery()
.eq(MovementCourseInfo::getMovementMasterId, movementMasterId)
.orderByAsc(MovementCourseInfo::getInfoSort)
.list();
Map<String, List<MovementCourseInfo>> movementCourseInfoMap = movementCourseInfoList.stream()
.collect(Collectors.groupingBy(MovementCourseInfo::getMovementCourseId));
for (int i = 0; i < movementCourseList.size(); i++) {
int sort = i + 1;
MovementCourse movementCourse = movementCourseList.get(i);
movementCourse.setSort(sort);
// 修改明细的轨号
List<MovementCourseInfo> movementCourseInfos = movementCourseInfoMap.get(movementCourse.getId());
int incr = 2;
int currentCheckNum = i + 1;
String trackCode = String.valueOf(currentCheckNum * 3 - incr);
for (int j = 0; j < movementCourseInfos.size(); j++) {
if (j != 0 && j % 8 == 0) {
incr = incr - 1;
trackCode = String.valueOf(currentCheckNum * 3 - incr);
}
MovementCourseInfo movementCourseInfo = movementCourseInfos.get(j);
movementCourseInfo.setTrackCode(trackCode);
}
}
movementCourseService.updateBatchById(movementCourseList);
movementCourseInfoService.updateBatchById(movementCourseInfoList);
}
}
package org.jeecg.modules.checkData.mapper;
import org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface MovementAdditiveInfoUnitDeviceMapMapper extends BaseMapper<MovementAdditiveInfoUnitDeviceMap> {
List<RailAddInstrumentCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, String checkId);
}
package org.jeecg.modules.checkData.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap;
import org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO;
import org.jeecg.modules.unitDevice.vo.StaticCheckVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +19,7 @@ import org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap;
*/
public interface MovementCheckDataUnitDeviceMapMapper extends BaseMapper<MovementCheckDataUnitDeviceMap> {
List<StaticCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, int checkType, String checkId);
Page<CaseReportCheckDataVO> queryUnitDeviceCheckRel(Page<CaseReportCheckDataVO> pageData, CaseReportCheckDataDTO dto);
}
......@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.mapper;
import org.jeecg.modules.checkData.entity.MovementOverReportUnitDeviceMap;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface MovementOverReportUnitDeviceMapMapper extends BaseMapper<MovementOverReportUnitDeviceMap> {
List<RailVehicleCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType,String checkId);
}
......@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.mapper;
import org.jeecg.modules.checkData.entity.MovementTqiReportUnitDeviceMap;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface MovementTqiReportUnitDeviceMapMapper extends BaseMapper<MovementTqiReportUnitDeviceMap> {
List<RailVehicleTqiVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType,String checkId);
}
......@@ -2,4 +2,32 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.mapper.MovementAdditiveInfoUnitDeviceMapMapper">
<select id="getUnitDeviceData" resultType="org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO">
SELECT t1.id,
t1.movement_master_id checkId,
t2.ek_code checkCode,
t1.unit_id,
t1.unit_code,
t1.unit_device_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_start_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.point_mileage,
t1.zontal_speed,
t1.zontal_speed_level,
t1.vertical_speed,
t1.vertical_speed_level,
t1.speed,
t1.mark,
t1.del_flag,
t1.info_sort
FROM t_djt_movement_additive_info_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.movement_master_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.movement_master_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
</mapper>
......@@ -2,4 +2,118 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.mapper.MovementCheckDataUnitDeviceMapMapper">
<select id="getUnitDeviceData" resultType="org.jeecg.modules.unitDevice.vo.StaticCheckVO">
SELECT t1.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.check_type,
t1.check_id,
t2.ek_code check_code,
t1.check_item_id,
t1.check_item_starting_mileage,
t1.check_item_end_mileage,
t1.check_item_text,
t1.check_detail_id,
t1.check_detail_starting_mileage,
t1.check_detail_end_mileage,
t1.measure_point,
t1.track_gauge,
t1.level,
t1.triangular_pit,
t1.direction,
t1.height,
t1.structure,
t1.rectification,
t1.remark
FROM t_djt_movement_check_data_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.check_type = #{checkType}
and t1.check_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
<select id="queryUnitDeviceCheckRel" resultType="org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO">
SELECT t1.unit_id,
t1.unit_type,
t1.unit_code,
t2.id checkId,
t2.type,
t2.ek_code checkCode,
t2.track_code,
t2.work_code,
t2.subway_section_id,
t2.subway_section_name,
t2.light_rail_id,
t2.light_rail_name,
t2.line_alias_id,
t2.line_alias_name,
t2.starting_mileage,
t2.end_mileage,
t2.start_level,
t2.end_level,
t2.direction,
t2.rail_num,
t2.curve_num,
t2.vertical_curve_num,
t2.switch_num,
t2.check_by,
t2.check_time,
t2.verify_by,
t2.verify_time,
t2.print_time,
t2.remark,
t2.del_flag
FROM (SELECT unit_id,
unit_type,
unit_code,
check_id
FROM (SELECT unit_id,
unit_type,
unit_code,
check_id
FROM t_djt_movement_check_data_unit_device_map
GROUP BY unit_id,
unit_type,
check_id
UNION ALL
SELECT unit_id,
unit_type,
unit_code,
movement_master_id check_id
FROM t_djt_movement_additive_info_unit_device_map
GROUP BY unit_id,
unit_type,
movement_master_id
UNION ALL
SELECT unit_id,
unit_type,
unit_code,
check_id
FROM t_djt_movement_over_report_unit_device_map
GROUP BY unit_id,
unit_type,
check_id
UNION ALL
SELECT unit_id,
unit_type,
unit_code,
check_id
FROM t_djt_movement_tqi_report_unit_device_map
GROUP BY unit_id,
unit_type,
check_id) t
GROUP BY unit_id,
check_id) t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
AND t2.del_flag = '0'
WHERE t1.unit_id = #{dto.unitId}
AND t1.unit_type = #{dto.unitType}
ORDER BY t2.create_time
</select>
</mapper>
......@@ -2,4 +2,33 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.mapper.MovementOverReportUnitDeviceMapMapper">
<select id="getUnitDeviceData" resultType="org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO">
SELECT t1.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.check_id,
t2.ek_code checkCode,
t1.check_type,
t1.over_report_id,
t1.over_report_mileage,
t1.over_type,
t1.over_level,
t1.peak_value,
t1.data_difference,
t1.xianxing,
t1.standard,
t1.spend,
t1.remark
FROM t_djt_movement_over_report_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.check_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
</mapper>
......@@ -2,4 +2,42 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.mapper.MovementTqiReportUnitDeviceMapMapper">
<select id="getUnitDeviceData" resultType="org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO">
SELECT t1.id,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.check_id,
t1.check_type,
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.tqi_report_id,
t1.start_mileage,
t1.end_mileage,
t1.section_name,
t1.high_low_left,
t1.high_low_right,
t1.track_left,
t1.track_right,
t1.level,
t1.track_gauge,
t1.triangular_pit,
t1.tqi_come_upon,
t1.tqi_above_standard,
t1.deduct,
t1.standard,
t1.spend
FROM t_djt_movement_tqi_report_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.check_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
</mapper>
package org.jeecg.modules.checkData.service;
import org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IMovementAdditiveInfoUnitDeviceMapService extends IService<MovementAdditiveInfoUnitDeviceMap> {
List<RailAddInstrumentCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, String checkId);
}
package org.jeecg.modules.checkData.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO;
import org.jeecg.modules.unitDevice.vo.StaticCheckVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +19,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IMovementCheckDataUnitDeviceMapService extends IService<MovementCheckDataUnitDeviceMap> {
List<StaticCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, int checkType,String checkId);
Page<CaseReportCheckDataVO> queryUnitDeviceCheckRel(Page<CaseReportCheckDataVO> pageData, CaseReportCheckDataDTO dto);
}
......@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.service;
import org.jeecg.modules.checkData.entity.MovementOverReportUnitDeviceMap;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IMovementOverReportUnitDeviceMapService extends IService<MovementOverReportUnitDeviceMap> {
List<RailVehicleCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType,String checkId);
}
......@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.service;
import org.jeecg.modules.checkData.entity.MovementTqiReportUnitDeviceMap;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO;
import java.util.List;
/**
* <p>
......@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IMovementTqiReportUnitDeviceMapService extends IService<MovementTqiReportUnitDeviceMap> {
List<RailVehicleTqiVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType,String checkId);
}
......@@ -4,8 +4,11 @@ import org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap;
import org.jeecg.modules.checkData.mapper.MovementAdditiveInfoUnitDeviceMapMapper;
import org.jeecg.modules.checkData.service.IMovementAdditiveInfoUnitDeviceMapService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 动静态几何尺寸对应的添乘仪详情表 服务实现类
......@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
@Service
public class MovementAdditiveInfoUnitDeviceMapServiceImpl extends ServiceImpl<MovementAdditiveInfoUnitDeviceMapMapper, MovementAdditiveInfoUnitDeviceMap> implements IMovementAdditiveInfoUnitDeviceMapService {
@Override
public List<RailAddInstrumentCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, String checkId) {
return this.baseMapper.getUnitDeviceData(unitDeviceId, unitDeviceType, checkId);
}
}
package org.jeecg.modules.checkData.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap;
import org.jeecg.modules.checkData.mapper.MovementCheckDataUnitDeviceMapMapper;
import org.jeecg.modules.checkData.service.IMovementCheckDataUnitDeviceMapService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO;
import org.jeecg.modules.unitDevice.vo.StaticCheckVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 动静态几何尺寸-检查数据单元映射表 服务实现类
......@@ -17,4 +23,13 @@ import org.springframework.stereotype.Service;
@Service
public class MovementCheckDataUnitDeviceMapServiceImpl extends ServiceImpl<MovementCheckDataUnitDeviceMapMapper, MovementCheckDataUnitDeviceMap> implements IMovementCheckDataUnitDeviceMapService {
@Override
public List<StaticCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, int checkType, String checkId) {
return this.baseMapper.getUnitDeviceData(unitDeviceId, unitDeviceType, checkType,checkId);
}
@Override
public Page<CaseReportCheckDataVO> queryUnitDeviceCheckRel(Page<CaseReportCheckDataVO> pageData, CaseReportCheckDataDTO dto) {
return this.baseMapper.queryUnitDeviceCheckRel(pageData, dto);
}
}
......@@ -4,8 +4,11 @@ import org.jeecg.modules.checkData.entity.MovementOverReportUnitDeviceMap;
import org.jeecg.modules.checkData.mapper.MovementOverReportUnitDeviceMapMapper;
import org.jeecg.modules.checkData.service.IMovementOverReportUnitDeviceMapService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 动静态几何尺寸-轨检车单元设备映射 服务实现类
......@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
@Service
public class MovementOverReportUnitDeviceMapServiceImpl extends ServiceImpl<MovementOverReportUnitDeviceMapMapper, MovementOverReportUnitDeviceMap> implements IMovementOverReportUnitDeviceMapService {
@Override
public List<RailVehicleCheckVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType,String checkId) {
return this.baseMapper.getUnitDeviceData(unitDeviceId, unitDeviceType,checkId);
}
}
......@@ -4,8 +4,11 @@ import org.jeecg.modules.checkData.entity.MovementTqiReportUnitDeviceMap;
import org.jeecg.modules.checkData.mapper.MovementTqiReportUnitDeviceMapMapper;
import org.jeecg.modules.checkData.service.IMovementTqiReportUnitDeviceMapService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 轨检车-tqi单元总结报告和单元映射关联关系 服务实现类
......@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
@Service
public class MovementTqiReportUnitDeviceMapServiceImpl extends ServiceImpl<MovementTqiReportUnitDeviceMapMapper, MovementTqiReportUnitDeviceMap> implements IMovementTqiReportUnitDeviceMapService {
@Override
public List<RailVehicleTqiVO> getUnitDeviceData(String unitDeviceId, int unitDeviceType, String checkId) {
return this.baseMapper.getUnitDeviceData(unitDeviceId, unitDeviceType,checkId);
}
}
package org.jeecg.modules.constant;
/**
* redis常量工具类
*/
public class RedisConstant {
}
......@@ -81,7 +81,7 @@ public class ConfigGradeLimit implements Serializable {
@TableField("grade_max")
private BigDecimal gradeMax;
@ApiModelProperty("设备类型 1-钢轨 2-道岔 3-曲线 4-竖曲线")
@ApiModelProperty("设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 ")
@TableField("device_type")
private Integer deviceType;
......
......@@ -57,6 +57,7 @@ public class WorkBatchDetailVO {
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
......
package org.jeecg.modules.unitDevice.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 lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO;
import org.jeecg.modules.unitDevice.face.IUnitDeviceFace;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataDetailVO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO;
import org.jeecg.modules.unitDevice.vo.CaseReportUnitScoreVO;
import org.jeecg.modules.unitDevice.vo.CaseReportWorkBatchVO;
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 javax.annotation.Resource;
import java.util.List;
@Slf4j
@RestController
@RequestMapping("/unitDevice/")
@Api(tags = "单元设备")
public class UnitDeviceController {
@Resource
private IUnitDeviceFace unitDeviceFace;
@AutoLog(value = "单元设备-检查数据列表")
@ApiOperation(value = "单元设备-检查数据列表", notes = "单元设备-检查数据列表")
@GetMapping(value = "/queryPageList")
public Result<IPage<CaseReportCheckDataVO>> queryPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
CaseReportCheckDataDTO dto) {
Page<CaseReportCheckDataVO> pageData = new Page<>(pageNo, pageSize);
pageData = unitDeviceFace.queryPageList(pageData, dto);
return Result.OK(pageData);
}
@AutoLog(value = "单元设备-设备病历本检查数据")
@ApiOperation(value = "单元设备-设备病历本检查数据", notes = "单元设备-设备病历本检查数据")
@GetMapping(value = "/caseReportCheckData")
@ApiImplicitParams({
@ApiImplicitParam(name = "unitId", value = "设备ID", required = true),
@ApiImplicitParam(name = "unitType", value = "设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 ", required = true),
@ApiImplicitParam(name = "checkId", value = "检查id", required = true)
})
public Result<CaseReportCheckDataDetailVO> caseReportCheckData(String unitId, int unitType, String checkId) {
CaseReportCheckDataDetailVO vo = unitDeviceFace.caseReportCheckData(unitId, unitType, checkId);
return Result.OK(vo);
}
@AutoLog(value = "单元设备-设备病历本-单元得分列表")
@ApiOperation(value = "单元设备-设备病历本-单元得分列表", notes = "单元设备-设备病历本-单元得分列表")
@GetMapping(value = "/caseReportUnitScore")
@ApiImplicitParams({
@ApiImplicitParam(name = "unitId", value = "设备ID", required = true),
@ApiImplicitParam(name = "unitType", value = "设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 ", required = true)
})
public Result<List<CaseReportUnitScoreVO>> caseReportUnitScore(String unitId, int unitType) {
List<CaseReportUnitScoreVO> vo = unitDeviceFace.caseReportUnitScore(unitId, unitType);
return Result.OK(vo);
}
@AutoLog(value = "单元设备-设备病历本-作业批次列表")
@ApiOperation(value = "单元设备-设备病历本-作业批次列表", notes = "单元设备-设备病历本-作业批次列表")
@GetMapping(value = "/caseReportWorkBatch")
@ApiImplicitParams({
@ApiImplicitParam(name = "unitId", value = "设备ID", required = true),
@ApiImplicitParam(name = "unitType", value = "设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 ", required = true)
})
public Result<List<CaseReportWorkBatchVO>> caseReportWorkBatch(String unitId, int unitType) {
List<CaseReportWorkBatchVO> vo = unitDeviceFace.caseReportWorkBatch(unitId, unitType);
return Result.OK(vo);
}
}
package org.jeecg.modules.unitDevice.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "CaseReportCheckDataDTO对象", description = "单元设备-病例报告检查数据列表")
public class CaseReportCheckDataDTO {
@ApiModelProperty("单元id")
private String unitId;
@ApiModelProperty("单元类型")
private String unitType;
}
package org.jeecg.modules.unitDevice.face;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataDetailVO;
import org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO;
import org.jeecg.modules.unitDevice.vo.CaseReportUnitScoreVO;
import org.jeecg.modules.unitDevice.vo.CaseReportWorkBatchVO;
import java.util.List;
public interface IUnitDeviceFace {
/**
* 病例报告-检查数据
*
* @param unitId
* @param unitType
*/
CaseReportCheckDataDetailVO caseReportCheckData(String unitId, int unitType,String checkId);
Page<CaseReportCheckDataVO> queryPageList(Page<CaseReportCheckDataVO> pageData, CaseReportCheckDataDTO dto);
List<CaseReportUnitScoreVO> caseReportUnitScore(String unitId, int unitType);
List<CaseReportWorkBatchVO> caseReportWorkBatch(String unitId, int unitType);
}
package org.jeecg.modules.unitDevice.face.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.service.IMovementAdditiveInfoUnitDeviceMapService;
import org.jeecg.modules.checkData.service.IMovementCheckDataUnitDeviceMapService;
import org.jeecg.modules.checkData.service.IMovementOverReportUnitDeviceMapService;
import org.jeecg.modules.checkData.service.IMovementTqiReportUnitDeviceMapService;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import org.jeecg.modules.maintenanceWork.service.IWorkBatchDetailService;
import org.jeecg.modules.maintenanceWork.service.IWorkBatchService;
import org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO;
import org.jeecg.modules.unitDevice.face.IUnitDeviceFace;
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 UnitDeviceFaceImpl implements IUnitDeviceFace {
@Resource
private IMovementCheckDataUnitDeviceMapService movementCheckDataUnitDeviceMapService;
@Resource
private IMovementAdditiveInfoUnitDeviceMapService movementAdditiveInfoUnitDeviceMapService;
@Resource
private IMovementOverReportUnitDeviceMapService movementOverReportUnitDeviceMapService;
@Resource
private IMovementTqiReportUnitDeviceMapService movementTqiReportUnitDeviceMapService;
@Resource
private IAnalysisBatchUnitDeviceService analysisBatchUnitDeviceService;
@Resource
private IWorkBatchService workBatchService;
@Resource
private IWorkBatchDetailService workBatchDetailService;
@Override
public CaseReportCheckDataDetailVO caseReportCheckData(String unitId, int unitType, String checkId) {
CaseReportCheckDataDetailVO vo = new CaseReportCheckDataDetailVO();
// 查询人工记录数据
List<StaticCheckVO> labourCheckVOList = movementCheckDataUnitDeviceMapService.getUnitDeviceData(unitId, unitType, 1, checkId);
vo.setLabourCheckVOList(labourCheckVOList);
// 查询轨检仪记录数据
List<StaticCheckVO> railDeviceCheckVOList = movementCheckDataUnitDeviceMapService.getUnitDeviceData(unitId, unitType, 2, checkId);
vo.setRailDeviceCheckVOList(railDeviceCheckVOList);
// 查询轨检车超限记录数据
List<RailVehicleCheckVO> railVehicleCheckVOList = movementOverReportUnitDeviceMapService.getUnitDeviceData(unitId, unitType, checkId);
vo.setRailVehicleCheckVOList(railVehicleCheckVOList);
// 查询轨检车TQI记录数据
List<RailVehicleTqiVO> railVehicleTqiVOList = movementTqiReportUnitDeviceMapService.getUnitDeviceData(unitId, unitType, checkId);
vo.setRailVehicleTqiVOList(railVehicleTqiVOList);
// 添乘仪记录数据
List<RailAddInstrumentCheckVO> railAddInstrumentCheckVOList = movementAdditiveInfoUnitDeviceMapService.getUnitDeviceData(unitId, unitType, checkId);
vo.setRailAddInstrumentCheckVOList(railAddInstrumentCheckVOList);
return vo;
}
@Override
public Page<CaseReportCheckDataVO> queryPageList(Page<CaseReportCheckDataVO> pageData, CaseReportCheckDataDTO dto) {
return movementCheckDataUnitDeviceMapService.queryUnitDeviceCheckRel(pageData, dto);
}
@Override
public List<CaseReportUnitScoreVO> caseReportUnitScore(String unitId, int unitType) {
List<AnalysisBatchUnitDevice> records = analysisBatchUnitDeviceService.lambdaQuery()
.eq(AnalysisBatchUnitDevice::getUnitId, unitId)
.eq(AnalysisBatchUnitDevice::getUnitType, unitType)
.ne(AnalysisBatchUnitDevice::getUnitScore, -1)
.orderByAsc(AnalysisBatchUnitDevice::getCreateTime).list();
List<CaseReportUnitScoreVO> results = new ArrayList<>();
if (ObjectUtil.isNotEmpty(records)) {
for (AnalysisBatchUnitDevice record : records) {
CaseReportUnitScoreVO result = new CaseReportUnitScoreVO();
result.setId(result.getId());
result.setUnitScore(record.getUnitScore());
result.setUnitScoreLevelStr(result.getUnitScoreLevelStr());
result.setAnalysisTime(record.getCreateTime());
}
}
return results;
}
@Override
public List<CaseReportWorkBatchVO> caseReportWorkBatch(String unitId, int unitType) {
return null;
}
}
package org.jeecg.modules.unitDevice.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "CaseReportCheckDataDetailVO对象", description = "单元设备-病例报告检查数据列表")
public class CaseReportCheckDataDetailVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("人工检查数据")
private List<StaticCheckVO> labourCheckVOList;
@ApiModelProperty("轨检仪检查数据")
private List<StaticCheckVO> railDeviceCheckVOList;
@ApiModelProperty("轨检车检查数据")
private List<RailVehicleCheckVO> railVehicleCheckVOList;
@ApiModelProperty("轨检车TQI数据")
private List<RailVehicleTqiVO> railVehicleTqiVOList;
@ApiModelProperty("添乘仪检查数据")
private List<RailAddInstrumentCheckVO> railAddInstrumentCheckVOList;
}
package org.jeecg.modules.unitDevice.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "CaseReportCheckDataVO对象", description = "单元设备-病例报告检查数据列表")
public class CaseReportCheckDataVO {
@ApiModelProperty("单元id")
private String unitId;
@ApiModelProperty("单元类型")
private String unitType;
@ApiModelProperty("单元code")
private String unitCode;
@ApiModelProperty("动态几何尺寸类型(1:人工静态检查;2:轨检仪静态检查; 3:轨检车检查;4:添乘仪检查)")
private String type;
@ApiModelProperty("检查id")
private String checkId;
@ApiModelProperty("检查批次号")
private String checkCode;
@ApiModelProperty("轨检车号")
private String trackCode;
@ApiModelProperty("工单编号")
private String workCode;
@ApiModelProperty("检查区间id")
private String subwaySectionId;
@ApiModelProperty("检查区间名称")
private String subwaySectionName;
@ApiModelProperty("所属线路id")
private String lightRailId;
@ApiModelProperty("所属线路名称")
private String lightRailName;
@ApiModelProperty("所属线别id")
private String lineAliasId;
@ApiModelProperty("所属线别名称")
private String lineAliasName;
@ApiModelProperty("起始里程")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
private BigDecimal endMileage;
@ApiModelProperty("开始速度等级")
private String startLevel;
@ApiModelProperty("结束速度等级")
private String endLevel;
@ApiModelProperty("钢轨单元数量")
private Integer railNum;
@ApiModelProperty("曲线数量")
private Integer curveNum;
@ApiModelProperty("竖曲线数量")
private Integer verticalCurveNum;
@ApiModelProperty("道岔数量")
private Integer switchNum;
@ApiModelProperty("检查人姓名")
private String checkBy;
@ApiModelProperty("检查日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date checkTime;
@ApiModelProperty("审核人姓名")
private String verifyBy;
@ApiModelProperty("审核时间")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date verifyTime;
@ApiModelProperty("打印日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date printTime;
@ApiModelProperty("备注")
private String remark;
}
package org.jeecg.modules.unitDevice.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "CaseReportUnitScoreVO对象", description = "单元设备-病例报告分数对象")
public class CaseReportUnitScoreVO {
private String id;
@ApiModelProperty("分析时间")
private Date analysisTime;
@ApiModelProperty("单元得分等级说明")
private String unitScoreLevelStr;
@ApiModelProperty("单元得分")
private BigDecimal unitScore;
}
package org.jeecg.modules.unitDevice.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "CaseReportWorkBatchVO对象", description = "单元设备-病例报告作业批次对象")
public class CaseReportWorkBatchVO {
}
package org.jeecg.modules.unitDevice.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "RailAddInstrumentCheckVO对象", description = "单元设备-病例报告本-添乘仪检查报告VO")
public class RailAddInstrumentCheckVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("动静态几何尺寸数据主表主键-》外键")
private String checkId;
@ApiModelProperty("动静态几何尺寸数据主表code")
private String checkCode;
@ApiModelProperty("设备单元id")
private String unitId;
@ApiModelProperty("设备单元编码")
private String unitCode;
@ApiModelProperty("设备单元编码")
private String unitDeviceCode;
@ApiModelProperty("设备单元类型1-钢轨,2-曲线,3-竖曲线,4-道岔")
private Integer unitType;
@ApiModelProperty("设备单元类型名称")
private String unitTypeName;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
@ApiModelProperty("设备单元终点里程")
private BigDecimal unitEndMileage;
@ApiModelProperty("测点里程")
private BigDecimal pointMileage;
@ApiModelProperty("水平加速度")
private BigDecimal zontalSpeed;
@ApiModelProperty("水平加速度等级")
private Integer zontalSpeedLevel;
@ApiModelProperty("垂直加速度")
private BigDecimal verticalSpeed;
@ApiModelProperty("垂直加速度等级")
private Integer verticalSpeedLevel;
@ApiModelProperty("速度")
private BigDecimal speed;
@ApiModelProperty("手动标记")
private String mark;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("排序字段")
private Integer infoSort;
}
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;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "RailVehicleCheckVO对象", description = "单元设备-病例报告本-轨检车检查vo")
public class RailVehicleCheckVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("设备单元id")
private String unitId;
@ApiModelProperty("设备单元编码")
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("检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
private Integer checkType;
@ApiModelProperty("检查主表id")
private String checkId;
@ApiModelProperty("动静态几何尺寸数据主表code")
private String checkCode;
@ApiModelProperty("轨检车超限表id")
private String overReportId;
@ApiModelProperty("超限里程")
private BigDecimal overReportMileage;
@ApiModelProperty("超限类型")
private String overType;
@ApiModelProperty("超限等级")
private Integer overLevel;
@ApiModelProperty("峰值(mm或g)")
private String peakValue;
@ApiModelProperty("管理数据差")
private String dataDifference;
@ApiModelProperty("线性")
private String xianxing;
@ApiModelProperty("检测标准")
private String standard;
@ApiModelProperty("速度(km/h)")
private String spend;
@ApiModelProperty("备注")
private String remark;
}
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;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "RailVehicleTqiVO对象", description = "单元设备-病例报告本-轨检车Tqivo")
public class RailVehicleTqiVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("检查主表id")
private String checkId;
@ApiModelProperty("检查主表code")
private String checkCode;
@ApiModelProperty("检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
private Integer checkType;
@ApiModelProperty("设备单元id")
private String unitId;
@ApiModelProperty("设备单元编码")
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("tqi报告id")
private String tqiReportId;
@ApiModelProperty("开始里程(m)")
private BigDecimal startMileage;
@ApiModelProperty("终点里程(m)")
private BigDecimal endMileage;
@ApiModelProperty("区间名称")
private String sectionName;
@ApiModelProperty("高低左")
private String highLowLeft;
@ApiModelProperty("高低右")
private String highLowRight;
@ApiModelProperty("轨向左")
private String trackLeft;
@ApiModelProperty("轨向右")
private String trackRight;
@ApiModelProperty("水平(mm)")
private String level;
@ApiModelProperty("轨距(mm)")
private String trackGauge;
@ApiModelProperty("三角坑(mm)")
private String triangularPit;
@ApiModelProperty("TQI数值")
private String tqiComeUpon;
@ApiModelProperty("TQI超标")
private String tqiAboveStandard;
@ApiModelProperty("扣分")
private String deduct;
@ApiModelProperty("检测标准")
private String standard;
@ApiModelProperty("速度(km/h)")
private String spend;
}
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;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "LabourCheckVO对象", description = "单元设备-病例报告本-静态检查记录vo")
public class StaticCheckVO {
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("设备单元id")
private String unitId;
@ApiModelProperty("设备单元编码")
private String unitCode;
@ApiModelProperty("设备单元类型 ")
private Integer unitType;
@ApiModelProperty("设备单元类型名称")
private String unitTypeName;
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage;
@ApiModelProperty("设备单元终点里程")
private BigDecimal unitEndMileage;
@ApiModelProperty("检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查")
private Integer checkType;
@ApiModelProperty("检查主表id")
private String checkId;
@ApiModelProperty("检查主表Code")
private String checkCode;
@ApiModelProperty("检查项目id[注:轨检车是tqi的id]")
private String checkItemId;
@ApiModelProperty("检查开始里程 [注:轨检车和添乘仪此id为null]")
private BigDecimal checkItemStartingMileage;
@ApiModelProperty("检查结束里程 [注:轨检车和添乘仪此id为null]")
private BigDecimal checkItemEndMileage;
@ApiModelProperty("检查文本")
private String checkItemText;
@ApiModelProperty("检查详情id")
private String checkDetailId;
@ApiModelProperty("检查开始里程")
private BigDecimal checkDetailStartingMileage;
@ApiModelProperty("检查结束里程")
private BigDecimal checkDetailEndMileage;
@ApiModelProperty("测点")
private Integer measurePoint;
@ApiModelProperty("轨距")
private String trackGauge;
@ApiModelProperty("水平")
private String level;
@ApiModelProperty("三角坑")
private String triangularPit;
@ApiModelProperty("方向")
private String direction;
@ApiModelProperty("高低")
private String height;
@ApiModelProperty("结构")
private String structure;
@ApiModelProperty("整改")
private String rectification;
@ApiModelProperty("备注")
private String remark;
}
package org.jeecg.modules.utils;
import org.springframework.data.redis.core.RedisTemplate;
import java.util.concurrent.TimeUnit;
/**
* redis 锁
*/
public class RedisLockUtil {
private RedisLockUtil() {
}
private static RedisTemplate<String, Object> redisTemplate;
public static void setService(RedisTemplate<String, Object> redisTemplate) {
RedisLockUtil.redisTemplate = redisTemplate;
}
/**
* @param key 键
* @return
*/
public static boolean lock(String key) {
/**
* 默认期望过期时间
*/
Long expireTime = 6000L;
return lock(key, expireTime);
}
/**
* @param key 键
* @param expireTime 过期时间
* @return
*/
public static boolean lock(String key, Long expireTime) {
if (key == null) {
return false;
}
Boolean flag = redisTemplate.hasKey(key);
if (Boolean.FALSE.equals(flag)) {
redisTemplate.opsForValue().set(key, key, expireTime, TimeUnit.MILLISECONDS);
return true;
} else {
return false;
}
}
public static boolean unlock(String key) {
if (key == null) {
return true;
} else {
return Boolean.TRUE.equals(redisTemplate.delete(key));
}
}
}
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