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

人工静态分析-病历本逻辑提交--shizhilong

parent 14ccfb80
...@@ -49,8 +49,8 @@ public class CorrugationRecordController extends JeecgController<CorrugationReco ...@@ -49,8 +49,8 @@ public class CorrugationRecordController extends JeecgController<CorrugationReco
@AutoLog(value = "检查数据-设备检查记录数据-钢轨波磨设备检查记录表检查详情页面") @AutoLog(value = "检查数据-设备检查记录数据-钢轨波磨设备检查记录表检查详情页面")
@ApiOperation(value = "检查数据-设备检查记录数据-钢轨波磨设备检查记录表检查详情页面", notes = "检查数据-设备检查记录数据-钢轨波磨设备检查记录表检查详情页面") @ApiOperation(value = "检查数据-设备检查记录数据-钢轨波磨设备检查记录表检查详情页面", notes = "检查数据-设备检查记录数据-钢轨波磨设备检查记录表检查详情页面")
@GetMapping(value = "/getDetail") @GetMapping(value = "/getDetail")
public Result<List<CorrugationRecordDetailVO>> getDetail(@ApiParam("id") String id) { public Result<List<CorrugationRecordDetailVO>> getDetail(@ApiParam("id") String id,@ApiParam("code") String code) {
List<CorrugationRecordDetailVO> data = this.service.getDetail(id); List<CorrugationRecordDetailVO> data = this.service.getDetail(id,code);
return Result.OK(data); return Result.OK(data);
} }
} }
...@@ -2,6 +2,7 @@ package org.jeecg.modules.checkData.controller; ...@@ -2,6 +2,7 @@ package org.jeecg.modules.checkData.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -51,10 +52,19 @@ public class CurveWearRecordController extends JeecgController<CurveWearRecord, ...@@ -51,10 +52,19 @@ public class CurveWearRecordController extends JeecgController<CurveWearRecord,
@AutoLog(value = "检查数据设备-设备检查记录数据-曲线磨耗情况检查-获取曲线编号List") @AutoLog(value = "检查数据设备-设备检查记录数据-曲线磨耗情况检查-获取曲线编号List")
@ApiOperation(value = "检查数据设备-设备检查记录数据-曲线磨耗情况检查-获取道岔编号List", notes = "检查数据设备-设备检查记录数据-曲线磨耗情况检查-获取道岔编号List") @ApiOperation(value = "检查数据设备-设备检查记录数据-曲线磨耗情况检查-获取道岔编号List", notes = "检查数据设备-设备检查记录数据-曲线磨耗情况检查-获取道岔编号List")
@GetMapping(value = "/getCurveCodeList") @GetMapping(value = "/getCurveCodeList")
public Result<Map<String, List<CurveWearRecord>>> getCurveCodeList(@ApiParam("设备检查记录主表id") String recordsMasterCheckId) { public Result<Map<String, List<CurveWearRecord>>> getCurveCodeList(@ApiParam("recordsMasterCheckId") String recordsMasterCheckId,@ApiParam("code") String code) {
List<CurveWearRecord> records = this.service.lambdaQuery() List<CurveWearRecord> records = new ArrayList<>();
.eq(CurveWearRecord::getRecordsMasterCheckId, recordsMasterCheckId) if(StringUtils.isNotEmpty(code)){
.list(); records = this.service.lambdaQuery()
.eq(CurveWearRecord::getRecordsMasterCheckId, recordsMasterCheckId)
.eq(CurveWearRecord::getCurveCode, code)
.list();
}else {
records = this.service.lambdaQuery()
.eq(CurveWearRecord::getRecordsMasterCheckId, recordsMasterCheckId)
.list();
}
Map<String, List<CurveWearRecord>> map = records.stream().collect(Collectors.groupingBy(CurveWearRecord::getCurveCode)); Map<String, List<CurveWearRecord>> map = records.stream().collect(Collectors.groupingBy(CurveWearRecord::getCurveCode));
return Result.OK(map); return Result.OK(map);
......
...@@ -49,8 +49,8 @@ public class RailWearRecordController extends JeecgController<RailWearRecord, IR ...@@ -49,8 +49,8 @@ public class RailWearRecordController extends JeecgController<RailWearRecord, IR
@AutoLog(value = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面") @AutoLog(value = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面")
@ApiOperation(value = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面", notes = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面") @ApiOperation(value = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面", notes = "检查数据-设备检查记录数据-钢轨伤损情况检查详情页面")
@GetMapping(value = "/getDetail") @GetMapping(value = "/getDetail")
public Result<List<RailWearRecordDetailVO>> getDetail(@ApiParam("id") String id) { public Result<List<RailWearRecordDetailVO>> getDetail(@ApiParam("id") String id, @ApiParam("code") String code) {
List<RailWearRecordDetailVO> data = this.service.getDetail(id); List<RailWearRecordDetailVO> data = this.service.getDetail(id,code);
return Result.OK(data); return Result.OK(data);
} }
......
...@@ -23,5 +23,5 @@ public interface CorrugationRecordMapper extends BaseMapper<CorrugationRecord> { ...@@ -23,5 +23,5 @@ public interface CorrugationRecordMapper extends BaseMapper<CorrugationRecord> {
Page<CorrugationRecordVO> queryPageList(Page<CorrugationRecordVO> pageData, CorrugationRecordDTO dto); Page<CorrugationRecordVO> queryPageList(Page<CorrugationRecordVO> pageData, CorrugationRecordDTO dto);
List<CorrugationRecordDetailVO> getDetail(String id); List<CorrugationRecordDetailVO> getDetail(String id,String code);
} }
...@@ -21,5 +21,5 @@ public interface RailWearRecordMapper extends BaseMapper<RailWearRecord> { ...@@ -21,5 +21,5 @@ public interface RailWearRecordMapper extends BaseMapper<RailWearRecord> {
Page<RailWearRecordVO> queryPageList(Page<RailWearRecordVO> pageData, RailWearRecordDTO dto); Page<RailWearRecordVO> queryPageList(Page<RailWearRecordVO> pageData, RailWearRecordDTO dto);
List<RailWearRecordDetailVO> getDetail(String id); List<RailWearRecordDetailVO> getDetail(String id,String code);
} }
...@@ -42,5 +42,8 @@ ...@@ -42,5 +42,8 @@
FROM FROM
t_ek_corrugation_record t1 t_ek_corrugation_record t1
where t1.records_master_check_id = #{id} where t1.records_master_check_id = #{id}
<if test="code != null and code != ''">
AND t1.device_project_code = #{code}
</if>
</select> </select>
</mapper> </mapper>
...@@ -39,81 +39,149 @@ ...@@ -39,81 +39,149 @@
ORDER BY t2.ek_code ASC ORDER BY t2.ek_code ASC
</select> </select>
<select id="queryUnitDeviceCheckRel" resultType="org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO"> <select id="queryUnitDeviceCheckRel" resultType="org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO">
SELECT t1.unit_id, SELECT * from (
t1.unit_type, -- 动静态分析
t1.unit_code, SELECT
t2.id checkId, 0 as checkType,
t2.type, t1.unit_id,
t2.ek_code checkCode, t1.unit_type,
t2.track_code, t1.unit_code,
t2.work_code, t2.id checkId,
t2.subway_section_id, t2.type,
t2.subway_section_name, t2.ek_code checkCode,
t2.light_rail_id, t2.track_code,
t2.light_rail_name, t2.work_code,
t2.line_alias_id, t2.subway_section_id,
t2.line_alias_name, t2.subway_section_name,
t2.starting_mileage, t2.light_rail_id,
t2.end_mileage, t2.light_rail_name,
t2.start_level, t2.line_alias_id,
t2.end_level, t2.line_alias_name,
t2.direction, t2.starting_mileage,
t2.rail_num, t2.end_mileage,
t2.curve_num, t2.check_by,
t2.vertical_curve_num, t2.check_time,
t2.switch_num, t2.remark,
t2.check_by, t2.del_flag,
t2.check_time, t2.create_time
t2.verify_by, FROM (SELECT unit_id,
t2.verify_time, unit_type,
t2.print_time, unit_code,
t2.remark, check_id
t2.del_flag FROM (SELECT unit_id,
FROM (SELECT unit_id, unit_type,
unit_type, unit_code,
unit_code, check_id
check_id FROM t_djt_movement_check_data_unit_device_map
FROM (SELECT unit_id, GROUP BY unit_id,
unit_type, unit_type,
unit_code, check_id
check_id UNION ALL
FROM t_djt_movement_check_data_unit_device_map SELECT unit_id,
GROUP BY 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'
UNION ALL
-- 人工静态检查
SELECT
1 as checkType,
t1.unit_id,
t1.unit_type,
t1.unit_code,
t2.id checkId,
CASE
WHEN t2.type = 1 THEN '5'
WHEN t2.type = 2 THEN '6'
WHEN t2.type = 3 THEN '7'
WHEN t2.type = 4 THEN '8'
END as type,
t2.ek_code checkCode,
t2.gauge_code as trackCode,
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.check_by,
t2.check_time,
t2.remark,
t2.del_flag,
t2.create_time
FROM (SELECT unit_id,
unit_type, unit_type,
unit_code,
check_id check_id
UNION ALL FROM (SELECT b.id as unit_id,
SELECT unit_id, '4' as unit_type,
unit_type, b.switch_code as unit_code,
unit_code, a.records_master_id as check_id
movement_master_id check_id FROM t_ek_records_master_turnout_info a left join t_da_switch_management b on a.switch_code = b.switch_code
FROM t_djt_movement_additive_info_unit_device_map GROUP BY b.id,
GROUP BY unit_id, '4',
unit_type, a.records_master_id
movement_master_id UNION ALL
UNION ALL SELECT device_project_id as unit_id,
SELECT unit_id, device_project_type as unit_type,
unit_type, device_project_code as unit_code,
unit_code, records_master_check_id as check_id
check_id FROM t_ek_rail_wear_record
FROM t_djt_movement_over_report_unit_device_map GROUP BY device_project_id,
GROUP BY unit_id, device_project_type,
unit_type, records_master_check_id
check_id UNION ALL
UNION ALL SELECT curve_id as unit_id,
SELECT unit_id, project_type as unit_type,
unit_type, curve_code as unit_code,
unit_code, records_master_check_id as check_id
check_id FROM t_ek_curve_wear_record
FROM t_djt_movement_tqi_report_unit_device_map GROUP BY curve_id,
GROUP BY unit_id, project_type,
unit_type, records_master_check_id
check_id) t UNION ALL
GROUP BY unit_id, SELECT device_project_id as unit_id,
check_id) t1 device_project_type as unit_type,
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id device_project_code as unit_code,
AND t2.del_flag = '0' records_master_check_id as check_id
WHERE t1.unit_id = #{dto.unitId} FROM t_ek_corrugation_record
AND t1.unit_type = #{dto.unitType} GROUP BY device_project_id,
ORDER BY t2.create_time device_project_type,
records_master_check_id) t
GROUP BY unit_id,
check_id) t1
LEFT JOIN t_ek_records_master_check t2 ON t1.check_id = t2.id
AND t2.del_flag = '0') t3
WHERE t3.unit_id = #{dto.unitId}
AND t3.unit_type = #{dto.unitType}
ORDER BY t3.create_time
</select> </select>
</mapper> </mapper>
...@@ -42,5 +42,8 @@ ...@@ -42,5 +42,8 @@
FROM FROM
t_ek_rail_wear_record t1 t_ek_rail_wear_record t1
where t1.records_master_check_id = #{id} where t1.records_master_check_id = #{id}
<if test="code != null and code != ''">
AND t1.device_project_code = #{code}
</if>
</select> </select>
</mapper> </mapper>
...@@ -24,5 +24,5 @@ public interface ICorrugationRecordService extends IService<CorrugationRecord> { ...@@ -24,5 +24,5 @@ public interface ICorrugationRecordService extends IService<CorrugationRecord> {
Page<CorrugationRecordVO> queryPageList(Page<CorrugationRecordVO> pageData, CorrugationRecordDTO dto); Page<CorrugationRecordVO> queryPageList(Page<CorrugationRecordVO> pageData, CorrugationRecordDTO dto);
List<CorrugationRecordDetailVO> getDetail(String id); List<CorrugationRecordDetailVO> getDetail(String id,String code);
} }
...@@ -21,5 +21,5 @@ public interface IRailWearRecordService extends IService<RailWearRecord> { ...@@ -21,5 +21,5 @@ public interface IRailWearRecordService extends IService<RailWearRecord> {
Page<RailWearRecordVO> queryPageList(Page<RailWearRecordVO> pageData, RailWearRecordDTO dto); Page<RailWearRecordVO> queryPageList(Page<RailWearRecordVO> pageData, RailWearRecordDTO dto);
List<RailWearRecordDetailVO> getDetail(String id); List<RailWearRecordDetailVO> getDetail(String id,String code);
} }
...@@ -31,7 +31,7 @@ public class CorrugationRecordServiceImpl extends ServiceImpl<CorrugationRecordM ...@@ -31,7 +31,7 @@ public class CorrugationRecordServiceImpl extends ServiceImpl<CorrugationRecordM
return this.baseMapper.queryPageList(pageData, dto); return this.baseMapper.queryPageList(pageData, dto);
} }
@Override @Override
public List<CorrugationRecordDetailVO> getDetail(String id) { public List<CorrugationRecordDetailVO> getDetail(String id,String code) {
return this.baseMapper.getDetail(id); return this.baseMapper.getDetail(id,code);
} }
} }
...@@ -29,7 +29,7 @@ public class RailWearRecordServiceImpl extends ServiceImpl<RailWearRecordMapper, ...@@ -29,7 +29,7 @@ public class RailWearRecordServiceImpl extends ServiceImpl<RailWearRecordMapper,
} }
@Override @Override
public List<RailWearRecordDetailVO> getDetail(String id) { public List<RailWearRecordDetailVO> getDetail(String id,String code) {
return this.baseMapper.getDetail(id); return this.baseMapper.getDetail(id,code);
} }
} }
...@@ -145,7 +145,9 @@ ...@@ -145,7 +145,9 @@
t2.team, t2.team,
t2.source, t2.source,
t2.work_status, t2.work_status,
t2.del_flag t2.del_flag,
t2.analysis_type,
t2.work_type
FROM FROM
( SELECT work_batch_id, unit_id, unit_type,id as workBatchDetailId ,maintenance_date,reform_remark FROM t_mw_work_batch_detail WHERE unit_id = #{dto.unitId} AND unit_type = #{dto.unitType} ) t1 ( SELECT work_batch_id, unit_id, unit_type,id as workBatchDetailId ,maintenance_date,reform_remark FROM t_mw_work_batch_detail WHERE unit_id = #{dto.unitId} AND unit_type = #{dto.unitType} ) t1
LEFT JOIN t_mw_work_batch t2 ON t1.work_batch_id = t2.id AND t2.del_flag = '0' LEFT JOIN t_mw_work_batch t2 ON t1.work_batch_id = t2.id AND t2.del_flag = '0'
......
...@@ -10,6 +10,6 @@ public class CaseReportCheckDataDTO { ...@@ -10,6 +10,6 @@ public class CaseReportCheckDataDTO {
@ApiModelProperty("单元id") @ApiModelProperty("单元id")
private String unitId; private String unitId;
@ApiModelProperty("单元类型") @ApiModelProperty("单元类型:1:钢轨;2:曲线;3:竖曲线;4:道岔")
private String unitType; private String unitType;
} }
...@@ -12,6 +12,8 @@ import java.util.Date; ...@@ -12,6 +12,8 @@ import java.util.Date;
@Data @Data
@ApiModel(value = "CaseReportCheckDataVO对象", description = "单元设备-病例报告检查数据列表") @ApiModel(value = "CaseReportCheckDataVO对象", description = "单元设备-病例报告检查数据列表")
public class CaseReportCheckDataVO { public class CaseReportCheckDataVO {
@ApiModelProperty("检查大类 0:动静态检查;1:人工静态检查")
private Integer checkType;
@ApiModelProperty("单元id") @ApiModelProperty("单元id")
private String unitId; private String unitId;
...@@ -22,7 +24,8 @@ public class CaseReportCheckDataVO { ...@@ -22,7 +24,8 @@ public class CaseReportCheckDataVO {
@ApiModelProperty("单元code") @ApiModelProperty("单元code")
private String unitCode; private String unitCode;
@ApiModelProperty("动态几何尺寸类型(1:人工静态检查;2:轨检仪静态检查; 3:轨检车检查;4:添乘仪检查)") @ApiModelProperty("设备检查类型(1:人工静态检查;2:轨检仪静态检查; 3:轨检车检查;4:添乘仪检查)" +
"5:道岔使用情况;6:钢轨伤损情况;7:曲线磨损情况;8:钢轨波磨情况")
private String type; private String type;
@ApiModelProperty("检查id") @ApiModelProperty("检查id")
......
...@@ -71,4 +71,9 @@ public class CaseReportWorkBatchVO { ...@@ -71,4 +71,9 @@ public class CaseReportWorkBatchVO {
@TableField("remark") @TableField("remark")
private String remark; private String remark;
@ApiModelProperty("分析类型(0-动静态分析1-道岔检查 2-钢轨常规探伤检查 3-曲线钢轨磨耗检查 4-钢轨波磨检查 5-道床检查 6-线路检查)")
private Integer analysisType;
@ApiModelProperty("作业类型(1-单元方式 2-分析批次方式)")
private Integer workType;
} }
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