Commit eb673a44 authored by 史志龙's avatar 史志龙

bug修改--shizhilong

parent 41ea2c3b
......@@ -65,6 +65,10 @@
<properties>
<package.environment>dev</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 测试环境 -->
......@@ -73,10 +77,6 @@
<properties>
<package.environment>test</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 生成环境环境-->
......
......@@ -54,23 +54,14 @@ public class AnalysisAlgorithmLine {
@Transactional
public void analysisLine(String analysisLineBatchId) {
Map<String, Map<String, Object>> unitDeviceTable = new LinkedHashMap<>();
// 1.1 获取分析基础数据
AnalysisLineBatch analysisLineBatch = analysisLineBatchService.getById(analysisLineBatchId);
//查询该批次所需要分析得采集信息批次
List<AnalysisLineBatchCheckDataMap> analysisLineBatchCheckDataMapList = analysisLineBatchCheckDataMapService.lambdaQuery().eq(AnalysisLineBatchCheckDataMap::getAnalysisBatchId, analysisLineBatchId).list();
// 1.2 按公里数正序排序所有1-钢轨,2-曲线,3-竖曲线,4-道岔
List<Map<String, Object>> unitDeviceList = analysisAlgorithmMapper.getUnitDevice(analysisLineBatch.getLightRailId(), analysisLineBatch.getLineAliasId(), analysisLineBatch.getStartingMileage(), analysisLineBatch.getEndMileage());
// 1.3 关联关系-封装1-钢轨,2-曲线,3-竖曲线,4-道岔得单位编号
for (Map<String, Object> unitDevice : unitDeviceList) {
unitDeviceTable.put(unitDevice.get("unitCode").toString(), unitDevice);
}
//原来单元信息删除
LambdaQueryWrapper<AnalysisLineBatchUnitDevice> wrapper2 = Wrappers.lambdaQuery();
wrapper2.eq(AnalysisLineBatchUnitDevice::getAnalysisBatchId, analysisLineBatch.getId());
......@@ -80,7 +71,7 @@ public class AnalysisAlgorithmLine {
for (AnalysisLineBatchCheckDataMap checkDataMap : analysisLineBatchCheckDataMapList) {
// 检查数据类型 1-道岔检查 2-钢轨常规探伤检查 3-曲线钢轨磨耗检查
// 4-钢轨波磨检查 5-道床检查 6-线路检查
if ("1" == checkDataMap.getEkType()) {
if ("1".equals(checkDataMap.getEkType())) {
//1-道岔检查
//原来道岔检查单元信息详情删除
LambdaQueryWrapper<AnalysisLineBatchUnitDeviceTurnoutInfo> wrapper3 = Wrappers.lambdaQuery();
......@@ -88,7 +79,7 @@ public class AnalysisAlgorithmLine {
analysisLineBatchUnitDeviceTurnoutInfoService.remove(wrapper3);
turnoutCheckDataLineAnalysis(analysisLineBatch, checkDataMap, unitDeviceList);
} else if ("2" == checkDataMap.getEkType()) {
} else if ("2".equals(checkDataMap.getEkType())) {
//2-钢轨常规探伤检查
//原来钢轨常规探伤检查单元信息详情删除
LambdaQueryWrapper<AnalysisLineBatchUnitDeviceRailWearInfo> wrapper3 = Wrappers.lambdaQuery();
......@@ -96,7 +87,7 @@ public class AnalysisAlgorithmLine {
analysisLineBatchUnitDeviceRailWearInfoService.remove(wrapper3);
railWearInfoCheckDataLineAnalysis(analysisLineBatch, checkDataMap, unitDeviceList);
} else if ("3" == checkDataMap.getEkType()) {
} else if ("3".equals(checkDataMap.getEkType())) {
//3-曲线钢轨磨耗检查
//原来曲线钢轨磨耗检查单元信息详情删除
LambdaQueryWrapper<AnalysisLineBatchUnitDeviceCurveWearInfo> wrapper3 = Wrappers.lambdaQuery();
......@@ -104,7 +95,7 @@ public class AnalysisAlgorithmLine {
analysisLineBatchUnitDeviceCurveWearInfoService.remove(wrapper3);
curveWearInfoCheckDataAnalysis(analysisLineBatch, checkDataMap, unitDeviceList);
} else if ("4" == checkDataMap.getEkType()) {
} else if ("4".equals(checkDataMap.getEkType())) {
//4-钢轨波磨检查
//原来钢轨波磨检查单元信息详情删除
LambdaQueryWrapper<AnalysisLineBatchUnitDeviceCorrugationInfo> wrapper3 = Wrappers.lambdaQuery();
......@@ -144,12 +135,12 @@ public class AnalysisAlgorithmLine {
for (Map<String, Object> map : unitDeviceList) {
//获取分析批次筛选的单元设备编码
String unitCode = map.get("unitCode").toString();
//判断分析批次的设备与检查时维护的设备是同一个设备
List<CorrugationRecord> corrugationRecordList = deviceProjectList.get(unitCode);
if (CollectionUtils.isNotEmpty(corrugationRecordList)) {
String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的设备与检查时维护的设备是同一个设备
List<CorrugationRecord> corrugationRecordList = deviceProjectList.get(unitCode);
if (CollectionUtils.isNotEmpty(corrugationRecordList)) {
corrugationRecordList.forEach(model -> {
//保存道岔单元信息详情
saveCorrugationRecordUnitInfo(analysisLineBatch, checkDataMap, unitInfoList, model, deviceId);
......@@ -183,12 +174,12 @@ public class AnalysisAlgorithmLine {
for (Map<String, Object> map : unitDeviceList) {
//获取分析批次筛选的单元设备编码
String unitCode = map.get("unitCode").toString();
//判断分析批次的设备与检查时维护的设备是同一个设备
List<CurveWearRecord> curveWearRecordList = deviceProjectList.get(unitCode);
if (CollectionUtils.isNotEmpty(curveWearRecordList)) {
String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的设备与检查时维护的设备是同一个设备
List<CurveWearRecord> curveWearRecordList = deviceProjectList.get(unitCode);
if (CollectionUtils.isNotEmpty(curveWearRecordList)) {
curveWearRecordList.forEach(model -> {
//保存道岔单元信息详情
saveCurveWearRecordUnitInfo(analysisLineBatch, checkDataMap, unitInfoList, model, deviceId);
......@@ -222,12 +213,12 @@ public class AnalysisAlgorithmLine {
for (Map<String, Object> map : unitDeviceList) {
//获取分析批次筛选的单元设备编码
String unitCode = map.get("unitCode").toString();
//判断分析批次的设备与检查时维护的设备是同一个设备
List<RailWearRecord> railWearRecordList = deviceProjectList.get(unitCode);
if (CollectionUtils.isNotEmpty(railWearRecordList)) {
String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的设备与检查时维护的设备是同一个设备
List<RailWearRecord> railWearRecordList = deviceProjectList.get(unitCode);
if (CollectionUtils.isNotEmpty(railWearRecordList)) {
railWearRecordList.forEach(model -> {
//保存道岔单元信息详情
saveRailWearRecordUnitInfo(analysisLineBatch, checkDataMap, unitInfoList, model, deviceId);
......@@ -248,6 +239,9 @@ public class AnalysisAlgorithmLine {
*/
public void turnoutCheckDataLineAnalysis(AnalysisLineBatch analysisLineBatch, AnalysisLineBatchCheckDataMap
checkDataMap, List<Map<String, Object>> unitDeviceList) {
//刷选出道岔的设备
unitDeviceList = unitDeviceList.stream().filter
(map -> "4".equals(map.get("type").toString())).collect(Collectors.toList());
//初始化单元表
List<AnalysisLineBatchUnitDevice> unitList = new ArrayList<>();
//初始化单元表道岔详情
......@@ -261,11 +255,11 @@ public class AnalysisAlgorithmLine {
for (Map<String, Object> map : unitDeviceList) {
//获取分析批次筛选的道岔编号
String deviceCode = map.get("deviceCode").toString();
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
//判断分析批次的道岔编号在检查时维护的道岔编号是同一个编号
List<RecordsMasterTurnoutInfo> recordsMasterTurnoutInfoList = switchCodeList.get(deviceCode);
if (CollectionUtils.isNotEmpty(recordsMasterTurnoutInfoList)) {
//保存单元信息
String deviceId = saveUnit(analysisLineBatch, checkDataMap, map, unitList, deviceCode);
recordsMasterTurnoutInfoList.forEach(model -> {
//保存道岔单元信息详情
saveUnitInfo(analysisLineBatch, checkDataMap, unitInfoList, model, deviceId);
......@@ -308,6 +302,7 @@ public class AnalysisAlgorithmLine {
unit.setUnitCenterMileage(new BigDecimal(map.get("centerMileage").toString()));
unit.setUnitEndMileage(new BigDecimal(map.get("endMileage").toString()));
unit.setWorkStatus(1);
unit.setMarkStatus(1);
unit.setRemark(analysisLineBatch.getRemark());
unitList.add(unit);
return unit.getId();
......@@ -327,7 +322,7 @@ public class AnalysisAlgorithmLine {
//维护单元详情表
AnalysisLineBatchUnitDeviceTurnoutInfo unitInfo = new AnalysisLineBatchUnitDeviceTurnoutInfo();
BeanCopyUtil.copyProperties(info, AnalysisLineBatchUnitDeviceTurnoutInfo.class);
BeanCopyUtil.copyProperties(info, unitInfo);
unitInfo.setId(UUIDGenerator.generate());
unitInfo.setDeviceId(deviceId);
unitInfo.setAnalysisBatchId(analysisLineBatch.getId());
......@@ -353,7 +348,7 @@ public class AnalysisAlgorithmLine {
//维护单元详情表
AnalysisLineBatchUnitDeviceRailWearInfo unitInfo = new AnalysisLineBatchUnitDeviceRailWearInfo();
BeanCopyUtil.copyProperties(info, AnalysisLineBatchUnitDeviceRailWearInfo.class);
BeanCopyUtil.copyProperties(info, unitInfo);
unitInfo.setId(UUIDGenerator.generate());
unitInfo.setDeviceId(deviceId);
unitInfo.setAnalysisBatchId(analysisLineBatch.getId());
......@@ -377,7 +372,7 @@ public class AnalysisAlgorithmLine {
//维护单元详情表
AnalysisLineBatchUnitDeviceCurveWearInfo unitInfo = new AnalysisLineBatchUnitDeviceCurveWearInfo();
BeanCopyUtil.copyProperties(info, AnalysisLineBatchUnitDeviceRailWearInfo.class);
BeanCopyUtil.copyProperties(info, unitInfo);
unitInfo.setId(UUIDGenerator.generate());
unitInfo.setDeviceId(deviceId);
unitInfo.setAnalysisBatchId(analysisLineBatch.getId());
......@@ -404,7 +399,7 @@ public class AnalysisAlgorithmLine {
//维护单元详情表
AnalysisLineBatchUnitDeviceCorrugationInfo unitInfo = new AnalysisLineBatchUnitDeviceCorrugationInfo();
BeanCopyUtil.copyProperties(info, AnalysisLineBatchUnitDeviceRailWearInfo.class);
BeanCopyUtil.copyProperties(info, unitInfo);
unitInfo.setId(UUIDGenerator.generate());
unitInfo.setDeviceId(deviceId);
unitInfo.setAnalysisBatchId(analysisLineBatch.getId());
......
......@@ -14,8 +14,6 @@ import org.jeecg.modules.diseaseAnalysis.dto.AnalysisLineBatchInfoDTO;
import org.jeecg.modules.diseaseAnalysis.dto.AnalysisLineBatchSaveOrUpdateDTO;
import org.jeecg.modules.diseaseAnalysis.dto.EkRecordsMasterCheckDTO;
import org.jeecg.modules.diseaseAnalysis.entity.AnalysisLineBatch;
import org.jeecg.modules.diseaseAnalysis.entity.AnalysisLineBatchUnitDeviceCorrugationInfo;
import org.jeecg.modules.diseaseAnalysis.entity.AnalysisLineBatchUnitDeviceCurveWearInfo;
import org.jeecg.modules.diseaseAnalysis.service.IAnalysisLineBatchService;
import org.jeecg.modules.diseaseAnalysis.vo.*;
import org.springframework.web.bind.annotation.*;
......@@ -157,6 +155,7 @@ public class AnalysisLineBatchController extends JeecgController<AnalysisLineBat
List<AnalysisLineBatchUnitDeviceTurnoutInfoVO> list = this.service.getAnalysisLineBatchUnitEkInfoList(analysisBatchId, ekId, deviceId);
return Result.OK(list);
}
/**
* 线路质量分析-其他病害分析-钢轨探伤单元详情检查记录查询
*
......@@ -172,6 +171,7 @@ public class AnalysisLineBatchController extends JeecgController<AnalysisLineBat
List<AnalysisLineBatchUnitDeviceRailWearInfoVO> list = this.service.getAnalysisLineBatchUnitDeviceRailWearInfoList(analysisBatchId, ekId, deviceId);
return Result.OK(list);
}
/**
* 线路质量分析-其他病害分析-钢轨波磨单元详情检查记录查询
*
......@@ -187,6 +187,7 @@ public class AnalysisLineBatchController extends JeecgController<AnalysisLineBat
List<AnalysisLineBatchUnitDeviceCorrugationInfoVO> list = this.service.getAnalysisLineBatchUnitDeviceCorrugationInfoList(analysisBatchId, ekId, deviceId);
return Result.OK(list);
}
/**
* 线路质量分析-其他病害分析-曲线波磨单元详情检查记录查询
*
......@@ -202,6 +203,7 @@ public class AnalysisLineBatchController extends JeecgController<AnalysisLineBat
List<AnalysisLineBatchUnitDeviceCurveWearInfoVO> list = this.service.getAnalysisLineBatchUnitDeviceCurveWearInfoList(analysisBatchId, ekId, deviceId);
return Result.OK(list);
}
//***********************************分析新增编辑接口*************************************************************************************************************
@AutoLog(value = "其他病害分析-分析批次-新增分析批次")
@ApiOperation(value = "其他病害分析-分析批次-新增分析批次", notes = "其他病害分析-分析批次-新增分析批次")
......@@ -255,15 +257,23 @@ public class AnalysisLineBatchController extends JeecgController<AnalysisLineBat
@AutoLog(value = "其他病害分析-分析批次-删除")
@ApiOperation(value = "其他病害分析-分析批次-删除", notes = "其他病害分析-分析批次-删除")
@GetMapping(value = "/deleteBatchRecord")
public Result<String> deleteBatchRecord(@RequestParam(name = "ids", required = true) String ids,@RequestParam(name = "type", required = true) Integer type) {
public Result<String> deleteBatchRecord(@RequestParam(name = "ids", required = true) String ids, @RequestParam(name = "type", required = true) Integer type) {
List<String> idList = new ArrayList<>();
if (ids.contains(",")) {
idList = Arrays.asList(ids.split(","));
} else {
idList.add(ids);
}
this.service.deleteBatchRecord(idList,type);
this.service.deleteBatchRecord(idList, type);
return Result.OK("批量删除成功!");
}
@AutoLog(value = "其他病害分析-分析批次-更新分析单元标记状态")
@ApiOperation(value = "其他病害分析-分析批次-更新分析单元标记状态", notes = "其他病害分析-分析批次-更新分析单元标记状态")
@GetMapping(value = "/updateRecordMarkStatus")
public Result<String> updateRecordMarkStatus(@RequestParam("id") String id, @RequestParam("status") Integer status) {
this.service.updateRecordMarkStatus(id,status);
return Result.OK("操作成功");
}
}
......@@ -32,4 +32,7 @@ public class AnalysisLineBatchInfoDTO {
@ApiModelProperty("派工状态(1:未派工,2:已派工)")
private Integer workStatus;
@ApiModelProperty("标记状态(1:未标记,2:异常,3:正常)")
private Integer markStatus;
}
......@@ -82,6 +82,9 @@ public class AnalysisLineBatchUnitDeviceDTO {
@ApiModelProperty("派工状态(1:未派工,2:已派工)")
private Integer workStatus;
@ApiModelProperty("标记状态(1:未标记,1:异常,2:正常)")
private Integer markStatus;
@ApiModelProperty("备注")
private String remark;
......
......@@ -100,6 +100,14 @@ public class AnalysisLineBatchUnitDevice implements Serializable {
@TableField("work_status")
private Integer workStatus;
@ApiModelProperty("标记状态(1:未标记,1:异常,2:正常)")
@TableField("mark_status")
private Integer markStatus;
@ApiModelProperty("检查结果:1:正常,2:异常(线路巡查时才有值)")
@TableField("check_status")
private Integer checkStatus;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
......
......@@ -112,7 +112,10 @@
<if test="dto.workStatus != null">
AND t1.work_status = #{dto.workStatus}
</if>
ORDER BY t1.unit_center_mileage ASC
<if test="dto.markStatus != null">
AND t1.mark_status = #{dto.markStatus}
</if>
ORDER BY t1.unit_start_mileage ASC
</select>
<select id="getAnalysisLineBatchUnitEkInfoList" resultType="org.jeecg.modules.diseaseAnalysis.vo.AnalysisLineBatchUnitDeviceTurnoutInfoVO">
......
......@@ -122,4 +122,11 @@ public interface IAnalysisLineBatchService extends IService<AnalysisLineBatch> {
* @param idList
*/
void deleteBatchRecord(List<String> idList,Integer type);
/**
* 其他病害分析-分析批次-更新分析单元标记状态
* @param id
* @param status
*/
void updateRecordMarkStatus(String id,Integer status);
}
......@@ -298,4 +298,17 @@ public class AnalysisLineBatchServiceImpl extends ServiceImpl<AnalysisLineBatchM
//4.删除分析主表
this.baseMapper.deleteBatchIds(idList);
}
/**
* 其他病害分析-分析批次-更新分析单元标记状态
* @param id
* @param status
*/
@Override
@Transactional
public void updateRecordMarkStatus(String id, Integer status) {
AnalysisLineBatchUnitDevice analysisLineBatchUnitDevice = new AnalysisLineBatchUnitDevice();
analysisLineBatchUnitDevice.setId(id);
analysisLineBatchUnitDevice.setMarkStatus(status);
analysisLineBatchUnitDeviceMapper.updateById(analysisLineBatchUnitDevice);
}
}
......@@ -4,6 +4,7 @@ package org.jeecg.modules.diseaseAnalysis.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -80,6 +81,12 @@ public class AnalysisLineBatchUnitDeviceVO {
@ApiModelProperty("派工状态(1:未派工,2:已派工)")
private Integer workStatus;
@ApiModelProperty("标记状态(1:未标记,2:异常,3:正常)")
private Integer markStatus;
@ApiModelProperty("检查结果:1:正常,2:异常(线路巡查时才有值)")
private Integer checkStatus;
@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